From 3d8a89c7e1179ced2d946e4fbc26dbbca8c805dc Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 26 Mar 2026 19:12:32 -0500 Subject: [PATCH 01/26] feat: add .claude-plugin marketplace and plugin metadata (#2136) --- .claude-plugin/marketplace.json | 67 +++++++++++++++++++++++++++++++++ .claude-plugin/plugin.json | 12 ++++++ 2 files changed, 79 insertions(+) create mode 100644 .claude-plugin/marketplace.json create mode 100644 .claude-plugin/plugin.json diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json new file mode 100644 index 000000000..3eebc7799 --- /dev/null +++ b/.claude-plugin/marketplace.json @@ -0,0 +1,67 @@ +{ + "name": "bmad-method", + "owner": { + "name": "Brian (BMad) Madison" + }, + "plugins": [ + { + "name": "bmad-pro-skills", + "source": "./", + "description": "Next level skills for power users — advanced prompting techniques, agent management, and more.", + "version": "6.3.0", + "skills": [ + "./src/core-skills/bmad-help", + "./src/core-skills/bmad-init", + "./src/core-skills/bmad-brainstorming", + "./src/core-skills/bmad-distillator", + "./src/core-skills/bmad-party-mode", + "./src/core-skills/bmad-shard-doc", + "./src/core-skills/bmad-advanced-elicitation", + "./src/core-skills/bmad-editorial-review-prose", + "./src/core-skills/bmad-editorial-review-structure", + "./src/core-skills/bmad-index-docs", + "./src/core-skills/bmad-review-adversarial-general", + "./src/core-skills/bmad-review-edge-case-hunter" + ] + }, + { + "name": "bmad-method-lifecycle", + "source": "./", + "description": "Full-lifecycle AI development framework — agents and workflows for product analysis, planning, architecture, and implementation.", + "version": "6.3.0", + "skills": [ + "./src/bmm-skills/1-analysis/bmad-product-brief", + "./src/bmm-skills/1-analysis/bmad-agent-analyst", + "./src/bmm-skills/1-analysis/bmad-agent-tech-writer", + "./src/bmm-skills/1-analysis/bmad-document-project", + "./src/bmm-skills/1-analysis/research/bmad-domain-research", + "./src/bmm-skills/1-analysis/research/bmad-market-research", + "./src/bmm-skills/1-analysis/research/bmad-technical-research", + "./src/bmm-skills/2-plan-workflows/bmad-agent-pm", + "./src/bmm-skills/2-plan-workflows/bmad-agent-ux-designer", + "./src/bmm-skills/2-plan-workflows/bmad-create-prd", + "./src/bmm-skills/2-plan-workflows/bmad-edit-prd", + "./src/bmm-skills/2-plan-workflows/bmad-validate-prd", + "./src/bmm-skills/2-plan-workflows/bmad-create-ux-design", + "./src/bmm-skills/3-solutioning/bmad-agent-architect", + "./src/bmm-skills/3-solutioning/bmad-create-architecture", + "./src/bmm-skills/3-solutioning/bmad-check-implementation-readiness", + "./src/bmm-skills/3-solutioning/bmad-create-epics-and-stories", + "./src/bmm-skills/3-solutioning/bmad-generate-project-context", + "./src/bmm-skills/4-implementation/bmad-agent-dev", + "./src/bmm-skills/4-implementation/bmad-agent-sm", + "./src/bmm-skills/4-implementation/bmad-agent-qa", + "./src/bmm-skills/4-implementation/bmad-agent-quick-flow-solo-dev", + "./src/bmm-skills/4-implementation/bmad-dev-story", + "./src/bmm-skills/4-implementation/bmad-quick-dev", + "./src/bmm-skills/4-implementation/bmad-sprint-planning", + "./src/bmm-skills/4-implementation/bmad-sprint-status", + "./src/bmm-skills/4-implementation/bmad-code-review", + "./src/bmm-skills/4-implementation/bmad-create-story", + "./src/bmm-skills/4-implementation/bmad-correct-course", + "./src/bmm-skills/4-implementation/bmad-retrospective", + "./src/bmm-skills/4-implementation/bmad-qa-generate-e2e-tests" + ] + } + ] +} diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 000000000..8c0adab25 --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,12 @@ +{ + "name": "bmad-method", + "version": "6.2.2", + "description": "Breakthrough Method of Agile AI-driven Development — a full-lifecycle framework with agents and workflows for analysis, planning, architecture, and implementation. The core BMad Method.", + "author": { + "name": "Brian (BMad) Madison" + }, + "license": "MIT", + "homepage": "https://github.com/bmad-code-org/BMAD-METHOD", + "repository": "https://github.com/bmad-code-org/BMAD-METHOD", + "keywords": ["bmad", "agile", "ai", "orchestrator", "development", "methodology", "agents"] +} From ed9dea9058fd836cf152ed7d1fa1d0aaaf948f8f Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 26 Mar 2026 19:48:04 -0500 Subject: [PATCH 02/26] refactor: consolidate plugin.json metadata into marketplace.json (#2137) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge license, homepage, repository, keywords, and author from plugin.json into marketplace.json and remove the redundant file. The npx skills installer only reads marketplace.json for skill discovery — plugin.json contributed no functional value. --- .claude-plugin/marketplace.json | 11 +++++++++++ .claude-plugin/plugin.json | 12 ------------ 2 files changed, 11 insertions(+), 12 deletions(-) delete mode 100644 .claude-plugin/plugin.json diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 3eebc7799..6f4f0e0c0 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -3,12 +3,20 @@ "owner": { "name": "Brian (BMad) Madison" }, + "description": "Breakthrough Method of Agile AI-driven Development — a full-lifecycle framework with agents and workflows for analysis, planning, architecture, and implementation.", + "license": "MIT", + "homepage": "https://github.com/bmad-code-org/BMAD-METHOD", + "repository": "https://github.com/bmad-code-org/BMAD-METHOD", + "keywords": ["bmad", "agile", "ai", "orchestrator", "development", "methodology", "agents"], "plugins": [ { "name": "bmad-pro-skills", "source": "./", "description": "Next level skills for power users — advanced prompting techniques, agent management, and more.", "version": "6.3.0", + "author": { + "name": "Brian (BMad) Madison" + }, "skills": [ "./src/core-skills/bmad-help", "./src/core-skills/bmad-init", @@ -29,6 +37,9 @@ "source": "./", "description": "Full-lifecycle AI development framework — agents and workflows for product analysis, planning, architecture, and implementation.", "version": "6.3.0", + "author": { + "name": "Brian (BMad) Madison" + }, "skills": [ "./src/bmm-skills/1-analysis/bmad-product-brief", "./src/bmm-skills/1-analysis/bmad-agent-analyst", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json deleted file mode 100644 index 8c0adab25..000000000 --- a/.claude-plugin/plugin.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "bmad-method", - "version": "6.2.2", - "description": "Breakthrough Method of Agile AI-driven Development — a full-lifecycle framework with agents and workflows for analysis, planning, architecture, and implementation. The core BMad Method.", - "author": { - "name": "Brian (BMad) Madison" - }, - "license": "MIT", - "homepage": "https://github.com/bmad-code-org/BMAD-METHOD", - "repository": "https://github.com/bmad-code-org/BMAD-METHOD", - "keywords": ["bmad", "agile", "ai", "orchestrator", "development", "methodology", "agents"] -} From 1040c3c30638cac7f66b08e5fc7d96240d701829 Mon Sep 17 00:00:00 2001 From: Akhilesh Tyagi Date: Fri, 27 Mar 2026 08:16:14 +0530 Subject: [PATCH 03/26] fix: correctly resolve output_folder paths outside project root (#2132) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(bmad-init): correctly resolve output_folder paths outside project root When output_folder was set to an absolute path (e.g. /Users/me/outputs), the {project-root}/{value} result template stored it as {project-root}//absolute/path. resolve_project_root_placeholder then did a naive string replace, producing /project//absolute/path — a broken path that workflows could not resolve. For relative paths outside the root (e.g. ../../sibling), the same naive replace left un-normalized paths like /project/../../sibling in the resolved config, which some tools mishandled. Fix resolve_project_root_placeholder to strip the {project-root} token, detect whether the remainder is absolute (returning it directly) or relative (joining with project root and normalizing via os.path.normpath). Fix apply_result_template to skip the template entirely when raw_value is already an absolute path, and to normalize the result for relative-but- outside paths. This covers the bmad-init SKILL write path, which bakes the resolved path directly into config.yaml. Add 7 tests covering all three path cases (absolute, relative-with- traversal, normal in-project) for both functions. * Address review comments --------- Co-authored-by: Akhilesh Tyagi Co-authored-by: Brian --- docs/how-to/non-interactive-installation.md | 15 ++++- .../bmad-init/scripts/bmad_init.py | 39 +++++++++-- .../bmad-init/scripts/tests/test_bmad_init.py | 64 +++++++++++++++++++ 3 files changed, 113 insertions(+), 5 deletions(-) diff --git a/docs/how-to/non-interactive-installation.md b/docs/how-to/non-interactive-installation.md index 62b3090d8..eb72dfef4 100644 --- a/docs/how-to/non-interactive-installation.md +++ b/docs/how-to/non-interactive-installation.md @@ -37,7 +37,19 @@ Requires [Node.js](https://nodejs.org) v20+ and `npx` (included with npm). | `--user-name ` | Name for agents to use | System username | | `--communication-language ` | Agent communication language | English | | `--document-output-language ` | Document output language | English | -| `--output-folder ` | Output folder path | _bmad-output | +| `--output-folder ` | Output folder path (see resolution rules below) | `_bmad-output` | + +#### Output Folder Path Resolution + +The value passed to `--output-folder` (or entered interactively) is resolved according to these rules: + +| Input type | Example | Resolved as | +|------------|---------|-------------| +| Relative path (default) | `_bmad-output` | `/_bmad-output` | +| Relative path with traversal | `../../shared-outputs` | Normalized absolute path — e.g. `/Users/me/shared-outputs` | +| Absolute path | `/Users/me/shared-outputs` | Used as-is — project root is **not** prepended | + +The resolved path is what agents and workflows use at runtime when writing output files. Using an absolute path or a traversal-based relative path lets you direct all generated artifacts to a directory outside your project tree — useful for shared or monorepo setups. ### Other Options @@ -141,6 +153,7 @@ Invalid values will either: :::tip[Best Practices] - Use absolute paths for `--directory` to avoid ambiguity +- Use an absolute path for `--output-folder` when you want artifacts written outside the project tree (e.g. a shared monorepo outputs directory) - Test flags locally before using in CI/CD pipelines - Combine with `-y` for truly unattended installations - Use `--debug` if you encounter issues during installation diff --git a/src/core-skills/bmad-init/scripts/bmad_init.py b/src/core-skills/bmad-init/scripts/bmad_init.py index 0c80eaab8..7a561bd2b 100644 --- a/src/core-skills/bmad-init/scripts/bmad_init.py +++ b/src/core-skills/bmad-init/scripts/bmad_init.py @@ -166,9 +166,27 @@ def resolve_project_root_placeholder(value, project_root): """Replace {project-root} placeholder with actual path.""" if not value or not isinstance(value, str): return value - if '{project-root}' in value: - return value.replace('{project-root}', str(project_root)) - return value + if '{project-root}' not in value: + return value + + # Strip the {project-root} token to inspect what remains, so we can + # correctly handle absolute paths stored as "{project-root}//absolute/path" + # (produced by the "{project-root}/{value}" template applied to an absolute value). + suffix = value.replace('{project-root}', '', 1) + + # Strip the one path separator that follows the token (if any) + if suffix.startswith('/') or suffix.startswith('\\'): + remainder = suffix[1:] + else: + remainder = suffix + + if os.path.isabs(remainder): + # The original value was an absolute path stored with a {project-root}/ prefix. + # Return the absolute path directly — no joining needed. + return remainder + + # Relative path: join with project root and normalize to resolve any .. segments. + return os.path.normpath(os.path.join(str(project_root), remainder)) def parse_var_specs(vars_string): @@ -222,9 +240,22 @@ def apply_result_template(var_def, raw_value, context): if not result_template: return raw_value + # If the user supplied an absolute path and the template would prefix it with + # "{project-root}/", skip the template entirely to avoid producing a broken path + # like "/my/project//absolute/path". + if isinstance(raw_value, str) and os.path.isabs(raw_value): + return raw_value + ctx = dict(context) ctx['value'] = raw_value - return expand_template(result_template, ctx) + result = expand_template(result_template, ctx) + + # Normalize the resulting path to resolve any ".." segments (e.g. when the user + # entered a relative path such as "../../outside-dir"). + if isinstance(result, str) and '{' not in result and os.path.isabs(result): + result = os.path.normpath(result) + + return result # ============================================================================= diff --git a/src/core-skills/bmad-init/scripts/tests/test_bmad_init.py b/src/core-skills/bmad-init/scripts/tests/test_bmad_init.py index 32e07effe..45d1abc66 100644 --- a/src/core-skills/bmad-init/scripts/tests/test_bmad_init.py +++ b/src/core-skills/bmad-init/scripts/tests/test_bmad_init.py @@ -110,6 +110,37 @@ class TestResolveProjectRootPlaceholder(unittest.TestCase): def test_non_string(self): self.assertEqual(resolve_project_root_placeholder(42, Path('/test')), 42) + def test_absolute_path_stored_with_prefix(self): + """Absolute output_folder entered by user is stored as '{project-root}//abs/path' + by the '{project-root}/{value}' template. It must resolve to '/abs/path', not + '/project//abs/path'.""" + result = resolve_project_root_placeholder( + '{project-root}//Users/me/outside', Path('/Users/me/myproject') + ) + self.assertEqual(result, '/Users/me/outside') + + def test_relative_path_with_traversal_is_normalized(self): + """A relative path like '../../sibling' produces '{project-root}/../../sibling' + after the template. It must resolve to the normalized absolute path, not the + un-normalized string '/project/../../sibling'.""" + result = resolve_project_root_placeholder( + '{project-root}/../../sibling', Path('/Users/me/myproject') + ) + self.assertEqual(result, '/Users/sibling') + + def test_relative_path_one_level_up(self): + result = resolve_project_root_placeholder( + '{project-root}/../outside-outputs', Path('/project/root') + ) + self.assertEqual(result, '/project/outside-outputs') + + def test_standard_relative_path_unchanged(self): + """Normal in-project relative paths continue to work correctly.""" + result = resolve_project_root_placeholder( + '{project-root}/_bmad-output', Path('/project/root') + ) + self.assertEqual(result, '/project/root/_bmad-output') + class TestExpandTemplate(unittest.TestCase): @@ -147,6 +178,39 @@ class TestApplyResultTemplate(unittest.TestCase): result = apply_result_template(var_def, 'English', {}) self.assertEqual(result, 'English') + def test_absolute_value_skips_project_root_template(self): + """When the user enters an absolute path, the '{project-root}/{value}' template + must not be applied — doing so would produce '/project//absolute/path'.""" + var_def = {'result': '{project-root}/{value}'} + result = apply_result_template( + var_def, '/Users/me/shared-outputs', {'project-root': '/Users/me/myproject'} + ) + self.assertEqual(result, '/Users/me/shared-outputs') + + def test_relative_traversal_value_is_normalized(self): + """A relative path like '../../outside' combined with the project-root template + must produce a clean normalized absolute path, not '/project/../../outside'.""" + var_def = {'result': '{project-root}/{value}'} + result = apply_result_template( + var_def, '../../outside-dir', {'project-root': '/Users/me/myproject'} + ) + self.assertEqual(result, '/Users/outside-dir') + + def test_relative_one_level_up_is_normalized(self): + var_def = {'result': '{project-root}/{value}'} + result = apply_result_template( + var_def, '../sibling-outputs', {'project-root': '/project/root'} + ) + self.assertEqual(result, '/project/sibling-outputs') + + def test_normal_relative_value_unchanged(self): + """Standard in-project relative paths still produce the expected joined path.""" + var_def = {'result': '{project-root}/{value}'} + result = apply_result_template( + var_def, '_bmad-output', {'project-root': '/project/root'} + ) + self.assertEqual(result, '/project/root/_bmad-output') + class TestLoadModuleYaml(unittest.TestCase): From 513f440a23c91591fe79335359d362eacad3da26 Mon Sep 17 00:00:00 2001 From: Alex Verkhovsky Date: Fri, 27 Mar 2026 06:50:07 -0600 Subject: [PATCH 04/26] refactor(installer): restructure installer with clean separation of concerns (#2129) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor(installer): restructure installer with clean separation of concerns Move tools/cli/ to tools/installer/ with major structural cleanup: - InstallPaths async factory for path resolution and directory creation - Config value object (frozen) replaces mutable config bag - ExistingInstall value object replaces stateful Detector class - OfficialModules + CustomModules + ExternalModuleManager replace monolithic ModuleManager - install() is prompt-free; all user interaction in ui.js - Update state returned explicitly instead of mutating customConfig - Delete dead code: dependency-resolver, _base-ide, IdeConfigManager, platform-codes helpers, npx wrapper, xml-utils - Flatten directory structure: custom/handler → custom-handler, tools/cli/ → tools/installer/, lib/ directories removed - Update all path references in package.json, tests, CI, and docs * fix(installer): guard ExistingInstall.version and surface module.yaml errors Guard ExistingInstall.version access with .installed check in uninstall.js, ui.js, and installer.js to prevent throwing on empty/partial _bmad dirs. Surface invalid module.yaml parse errors as warnings instead of silently returning empty results. --- .github/workflows/publish.yaml | 2 +- .../fr/how-to/non-interactive-installation.md | 2 +- docs/how-to/non-interactive-installation.md | 2 +- .../how-to/non-interactive-installation.md | 2 +- package.json | 14 +- .../resources/distillate-format-reference.md | 2 +- test/test-install-to-bmad.js | 2 +- test/test-installation-components.js | 218 +- test/test-workflow-path-regex.js | 2 +- tools/bmad-npx-wrapper.js | 38 - .../lib/core/dependency-resolver.js | 743 ---- tools/cli/installers/lib/core/detector.js | 223 -- .../installers/lib/core/ide-config-manager.js | 157 - tools/cli/installers/lib/core/installer.js | 3002 ----------------- tools/cli/installers/lib/ide/_base-ide.js | 657 ---- .../cli/installers/lib/ide/platform-codes.js | 100 - .../installers/lib/ide/platform-codes.yaml | 341 -- .../combined/claude-workflow-yaml.md | 1 - .../lib/modules/external-manager.js | 136 - tools/cli/installers/lib/modules/manager.js | 928 ----- tools/cli/lib/config.js | 213 -- tools/cli/lib/platform-codes.js | 116 - tools/docs/_prompt-external-modules-page.md | 2 +- tools/{cli => installer}/README.md | 0 tools/{cli => installer}/bmad-cli.js | 4 +- tools/{cli/lib => installer}/cli-utils.js | 7 +- tools/{cli => installer}/commands/install.js | 6 +- tools/{cli => installer}/commands/status.js | 8 +- .../{cli => installer}/commands/uninstall.js | 10 +- tools/installer/core/config.js | 52 + .../core/custom-module-cache.js | 2 +- tools/installer/core/existing-install.js | 127 + tools/installer/core/install-paths.js | 129 + tools/installer/core/installer.js | 1790 ++++++++++ .../core/manifest-generator.js | 6 +- .../lib => installer}/core/manifest.js | 4 +- .../custom-handler.js} | 2 +- .../external-official-modules.yaml | 0 tools/{cli/lib => installer}/file-ops.js | 0 .../lib => installer}/ide/_config-driven.js | 427 +-- .../lib => installer}/ide/manager.js | 54 +- tools/installer/ide/platform-codes.js | 37 + tools/installer/ide/platform-codes.yaml | 190 ++ .../ide/shared/agent-command-generator.js | 0 .../ide/shared/bmad-artifacts.js | 0 .../ide/shared/module-injections.js | 2 +- .../ide/shared/path-utils.js | 0 .../ide/shared/skill-manifest.js | 0 .../ide/templates/agent-command-template.md | 0 .../ide/templates/combined/antigravity.md | 0 .../ide/templates/combined/claude-agent.md | 0 .../ide/templates/combined/claude-workflow.md | 0 .../ide/templates/combined/default-agent.md | 0 .../ide/templates/combined/default-task.md | 0 .../ide/templates/combined/default-tool.md | 0 .../templates/combined/default-workflow.md | 0 .../ide/templates/combined/gemini-agent.toml | 0 .../ide/templates/combined/gemini-task.toml | 0 .../ide/templates/combined/gemini-tool.toml | 0 .../combined/gemini-workflow-yaml.toml | 0 .../templates/combined/gemini-workflow.toml | 0 .../ide/templates/combined/kiro-agent.md | 0 .../ide/templates/combined/kiro-task.md | 0 .../ide/templates/combined/kiro-tool.md | 0 .../ide/templates/combined/kiro-workflow.md | 0 .../ide/templates/combined/opencode-agent.md | 0 .../ide/templates/combined/opencode-task.md | 0 .../ide/templates/combined/opencode-tool.md | 0 .../combined/opencode-workflow-yaml.md | 0 .../templates/combined/opencode-workflow.md | 0 .../ide/templates/combined/rovodev.md | 0 .../ide/templates/combined/trae.md | 0 .../templates/combined/windsurf-workflow.md | 0 .../ide/templates/split/.gitkeep | 0 .../install-messages.yaml | 0 .../lib => installer}/message-loader.js | 4 +- tools/installer/modules/custom-modules.js | 197 ++ tools/installer/modules/external-manager.js | 323 ++ .../modules/official-modules.js} | 757 ++++- tools/{cli/lib => installer}/project-root.js | 0 tools/{cli/lib => installer}/prompts.js | 0 tools/{cli/lib => installer}/ui.js | 364 +- tools/{cli/lib => installer}/yaml-format.js | 0 tools/javascript-conventions.md | 5 + tools/lib/xml-utils.js | 13 - 85 files changed, 3706 insertions(+), 7717 deletions(-) delete mode 100755 tools/bmad-npx-wrapper.js delete mode 100644 tools/cli/installers/lib/core/dependency-resolver.js delete mode 100644 tools/cli/installers/lib/core/detector.js delete mode 100644 tools/cli/installers/lib/core/ide-config-manager.js delete mode 100644 tools/cli/installers/lib/core/installer.js delete mode 100644 tools/cli/installers/lib/ide/_base-ide.js delete mode 100644 tools/cli/installers/lib/ide/platform-codes.js delete mode 100644 tools/cli/installers/lib/ide/platform-codes.yaml delete mode 120000 tools/cli/installers/lib/ide/templates/combined/claude-workflow-yaml.md delete mode 100644 tools/cli/installers/lib/modules/external-manager.js delete mode 100644 tools/cli/installers/lib/modules/manager.js delete mode 100644 tools/cli/lib/config.js delete mode 100644 tools/cli/lib/platform-codes.js rename tools/{cli => installer}/README.md (100%) rename tools/{cli => installer}/bmad-cli.js (98%) rename tools/{cli/lib => installer}/cli-utils.js (96%) rename tools/{cli => installer}/commands/install.js (95%) rename tools/{cli => installer}/commands/status.js (89%) rename tools/{cli => installer}/commands/uninstall.js (94%) create mode 100644 tools/installer/core/config.js rename tools/{cli/installers/lib => installer}/core/custom-module-cache.js (99%) create mode 100644 tools/installer/core/existing-install.js create mode 100644 tools/installer/core/install-paths.js create mode 100644 tools/installer/core/installer.js rename tools/{cli/installers/lib => installer}/core/manifest-generator.js (99%) rename tools/{cli/installers/lib => installer}/core/manifest.js (99%) rename tools/{cli/installers/lib/custom/handler.js => installer/custom-handler.js} (98%) rename tools/{cli => installer}/external-official-modules.yaml (100%) rename tools/{cli/lib => installer}/file-ops.js (100%) rename tools/{cli/installers/lib => installer}/ide/_config-driven.js (54%) rename tools/{cli/installers/lib => installer}/ide/manager.js (82%) create mode 100644 tools/installer/ide/platform-codes.js create mode 100644 tools/installer/ide/platform-codes.yaml rename tools/{cli/installers/lib => installer}/ide/shared/agent-command-generator.js (100%) rename tools/{cli/installers/lib => installer}/ide/shared/bmad-artifacts.js (100%) rename tools/{cli/installers/lib => installer}/ide/shared/module-injections.js (98%) rename tools/{cli/installers/lib => installer}/ide/shared/path-utils.js (100%) rename tools/{cli/installers/lib => installer}/ide/shared/skill-manifest.js (100%) rename tools/{cli/installers/lib => installer}/ide/templates/agent-command-template.md (100%) rename tools/{cli/installers/lib => installer}/ide/templates/combined/antigravity.md (100%) rename tools/{cli/installers/lib => installer}/ide/templates/combined/claude-agent.md (100%) rename tools/{cli/installers/lib => installer}/ide/templates/combined/claude-workflow.md (100%) rename tools/{cli/installers/lib => installer}/ide/templates/combined/default-agent.md (100%) rename tools/{cli/installers/lib => installer}/ide/templates/combined/default-task.md (100%) rename tools/{cli/installers/lib => installer}/ide/templates/combined/default-tool.md (100%) rename tools/{cli/installers/lib => installer}/ide/templates/combined/default-workflow.md (100%) rename tools/{cli/installers/lib => installer}/ide/templates/combined/gemini-agent.toml (100%) rename tools/{cli/installers/lib => installer}/ide/templates/combined/gemini-task.toml (100%) rename tools/{cli/installers/lib => installer}/ide/templates/combined/gemini-tool.toml (100%) rename tools/{cli/installers/lib => installer}/ide/templates/combined/gemini-workflow-yaml.toml (100%) rename tools/{cli/installers/lib => installer}/ide/templates/combined/gemini-workflow.toml (100%) rename tools/{cli/installers/lib => installer}/ide/templates/combined/kiro-agent.md (100%) rename tools/{cli/installers/lib => installer}/ide/templates/combined/kiro-task.md (100%) rename tools/{cli/installers/lib => installer}/ide/templates/combined/kiro-tool.md (100%) rename tools/{cli/installers/lib => installer}/ide/templates/combined/kiro-workflow.md (100%) rename tools/{cli/installers/lib => installer}/ide/templates/combined/opencode-agent.md (100%) rename tools/{cli/installers/lib => installer}/ide/templates/combined/opencode-task.md (100%) rename tools/{cli/installers/lib => installer}/ide/templates/combined/opencode-tool.md (100%) rename tools/{cli/installers/lib => installer}/ide/templates/combined/opencode-workflow-yaml.md (100%) rename tools/{cli/installers/lib => installer}/ide/templates/combined/opencode-workflow.md (100%) rename tools/{cli/installers/lib => installer}/ide/templates/combined/rovodev.md (100%) rename tools/{cli/installers/lib => installer}/ide/templates/combined/trae.md (100%) rename tools/{cli/installers/lib => installer}/ide/templates/combined/windsurf-workflow.md (100%) rename tools/{cli/installers/lib => installer}/ide/templates/split/.gitkeep (100%) rename tools/{cli/installers => installer}/install-messages.yaml (100%) rename tools/{cli/installers/lib => installer}/message-loader.js (93%) create mode 100644 tools/installer/modules/custom-modules.js create mode 100644 tools/installer/modules/external-manager.js rename tools/{cli/installers/lib/core/config-collector.js => installer/modules/official-modules.js} (64%) rename tools/{cli/lib => installer}/project-root.js (100%) rename tools/{cli/lib => installer}/prompts.js (100%) rename tools/{cli/lib => installer}/ui.js (81%) rename tools/{cli/lib => installer}/yaml-format.js (100%) create mode 100644 tools/javascript-conventions.md delete mode 100644 tools/lib/xml-utils.js diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 63c797803..0079a5e81 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -5,7 +5,7 @@ on: branches: [main] paths: - "src/**" - - "tools/cli/**" + - "tools/installer/**" - "package.json" workflow_dispatch: inputs: diff --git a/docs/fr/how-to/non-interactive-installation.md b/docs/fr/how-to/non-interactive-installation.md index 46e8ad4dc..0fe6588f9 100644 --- a/docs/fr/how-to/non-interactive-installation.md +++ b/docs/fr/how-to/non-interactive-installation.md @@ -61,7 +61,7 @@ IDs d'outils disponibles pour l’option `--tools` : **Recommandés :** `claude-code`, `cursor` -Exécutez `npx bmad-method install` de manière interactive une fois pour voir la liste complète actuelle des outils pris en charge, ou consultez la [configuration des codes de la plateforme](https://github.com/bmad-code-org/BMAD-METHOD/blob/main/tools/cli/installers/lib/ide/platform-codes.yaml). +Exécutez `npx bmad-method install` de manière interactive une fois pour voir la liste complète actuelle des outils pris en charge, ou consultez la [configuration des codes de la plateforme](https://github.com/bmad-code-org/BMAD-METHOD/blob/main/tools/installer/ide/platform-codes.yaml). ## Modes d'installation diff --git a/docs/how-to/non-interactive-installation.md b/docs/how-to/non-interactive-installation.md index eb72dfef4..64687c0a1 100644 --- a/docs/how-to/non-interactive-installation.md +++ b/docs/how-to/non-interactive-installation.md @@ -73,7 +73,7 @@ Available tool IDs for the `--tools` flag: **Preferred:** `claude-code`, `cursor` -Run `npx bmad-method install` interactively once to see the full current list of supported tools, or check the [platform codes configuration](https://github.com/bmad-code-org/BMAD-METHOD/blob/main/tools/cli/installers/lib/ide/platform-codes.yaml). +Run `npx bmad-method install` interactively once to see the full current list of supported tools, or check the [platform codes configuration](https://github.com/bmad-code-org/BMAD-METHOD/blob/main/tools/installer/ide/platform-codes.yaml). ## Installation Modes diff --git a/docs/zh-cn/how-to/non-interactive-installation.md b/docs/zh-cn/how-to/non-interactive-installation.md index fdcfbc9fd..df7259d97 100644 --- a/docs/zh-cn/how-to/non-interactive-installation.md +++ b/docs/zh-cn/how-to/non-interactive-installation.md @@ -61,7 +61,7 @@ sidebar: **推荐:** `claude-code`、`cursor` -运行一次 `npx bmad-method install` 交互式安装以查看完整的当前支持工具列表,或查看 [平台代码配置](https://github.com/bmad-code-org/BMAD-METHOD/blob/main/tools/cli/installers/lib/ide/platform-codes.yaml)。 +运行一次 `npx bmad-method install` 交互式安装以查看完整的当前支持工具列表,或查看 [平台代码配置](https://github.com/bmad-code-org/BMAD-METHOD/blob/main/tools/installer/ide/platform-codes.yaml)。 ## 安装模式 diff --git a/package.json b/package.json index 13825fe87..38f4d913e 100644 --- a/package.json +++ b/package.json @@ -18,14 +18,14 @@ }, "license": "MIT", "author": "Brian (BMad) Madison", - "main": "tools/cli/bmad-cli.js", + "main": "tools/installer/bmad-cli.js", "bin": { - "bmad": "tools/bmad-npx-wrapper.js", - "bmad-method": "tools/bmad-npx-wrapper.js" + "bmad": "tools/installer/bmad-cli.js", + "bmad-method": "tools/installer/bmad-cli.js" }, "scripts": { - "bmad:install": "node tools/cli/bmad-cli.js install", - "bmad:uninstall": "node tools/cli/bmad-cli.js uninstall", + "bmad:install": "node tools/installer/bmad-cli.js install", + "bmad:uninstall": "node tools/installer/bmad-cli.js uninstall", "docs:build": "node tools/build-docs.mjs", "docs:dev": "astro dev --root website", "docs:fix-links": "node tools/fix-doc-links.js", @@ -34,13 +34,13 @@ "format:check": "prettier --check \"**/*.{js,cjs,mjs,json,yaml}\"", "format:fix": "prettier --write \"**/*.{js,cjs,mjs,json,yaml}\"", "format:fix:staged": "prettier --write", - "install:bmad": "node tools/cli/bmad-cli.js install", + "install:bmad": "node tools/installer/bmad-cli.js install", "lint": "eslint . --ext .js,.cjs,.mjs,.yaml --max-warnings=0", "lint:fix": "eslint . --ext .js,.cjs,.mjs,.yaml --fix", "lint:md": "markdownlint-cli2 \"**/*.md\"", "prepare": "command -v husky >/dev/null 2>&1 && husky || exit 0", "quality": "npm run format:check && npm run lint && npm run lint:md && npm run docs:build && npm run test:install && npm run validate:refs && npm run validate:skills", - "rebundle": "node tools/cli/bundlers/bundle-web.js rebundle", + "rebundle": "node tools/installer/bundlers/bundle-web.js rebundle", "test": "npm run test:refs && npm run test:install && npm run lint && npm run lint:md && npm run format:check", "test:install": "node test/test-installation-components.js", "test:refs": "node test/test-file-refs-csv.js", diff --git a/src/core-skills/bmad-distillator/resources/distillate-format-reference.md b/src/core-skills/bmad-distillator/resources/distillate-format-reference.md index 11ffac526..3c21d3598 100644 --- a/src/core-skills/bmad-distillator/resources/distillate-format-reference.md +++ b/src/core-skills/bmad-distillator/resources/distillate-format-reference.md @@ -172,7 +172,7 @@ parts: 1 - Deferred: CI/CD integration, telemetry for module authors, air-gapped enterprise install, zip bundle integrity verification (checksums/signing), deeper non-technical platform integrations ## Current Installer (migration context) -- Entry: `tools/cli/bmad-cli.js` (Commander.js) → `tools/cli/installers/lib/core/installer.js` +- Entry: `tools/installer/bmad-cli.js` (Commander.js) → `tools/installer/core/installer.js` - Platforms: `platform-codes.yaml` (~20 platforms with target dirs, legacy dirs, template types, special flags) - Manifests: CSV files (skill/workflow/agent-manifest.csv) are current source of truth, not JSON - External modules: `external-official-modules.yaml` (CIS, GDS, TEA, WDS) from npm with semver diff --git a/test/test-install-to-bmad.js b/test/test-install-to-bmad.js index 0367dbe93..d33218eb8 100644 --- a/test/test-install-to-bmad.js +++ b/test/test-install-to-bmad.js @@ -15,7 +15,7 @@ const path = require('node:path'); const os = require('node:os'); const fs = require('fs-extra'); -const { loadSkillManifest, getInstallToBmad } = require('../tools/cli/installers/lib/ide/shared/skill-manifest'); +const { loadSkillManifest, getInstallToBmad } = require('../tools/installer/ide/shared/skill-manifest'); // ANSI colors const colors = { diff --git a/test/test-installation-components.js b/test/test-installation-components.js index 8b6f505de..38da1eba4 100644 --- a/test/test-installation-components.js +++ b/test/test-installation-components.js @@ -14,10 +14,9 @@ const path = require('node:path'); const os = require('node:os'); const fs = require('fs-extra'); -const { ConfigCollector } = require('../tools/cli/installers/lib/core/config-collector'); -const { ManifestGenerator } = require('../tools/cli/installers/lib/core/manifest-generator'); -const { IdeManager } = require('../tools/cli/installers/lib/ide/manager'); -const { clearCache, loadPlatformCodes } = require('../tools/cli/installers/lib/ide/platform-codes'); +const { ManifestGenerator } = require('../tools/installer/core/manifest-generator'); +const { IdeManager } = require('../tools/installer/ide/manager'); +const { clearCache, loadPlatformCodes } = require('../tools/installer/ide/platform-codes'); // ANSI colors const colors = { @@ -149,8 +148,6 @@ async function runTests() { assert(windsurfInstaller?.target_dir === '.windsurf/skills', 'Windsurf target_dir uses native skills path'); - assert(windsurfInstaller?.skill_format === true, 'Windsurf installer enables native skill output'); - assert( Array.isArray(windsurfInstaller?.legacy_targets) && windsurfInstaller.legacy_targets.includes('.windsurf/workflows'), 'Windsurf installer cleans legacy workflow output', @@ -197,8 +194,6 @@ async function runTests() { assert(kiroInstaller?.target_dir === '.kiro/skills', 'Kiro target_dir uses native skills path'); - assert(kiroInstaller?.skill_format === true, 'Kiro installer enables native skill output'); - assert( Array.isArray(kiroInstaller?.legacy_targets) && kiroInstaller.legacy_targets.includes('.kiro/steering'), 'Kiro installer cleans legacy steering output', @@ -245,8 +240,6 @@ async function runTests() { assert(antigravityInstaller?.target_dir === '.agent/skills', 'Antigravity target_dir uses native skills path'); - assert(antigravityInstaller?.skill_format === true, 'Antigravity installer enables native skill output'); - assert( Array.isArray(antigravityInstaller?.legacy_targets) && antigravityInstaller.legacy_targets.includes('.agent/workflows'), 'Antigravity installer cleans legacy workflow output', @@ -293,8 +286,6 @@ async function runTests() { assert(auggieInstaller?.target_dir === '.augment/skills', 'Auggie target_dir uses native skills path'); - assert(auggieInstaller?.skill_format === true, 'Auggie installer enables native skill output'); - assert( Array.isArray(auggieInstaller?.legacy_targets) && auggieInstaller.legacy_targets.includes('.augment/commands'), 'Auggie installer cleans legacy command output', @@ -346,8 +337,6 @@ async function runTests() { assert(opencodeInstaller?.target_dir === '.opencode/skills', 'OpenCode target_dir uses native skills path'); - assert(opencodeInstaller?.skill_format === true, 'OpenCode installer enables native skill output'); - assert(opencodeInstaller?.ancestor_conflict_check === true, 'OpenCode installer enables ancestor conflict checks'); assert( @@ -412,8 +401,6 @@ async function runTests() { assert(claudeInstaller?.target_dir === '.claude/skills', 'Claude Code target_dir uses native skills path'); - assert(claudeInstaller?.skill_format === true, 'Claude Code installer enables native skill output'); - assert(claudeInstaller?.ancestor_conflict_check === true, 'Claude Code installer enables ancestor conflict checks'); assert( @@ -505,8 +492,6 @@ async function runTests() { assert(codexInstaller?.target_dir === '.agents/skills', 'Codex target_dir uses native skills path'); - assert(codexInstaller?.skill_format === true, 'Codex installer enables native skill output'); - assert(codexInstaller?.ancestor_conflict_check === true, 'Codex installer enables ancestor conflict checks'); assert( @@ -595,8 +580,6 @@ async function runTests() { assert(cursorInstaller?.target_dir === '.cursor/skills', 'Cursor target_dir uses native skills path'); - assert(cursorInstaller?.skill_format === true, 'Cursor installer enables native skill output'); - assert( Array.isArray(cursorInstaller?.legacy_targets) && cursorInstaller.legacy_targets.includes('.cursor/commands'), 'Cursor installer cleans legacy command output', @@ -649,8 +632,6 @@ async function runTests() { assert(rooInstaller?.target_dir === '.roo/skills', 'Roo target_dir uses native skills path'); - assert(rooInstaller?.skill_format === true, 'Roo installer enables native skill output'); - assert( Array.isArray(rooInstaller?.legacy_targets) && rooInstaller.legacy_targets.includes('.roo/commands'), 'Roo installer cleans legacy command output', @@ -757,8 +738,6 @@ async function runTests() { assert(copilotInstaller?.target_dir === '.github/skills', 'GitHub Copilot target_dir uses native skills path'); - assert(copilotInstaller?.skill_format === true, 'GitHub Copilot installer enables native skill output'); - assert( Array.isArray(copilotInstaller?.legacy_targets) && copilotInstaller.legacy_targets.includes('.github/agents'), 'GitHub Copilot installer cleans legacy agents output', @@ -839,8 +818,6 @@ async function runTests() { assert(clineInstaller?.target_dir === '.cline/skills', 'Cline target_dir uses native skills path'); - assert(clineInstaller?.skill_format === true, 'Cline installer enables native skill output'); - assert( Array.isArray(clineInstaller?.legacy_targets) && clineInstaller.legacy_targets.includes('.clinerules/workflows'), 'Cline installer cleans legacy workflow output', @@ -901,8 +878,6 @@ async function runTests() { assert(codebuddyInstaller?.target_dir === '.codebuddy/skills', 'CodeBuddy target_dir uses native skills path'); - assert(codebuddyInstaller?.skill_format === true, 'CodeBuddy installer enables native skill output'); - assert( Array.isArray(codebuddyInstaller?.legacy_targets) && codebuddyInstaller.legacy_targets.includes('.codebuddy/commands'), 'CodeBuddy installer cleans legacy command output', @@ -961,8 +936,6 @@ async function runTests() { assert(crushInstaller?.target_dir === '.crush/skills', 'Crush target_dir uses native skills path'); - assert(crushInstaller?.skill_format === true, 'Crush installer enables native skill output'); - assert( Array.isArray(crushInstaller?.legacy_targets) && crushInstaller.legacy_targets.includes('.crush/commands'), 'Crush installer cleans legacy command output', @@ -1021,8 +994,6 @@ async function runTests() { assert(traeInstaller?.target_dir === '.trae/skills', 'Trae target_dir uses native skills path'); - assert(traeInstaller?.skill_format === true, 'Trae installer enables native skill output'); - assert( Array.isArray(traeInstaller?.legacy_targets) && traeInstaller.legacy_targets.includes('.trae/rules'), 'Trae installer cleans legacy rules output', @@ -1138,8 +1109,6 @@ async function runTests() { assert(geminiInstaller?.target_dir === '.gemini/skills', 'Gemini target_dir uses native skills path'); - assert(geminiInstaller?.skill_format === true, 'Gemini installer enables native skill output'); - assert( Array.isArray(geminiInstaller?.legacy_targets) && geminiInstaller.legacy_targets.includes('.gemini/commands'), 'Gemini installer cleans legacy commands output', @@ -1196,7 +1165,6 @@ async function runTests() { const iflowInstaller = platformCodes24.platforms.iflow?.installer; assert(iflowInstaller?.target_dir === '.iflow/skills', 'iFlow target_dir uses native skills path'); - assert(iflowInstaller?.skill_format === true, 'iFlow installer enables native skill output'); assert( Array.isArray(iflowInstaller?.legacy_targets) && iflowInstaller.legacy_targets.includes('.iflow/commands'), 'iFlow installer cleans legacy commands output', @@ -1246,7 +1214,6 @@ async function runTests() { const qwenInstaller = platformCodes25.platforms.qwen?.installer; assert(qwenInstaller?.target_dir === '.qwen/skills', 'QwenCoder target_dir uses native skills path'); - assert(qwenInstaller?.skill_format === true, 'QwenCoder installer enables native skill output'); assert( Array.isArray(qwenInstaller?.legacy_targets) && qwenInstaller.legacy_targets.includes('.qwen/commands'), 'QwenCoder installer cleans legacy commands output', @@ -1296,7 +1263,6 @@ async function runTests() { const rovoInstaller = platformCodes26.platforms['rovo-dev']?.installer; assert(rovoInstaller?.target_dir === '.rovodev/skills', 'Rovo Dev target_dir uses native skills path'); - assert(rovoInstaller?.skill_format === true, 'Rovo Dev installer enables native skill output'); assert( Array.isArray(rovoInstaller?.legacy_targets) && rovoInstaller.legacy_targets.includes('.rovodev/workflows'), 'Rovo Dev installer cleans legacy workflows output', @@ -1432,8 +1398,6 @@ async function runTests() { const piInstaller = platformCodes28.platforms.pi?.installer; assert(piInstaller?.target_dir === '.pi/skills', 'Pi target_dir uses native skills path'); - assert(piInstaller?.skill_format === true, 'Pi installer enables native skill output'); - assert(piInstaller?.template_type === 'default', 'Pi installer uses default skill template'); tempProjectDir28 = await fs.mkdtemp(path.join(os.tmpdir(), 'bmad-pi-test-')); installedBmadDir28 = await createTestBmadFixture(); @@ -1648,93 +1612,6 @@ async function runTests() { // skill-manifest.csv should include the native agent entrypoint const skillManifestCsv29 = await fs.readFile(path.join(tempFixture29, '_config', 'skill-manifest.csv'), 'utf8'); assert(skillManifestCsv29.includes('bmad-tea'), 'skill-manifest.csv includes native type:agent SKILL.md entrypoint'); - - // --- Agents at non-agents/ paths (regression test for BMM/CIS layouts) --- - // Create a second fixture with agents at paths like bmm/1-analysis/bmad-agent-analyst/ - const tempFixture29b = await fs.mkdtemp(path.join(os.tmpdir(), 'bmad-agent-paths-')); - await fs.ensureDir(path.join(tempFixture29b, '_config')); - - // Agent at bmm-style path: bmm/1-analysis/bmad-agent-analyst/ - const bmmAgentDir = path.join(tempFixture29b, 'bmm', '1-analysis', 'bmad-agent-analyst'); - await fs.ensureDir(bmmAgentDir); - await fs.writeFile( - path.join(bmmAgentDir, 'bmad-skill-manifest.yaml'), - [ - 'type: agent', - 'name: bmad-agent-analyst', - 'displayName: Mary', - 'title: Business Analyst', - 'role: Strategic Business Analyst', - 'module: bmm', - ].join('\n') + '\n', - ); - await fs.writeFile( - path.join(bmmAgentDir, 'SKILL.md'), - '---\nname: bmad-agent-analyst\ndescription: Business Analyst agent\n---\n\nAnalyst agent.\n', - ); - - // Agent at cis-style path: cis/skills/bmad-cis-agent-brainstorming-coach/ - const cisAgentDir = path.join(tempFixture29b, 'cis', 'skills', 'bmad-cis-agent-brainstorming-coach'); - await fs.ensureDir(cisAgentDir); - await fs.writeFile( - path.join(cisAgentDir, 'bmad-skill-manifest.yaml'), - [ - 'type: agent', - 'name: bmad-cis-agent-brainstorming-coach', - 'displayName: Carson', - 'title: Brainstorming Specialist', - 'role: Master Facilitator', - 'module: cis', - ].join('\n') + '\n', - ); - await fs.writeFile( - path.join(cisAgentDir, 'SKILL.md'), - '---\nname: bmad-cis-agent-brainstorming-coach\ndescription: Brainstorming coach\n---\n\nCoach.\n', - ); - - // Agent at standard agents/ path (GDS-style): gds/agents/gds-agent-game-dev/ - const gdsAgentDir = path.join(tempFixture29b, 'gds', 'agents', 'gds-agent-game-dev'); - await fs.ensureDir(gdsAgentDir); - await fs.writeFile( - path.join(gdsAgentDir, 'bmad-skill-manifest.yaml'), - [ - 'type: agent', - 'name: gds-agent-game-dev', - 'displayName: Link', - 'title: Game Developer', - 'role: Senior Game Dev', - 'module: gds', - ].join('\n') + '\n', - ); - await fs.writeFile( - path.join(gdsAgentDir, 'SKILL.md'), - '---\nname: gds-agent-game-dev\ndescription: Game developer agent\n---\n\nGame dev.\n', - ); - - const generator29b = new ManifestGenerator(); - await generator29b.generateManifests(tempFixture29b, ['bmm', 'cis', 'gds'], [], { ides: [] }); - - // All three agents should appear in agents[] regardless of directory layout - const bmmAgent = generator29b.agents.find((a) => a.name === 'bmad-agent-analyst'); - assert(bmmAgent !== undefined, 'Agent at bmm/1-analysis/ path appears in agents[]'); - assert(bmmAgent && bmmAgent.module === 'bmm', 'BMM agent module field comes from manifest file'); - assert(bmmAgent && bmmAgent.path.includes('bmm/1-analysis/bmad-agent-analyst'), 'BMM agent path reflects actual directory layout'); - - const cisAgent = generator29b.agents.find((a) => a.name === 'bmad-cis-agent-brainstorming-coach'); - assert(cisAgent !== undefined, 'Agent at cis/skills/ path appears in agents[]'); - assert(cisAgent && cisAgent.module === 'cis', 'CIS agent module field comes from manifest file'); - - const gdsAgent = generator29b.agents.find((a) => a.name === 'gds-agent-game-dev'); - assert(gdsAgent !== undefined, 'Agent at gds/agents/ path appears in agents[]'); - assert(gdsAgent && gdsAgent.module === 'gds', 'GDS agent module field comes from manifest file'); - - // agent-manifest.csv should contain all three - const agentCsv29b = await fs.readFile(path.join(tempFixture29b, '_config', 'agent-manifest.csv'), 'utf8'); - assert(agentCsv29b.includes('bmad-agent-analyst'), 'agent-manifest.csv includes BMM-layout agent'); - assert(agentCsv29b.includes('bmad-cis-agent-brainstorming-coach'), 'agent-manifest.csv includes CIS-layout agent'); - assert(agentCsv29b.includes('gds-agent-game-dev'), 'agent-manifest.csv includes GDS-layout agent'); - - await fs.remove(tempFixture29b).catch(() => {}); } catch (error) { assert(false, 'Unified skill scanner test succeeds', error.message); } finally { @@ -1861,8 +1738,6 @@ async function runTests() { const onaInstaller = platformCodes32.platforms.ona?.installer; assert(onaInstaller?.target_dir === '.ona/skills', 'Ona target_dir uses native skills path'); - assert(onaInstaller?.skill_format === true, 'Ona installer enables native skill output'); - assert(onaInstaller?.template_type === 'default', 'Ona installer uses default skill template'); tempProjectDir32 = await fs.mkdtemp(path.join(os.tmpdir(), 'bmad-ona-test-')); installedBmadDir32 = await createTestBmadFixture(); @@ -1941,93 +1816,6 @@ async function runTests() { console.log(''); - // ============================================================ - // Test Suite 33: ConfigCollector Prompt Normalization - // ============================================================ - console.log(`${colors.yellow}Test Suite 33: ConfigCollector Prompt Normalization${colors.reset}\n`); - - try { - const teaModuleConfig33 = { - test_artifacts: { - default: '_bmad-output/test-artifacts', - }, - test_design_output: { - prompt: 'Where should test design documents be stored?', - default: 'test-design', - result: '{test_artifacts}/{value}', - }, - test_review_output: { - prompt: 'Where should test review reports be stored?', - default: 'test-reviews', - result: '{test_artifacts}/{value}', - }, - trace_output: { - prompt: 'Where should traceability reports be stored?', - default: 'traceability', - result: '{test_artifacts}/{value}', - }, - }; - - const collector33 = new ConfigCollector(); - collector33.currentProjectDir = path.join(os.tmpdir(), 'bmad-config-normalization'); - collector33.allAnswers = {}; - collector33.collectedConfig = { - tea: { - test_artifacts: '_bmad-output/test-artifacts', - }, - }; - collector33.existingConfig = { - tea: { - test_artifacts: '_bmad-output/test-artifacts', - test_design_output: '_bmad-output/test-artifacts/test-design', - test_review_output: '_bmad-output/test-artifacts/test-reviews', - trace_output: '_bmad-output/test-artifacts/traceability', - }, - }; - - const testDesignQuestion33 = await collector33.buildQuestion( - 'tea', - 'test_design_output', - teaModuleConfig33.test_design_output, - teaModuleConfig33, - ); - const testReviewQuestion33 = await collector33.buildQuestion( - 'tea', - 'test_review_output', - teaModuleConfig33.test_review_output, - teaModuleConfig33, - ); - const traceQuestion33 = await collector33.buildQuestion('tea', 'trace_output', teaModuleConfig33.trace_output, teaModuleConfig33); - - assert(testDesignQuestion33.default === 'test-design', 'ConfigCollector normalizes existing test_design_output prompt default'); - assert(testReviewQuestion33.default === 'test-reviews', 'ConfigCollector normalizes existing test_review_output prompt default'); - assert(traceQuestion33.default === 'traceability', 'ConfigCollector normalizes existing trace_output prompt default'); - - collector33.allAnswers = { - tea_test_artifacts: '_bmad-output/test-artifacts', - }; - - assert( - collector33.processResultTemplate(teaModuleConfig33.test_design_output.result, testDesignQuestion33.default) === - '_bmad-output/test-artifacts/test-design', - 'ConfigCollector re-applies test_design_output template without duplicating prefix', - ); - assert( - collector33.processResultTemplate(teaModuleConfig33.test_review_output.result, testReviewQuestion33.default) === - '_bmad-output/test-artifacts/test-reviews', - 'ConfigCollector re-applies test_review_output template without duplicating prefix', - ); - assert( - collector33.processResultTemplate(teaModuleConfig33.trace_output.result, traceQuestion33.default) === - '_bmad-output/test-artifacts/traceability', - 'ConfigCollector re-applies trace_output template without duplicating prefix', - ); - } catch (error) { - assert(false, 'ConfigCollector prompt normalization test succeeds', error.message); - } - - console.log(''); - // ============================================================ // Summary // ============================================================ diff --git a/test/test-workflow-path-regex.js b/test/test-workflow-path-regex.js index 5f57a0ab9..f05ea1a34 100644 --- a/test/test-workflow-path-regex.js +++ b/test/test-workflow-path-regex.js @@ -34,7 +34,7 @@ function assert(condition, testName, errorMessage = '') { // --------------------------------------------------------------------------- // These regexes are extracted from ModuleManager.vendorWorkflowDependencies() -// in tools/cli/installers/lib/modules/manager.js +// in tools/installer/modules/manager.js // --------------------------------------------------------------------------- // Source regex (line ~1081) — uses non-capturing group for _bmad diff --git a/tools/bmad-npx-wrapper.js b/tools/bmad-npx-wrapper.js deleted file mode 100755 index c6f578b2d..000000000 --- a/tools/bmad-npx-wrapper.js +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env node - -/** - * BMad Method CLI - Direct execution wrapper for npx - * This file ensures proper execution when run via npx from GitHub or npm registry - */ - -const { execFileSync } = require('node:child_process'); -const path = require('node:path'); -const fs = require('node:fs'); - -// Check if we're running in an npx temporary directory -const isNpxExecution = __dirname.includes('_npx') || __dirname.includes('.npm'); - -if (isNpxExecution) { - // Running via npx - spawn child process to preserve user's working directory - const args = process.argv.slice(2); - const bmadCliPath = path.join(__dirname, 'cli', 'bmad-cli.js'); - - if (!fs.existsSync(bmadCliPath)) { - console.error('Error: Could not find bmad-cli.js at', bmadCliPath); - console.error('Current directory:', __dirname); - process.exit(1); - } - - try { - // Execute CLI from user's working directory (process.cwd()), not npm cache - execFileSync('node', [bmadCliPath, ...args], { - stdio: 'inherit', - cwd: process.cwd(), // This preserves the user's working directory - }); - } catch (error) { - process.exit(error.status || 1); - } -} else { - // Local execution - use require - require('./cli/bmad-cli.js'); -} diff --git a/tools/cli/installers/lib/core/dependency-resolver.js b/tools/cli/installers/lib/core/dependency-resolver.js deleted file mode 100644 index 8b0971bf1..000000000 --- a/tools/cli/installers/lib/core/dependency-resolver.js +++ /dev/null @@ -1,743 +0,0 @@ -const fs = require('fs-extra'); -const path = require('node:path'); -const glob = require('glob'); -const yaml = require('yaml'); -const prompts = require('../../../lib/prompts'); - -/** - * Dependency Resolver for BMAD modules - * Handles cross-module dependencies and ensures all required files are included - */ -class DependencyResolver { - constructor() { - this.dependencies = new Map(); - this.resolvedFiles = new Set(); - this.missingDependencies = new Set(); - } - - /** - * Resolve all dependencies for selected modules - * @param {string} bmadDir - BMAD installation directory - * @param {Array} selectedModules - Modules explicitly selected by user - * @param {Object} options - Resolution options - * @returns {Object} Resolution results with all required files - */ - async resolve(bmadDir, selectedModules = [], options = {}) { - if (options.verbose) { - await prompts.log.info('Resolving module dependencies...'); - } - - // Always include core as base - const modulesToProcess = new Set(['core', ...selectedModules]); - - // First pass: collect all explicitly selected files - const primaryFiles = await this.collectPrimaryFiles(bmadDir, modulesToProcess, options); - - // Second pass: parse and resolve dependencies - const allDependencies = await this.parseDependencies(primaryFiles); - - // Third pass: resolve dependency paths and collect files - const resolvedDeps = await this.resolveDependencyPaths(bmadDir, allDependencies); - - // Fourth pass: check for transitive dependencies - const transitiveDeps = await this.resolveTransitiveDependencies(bmadDir, resolvedDeps); - - // Combine all files - const allFiles = new Set([...primaryFiles.map((f) => f.path), ...resolvedDeps, ...transitiveDeps]); - - // Organize by module - const organizedFiles = this.organizeByModule(bmadDir, allFiles); - - // Report results (only in verbose mode) - if (options.verbose) { - await this.reportResults(organizedFiles, selectedModules); - } - - return { - primaryFiles, - dependencies: resolvedDeps, - transitiveDependencies: transitiveDeps, - allFiles: [...allFiles], - byModule: organizedFiles, - missing: [...this.missingDependencies], - }; - } - - /** - * Collect primary files from selected modules - */ - async collectPrimaryFiles(bmadDir, modules, options = {}) { - const files = []; - const { moduleManager } = options; - - for (const module of modules) { - // Skip external modules - they're installed from cache, not from source - if (moduleManager && (await moduleManager.isExternalModule(module))) { - continue; - } - - // Handle both source (src/) and installed (bmad/) directory structures - let moduleDir; - - // Check if this is a source directory (has 'src' subdirectory) - const srcDir = path.join(bmadDir, 'src'); - if (await fs.pathExists(srcDir)) { - // Source directory structure: src/core-skills or src/bmm-skills - if (module === 'core') { - moduleDir = path.join(srcDir, 'core-skills'); - } else if (module === 'bmm') { - moduleDir = path.join(srcDir, 'bmm-skills'); - } - } - - if (!moduleDir) { - continue; - } - - if (!(await fs.pathExists(moduleDir))) { - await prompts.log.warn('Module directory not found: ' + moduleDir); - continue; - } - - // Collect agents - const agentsDir = path.join(moduleDir, 'agents'); - if (await fs.pathExists(agentsDir)) { - const agentFiles = await glob.glob('*.md', { cwd: agentsDir }); - for (const file of agentFiles) { - const agentPath = path.join(agentsDir, file); - - // Check for localskip attribute - const content = await fs.readFile(agentPath, 'utf8'); - const hasLocalSkip = content.match(/]*\slocalskip="true"[^>]*>/); - if (hasLocalSkip) { - continue; // Skip agents marked for web-only - } - - files.push({ - path: agentPath, - type: 'agent', - module, - name: path.basename(file, '.md'), - }); - } - } - - // Collect tasks - const tasksDir = path.join(moduleDir, 'tasks'); - if (await fs.pathExists(tasksDir)) { - const taskFiles = await glob.glob('*.md', { cwd: tasksDir }); - for (const file of taskFiles) { - files.push({ - path: path.join(tasksDir, file), - type: 'task', - module, - name: path.basename(file, '.md'), - }); - } - } - } - - return files; - } - - /** - * Parse dependencies from file content - */ - async parseDependencies(files) { - const allDeps = new Set(); - - for (const file of files) { - const content = await fs.readFile(file.path, 'utf8'); - - // Parse YAML frontmatter for explicit dependencies - const frontmatterMatch = content.match(/^---\r?\n([\s\S]*?)\r?\n---/); - if (frontmatterMatch) { - try { - // Pre-process to handle backticks in YAML values - let yamlContent = frontmatterMatch[1]; - // Quote values with backticks to make them valid YAML - yamlContent = yamlContent.replaceAll(/: `([^`]+)`/g, ': "$1"'); - - const frontmatter = yaml.parse(yamlContent); - if (frontmatter.dependencies) { - const deps = Array.isArray(frontmatter.dependencies) ? frontmatter.dependencies : [frontmatter.dependencies]; - - for (const dep of deps) { - allDeps.add({ - from: file.path, - dependency: dep, - type: 'explicit', - }); - } - } - - // Check for template dependencies - if (frontmatter.template) { - const templates = Array.isArray(frontmatter.template) ? frontmatter.template : [frontmatter.template]; - for (const template of templates) { - allDeps.add({ - from: file.path, - dependency: template, - type: 'template', - }); - } - } - } catch (error) { - await prompts.log.warn('Failed to parse frontmatter in ' + file.name + ': ' + error.message); - } - } - - // Parse content for command references (cross-module dependencies) - const commandRefs = this.parseCommandReferences(content); - for (const ref of commandRefs) { - allDeps.add({ - from: file.path, - dependency: ref, - type: 'command', - }); - } - - // Parse for file path references - const fileRefs = this.parseFileReferences(content); - for (const ref of fileRefs) { - // Determine type based on path format - // Paths starting with bmad/ are absolute references to the bmad installation - const depType = ref.startsWith('bmad/') ? 'bmad-path' : 'file'; - allDeps.add({ - from: file.path, - dependency: ref, - type: depType, - }); - } - } - - return allDeps; - } - - /** - * Parse command references from content - */ - parseCommandReferences(content) { - const refs = new Set(); - - // Match @task-{name} or @agent-{name} or @{module}-{type}-{name} - const commandPattern = /@(task-|agent-|bmad-)([a-z0-9-]+)/g; - let match; - - while ((match = commandPattern.exec(content)) !== null) { - refs.add(match[0]); - } - - // Match file paths like bmad/core/agents/analyst - const pathPattern = /bmad\/(core|bmm|cis)\/(agents|tasks)\/([a-z0-9-]+)/g; - - while ((match = pathPattern.exec(content)) !== null) { - refs.add(match[0]); - } - - return [...refs]; - } - - /** - * Parse file path references from content - */ - parseFileReferences(content) { - const refs = new Set(); - - // Match relative paths like ../templates/file.yaml or ./data/file.md - const relativePattern = /['"](\.\.?\/[^'"]+\.(md|yaml|yml|xml|json|txt|csv))['"]/g; - let match; - - while ((match = relativePattern.exec(content)) !== null) { - refs.add(match[1]); - } - - // Parse exec attributes in command tags - const execPattern = /exec="([^"]+)"/g; - while ((match = execPattern.exec(content)) !== null) { - let execPath = match[1]; - if (execPath && execPath !== '*') { - // Remove {project-root} prefix to get the actual path - // Usage is like {project-root}/bmad/core/tasks/foo.md - if (execPath.includes('{project-root}')) { - execPath = execPath.replace('{project-root}', ''); - } - refs.add(execPath); - } - } - - // Parse tmpl attributes in command tags - const tmplPattern = /tmpl="([^"]+)"/g; - while ((match = tmplPattern.exec(content)) !== null) { - let tmplPath = match[1]; - if (tmplPath && tmplPath !== '*') { - // Remove {project-root} prefix to get the actual path - // Usage is like {project-root}/bmad/core/tasks/foo.md - if (tmplPath.includes('{project-root}')) { - tmplPath = tmplPath.replace('{project-root}', ''); - } - refs.add(tmplPath); - } - } - - return [...refs]; - } - - /** - * Resolve dependency paths to actual files - */ - async resolveDependencyPaths(bmadDir, dependencies) { - const resolved = new Set(); - - for (const dep of dependencies) { - const resolvedPaths = await this.resolveSingleDependency(bmadDir, dep); - for (const path of resolvedPaths) { - resolved.add(path); - } - } - - return resolved; - } - - /** - * Resolve a single dependency to file paths - */ - async resolveSingleDependency(bmadDir, dep) { - const paths = []; - - switch (dep.type) { - case 'explicit': - case 'file': { - let depPath = dep.dependency; - - // Handle {project-root} prefix if present - if (depPath.includes('{project-root}')) { - // Remove {project-root} and resolve as bmad path - depPath = depPath.replace('{project-root}', ''); - - if (depPath.startsWith('bmad/')) { - const bmadPath = depPath.replace(/^bmad\//, ''); - - // Handle glob patterns - if (depPath.includes('*')) { - // Extract the base path and pattern - const pathParts = bmadPath.split('/'); - const module = pathParts[0]; - const filePattern = pathParts.at(-1); - const middlePath = pathParts.slice(1, -1).join('/'); - - let basePath; - if (module === 'core') { - basePath = path.join(bmadDir, 'core', middlePath); - } else { - basePath = path.join(bmadDir, 'modules', module, middlePath); - } - - if (await fs.pathExists(basePath)) { - const files = await glob.glob(filePattern, { cwd: basePath }); - for (const file of files) { - paths.push(path.join(basePath, file)); - } - } - } else { - // Direct path - if (bmadPath.startsWith('core/')) { - const corePath = path.join(bmadDir, bmadPath); - if (await fs.pathExists(corePath)) { - paths.push(corePath); - } - } else { - const parts = bmadPath.split('/'); - const module = parts[0]; - const rest = parts.slice(1).join('/'); - const modulePath = path.join(bmadDir, 'modules', module, rest); - - if (await fs.pathExists(modulePath)) { - paths.push(modulePath); - } - } - } - } - } else { - // Regular relative path handling - const sourceDir = path.dirname(dep.from); - - // Handle glob patterns - if (depPath.includes('*')) { - const basePath = path.resolve(sourceDir, path.dirname(depPath)); - const pattern = path.basename(depPath); - - if (await fs.pathExists(basePath)) { - const files = await glob.glob(pattern, { cwd: basePath }); - for (const file of files) { - paths.push(path.join(basePath, file)); - } - } - } else { - // Direct file reference - const fullPath = path.resolve(sourceDir, depPath); - if (await fs.pathExists(fullPath)) { - paths.push(fullPath); - } else { - this.missingDependencies.add(`${depPath} (referenced by ${path.basename(dep.from)})`); - } - } - } - - break; - } - case 'command': { - // Resolve command references to actual files - const commandPath = await this.resolveCommandToPath(bmadDir, dep.dependency); - if (commandPath) { - paths.push(commandPath); - } - - break; - } - case 'bmad-path': { - // Resolve bmad/ paths (from {project-root}/bmad/... references) - // These are paths relative to the src directory structure - const bmadPath = dep.dependency.replace(/^bmad\//, ''); - - // Try to resolve as if it's in src structure - // bmad/core/tasks/foo.md -> src/core-skills/tasks/foo.md - // bmad/bmm/tasks/bar.md -> src/bmm-skills/tasks/bar.md (bmm is directly under src/) - // bmad/cis/agents/bar.md -> src/modules/cis/agents/bar.md - - if (bmadPath.startsWith('core/')) { - const corePath = path.join(bmadDir, bmadPath); - if (await fs.pathExists(corePath)) { - paths.push(corePath); - } else { - // Not found, but don't report as missing since it might be installed later - } - } else { - // It's a module path like bmm/tasks/foo.md or cis/agents/bar.md - const parts = bmadPath.split('/'); - const module = parts[0]; - const rest = parts.slice(1).join('/'); - let modulePath; - if (module === 'bmm') { - // bmm is directly under src/ - modulePath = path.join(bmadDir, module, rest); - } else { - // Other modules are under modules/ - modulePath = path.join(bmadDir, 'modules', module, rest); - } - - if (await fs.pathExists(modulePath)) { - paths.push(modulePath); - } else { - // Not found, but don't report as missing since it might be installed later - } - } - - break; - } - case 'template': { - // Resolve template references - let templateDep = dep.dependency; - - // Handle {project-root} prefix if present - if (templateDep.includes('{project-root}')) { - // Remove {project-root} and treat as bmad-path - templateDep = templateDep.replace('{project-root}', ''); - - // Now resolve as a bmad path - if (templateDep.startsWith('bmad/')) { - const bmadPath = templateDep.replace(/^bmad\//, ''); - - if (bmadPath.startsWith('core/')) { - const corePath = path.join(bmadDir, bmadPath); - if (await fs.pathExists(corePath)) { - paths.push(corePath); - } - } else { - // Module path like cis/templates/brainstorm.md - const parts = bmadPath.split('/'); - const module = parts[0]; - const rest = parts.slice(1).join('/'); - const modulePath = path.join(bmadDir, 'modules', module, rest); - - if (await fs.pathExists(modulePath)) { - paths.push(modulePath); - } - } - } - } else { - // Regular relative template path - const sourceDir = path.dirname(dep.from); - const templatePath = path.resolve(sourceDir, templateDep); - - if (await fs.pathExists(templatePath)) { - paths.push(templatePath); - } else { - this.missingDependencies.add(`Template: ${dep.dependency}`); - } - } - - break; - } - // No default - } - - return paths; - } - - /** - * Resolve command reference to file path - */ - async resolveCommandToPath(bmadDir, command) { - // Parse command format: @task-name or @agent-name or bmad/module/type/name - - if (command.startsWith('@task-')) { - const taskName = command.slice(6); - // Search all modules for this task - for (const module of ['core', 'bmm', 'cis']) { - const taskPath = - module === 'core' - ? path.join(bmadDir, 'core', 'tasks', `${taskName}.md`) - : path.join(bmadDir, 'modules', module, 'tasks', `${taskName}.md`); - if (await fs.pathExists(taskPath)) { - return taskPath; - } - } - } else if (command.startsWith('@agent-')) { - const agentName = command.slice(7); - // Search all modules for this agent - for (const module of ['core', 'bmm', 'cis']) { - const agentPath = - module === 'core' - ? path.join(bmadDir, 'core', 'agents', `${agentName}.md`) - : path.join(bmadDir, 'modules', module, 'agents', `${agentName}.md`); - if (await fs.pathExists(agentPath)) { - return agentPath; - } - } - } else if (command.startsWith('bmad/')) { - // Direct path reference - const parts = command.split('/'); - if (parts.length >= 4) { - const [, module, type, ...nameParts] = parts; - const name = nameParts.join('/'); // Handle nested paths - - // Check if name already has extension - const fileName = name.endsWith('.md') ? name : `${name}.md`; - - const filePath = - module === 'core' ? path.join(bmadDir, 'core', type, fileName) : path.join(bmadDir, 'modules', module, type, fileName); - if (await fs.pathExists(filePath)) { - return filePath; - } - } - } - - // Don't report as missing if it's a self-reference within the module being installed - if (!command.includes('cis') || command.includes('brain')) { - // Only report missing if it's a true external dependency - // this.missingDependencies.add(`Command: ${command}`); - } - return null; - } - - /** - * Resolve transitive dependencies (dependencies of dependencies) - */ - async resolveTransitiveDependencies(bmadDir, directDeps) { - const transitive = new Set(); - const processed = new Set(); - - // Process each direct dependency - for (const depPath of directDeps) { - if (processed.has(depPath)) continue; - processed.add(depPath); - - // Only process markdown and YAML files for transitive deps - if ((depPath.endsWith('.md') || depPath.endsWith('.yaml') || depPath.endsWith('.yml')) && (await fs.pathExists(depPath))) { - const content = await fs.readFile(depPath, 'utf8'); - const subDeps = await this.parseDependencies([ - { - path: depPath, - type: 'dependency', - module: this.getModuleFromPath(bmadDir, depPath), - name: path.basename(depPath), - }, - ]); - - const resolvedSubDeps = await this.resolveDependencyPaths(bmadDir, subDeps); - for (const subDep of resolvedSubDeps) { - if (!directDeps.has(subDep)) { - transitive.add(subDep); - } - } - } - } - - return transitive; - } - - /** - * Get module name from file path - */ - getModuleFromPath(bmadDir, filePath) { - const relative = path.relative(bmadDir, filePath); - const parts = relative.split(path.sep); - - // Handle source directory structure (src/core-skills, src/bmm-skills, or src/modules/xxx) - if (parts[0] === 'src') { - if (parts[1] === 'core-skills') { - return 'core'; - } else if (parts[1] === 'bmm-skills') { - return 'bmm'; - } else if (parts[1] === 'modules' && parts.length > 2) { - return parts[2]; - } - } - - // Check if it's in modules directory (installed structure) - if (parts[0] === 'modules' && parts.length > 1) { - return parts[1]; - } - - // Otherwise return the first part (core, etc.) - // But don't return 'src' as a module name - if (parts[0] === 'src') { - return 'unknown'; - } - return parts[0] || 'unknown'; - } - - /** - * Organize files by module - */ - organizeByModule(bmadDir, files) { - const organized = {}; - - for (const file of files) { - const module = this.getModuleFromPath(bmadDir, file); - if (!organized[module]) { - organized[module] = { - agents: [], - tasks: [], - tools: [], - templates: [], - data: [], - other: [], - }; - } - - // Get relative path correctly based on module structure - let moduleBase; - - // Check if file is in source directory structure - if (file.includes('/src/core-skills/') || file.includes('/src/bmm-skills/')) { - if (module === 'core') { - moduleBase = path.join(bmadDir, 'src', 'core-skills'); - } else if (module === 'bmm') { - moduleBase = path.join(bmadDir, 'src', 'bmm-skills'); - } - } else { - moduleBase = module === 'core' ? path.join(bmadDir, 'core') : path.join(bmadDir, 'modules', module); - } - - const relative = path.relative(moduleBase, file); - - if (relative.startsWith('agents/') || file.includes('/agents/')) { - organized[module].agents.push(file); - } else if (relative.startsWith('tasks/') || file.includes('/tasks/')) { - organized[module].tasks.push(file); - } else if (relative.startsWith('tools/') || file.includes('/tools/')) { - organized[module].tools.push(file); - } else if (relative.includes('data/')) { - organized[module].data.push(file); - } else { - organized[module].other.push(file); - } - } - - return organized; - } - - /** - * Report resolution results - */ - async reportResults(organized, selectedModules) { - await prompts.log.success('Dependency resolution complete'); - - for (const [module, files] of Object.entries(organized)) { - const isSelected = selectedModules.includes(module) || module === 'core'; - const totalFiles = - files.agents.length + files.tasks.length + files.tools.length + files.templates.length + files.data.length + files.other.length; - - if (totalFiles > 0) { - await prompts.log.info(` ${module.toUpperCase()} module:`); - await prompts.log.message(` Status: ${isSelected ? 'Selected' : 'Dependencies only'}`); - - if (files.agents.length > 0) { - await prompts.log.message(` Agents: ${files.agents.length}`); - } - if (files.tasks.length > 0) { - await prompts.log.message(` Tasks: ${files.tasks.length}`); - } - if (files.templates.length > 0) { - await prompts.log.message(` Templates: ${files.templates.length}`); - } - if (files.data.length > 0) { - await prompts.log.message(` Data files: ${files.data.length}`); - } - if (files.other.length > 0) { - await prompts.log.message(` Other files: ${files.other.length}`); - } - } - } - - if (this.missingDependencies.size > 0) { - await prompts.log.warn('Missing dependencies:'); - for (const missing of this.missingDependencies) { - await prompts.log.warn(` - ${missing}`); - } - } - } - - /** - * Create a bundle for web deployment - * @param {Object} resolution - Resolution results from resolve() - * @returns {Object} Bundle data ready for web - */ - async createWebBundle(resolution) { - const bundle = { - metadata: { - created: new Date().toISOString(), - modules: Object.keys(resolution.byModule), - totalFiles: resolution.allFiles.length, - }, - agents: {}, - tasks: {}, - templates: {}, - data: {}, - }; - - // Bundle all files by type - for (const filePath of resolution.allFiles) { - if (!(await fs.pathExists(filePath))) continue; - - const content = await fs.readFile(filePath, 'utf8'); - const relative = path.relative(path.dirname(resolution.primaryFiles[0]?.path || '.'), filePath); - - if (filePath.includes('/agents/')) { - bundle.agents[relative] = content; - } else if (filePath.includes('/tasks/')) { - bundle.tasks[relative] = content; - } else if (filePath.includes('template')) { - bundle.templates[relative] = content; - } else { - bundle.data[relative] = content; - } - } - - return bundle; - } -} - -module.exports = { DependencyResolver }; diff --git a/tools/cli/installers/lib/core/detector.js b/tools/cli/installers/lib/core/detector.js deleted file mode 100644 index 9bb736589..000000000 --- a/tools/cli/installers/lib/core/detector.js +++ /dev/null @@ -1,223 +0,0 @@ -const path = require('node:path'); -const fs = require('fs-extra'); -const yaml = require('yaml'); -const { Manifest } = require('./manifest'); - -class Detector { - /** - * Detect existing BMAD installation - * @param {string} bmadDir - Path to bmad directory - * @returns {Object} Installation status and details - */ - async detect(bmadDir) { - const result = { - installed: false, - path: bmadDir, - version: null, - hasCore: false, - modules: [], - ides: [], - customModules: [], - manifest: null, - }; - - // Check if bmad directory exists - if (!(await fs.pathExists(bmadDir))) { - return result; - } - - // Check for manifest using the Manifest class - const manifest = new Manifest(); - const manifestData = await manifest.read(bmadDir); - if (manifestData) { - result.manifest = manifestData; - result.version = manifestData.version; - result.installed = true; - // Copy custom modules if they exist - if (manifestData.customModules) { - result.customModules = manifestData.customModules; - } - } - - // Check for core - const corePath = path.join(bmadDir, 'core'); - if (await fs.pathExists(corePath)) { - result.hasCore = true; - - // Try to get core version from config - const coreConfigPath = path.join(corePath, 'config.yaml'); - if (await fs.pathExists(coreConfigPath)) { - try { - const configContent = await fs.readFile(coreConfigPath, 'utf8'); - const config = yaml.parse(configContent); - if (!result.version && config.version) { - result.version = config.version; - } - } catch { - // Ignore config read errors - } - } - } - - // Check for modules - // If manifest exists, use it as the source of truth for installed modules - // Otherwise fall back to directory scanning (legacy installations) - if (manifestData && manifestData.modules && manifestData.modules.length > 0) { - // Use manifest module list - these are officially installed modules - for (const moduleId of manifestData.modules) { - const modulePath = path.join(bmadDir, moduleId); - const moduleConfigPath = path.join(modulePath, 'config.yaml'); - - const moduleInfo = { - id: moduleId, - path: modulePath, - version: 'unknown', - }; - - if (await fs.pathExists(moduleConfigPath)) { - try { - const configContent = await fs.readFile(moduleConfigPath, 'utf8'); - const config = yaml.parse(configContent); - moduleInfo.version = config.version || 'unknown'; - moduleInfo.name = config.name || moduleId; - moduleInfo.description = config.description; - } catch { - // Ignore config read errors - } - } - - result.modules.push(moduleInfo); - } - } else { - // Fallback: scan directory for modules (legacy installations without manifest) - const entries = await fs.readdir(bmadDir, { withFileTypes: true }); - for (const entry of entries) { - if (entry.isDirectory() && entry.name !== 'core' && entry.name !== '_config') { - const modulePath = path.join(bmadDir, entry.name); - const moduleConfigPath = path.join(modulePath, 'config.yaml'); - - // Only treat it as a module if it has a config.yaml - if (await fs.pathExists(moduleConfigPath)) { - const moduleInfo = { - id: entry.name, - path: modulePath, - version: 'unknown', - }; - - try { - const configContent = await fs.readFile(moduleConfigPath, 'utf8'); - const config = yaml.parse(configContent); - moduleInfo.version = config.version || 'unknown'; - moduleInfo.name = config.name || entry.name; - moduleInfo.description = config.description; - } catch { - // Ignore config read errors - } - - result.modules.push(moduleInfo); - } - } - } - } - - // Check for IDE configurations from manifest - if (result.manifest && result.manifest.ides) { - // Filter out any undefined/null values - result.ides = result.manifest.ides.filter((ide) => ide && typeof ide === 'string'); - } - - // Mark as installed if we found core or modules - if (result.hasCore || result.modules.length > 0) { - result.installed = true; - } - - return result; - } - - /** - * Detect legacy installation (_bmad-method, .bmm, .cis) - * @param {string} projectDir - Project directory to check - * @returns {Object} Legacy installation details - */ - async detectLegacy(projectDir) { - const result = { - hasLegacy: false, - legacyCore: false, - legacyModules: [], - paths: [], - }; - - // Check for legacy core (_bmad-method) - const legacyCorePath = path.join(projectDir, '_bmad-method'); - if (await fs.pathExists(legacyCorePath)) { - result.hasLegacy = true; - result.legacyCore = true; - result.paths.push(legacyCorePath); - } - - // Check for legacy modules (directories starting with .) - const entries = await fs.readdir(projectDir, { withFileTypes: true }); - for (const entry of entries) { - if ( - entry.isDirectory() && - entry.name.startsWith('.') && - entry.name !== '_bmad-method' && - !entry.name.startsWith('.git') && - !entry.name.startsWith('.vscode') && - !entry.name.startsWith('.idea') - ) { - const modulePath = path.join(projectDir, entry.name); - const moduleManifestPath = path.join(modulePath, 'install-manifest.yaml'); - - // Check if it's likely a BMAD module - if ((await fs.pathExists(moduleManifestPath)) || (await fs.pathExists(path.join(modulePath, 'config.yaml')))) { - result.hasLegacy = true; - result.legacyModules.push({ - name: entry.name.slice(1), // Remove leading dot - path: modulePath, - }); - result.paths.push(modulePath); - } - } - } - - return result; - } - - /** - * Check if migration from legacy is needed - * @param {string} projectDir - Project directory - * @returns {Object} Migration requirements - */ - async checkMigrationNeeded(projectDir) { - const bmadDir = path.join(projectDir, 'bmad'); - const current = await this.detect(bmadDir); - const legacy = await this.detectLegacy(projectDir); - - return { - needed: legacy.hasLegacy && !current.installed, - canMigrate: legacy.hasLegacy, - legacy: legacy, - current: current, - }; - } - - /** - * Detect legacy BMAD v4 .bmad-method folder - * @param {string} projectDir - Project directory to check - * @returns {{ hasLegacyV4: boolean, offenders: string[] }} - */ - async detectLegacyV4(projectDir) { - const offenders = []; - - // Check for .bmad-method folder - const bmadMethodPath = path.join(projectDir, '.bmad-method'); - if (await fs.pathExists(bmadMethodPath)) { - offenders.push(bmadMethodPath); - } - - return { hasLegacyV4: offenders.length > 0, offenders }; - } -} - -module.exports = { Detector }; diff --git a/tools/cli/installers/lib/core/ide-config-manager.js b/tools/cli/installers/lib/core/ide-config-manager.js deleted file mode 100644 index c00c00d48..000000000 --- a/tools/cli/installers/lib/core/ide-config-manager.js +++ /dev/null @@ -1,157 +0,0 @@ -const path = require('node:path'); -const fs = require('fs-extra'); -const yaml = require('yaml'); -const prompts = require('../../../lib/prompts'); - -/** - * Manages IDE configuration persistence - * Saves and loads IDE-specific configurations to/from bmad/_config/ides/ - */ -class IdeConfigManager { - constructor() {} - - /** - * Get path to IDE config directory - * @param {string} bmadDir - BMAD installation directory - * @returns {string} Path to IDE config directory - */ - getIdeConfigDir(bmadDir) { - return path.join(bmadDir, '_config', 'ides'); - } - - /** - * Get path to specific IDE config file - * @param {string} bmadDir - BMAD installation directory - * @param {string} ideName - IDE name (e.g., 'claude-code') - * @returns {string} Path to IDE config file - */ - getIdeConfigPath(bmadDir, ideName) { - return path.join(this.getIdeConfigDir(bmadDir), `${ideName}.yaml`); - } - - /** - * Save IDE configuration - * @param {string} bmadDir - BMAD installation directory - * @param {string} ideName - IDE name - * @param {Object} configuration - IDE-specific configuration object - */ - async saveIdeConfig(bmadDir, ideName, configuration) { - const configDir = this.getIdeConfigDir(bmadDir); - await fs.ensureDir(configDir); - - const configPath = this.getIdeConfigPath(bmadDir, ideName); - const now = new Date().toISOString(); - - // Check if config already exists to preserve configured_date - let configuredDate = now; - if (await fs.pathExists(configPath)) { - try { - const existing = await this.loadIdeConfig(bmadDir, ideName); - if (existing && existing.configured_date) { - configuredDate = existing.configured_date; - } - } catch { - // Ignore errors reading existing config - } - } - - const configData = { - ide: ideName, - configured_date: configuredDate, - last_updated: now, - configuration: configuration || {}, - }; - - // Clean the config to remove any non-serializable values (like functions) - const cleanConfig = structuredClone(configData); - - const yamlContent = yaml.stringify(cleanConfig, { - indent: 2, - lineWidth: 0, - sortKeys: false, - }); - - // Ensure POSIX-compliant final newline - const content = yamlContent.endsWith('\n') ? yamlContent : yamlContent + '\n'; - await fs.writeFile(configPath, content, 'utf8'); - } - - /** - * Load IDE configuration - * @param {string} bmadDir - BMAD installation directory - * @param {string} ideName - IDE name - * @returns {Object|null} IDE configuration or null if not found - */ - async loadIdeConfig(bmadDir, ideName) { - const configPath = this.getIdeConfigPath(bmadDir, ideName); - - if (!(await fs.pathExists(configPath))) { - return null; - } - - try { - const content = await fs.readFile(configPath, 'utf8'); - const config = yaml.parse(content); - return config; - } catch (error) { - await prompts.log.warn(`Failed to load IDE config for ${ideName}: ${error.message}`); - return null; - } - } - - /** - * Load all IDE configurations - * @param {string} bmadDir - BMAD installation directory - * @returns {Object} Map of IDE name to configuration - */ - async loadAllIdeConfigs(bmadDir) { - const configDir = this.getIdeConfigDir(bmadDir); - const configs = {}; - - if (!(await fs.pathExists(configDir))) { - return configs; - } - - try { - const files = await fs.readdir(configDir); - for (const file of files) { - if (file.endsWith('.yaml')) { - const ideName = file.replace('.yaml', ''); - const config = await this.loadIdeConfig(bmadDir, ideName); - if (config) { - configs[ideName] = config.configuration; - } - } - } - } catch (error) { - await prompts.log.warn(`Failed to load IDE configs: ${error.message}`); - } - - return configs; - } - - /** - * Check if IDE has saved configuration - * @param {string} bmadDir - BMAD installation directory - * @param {string} ideName - IDE name - * @returns {boolean} True if configuration exists - */ - async hasIdeConfig(bmadDir, ideName) { - const configPath = this.getIdeConfigPath(bmadDir, ideName); - return await fs.pathExists(configPath); - } - - /** - * Delete IDE configuration - * @param {string} bmadDir - BMAD installation directory - * @param {string} ideName - IDE name - */ - async deleteIdeConfig(bmadDir, ideName) { - const configPath = this.getIdeConfigPath(bmadDir, ideName); - if (await fs.pathExists(configPath)) { - await fs.remove(configPath); - } - } -} - -module.exports = { IdeConfigManager }; diff --git a/tools/cli/installers/lib/core/installer.js b/tools/cli/installers/lib/core/installer.js deleted file mode 100644 index 217da91ec..000000000 --- a/tools/cli/installers/lib/core/installer.js +++ /dev/null @@ -1,3002 +0,0 @@ -const path = require('node:path'); -const fs = require('fs-extra'); -const { Detector } = require('./detector'); -const { Manifest } = require('./manifest'); -const { ModuleManager } = require('../modules/manager'); -const { IdeManager } = require('../ide/manager'); -const { FileOps } = require('../../../lib/file-ops'); -const { Config } = require('../../../lib/config'); -const { DependencyResolver } = require('./dependency-resolver'); -const { ConfigCollector } = require('./config-collector'); -const { getProjectRoot, getSourcePath, getModulePath } = require('../../../lib/project-root'); -const { CLIUtils } = require('../../../lib/cli-utils'); -const { ManifestGenerator } = require('./manifest-generator'); -const { IdeConfigManager } = require('./ide-config-manager'); -const { CustomHandler } = require('../custom/handler'); -const prompts = require('../../../lib/prompts'); -const { BMAD_FOLDER_NAME } = require('../ide/shared/path-utils'); - -class Installer { - constructor() { - this.detector = new Detector(); - this.manifest = new Manifest(); - this.moduleManager = new ModuleManager(); - this.ideManager = new IdeManager(); - this.fileOps = new FileOps(); - this.config = new Config(); - this.dependencyResolver = new DependencyResolver(); - this.configCollector = new ConfigCollector(); - this.ideConfigManager = new IdeConfigManager(); - this.installedFiles = new Set(); // Track all installed files - this.bmadFolderName = BMAD_FOLDER_NAME; - } - - /** - * Find the bmad installation directory in a project - * Always uses the standard _bmad folder name - * Also checks for legacy _cfg folder for migration - * @param {string} projectDir - Project directory - * @returns {Promise} { bmadDir: string, hasLegacyCfg: boolean } - */ - async findBmadDir(projectDir) { - const bmadDir = path.join(projectDir, BMAD_FOLDER_NAME); - - // Check if project directory exists - if (!(await fs.pathExists(projectDir))) { - // Project doesn't exist yet, return default - return { bmadDir, hasLegacyCfg: false }; - } - - // Check for legacy _cfg folder if bmad directory exists - let hasLegacyCfg = false; - if (await fs.pathExists(bmadDir)) { - const legacyCfgPath = path.join(bmadDir, '_cfg'); - if (await fs.pathExists(legacyCfgPath)) { - hasLegacyCfg = true; - } - } - - return { bmadDir, hasLegacyCfg }; - } - - /** - * @function copyFileWithPlaceholderReplacement - * @intent Copy files from BMAD source to installation directory with dynamic content transformation - * @why Enables installation-time customization: _bmad replacement - * @param {string} sourcePath - Absolute path to source file in BMAD repository - * @param {string} targetPath - Absolute path to destination file in user's project - * @param {string} bmadFolderName - User's chosen bmad folder name (default: 'bmad') - * @returns {Promise} Resolves when file copy and transformation complete - * @sideeffects Writes transformed file to targetPath, creates parent directories if needed - * @edgecases Binary files bypass transformation, falls back to raw copy if UTF-8 read fails - * @calledby installCore(), installModule(), IDE installers during file vendoring - * @calls fs.readFile(), fs.writeFile(), fs.copy() - * - - * - * 3. Document marker in instructions.md (if applicable) - */ - async copyFileWithPlaceholderReplacement(sourcePath, targetPath) { - // List of text file extensions that should have placeholder replacement - const textExtensions = ['.md', '.yaml', '.yml', '.txt', '.json', '.js', '.ts', '.html', '.css', '.sh', '.bat', '.csv', '.xml']; - const ext = path.extname(sourcePath).toLowerCase(); - - // Check if this is a text file that might contain placeholders - if (textExtensions.includes(ext)) { - try { - // Read the file content - let content = await fs.readFile(sourcePath, 'utf8'); - - // Write to target with replaced content - await fs.ensureDir(path.dirname(targetPath)); - await fs.writeFile(targetPath, content, 'utf8'); - } catch { - // If reading as text fails (might be binary despite extension), fall back to regular copy - await fs.copy(sourcePath, targetPath, { overwrite: true }); - } - } else { - // Binary file or other file type - just copy directly - await fs.copy(sourcePath, targetPath, { overwrite: true }); - } - } - - /** - * Collect Tool/IDE configurations after module configuration - * @param {string} projectDir - Project directory - * @param {Array} selectedModules - Selected modules from configuration - * @param {boolean} isFullReinstall - Whether this is a full reinstall - * @param {Array} previousIdes - Previously configured IDEs (for reinstalls) - * @param {Array} preSelectedIdes - Pre-selected IDEs from early prompt (optional) - * @param {boolean} skipPrompts - Skip prompts and use defaults (for --yes flag) - * @returns {Object} Tool/IDE selection and configurations - */ - async collectToolConfigurations( - projectDir, - selectedModules, - isFullReinstall = false, - previousIdes = [], - preSelectedIdes = null, - skipPrompts = false, - ) { - // Use pre-selected IDEs if provided, otherwise prompt - let toolConfig; - if (preSelectedIdes === null) { - // Fallback: prompt for tool selection (backwards compatibility) - const { UI } = require('../../../lib/ui'); - const ui = new UI(); - toolConfig = await ui.promptToolSelection(projectDir); - } else { - // IDEs were already selected during initial prompts - toolConfig = { - ides: preSelectedIdes, - skipIde: !preSelectedIdes || preSelectedIdes.length === 0, - }; - } - - // Check for already configured IDEs - const { Detector } = require('./detector'); - const detector = new Detector(); - const bmadDir = path.join(projectDir, BMAD_FOLDER_NAME); - - // During full reinstall, use the saved previous IDEs since bmad dir was deleted - // Otherwise detect from existing installation - let previouslyConfiguredIdes; - if (isFullReinstall) { - // During reinstall, treat all IDEs as new (need configuration) - previouslyConfiguredIdes = []; - } else { - const existingInstall = await detector.detect(bmadDir); - previouslyConfiguredIdes = existingInstall.ides || []; - } - - // Load saved IDE configurations for already-configured IDEs - const savedIdeConfigs = await this.ideConfigManager.loadAllIdeConfigs(bmadDir); - - // Collect IDE-specific configurations if any were selected - const ideConfigurations = {}; - - // First, add saved configs for already-configured IDEs - for (const ide of toolConfig.ides || []) { - if (previouslyConfiguredIdes.includes(ide) && savedIdeConfigs[ide]) { - ideConfigurations[ide] = savedIdeConfigs[ide]; - } - } - - if (!toolConfig.skipIde && toolConfig.ides && toolConfig.ides.length > 0) { - // Ensure IDE manager is initialized - await this.ideManager.ensureInitialized(); - - // Determine which IDEs are newly selected (not previously configured) - const newlySelectedIdes = toolConfig.ides.filter((ide) => !previouslyConfiguredIdes.includes(ide)); - - if (newlySelectedIdes.length > 0) { - // Collect configuration for IDEs that support it - for (const ide of newlySelectedIdes) { - try { - const handler = this.ideManager.handlers.get(ide); - - if (!handler) { - await prompts.log.warn(`Warning: IDE '${ide}' handler not found`); - continue; - } - - // Check if this IDE handler has a collectConfiguration method - // (custom installers like Codex, Kilo may have this) - if (typeof handler.collectConfiguration === 'function') { - await prompts.log.info(`Configuring ${ide}...`); - ideConfigurations[ide] = await handler.collectConfiguration({ - selectedModules: selectedModules || [], - projectDir, - bmadDir, - skipPrompts, - }); - } else { - // Config-driven IDEs don't need configuration - mark as ready - ideConfigurations[ide] = { _noConfigNeeded: true }; - } - } catch (error) { - // IDE doesn't support configuration or has an error - await prompts.log.warn(`Warning: Could not load configuration for ${ide}: ${error.message}`); - } - } - } - - // Log which IDEs are already configured and being kept - const keptIdes = toolConfig.ides.filter((ide) => previouslyConfiguredIdes.includes(ide)); - if (keptIdes.length > 0) { - await prompts.log.message(`Keeping existing configuration for: ${keptIdes.join(', ')}`); - } - } - - return { - ides: toolConfig.ides, - skipIde: toolConfig.skipIde, - configurations: ideConfigurations, - }; - } - - /** - * Main installation method - * @param {Object} config - Installation configuration - * @param {string} config.directory - Target directory - * @param {boolean} config.installCore - Whether to install core - * @param {string[]} config.modules - Modules to install - * @param {string[]} config.ides - IDEs to configure - * @param {boolean} config.skipIde - Skip IDE configuration - */ - async install(originalConfig) { - // Clone config to avoid mutating the caller's object - const config = { ...originalConfig }; - - // Check if core config was already collected in UI - const hasCoreConfig = config.coreConfig && Object.keys(config.coreConfig).length > 0; - - // Only display logo if core config wasn't already collected (meaning we're not continuing from UI) - if (!hasCoreConfig) { - // Display BMAD logo - await CLIUtils.displayLogo(); - - // Display welcome message - await CLIUtils.displaySection('BMad™ Installation', 'Version ' + require(path.join(getProjectRoot(), 'package.json')).version); - } - - // Note: Legacy V4 detection now happens earlier in UI.promptInstall() - // before any config collection, so we don't need to check again here - - const projectDir = path.resolve(config.directory); - const bmadDir = path.join(projectDir, BMAD_FOLDER_NAME); - - // If core config was pre-collected (from interactive mode), use it - if (config.coreConfig && Object.keys(config.coreConfig).length > 0) { - this.configCollector.collectedConfig.core = config.coreConfig; - // Also store in allAnswers for cross-referencing - this.configCollector.allAnswers = {}; - for (const [key, value] of Object.entries(config.coreConfig)) { - this.configCollector.allAnswers[`core_${key}`] = value; - } - } - - // Collect configurations for modules (skip if quick update already collected them) - let moduleConfigs; - let customModulePaths = new Map(); - - if (config._quickUpdate) { - // Quick update already collected all configs, use them directly - moduleConfigs = this.configCollector.collectedConfig; - - // For quick update, populate customModulePaths from _customModuleSources - if (config._customModuleSources) { - for (const [moduleId, customInfo] of config._customModuleSources) { - customModulePaths.set(moduleId, customInfo.sourcePath); - } - } - } else { - // For regular updates (modify flow), check manifest for custom module sources - if (config._isUpdate && config._existingInstall && config._existingInstall.customModules) { - for (const customModule of config._existingInstall.customModules) { - // Ensure we have an absolute sourcePath - let absoluteSourcePath = customModule.sourcePath; - - // Check if sourcePath is a cache-relative path (starts with _config) - if (absoluteSourcePath && absoluteSourcePath.startsWith('_config')) { - // Convert cache-relative path to absolute path - absoluteSourcePath = path.join(bmadDir, absoluteSourcePath); - } - // If no sourcePath but we have relativePath, convert it - else if (!absoluteSourcePath && customModule.relativePath) { - // relativePath is relative to the project root (parent of bmad dir) - absoluteSourcePath = path.resolve(projectDir, customModule.relativePath); - } - // Ensure sourcePath is absolute for anything else - else if (absoluteSourcePath && !path.isAbsolute(absoluteSourcePath)) { - absoluteSourcePath = path.resolve(absoluteSourcePath); - } - - if (absoluteSourcePath) { - customModulePaths.set(customModule.id, absoluteSourcePath); - } - } - } - - // Build custom module paths map from customContent - - // Handle selectedFiles (from existing install path or manual directory input) - if (config.customContent && config.customContent.selected && config.customContent.selectedFiles) { - const customHandler = new CustomHandler(); - for (const customFile of config.customContent.selectedFiles) { - const customInfo = await customHandler.getCustomInfo(customFile, path.resolve(config.directory)); - if (customInfo && customInfo.id) { - customModulePaths.set(customInfo.id, customInfo.path); - } - } - } - - // Handle new custom content sources from UI - if (config.customContent && config.customContent.sources) { - for (const source of config.customContent.sources) { - customModulePaths.set(source.id, source.path); - } - } - - // Handle cachedModules (from new install path where modules are cached) - // Only include modules that were actually selected for installation - if (config.customContent && config.customContent.cachedModules) { - // Get selected cached module IDs (if available) - const selectedCachedIds = config.customContent.selectedCachedModules || []; - // If no selection info, include all cached modules (for backward compatibility) - const shouldIncludeAll = selectedCachedIds.length === 0 && config.customContent.selected; - - for (const cachedModule of config.customContent.cachedModules) { - // For cached modules, the path is the cachePath which contains the module.yaml - if ( - cachedModule.id && - cachedModule.cachePath && // Include if selected or if we should include all - (shouldIncludeAll || selectedCachedIds.includes(cachedModule.id)) - ) { - customModulePaths.set(cachedModule.id, cachedModule.cachePath); - } - } - } - - // Get list of all modules including custom modules - // Order: core first, then official modules, then custom modules - const allModulesForConfig = ['core']; - - // Add official modules (excluding core and any custom modules) - const officialModules = (config.modules || []).filter((m) => m !== 'core' && !customModulePaths.has(m)); - allModulesForConfig.push(...officialModules); - - // Add custom modules at the end - for (const [moduleId] of customModulePaths) { - if (!allModulesForConfig.includes(moduleId)) { - allModulesForConfig.push(moduleId); - } - } - - // Check if core was already collected in UI - if (config.coreConfig && Object.keys(config.coreConfig).length > 0) { - // Core already collected, skip it in config collection - const modulesWithoutCore = allModulesForConfig.filter((m) => m !== 'core'); - moduleConfigs = await this.configCollector.collectAllConfigurations(modulesWithoutCore, path.resolve(config.directory), { - customModulePaths, - skipPrompts: config.skipPrompts, - }); - } else { - // Core not collected yet, include it - moduleConfigs = await this.configCollector.collectAllConfigurations(allModulesForConfig, path.resolve(config.directory), { - customModulePaths, - skipPrompts: config.skipPrompts, - }); - } - } - - // Set bmad folder name on module manager and IDE manager for placeholder replacement - this.moduleManager.setBmadFolderName(BMAD_FOLDER_NAME); - this.moduleManager.setCoreConfig(moduleConfigs.core || {}); - this.moduleManager.setCustomModulePaths(customModulePaths); - this.ideManager.setBmadFolderName(BMAD_FOLDER_NAME); - - // Tool selection will be collected after we determine if it's a reinstall/update/new install - - const spinner = await prompts.spinner(); - spinner.start('Preparing installation...'); - - try { - // Create a project directory if it doesn't exist (user already confirmed) - if (!(await fs.pathExists(projectDir))) { - spinner.message('Creating installation directory...'); - try { - // fs.ensureDir handles platform-specific directory creation - // It will recursively create all necessary parent directories - await fs.ensureDir(projectDir); - } catch (error) { - spinner.error('Failed to create installation directory'); - await prompts.log.error(`Error: ${error.message}`); - // More detailed error for common issues - if (error.code === 'EACCES') { - await prompts.log.error('Permission denied. Check parent directory permissions.'); - } else if (error.code === 'ENOSPC') { - await prompts.log.error('No space left on device.'); - } - throw new Error(`Cannot create directory: ${projectDir}`); - } - } - - // Check existing installation - spinner.message('Checking for existing installation...'); - const existingInstall = await this.detector.detect(bmadDir); - - if (existingInstall.installed && !config.force && !config._quickUpdate) { - spinner.stop('Existing installation detected'); - - // Check if user already decided what to do (from early menu in ui.js) - let action = null; - if (config.actionType === 'update') { - action = 'update'; - } else if (config.skipPrompts) { - // Non-interactive mode: default to update - action = 'update'; - } else { - // Fallback: Ask the user (backwards compatibility for other code paths) - await prompts.log.warn('Existing BMAD installation detected'); - await prompts.log.message(` Location: ${bmadDir}`); - await prompts.log.message(` Version: ${existingInstall.version}`); - - const promptResult = await this.promptUpdateAction(); - action = promptResult.action; - } - - if (action === 'update') { - // Store that we're updating for later processing - config._isUpdate = true; - config._existingInstall = existingInstall; - - // Detect modules that were previously installed but are NOT in the new selection (to be removed) - const previouslyInstalledModules = new Set(existingInstall.modules.map((m) => m.id)); - const newlySelectedModules = new Set(config.modules || []); - - // Find modules to remove (installed but not in new selection) - // Exclude 'core' from being removable - const modulesToRemove = [...previouslyInstalledModules].filter((m) => !newlySelectedModules.has(m) && m !== 'core'); - - // If there are modules to remove, ask for confirmation - if (modulesToRemove.length > 0) { - if (config.skipPrompts) { - // Non-interactive mode: preserve modules (matches prompt default: false) - for (const moduleId of modulesToRemove) { - if (!config.modules) config.modules = []; - config.modules.push(moduleId); - } - spinner.start('Preparing update...'); - } else { - if (spinner.isSpinning) { - spinner.stop('Module changes reviewed'); - } - - await prompts.log.warn('Modules to be removed:'); - for (const moduleId of modulesToRemove) { - const moduleInfo = existingInstall.modules.find((m) => m.id === moduleId); - const displayName = moduleInfo?.name || moduleId; - const modulePath = path.join(bmadDir, moduleId); - await prompts.log.error(` - ${displayName} (${modulePath})`); - } - - const confirmRemoval = await prompts.confirm({ - message: `Remove ${modulesToRemove.length} module(s) from BMAD installation?`, - default: false, - }); - - if (confirmRemoval) { - // Remove module folders - for (const moduleId of modulesToRemove) { - const modulePath = path.join(bmadDir, moduleId); - try { - if (await fs.pathExists(modulePath)) { - await fs.remove(modulePath); - await prompts.log.message(` Removed: ${moduleId}`); - } - } catch (error) { - await prompts.log.warn(` Warning: Failed to remove ${moduleId}: ${error.message}`); - } - } - await prompts.log.success(` Removed ${modulesToRemove.length} module(s)`); - } else { - await prompts.log.message(' Module removal cancelled'); - // Add the modules back to the selection since user cancelled removal - for (const moduleId of modulesToRemove) { - if (!config.modules) config.modules = []; - config.modules.push(moduleId); - } - } - - spinner.start('Preparing update...'); - } - } - - // Detect custom and modified files BEFORE updating (compare current files vs files-manifest.csv) - const existingFilesManifest = await this.readFilesManifest(bmadDir); - const { customFiles, modifiedFiles } = await this.detectCustomFiles(bmadDir, existingFilesManifest); - - config._customFiles = customFiles; - config._modifiedFiles = modifiedFiles; - - // Preserve existing core configuration during updates - // Read the current core config.yaml to maintain user's settings - const coreConfigPath = path.join(bmadDir, 'core', 'config.yaml'); - if ((await fs.pathExists(coreConfigPath)) && (!config.coreConfig || Object.keys(config.coreConfig).length === 0)) { - try { - const yaml = require('yaml'); - const coreConfigContent = await fs.readFile(coreConfigPath, 'utf8'); - const existingCoreConfig = yaml.parse(coreConfigContent); - - // Store in config.coreConfig so it's preserved through the installation - config.coreConfig = existingCoreConfig; - - // Also store in configCollector for use during config collection - this.configCollector.collectedConfig.core = existingCoreConfig; - } catch (error) { - await prompts.log.warn(`Warning: Could not read existing core config: ${error.message}`); - } - } - - // Also check cache directory for custom modules (like quick update does) - const cacheDir = path.join(bmadDir, '_config', 'custom'); - if (await fs.pathExists(cacheDir)) { - const cachedModules = await fs.readdir(cacheDir, { withFileTypes: true }); - - for (const cachedModule of cachedModules) { - const moduleId = cachedModule.name; - const cachedPath = path.join(cacheDir, moduleId); - - // Skip if path doesn't exist (broken symlink, deleted dir) - avoids lstat ENOENT - if (!(await fs.pathExists(cachedPath)) || !cachedModule.isDirectory()) { - continue; - } - - // Skip if we already have this module from manifest - if (customModulePaths.has(moduleId)) { - continue; - } - - // Check if this is an external official module - skip cache for those - const isExternal = await this.moduleManager.isExternalModule(moduleId); - if (isExternal) { - // External modules are handled via cloneExternalModule, not from cache - continue; - } - - // Check if this is actually a custom module (has module.yaml) - const moduleYamlPath = path.join(cachedPath, 'module.yaml'); - if (await fs.pathExists(moduleYamlPath)) { - customModulePaths.set(moduleId, cachedPath); - } - } - - // Update module manager with the new custom module paths from cache - this.moduleManager.setCustomModulePaths(customModulePaths); - } - - // If there are custom files, back them up temporarily - if (customFiles.length > 0) { - const tempBackupDir = path.join(projectDir, '_bmad-custom-backup-temp'); - await fs.ensureDir(tempBackupDir); - - spinner.start(`Backing up ${customFiles.length} custom files...`); - for (const customFile of customFiles) { - const relativePath = path.relative(bmadDir, customFile); - const backupPath = path.join(tempBackupDir, relativePath); - await fs.ensureDir(path.dirname(backupPath)); - await fs.copy(customFile, backupPath); - } - spinner.stop(`Backed up ${customFiles.length} custom files`); - - config._tempBackupDir = tempBackupDir; - } - - // For modified files, back them up to temp directory (will be restored as .bak files after install) - if (modifiedFiles.length > 0) { - const tempModifiedBackupDir = path.join(projectDir, '_bmad-modified-backup-temp'); - await fs.ensureDir(tempModifiedBackupDir); - - spinner.start(`Backing up ${modifiedFiles.length} modified files...`); - for (const modifiedFile of modifiedFiles) { - const relativePath = path.relative(bmadDir, modifiedFile.path); - const tempBackupPath = path.join(tempModifiedBackupDir, relativePath); - await fs.ensureDir(path.dirname(tempBackupPath)); - await fs.copy(modifiedFile.path, tempBackupPath, { overwrite: true }); - } - spinner.stop(`Backed up ${modifiedFiles.length} modified files`); - - config._tempModifiedBackupDir = tempModifiedBackupDir; - } - } - } else if (existingInstall.installed && config._quickUpdate) { - // Quick update mode - automatically treat as update without prompting - spinner.message('Preparing quick update...'); - config._isUpdate = true; - config._existingInstall = existingInstall; - - // Detect custom and modified files BEFORE updating - const existingFilesManifest = await this.readFilesManifest(bmadDir); - const { customFiles, modifiedFiles } = await this.detectCustomFiles(bmadDir, existingFilesManifest); - - config._customFiles = customFiles; - config._modifiedFiles = modifiedFiles; - - // Also check cache directory for custom modules (like quick update does) - const cacheDir = path.join(bmadDir, '_config', 'custom'); - if (await fs.pathExists(cacheDir)) { - const cachedModules = await fs.readdir(cacheDir, { withFileTypes: true }); - - for (const cachedModule of cachedModules) { - const moduleId = cachedModule.name; - const cachedPath = path.join(cacheDir, moduleId); - - // Skip if path doesn't exist (broken symlink, deleted dir) - avoids lstat ENOENT - if (!(await fs.pathExists(cachedPath)) || !cachedModule.isDirectory()) { - continue; - } - - // Skip if we already have this module from manifest - if (customModulePaths.has(moduleId)) { - continue; - } - - // Check if this is an external official module - skip cache for those - const isExternal = await this.moduleManager.isExternalModule(moduleId); - if (isExternal) { - // External modules are handled via cloneExternalModule, not from cache - continue; - } - - // Check if this is actually a custom module (has module.yaml) - const moduleYamlPath = path.join(cachedPath, 'module.yaml'); - if (await fs.pathExists(moduleYamlPath)) { - customModulePaths.set(moduleId, cachedPath); - } - } - - // Update module manager with the new custom module paths from cache - this.moduleManager.setCustomModulePaths(customModulePaths); - } - - // Back up custom files - if (customFiles.length > 0) { - const tempBackupDir = path.join(projectDir, '_bmad-custom-backup-temp'); - await fs.ensureDir(tempBackupDir); - - spinner.start(`Backing up ${customFiles.length} custom files...`); - for (const customFile of customFiles) { - const relativePath = path.relative(bmadDir, customFile); - const backupPath = path.join(tempBackupDir, relativePath); - await fs.ensureDir(path.dirname(backupPath)); - await fs.copy(customFile, backupPath); - } - spinner.stop(`Backed up ${customFiles.length} custom files`); - config._tempBackupDir = tempBackupDir; - } - - // Back up modified files - if (modifiedFiles.length > 0) { - const tempModifiedBackupDir = path.join(projectDir, '_bmad-modified-backup-temp'); - await fs.ensureDir(tempModifiedBackupDir); - - spinner.start(`Backing up ${modifiedFiles.length} modified files...`); - for (const modifiedFile of modifiedFiles) { - const relativePath = path.relative(bmadDir, modifiedFile.path); - const tempBackupPath = path.join(tempModifiedBackupDir, relativePath); - await fs.ensureDir(path.dirname(tempBackupPath)); - await fs.copy(modifiedFile.path, tempBackupPath, { overwrite: true }); - } - spinner.stop(`Backed up ${modifiedFiles.length} modified files`); - config._tempModifiedBackupDir = tempModifiedBackupDir; - } - } - - // Now collect tool configurations after we know if it's a reinstall - // Skip for quick update since we already have the IDE list - spinner.stop('Pre-checks complete'); - let toolSelection; - if (config._quickUpdate) { - // Quick update already has IDEs configured, use saved configurations - const preConfiguredIdes = {}; - const savedIdeConfigs = config._savedIdeConfigs || {}; - - for (const ide of config.ides || []) { - // Use saved config if available, otherwise mark as already configured (legacy) - if (savedIdeConfigs[ide]) { - preConfiguredIdes[ide] = savedIdeConfigs[ide]; - } else { - preConfiguredIdes[ide] = { _alreadyConfigured: true }; - } - } - toolSelection = { - ides: config.ides || [], - skipIde: !config.ides || config.ides.length === 0, - configurations: preConfiguredIdes, - }; - } else { - // Pass pre-selected IDEs from early prompt (if available) - // This allows IDE selection to happen before file copying, improving UX - // Use config.ides if it's an array (even if empty), null means prompt - const preSelectedIdes = Array.isArray(config.ides) ? config.ides : null; - toolSelection = await this.collectToolConfigurations( - path.resolve(config.directory), - config.modules, - config._isFullReinstall || false, - config._previouslyConfiguredIdes || [], - preSelectedIdes, - config.skipPrompts || false, - ); - } - - // Merge tool selection into config (for both quick update and regular flow) - // Normalize IDE keys to lowercase so they match handler map keys consistently - config.ides = (toolSelection.ides || []).map((ide) => ide.toLowerCase()); - config.skipIde = toolSelection.skipIde; - const ideConfigurations = toolSelection.configurations; - - // Early check: fail fast if ALL selected IDEs are suspended - if (config.ides && config.ides.length > 0) { - await this.ideManager.ensureInitialized(); - const suspendedIdes = config.ides.filter((ide) => { - const handler = this.ideManager.handlers.get(ide); - return handler?.platformConfig?.suspended; - }); - - if (suspendedIdes.length > 0 && suspendedIdes.length === config.ides.length) { - for (const ide of suspendedIdes) { - const handler = this.ideManager.handlers.get(ide); - await prompts.log.error(`${handler.displayName || ide}: ${handler.platformConfig.suspended}`); - } - throw new Error( - `All selected tool(s) are suspended: ${suspendedIdes.join(', ')}. Installation aborted to prevent upgrading _bmad/ without a working IDE configuration.`, - ); - } - } - - // Detect IDEs that were previously installed but are NOT in the new selection (to be removed) - if (config._isUpdate && config._existingInstall) { - const previouslyInstalledIdes = new Set(config._existingInstall.ides || []); - const newlySelectedIdes = new Set(config.ides || []); - - const idesToRemove = [...previouslyInstalledIdes].filter((ide) => !newlySelectedIdes.has(ide)); - - if (idesToRemove.length > 0) { - if (config.skipPrompts) { - // Non-interactive mode: silently preserve existing IDE configs - if (!config.ides) config.ides = []; - const savedIdeConfigs = await this.ideConfigManager.loadAllIdeConfigs(bmadDir); - for (const ide of idesToRemove) { - config.ides.push(ide); - if (savedIdeConfigs[ide] && !ideConfigurations[ide]) { - ideConfigurations[ide] = savedIdeConfigs[ide]; - } - } - } else { - if (spinner.isSpinning) { - spinner.stop('IDE changes reviewed'); - } - - await prompts.log.warn('IDEs to be removed:'); - for (const ide of idesToRemove) { - await prompts.log.error(` - ${ide}`); - } - - const confirmRemoval = await prompts.confirm({ - message: `Remove BMAD configuration for ${idesToRemove.length} IDE(s)?`, - default: false, - }); - - if (confirmRemoval) { - await this.ideManager.ensureInitialized(); - for (const ide of idesToRemove) { - try { - const handler = this.ideManager.handlers.get(ide); - if (handler) { - await handler.cleanup(projectDir); - } - await this.ideConfigManager.deleteIdeConfig(bmadDir, ide); - await prompts.log.message(` Removed: ${ide}`); - } catch (error) { - await prompts.log.warn(` Warning: Failed to remove ${ide}: ${error.message}`); - } - } - await prompts.log.success(` Removed ${idesToRemove.length} IDE(s)`); - } else { - await prompts.log.message(' IDE removal cancelled'); - // Add IDEs back to selection and restore their saved configurations - if (!config.ides) config.ides = []; - const savedIdeConfigs = await this.ideConfigManager.loadAllIdeConfigs(bmadDir); - for (const ide of idesToRemove) { - config.ides.push(ide); - if (savedIdeConfigs[ide] && !ideConfigurations[ide]) { - ideConfigurations[ide] = savedIdeConfigs[ide]; - } - } - } - - spinner.start('Preparing installation...'); - } - } - } - - // Results collector for consolidated summary - const results = []; - const addResult = (step, status, detail = '') => results.push({ step, status, detail }); - - if (spinner.isSpinning) { - spinner.message('Preparing installation...'); - } else { - spinner.start('Preparing installation...'); - } - - // Create bmad directory structure - spinner.message('Creating directory structure...'); - await this.createDirectoryStructure(bmadDir); - - // Cache custom modules if any - if (customModulePaths && customModulePaths.size > 0) { - spinner.message('Caching custom modules...'); - const { CustomModuleCache } = require('./custom-module-cache'); - const customCache = new CustomModuleCache(bmadDir); - - for (const [moduleId, sourcePath] of customModulePaths) { - const cachedInfo = await customCache.cacheModule(moduleId, sourcePath, { - sourcePath: sourcePath, // Store original path for updates - }); - - // Update the customModulePaths to use the cached location - customModulePaths.set(moduleId, cachedInfo.cachePath); - } - - // Update module manager with the cached paths - this.moduleManager.setCustomModulePaths(customModulePaths); - addResult('Custom modules cached', 'ok'); - } - - const projectRoot = getProjectRoot(); - - // Custom content is already handled in UI before module selection - const finalCustomContent = config.customContent; - - // Prepare modules list including cached custom modules - let allModules = [...(config.modules || [])]; - - // During quick update, we might have custom module sources from the manifest - if (config._customModuleSources) { - // Add custom modules from stored sources - for (const [moduleId, customInfo] of config._customModuleSources) { - if (!allModules.includes(moduleId) && (await fs.pathExists(customInfo.sourcePath))) { - allModules.push(moduleId); - } - } - } - - // Add cached custom modules - if (finalCustomContent && finalCustomContent.cachedModules) { - for (const cachedModule of finalCustomContent.cachedModules) { - if (!allModules.includes(cachedModule.id)) { - allModules.push(cachedModule.id); - } - } - } - - // Regular custom content from user input (non-cached) - if (finalCustomContent && finalCustomContent.selected && finalCustomContent.selectedFiles) { - // Add custom modules to the installation list - const customHandler = new CustomHandler(); - for (const customFile of finalCustomContent.selectedFiles) { - const customInfo = await customHandler.getCustomInfo(customFile, projectDir); - if (customInfo && customInfo.id) { - allModules.push(customInfo.id); - } - } - } - - // Don't include core again if already installed - if (config.installCore) { - allModules = allModules.filter((m) => m !== 'core'); - } - - // For dependency resolution, we only need regular modules (not custom modules) - // Custom modules are already installed in _bmad and don't need dependency resolution from source - const regularModulesForResolution = allModules.filter((module) => { - // Check if this is a custom module - const isCustom = - customModulePaths.has(module) || - (finalCustomContent && finalCustomContent.cachedModules && finalCustomContent.cachedModules.some((cm) => cm.id === module)) || - (finalCustomContent && - finalCustomContent.selected && - finalCustomContent.selectedFiles && - finalCustomContent.selectedFiles.some((f) => f.includes(module))); - return !isCustom; - }); - - // Stop spinner before tasks() takes over progress display - spinner.stop('Preparation complete'); - - // ───────────────────────────────────────────────────────────────────────── - // FIRST TASKS BLOCK: Core installation through manifests (non-interactive) - // ───────────────────────────────────────────────────────────────────────── - const isQuickUpdate = config._quickUpdate || false; - - // Shared resolution result across task callbacks (closure-scoped, not on `this`) - let taskResolution; - - // Collect directory creation results for output after tasks() completes - const dirResults = { createdDirs: [], movedDirs: [], createdWdsFolders: [] }; - - // Build task list conditionally - const installTasks = []; - - // Core installation task - if (config.installCore) { - installTasks.push({ - title: isQuickUpdate ? 'Updating BMAD core' : 'Installing BMAD core', - task: async (message) => { - await this.installCoreWithDependencies(bmadDir, { core: {} }); - addResult('Core', 'ok', isQuickUpdate ? 'updated' : 'installed'); - await this.generateModuleConfigs(bmadDir, { core: config.coreConfig || {} }); - return isQuickUpdate ? 'Core updated' : 'Core installed'; - }, - }); - } - - // Dependency resolution task - installTasks.push({ - title: 'Resolving dependencies', - task: async (message) => { - // Create a temporary module manager that knows about custom content locations - const tempModuleManager = new ModuleManager({ - bmadDir: bmadDir, - }); - - taskResolution = await this.dependencyResolver.resolve(projectRoot, regularModulesForResolution, { - verbose: config.verbose, - moduleManager: tempModuleManager, - }); - return 'Dependencies resolved'; - }, - }); - - // Module installation task - if (allModules && allModules.length > 0) { - installTasks.push({ - title: isQuickUpdate ? `Updating ${allModules.length} module(s)` : `Installing ${allModules.length} module(s)`, - task: async (message) => { - const resolution = taskResolution; - const installedModuleNames = new Set(); - - for (const moduleName of allModules) { - if (installedModuleNames.has(moduleName)) continue; - installedModuleNames.add(moduleName); - - message(`${isQuickUpdate ? 'Updating' : 'Installing'} ${moduleName}...`); - - // Check if this is a custom module - let isCustomModule = false; - let customInfo = null; - - // First check if we have a cached version - if (finalCustomContent && finalCustomContent.cachedModules) { - const cachedModule = finalCustomContent.cachedModules.find((m) => m.id === moduleName); - if (cachedModule) { - isCustomModule = true; - customInfo = { id: moduleName, path: cachedModule.cachePath, config: {} }; - } - } - - // Then check custom module sources from manifest (for quick update) - if (!isCustomModule && config._customModuleSources && config._customModuleSources.has(moduleName)) { - customInfo = config._customModuleSources.get(moduleName); - isCustomModule = true; - if (customInfo.sourcePath && !customInfo.path) { - customInfo.path = path.isAbsolute(customInfo.sourcePath) - ? customInfo.sourcePath - : path.join(bmadDir, customInfo.sourcePath); - } - } - - // Finally check regular custom content - if (!isCustomModule && finalCustomContent && finalCustomContent.selected && finalCustomContent.selectedFiles) { - const customHandler = new CustomHandler(); - for (const customFile of finalCustomContent.selectedFiles) { - const info = await customHandler.getCustomInfo(customFile, projectDir); - if (info && info.id === moduleName) { - isCustomModule = true; - customInfo = info; - break; - } - } - } - - if (isCustomModule && customInfo) { - if (!customModulePaths.has(moduleName) && customInfo.path) { - customModulePaths.set(moduleName, customInfo.path); - this.moduleManager.setCustomModulePaths(customModulePaths); - } - - const collectedModuleConfig = moduleConfigs[moduleName] || {}; - await this.moduleManager.install( - moduleName, - bmadDir, - (filePath) => { - this.installedFiles.add(filePath); - }, - { - isCustom: true, - moduleConfig: collectedModuleConfig, - isQuickUpdate: isQuickUpdate, - installer: this, - silent: true, - }, - ); - await this.generateModuleConfigs(bmadDir, { - [moduleName]: { ...config.coreConfig, ...customInfo.config, ...collectedModuleConfig }, - }); - } else { - if (!resolution || !resolution.byModule) { - addResult(`Module: ${moduleName}`, 'warn', 'skipped (no resolution data)'); - continue; - } - if (moduleName === 'core') { - await this.installCoreWithDependencies(bmadDir, resolution.byModule[moduleName]); - } else { - await this.installModuleWithDependencies(moduleName, bmadDir, resolution.byModule[moduleName]); - } - } - - addResult(`Module: ${moduleName}`, 'ok', isQuickUpdate ? 'updated' : 'installed'); - } - - // Install partial modules (only dependencies) - if (!resolution || !resolution.byModule) { - return `${allModules.length} module(s) ${isQuickUpdate ? 'updated' : 'installed'}`; - } - for (const [module, files] of Object.entries(resolution.byModule)) { - if (!allModules.includes(module) && module !== 'core') { - const totalFiles = - files.agents.length + - files.tasks.length + - files.tools.length + - files.templates.length + - files.data.length + - files.other.length; - if (totalFiles > 0) { - message(`Installing ${module} dependencies...`); - await this.installPartialModule(module, bmadDir, files); - } - } - } - - return `${allModules.length} module(s) ${isQuickUpdate ? 'updated' : 'installed'}`; - }, - }); - } - - // Module directory creation task - installTasks.push({ - title: 'Creating module directories', - task: async (message) => { - const resolution = taskResolution; - if (!resolution || !resolution.byModule) { - addResult('Module directories', 'warn', 'no resolution data'); - return 'Module directories skipped (no resolution data)'; - } - const verboseMode = process.env.BMAD_VERBOSE_INSTALL === 'true' || config.verbose; - const moduleLogger = { - log: async (msg) => (verboseMode ? await prompts.log.message(msg) : undefined), - error: async (msg) => await prompts.log.error(msg), - warn: async (msg) => await prompts.log.warn(msg), - }; - - // Core module directories - if (config.installCore || resolution.byModule.core) { - const result = await this.moduleManager.createModuleDirectories('core', bmadDir, { - installedIDEs: config.ides || [], - moduleConfig: moduleConfigs.core || {}, - existingModuleConfig: this.configCollector.existingConfig?.core || {}, - coreConfig: moduleConfigs.core || {}, - logger: moduleLogger, - silent: true, - }); - if (result) { - dirResults.createdDirs.push(...result.createdDirs); - dirResults.movedDirs.push(...(result.movedDirs || [])); - dirResults.createdWdsFolders.push(...result.createdWdsFolders); - } - } - - // User-selected module directories - if (config.modules && config.modules.length > 0) { - for (const moduleName of config.modules) { - message(`Setting up ${moduleName}...`); - const result = await this.moduleManager.createModuleDirectories(moduleName, bmadDir, { - installedIDEs: config.ides || [], - moduleConfig: moduleConfigs[moduleName] || {}, - existingModuleConfig: this.configCollector.existingConfig?.[moduleName] || {}, - coreConfig: moduleConfigs.core || {}, - logger: moduleLogger, - silent: true, - }); - if (result) { - dirResults.createdDirs.push(...result.createdDirs); - dirResults.movedDirs.push(...(result.movedDirs || [])); - dirResults.createdWdsFolders.push(...result.createdWdsFolders); - } - } - } - - addResult('Module directories', 'ok'); - return 'Module directories created'; - }, - }); - - // Configuration generation task (stored as named reference for deferred execution) - const configTask = { - title: 'Generating configurations', - task: async (message) => { - // Generate clean config.yaml files for each installed module - await this.generateModuleConfigs(bmadDir, moduleConfigs); - addResult('Configurations', 'ok', 'generated'); - - // Pre-register manifest files - const cfgDir = path.join(bmadDir, '_config'); - this.installedFiles.add(path.join(cfgDir, 'manifest.yaml')); - this.installedFiles.add(path.join(cfgDir, 'agent-manifest.csv')); - - // Generate CSV manifests for agents, skills AND ALL FILES with hashes - // This must happen BEFORE mergeModuleHelpCatalogs because it depends on agent-manifest.csv - message('Generating manifests...'); - const manifestGen = new ManifestGenerator(); - - const allModulesForManifest = config._quickUpdate - ? config._existingModules || allModules || [] - : config._preserveModules - ? [...allModules, ...config._preserveModules] - : allModules || []; - - let modulesForCsvPreserve; - if (config._quickUpdate) { - modulesForCsvPreserve = config._existingModules || allModules || []; - } else { - modulesForCsvPreserve = config._preserveModules ? [...allModules, ...config._preserveModules] : allModules; - } - - const manifestStats = await manifestGen.generateManifests(bmadDir, allModulesForManifest, [...this.installedFiles], { - ides: config.ides || [], - preservedModules: modulesForCsvPreserve, - }); - - // Merge help catalogs - message('Generating help catalog...'); - await this.mergeModuleHelpCatalogs(bmadDir); - addResult('Help catalog', 'ok'); - - return 'Configurations generated'; - }, - }; - installTasks.push(configTask); - - // Run all tasks except config (which runs after directory output) - const mainTasks = installTasks.filter((t) => t !== configTask); - await prompts.tasks(mainTasks); - - // Render directory creation output right after directory task - const color = await prompts.getColor(); - if (dirResults.movedDirs.length > 0) { - const lines = dirResults.movedDirs.map((d) => ` ${d}`).join('\n'); - await prompts.log.message(color.cyan(`Moved directories:\n${lines}`)); - } - if (dirResults.createdDirs.length > 0) { - const lines = dirResults.createdDirs.map((d) => ` ${d}`).join('\n'); - await prompts.log.message(color.yellow(`Created directories:\n${lines}`)); - } - if (dirResults.createdWdsFolders.length > 0) { - const lines = dirResults.createdWdsFolders.map((f) => color.dim(` \u2713 ${f}/`)).join('\n'); - await prompts.log.message(color.cyan(`Created WDS folder structure:\n${lines}`)); - } - - // Now run configuration generation - await prompts.tasks([configTask]); - - // Resolution is now available via closure-scoped taskResolution - const resolution = taskResolution; - - // ───────────────────────────────────────────────────────────────────────── - // IDE SETUP: Keep as spinner since it may prompt for user input - // ───────────────────────────────────────────────────────────────────────── - if (!config.skipIde && config.ides && config.ides.length > 0) { - await this.ideManager.ensureInitialized(); - const validIdes = config.ides.filter((ide) => ide && typeof ide === 'string'); - - if (validIdes.length === 0) { - addResult('IDE configuration', 'warn', 'no valid IDEs selected'); - } else { - const needsPrompting = validIdes.some((ide) => !ideConfigurations[ide]); - const ideSpinner = await prompts.spinner(); - ideSpinner.start('Configuring tools...'); - - try { - for (const ide of validIdes) { - if (!needsPrompting || ideConfigurations[ide]) { - ideSpinner.message(`Configuring ${ide}...`); - } else { - if (ideSpinner.isSpinning) { - ideSpinner.stop('Ready for IDE configuration'); - } - } - - // Suppress stray console output for pre-configured IDEs (no user interaction) - const ideHasConfig = Boolean(ideConfigurations[ide]); - const originalLog = console.log; - if (!config.verbose && ideHasConfig) { - console.log = () => {}; - } - try { - const setupResult = await this.ideManager.setup(ide, projectDir, bmadDir, { - selectedModules: allModules || [], - preCollectedConfig: ideConfigurations[ide] || null, - verbose: config.verbose, - silent: ideHasConfig, - }); - - if (ideConfigurations[ide] && !ideConfigurations[ide]._alreadyConfigured) { - await this.ideConfigManager.saveIdeConfig(bmadDir, ide, ideConfigurations[ide]); - } - - if (setupResult.success) { - addResult(ide, 'ok', setupResult.detail || ''); - } else { - addResult(ide, 'error', setupResult.error || 'failed'); - } - } finally { - console.log = originalLog; - } - - if (needsPrompting && !ideSpinner.isSpinning) { - ideSpinner.start('Configuring tools...'); - } - } - } finally { - if (ideSpinner.isSpinning) { - ideSpinner.stop('Tool configuration complete'); - } - } - } - } - - // ───────────────────────────────────────────────────────────────────────── - // SECOND TASKS BLOCK: Post-IDE operations (non-interactive) - // ───────────────────────────────────────────────────────────────────────── - const postIdeTasks = []; - - // File restoration task (only for updates) - if ( - config._isUpdate && - ((config._customFiles && config._customFiles.length > 0) || (config._modifiedFiles && config._modifiedFiles.length > 0)) - ) { - postIdeTasks.push({ - title: 'Finalizing installation', - task: async (message) => { - let customFiles = []; - let modifiedFiles = []; - - if (config._customFiles && config._customFiles.length > 0) { - message(`Restoring ${config._customFiles.length} custom files...`); - - for (const originalPath of config._customFiles) { - const relativePath = path.relative(bmadDir, originalPath); - const backupPath = path.join(config._tempBackupDir, relativePath); - - if (await fs.pathExists(backupPath)) { - await fs.ensureDir(path.dirname(originalPath)); - await fs.copy(backupPath, originalPath, { overwrite: true }); - } - } - - if (config._tempBackupDir && (await fs.pathExists(config._tempBackupDir))) { - await fs.remove(config._tempBackupDir); - } - - customFiles = config._customFiles; - } - - if (config._modifiedFiles && config._modifiedFiles.length > 0) { - modifiedFiles = config._modifiedFiles; - - if (config._tempModifiedBackupDir && (await fs.pathExists(config._tempModifiedBackupDir))) { - message(`Restoring ${modifiedFiles.length} modified files as .bak...`); - - for (const modifiedFile of modifiedFiles) { - const relativePath = path.relative(bmadDir, modifiedFile.path); - const tempBackupPath = path.join(config._tempModifiedBackupDir, relativePath); - const bakPath = modifiedFile.path + '.bak'; - - if (await fs.pathExists(tempBackupPath)) { - await fs.ensureDir(path.dirname(bakPath)); - await fs.copy(tempBackupPath, bakPath, { overwrite: true }); - } - } - - await fs.remove(config._tempModifiedBackupDir); - } - } - - // Store for summary access - config._restoredCustomFiles = customFiles; - config._restoredModifiedFiles = modifiedFiles; - - return 'Installation finalized'; - }, - }); - } - - await prompts.tasks(postIdeTasks); - - // Retrieve restored file info for summary - const customFiles = config._restoredCustomFiles || []; - const modifiedFiles = config._restoredModifiedFiles || []; - - // Render consolidated summary - await this.renderInstallSummary(results, { - bmadDir, - modules: config.modules, - ides: config.ides, - customFiles: customFiles.length > 0 ? customFiles : undefined, - modifiedFiles: modifiedFiles.length > 0 ? modifiedFiles : undefined, - }); - - return { - success: true, - path: bmadDir, - modules: config.modules, - ides: config.ides, - projectDir: projectDir, - }; - } catch (error) { - try { - if (spinner.isSpinning) { - spinner.error('Installation failed'); - } else { - await prompts.log.error('Installation failed'); - } - } catch { - // Ensure the original error is never swallowed by a logging failure - } - - // Clean up any temp backup directories that were created before the failure - try { - if (config._tempBackupDir && (await fs.pathExists(config._tempBackupDir))) { - await fs.remove(config._tempBackupDir); - } - if (config._tempModifiedBackupDir && (await fs.pathExists(config._tempModifiedBackupDir))) { - await fs.remove(config._tempModifiedBackupDir); - } - } catch { - // Best-effort cleanup — don't mask the original error - } - - throw error; - } - } - - /** - * Render a consolidated install summary using prompts.note() - * @param {Array} results - Array of {step, status: 'ok'|'error'|'warn', detail} - * @param {Object} context - {bmadDir, modules, ides, customFiles, modifiedFiles} - */ - async renderInstallSummary(results, context = {}) { - const color = await prompts.getColor(); - const selectedIdes = new Set((context.ides || []).map((ide) => String(ide).toLowerCase())); - - // Build step lines with status indicators - const lines = []; - for (const r of results) { - let stepLabel = null; - - if (r.status !== 'ok') { - stepLabel = r.step; - } else if (r.step === 'Core') { - stepLabel = 'BMAD'; - } else if (r.step.startsWith('Module: ')) { - stepLabel = r.step; - } else if (selectedIdes.has(String(r.step).toLowerCase())) { - stepLabel = r.step; - } - - if (!stepLabel) { - continue; - } - - let icon; - if (r.status === 'ok') { - icon = color.green('\u2713'); - } else if (r.status === 'warn') { - icon = color.yellow('!'); - } else { - icon = color.red('\u2717'); - } - const detail = r.detail ? color.dim(` (${r.detail})`) : ''; - lines.push(` ${icon} ${stepLabel}${detail}`); - } - - if ((context.ides || []).length === 0) { - lines.push(` ${color.green('\u2713')} No IDE selected ${color.dim('(installed in _bmad only)')}`); - } - - // Context and warnings - lines.push(''); - if (context.bmadDir) { - lines.push(` Installed to: ${color.dim(context.bmadDir)}`); - } - if (context.customFiles && context.customFiles.length > 0) { - lines.push(` ${color.cyan(`Custom files preserved: ${context.customFiles.length}`)}`); - } - if (context.modifiedFiles && context.modifiedFiles.length > 0) { - lines.push(` ${color.yellow(`Modified files backed up (.bak): ${context.modifiedFiles.length}`)}`); - } - - // Next steps - lines.push( - '', - ' Next steps:', - ` Read our new Docs Site: ${color.dim('https://docs.bmad-method.org/')}`, - ` Join our Discord: ${color.dim('https://discord.gg/gk8jAdXWmj')}`, - ` Star us on GitHub: ${color.dim('https://github.com/bmad-code-org/BMAD-METHOD/')}`, - ` Subscribe on YouTube: ${color.dim('https://www.youtube.com/@BMadCode')}`, - ); - if (context.ides && context.ides.length > 0) { - lines.push(` Invoke the ${color.cyan('bmad-help')} skill in your IDE Agent to get started`); - } - - await prompts.note(lines.join('\n'), 'BMAD is ready to use!'); - } - - /** - * Update existing installation - */ - async update(config) { - const spinner = await prompts.spinner(); - spinner.start('Checking installation...'); - - try { - const projectDir = path.resolve(config.directory); - const { bmadDir } = await this.findBmadDir(projectDir); - const existingInstall = await this.detector.detect(bmadDir); - - if (!existingInstall.installed) { - spinner.stop('No BMAD installation found'); - throw new Error(`No BMAD installation found at ${bmadDir}`); - } - - spinner.message('Analyzing update requirements...'); - - // Compare versions and determine what needs updating - const currentVersion = existingInstall.version; - const newVersion = require(path.join(getProjectRoot(), 'package.json')).version; - - // Check for custom modules with missing sources before update - const customModuleSources = new Map(); - - // Check manifest for backward compatibility - if (existingInstall.customModules) { - for (const customModule of existingInstall.customModules) { - customModuleSources.set(customModule.id, customModule); - } - } - - // Also check cache directory - const cacheDir = path.join(bmadDir, '_config', 'custom'); - if (await fs.pathExists(cacheDir)) { - const cachedModules = await fs.readdir(cacheDir, { withFileTypes: true }); - - for (const cachedModule of cachedModules) { - if (cachedModule.isDirectory()) { - const moduleId = cachedModule.name; - - // Skip if we already have this module - if (customModuleSources.has(moduleId)) { - continue; - } - - // Check if this is an external official module - skip cache for those - const isExternal = await this.moduleManager.isExternalModule(moduleId); - if (isExternal) { - // External modules are handled via cloneExternalModule, not from cache - continue; - } - - const cachedPath = path.join(cacheDir, moduleId); - - // Check if this is actually a custom module (has module.yaml) - const moduleYamlPath = path.join(cachedPath, 'module.yaml'); - if (await fs.pathExists(moduleYamlPath)) { - customModuleSources.set(moduleId, { - id: moduleId, - name: moduleId, - sourcePath: path.join('_config', 'custom', moduleId), // Relative path - cached: true, - }); - } - } - } - } - - if (customModuleSources.size > 0) { - spinner.stop('Update analysis complete'); - await prompts.log.warn('Checking custom module sources before update...'); - - const projectRoot = getProjectRoot(); - await this.handleMissingCustomSources( - customModuleSources, - bmadDir, - projectRoot, - 'update', - existingInstall.modules.map((m) => m.id), - config.skipPrompts || false, - ); - - spinner.start('Preparing update...'); - } - - if (config.dryRun) { - spinner.stop('Dry run analysis complete'); - let dryRunContent = `Current version: ${currentVersion}\n`; - dryRunContent += `New version: ${newVersion}\n`; - dryRunContent += `Core: ${existingInstall.hasCore ? 'Will be updated' : 'Not installed'}`; - - if (existingInstall.modules.length > 0) { - dryRunContent += '\n\nModules to update:'; - for (const mod of existingInstall.modules) { - dryRunContent += `\n - ${mod.id}`; - } - } - await prompts.note(dryRunContent, 'Update Preview (Dry Run)'); - return; - } - - // Perform actual update - if (existingInstall.hasCore) { - spinner.message('Updating core...'); - await this.updateCore(bmadDir, config.force); - } - - for (const module of existingInstall.modules) { - spinner.message(`Updating module: ${module.id}...`); - await this.moduleManager.update(module.id, bmadDir, config.force, { installer: this }); - } - - // Update manifest - spinner.message('Updating manifest...'); - await this.manifest.update(bmadDir, { - version: newVersion, - updateDate: new Date().toISOString(), - }); - - spinner.stop('Update complete'); - return { success: true }; - } catch (error) { - spinner.error('Update failed'); - throw error; - } - } - - /** - * Get installation status - */ - async getStatus(directory) { - const projectDir = path.resolve(directory); - const { bmadDir } = await this.findBmadDir(projectDir); - return await this.detector.detect(bmadDir); - } - - /** - * Get available modules - */ - async getAvailableModules() { - return await this.moduleManager.listAvailable(); - } - - /** - * Uninstall BMAD with selective removal options - * @param {string} directory - Project directory - * @param {Object} options - Uninstall options - * @param {boolean} [options.removeModules=true] - Remove _bmad/ directory - * @param {boolean} [options.removeIdeConfigs=true] - Remove IDE configurations - * @param {boolean} [options.removeOutputFolder=false] - Remove user artifacts output folder - * @returns {Object} Result with success status and removed components - */ - async uninstall(directory, options = {}) { - const projectDir = path.resolve(directory); - const { bmadDir } = await this.findBmadDir(projectDir); - - if (!(await fs.pathExists(bmadDir))) { - return { success: false, reason: 'not-installed' }; - } - - // 1. DETECT: Read state BEFORE deleting anything - const existingInstall = await this.detector.detect(bmadDir); - const outputFolder = await this._readOutputFolder(bmadDir); - - const removed = { modules: false, ideConfigs: false, outputFolder: false }; - - // 2. IDE CLEANUP (before _bmad/ deletion so configs are accessible) - if (options.removeIdeConfigs !== false) { - await this.uninstallIdeConfigs(projectDir, existingInstall, { silent: options.silent }); - removed.ideConfigs = true; - } - - // 3. OUTPUT FOLDER (only if explicitly requested) - if (options.removeOutputFolder === true && outputFolder) { - removed.outputFolder = await this.uninstallOutputFolder(projectDir, outputFolder); - } - - // 4. BMAD DIRECTORY (last, after everything that needs it) - if (options.removeModules !== false) { - removed.modules = await this.uninstallModules(projectDir); - } - - return { success: true, removed, version: existingInstall.version }; - } - - /** - * Uninstall IDE configurations only - * @param {string} projectDir - Project directory - * @param {Object} existingInstall - Detection result from detector.detect() - * @param {Object} [options] - Options (e.g. { silent: true }) - * @returns {Promise} Results from IDE cleanup - */ - async uninstallIdeConfigs(projectDir, existingInstall, options = {}) { - await this.ideManager.ensureInitialized(); - const cleanupOptions = { isUninstall: true, silent: options.silent }; - const ideList = existingInstall.ides || []; - if (ideList.length > 0) { - return this.ideManager.cleanupByList(projectDir, ideList, cleanupOptions); - } - return this.ideManager.cleanup(projectDir, cleanupOptions); - } - - /** - * Remove user artifacts output folder - * @param {string} projectDir - Project directory - * @param {string} outputFolder - Output folder name (relative) - * @returns {Promise} Whether the folder was removed - */ - async uninstallOutputFolder(projectDir, outputFolder) { - if (!outputFolder) return false; - const resolvedProject = path.resolve(projectDir); - const outputPath = path.resolve(resolvedProject, outputFolder); - if (!outputPath.startsWith(resolvedProject + path.sep)) { - return false; - } - if (await fs.pathExists(outputPath)) { - await fs.remove(outputPath); - return true; - } - return false; - } - - /** - * Remove the _bmad/ directory - * @param {string} projectDir - Project directory - * @returns {Promise} Whether the directory was removed - */ - async uninstallModules(projectDir) { - const { bmadDir } = await this.findBmadDir(projectDir); - if (await fs.pathExists(bmadDir)) { - await fs.remove(bmadDir); - return true; - } - return false; - } - - /** - * Get the configured output folder name for a project - * Resolves bmadDir internally from projectDir - * @param {string} projectDir - Project directory - * @returns {string} Output folder name (relative, default: '_bmad-output') - */ - async getOutputFolder(projectDir) { - const { bmadDir } = await this.findBmadDir(projectDir); - return this._readOutputFolder(bmadDir); - } - - /** - * Read the output_folder setting from module config files - * Checks bmm/config.yaml first, then other module configs - * @param {string} bmadDir - BMAD installation directory - * @returns {string} Output folder path or default - */ - async _readOutputFolder(bmadDir) { - const yaml = require('yaml'); - - // Check bmm/config.yaml first (most common) - const bmmConfigPath = path.join(bmadDir, 'bmm', 'config.yaml'); - if (await fs.pathExists(bmmConfigPath)) { - try { - const content = await fs.readFile(bmmConfigPath, 'utf8'); - const config = yaml.parse(content); - if (config && config.output_folder) { - // Strip {project-root}/ prefix if present - return config.output_folder.replace(/^\{project-root\}[/\\]/, ''); - } - } catch { - // Fall through to other modules - } - } - - // Scan other module config.yaml files - try { - const entries = await fs.readdir(bmadDir, { withFileTypes: true }); - for (const entry of entries) { - if (!entry.isDirectory() || entry.name === 'bmm' || entry.name.startsWith('_')) continue; - const configPath = path.join(bmadDir, entry.name, 'config.yaml'); - if (await fs.pathExists(configPath)) { - try { - const content = await fs.readFile(configPath, 'utf8'); - const config = yaml.parse(content); - if (config && config.output_folder) { - return config.output_folder.replace(/^\{project-root\}[/\\]/, ''); - } - } catch { - // Continue scanning - } - } - } - } catch { - // Directory scan failed - } - - // Default fallback - return '_bmad-output'; - } - - /** - * Private: Create directory structure - */ - /** - * Merge all module-help.csv files into a single bmad-help.csv - * Scans all installed modules for module-help.csv and merges them - * Enriches agent info from agent-manifest.csv - * Output is written to _bmad/_config/bmad-help.csv - * @param {string} bmadDir - BMAD installation directory - */ - async mergeModuleHelpCatalogs(bmadDir) { - const allRows = []; - const headerRow = - 'module,phase,name,code,sequence,workflow-file,command,required,agent-name,agent-command,agent-display-name,agent-title,options,description,output-location,outputs'; - - // Load agent manifest for agent info lookup - const agentManifestPath = path.join(bmadDir, '_config', 'agent-manifest.csv'); - const agentInfo = new Map(); // agent-name -> {command, displayName, title+icon} - - if (await fs.pathExists(agentManifestPath)) { - const manifestContent = await fs.readFile(agentManifestPath, 'utf8'); - const lines = manifestContent.split('\n').filter((line) => line.trim()); - - for (const line of lines) { - if (line.startsWith('name,')) continue; // Skip header - - const cols = line.split(','); - if (cols.length >= 4) { - const agentName = cols[0].replaceAll('"', '').trim(); - const displayName = cols[1].replaceAll('"', '').trim(); - const title = cols[2].replaceAll('"', '').trim(); - const icon = cols[3].replaceAll('"', '').trim(); - const module = cols[10] ? cols[10].replaceAll('"', '').trim() : ''; - - // Build agent command: bmad:module:agent:name - const agentCommand = module ? `bmad:${module}:agent:${agentName}` : `bmad:agent:${agentName}`; - - agentInfo.set(agentName, { - command: agentCommand, - displayName: displayName || agentName, - title: icon && title ? `${icon} ${title}` : title || agentName, - }); - } - } - } - - // Get all installed module directories - const entries = await fs.readdir(bmadDir, { withFileTypes: true }); - const installedModules = entries - .filter((entry) => entry.isDirectory() && entry.name !== '_config' && entry.name !== 'docs' && entry.name !== '_memory') - .map((entry) => entry.name); - - // Add core module to scan (it's installed at root level as _config, but we check src/core-skills) - const coreModulePath = getSourcePath('core-skills'); - const modulePaths = new Map(); - - // Map all module source paths - if (await fs.pathExists(coreModulePath)) { - modulePaths.set('core', coreModulePath); - } - - // Map installed module paths - for (const moduleName of installedModules) { - const modulePath = path.join(bmadDir, moduleName); - modulePaths.set(moduleName, modulePath); - } - - // Scan each module for module-help.csv - for (const [moduleName, modulePath] of modulePaths) { - const helpFilePath = path.join(modulePath, 'module-help.csv'); - - if (await fs.pathExists(helpFilePath)) { - try { - const content = await fs.readFile(helpFilePath, 'utf8'); - const lines = content.split('\n').filter((line) => line.trim() && !line.startsWith('#')); - - for (const line of lines) { - // Skip header row - if (line.startsWith('module,')) { - continue; - } - - // Parse the line - handle quoted fields with commas - const columns = this.parseCSVLine(line); - if (columns.length >= 12) { - // Map old schema to new schema - // Old: module,phase,name,code,sequence,workflow-file,command,required,agent,options,description,output-location,outputs - // New: module,phase,name,code,sequence,workflow-file,command,required,agent-name,agent-command,agent-display-name,agent-title,options,description,output-location,outputs - - const [ - module, - phase, - name, - code, - sequence, - workflowFile, - command, - required, - agentName, - options, - description, - outputLocation, - outputs, - ] = columns; - - // If module column is empty, set it to this module's name (except for core which stays empty for universal tools) - const finalModule = (!module || module.trim() === '') && moduleName !== 'core' ? moduleName : module || ''; - - // Lookup agent info - const cleanAgentName = agentName ? agentName.trim() : ''; - const agentData = agentInfo.get(cleanAgentName) || { command: '', displayName: '', title: '' }; - - // Build new row with agent info - const newRow = [ - finalModule, - phase || '', - name || '', - code || '', - sequence || '', - workflowFile || '', - command || '', - required || 'false', - cleanAgentName, - agentData.command, - agentData.displayName, - agentData.title, - options || '', - description || '', - outputLocation || '', - outputs || '', - ]; - - allRows.push(newRow.map((c) => this.escapeCSVField(c)).join(',')); - } - } - - if (process.env.BMAD_VERBOSE_INSTALL === 'true') { - await prompts.log.message(` Merged module-help from: ${moduleName}`); - } - } catch (error) { - await prompts.log.warn(` Warning: Failed to read module-help.csv from ${moduleName}: ${error.message}`); - } - } - } - - // Sort by module, then phase, then sequence - allRows.sort((a, b) => { - const colsA = this.parseCSVLine(a); - const colsB = this.parseCSVLine(b); - - // Module comparison (empty module/universal tools come first) - const moduleA = (colsA[0] || '').toLowerCase(); - const moduleB = (colsB[0] || '').toLowerCase(); - if (moduleA !== moduleB) { - return moduleA.localeCompare(moduleB); - } - - // Phase comparison - const phaseA = colsA[1] || ''; - const phaseB = colsB[1] || ''; - if (phaseA !== phaseB) { - return phaseA.localeCompare(phaseB); - } - - // Sequence comparison - const seqA = parseInt(colsA[4] || '0', 10); - const seqB = parseInt(colsB[4] || '0', 10); - return seqA - seqB; - }); - - // Write merged catalog - const outputDir = path.join(bmadDir, '_config'); - await fs.ensureDir(outputDir); - const outputPath = path.join(outputDir, 'bmad-help.csv'); - - const mergedContent = [headerRow, ...allRows].join('\n'); - await fs.writeFile(outputPath, mergedContent, 'utf8'); - - // Track the installed file - this.installedFiles.add(outputPath); - - if (process.env.BMAD_VERBOSE_INSTALL === 'true') { - await prompts.log.message(` Generated bmad-help.csv: ${allRows.length} workflows`); - } - } - - /** - * Parse a CSV line, handling quoted fields - * @param {string} line - CSV line to parse - * @returns {Array} Array of field values - */ - parseCSVLine(line) { - const result = []; - let current = ''; - let inQuotes = false; - - for (let i = 0; i < line.length; i++) { - const char = line[i]; - const nextChar = line[i + 1]; - - if (char === '"') { - if (inQuotes && nextChar === '"') { - // Escaped quote - current += '"'; - i++; // Skip next quote - } else { - // Toggle quote mode - inQuotes = !inQuotes; - } - } else if (char === ',' && !inQuotes) { - result.push(current); - current = ''; - } else { - current += char; - } - } - result.push(current); - return result; - } - - /** - * Escape a CSV field if it contains special characters - * @param {string} field - Field value to escape - * @returns {string} Escaped field - */ - escapeCSVField(field) { - if (field === null || field === undefined) { - return ''; - } - const str = String(field); - // If field contains comma, quote, or newline, wrap in quotes and escape inner quotes - if (str.includes(',') || str.includes('"') || str.includes('\n')) { - return `"${str.replaceAll('"', '""')}"`; - } - return str; - } - - async createDirectoryStructure(bmadDir) { - await fs.ensureDir(bmadDir); - await fs.ensureDir(path.join(bmadDir, '_config')); - await fs.ensureDir(path.join(bmadDir, '_config', 'agents')); - await fs.ensureDir(path.join(bmadDir, '_config', 'custom')); - } - - /** - * Generate clean config.yaml files for each installed module - * @param {string} bmadDir - BMAD installation directory - * @param {Object} moduleConfigs - Collected configuration values - */ - async generateModuleConfigs(bmadDir, moduleConfigs) { - const yaml = require('yaml'); - - // Extract core config values to share with other modules - const coreConfig = moduleConfigs.core || {}; - - // Get all installed module directories - const entries = await fs.readdir(bmadDir, { withFileTypes: true }); - const installedModules = entries - .filter((entry) => entry.isDirectory() && entry.name !== '_config' && entry.name !== 'docs') - .map((entry) => entry.name); - - // Generate config.yaml for each installed module - for (const moduleName of installedModules) { - const modulePath = path.join(bmadDir, moduleName); - - // Get module-specific config or use empty object if none - const config = moduleConfigs[moduleName] || {}; - - if (await fs.pathExists(modulePath)) { - const configPath = path.join(modulePath, 'config.yaml'); - - // Create header - const packageJson = require(path.join(getProjectRoot(), 'package.json')); - const header = `# ${moduleName.toUpperCase()} Module Configuration -# Generated by BMAD installer -# Version: ${packageJson.version} -# Date: ${new Date().toISOString()} - -`; - - // For non-core modules, add core config values directly - let finalConfig = { ...config }; - let coreSection = ''; - - if (moduleName !== 'core' && coreConfig && Object.keys(coreConfig).length > 0) { - // Add core values directly to the module config - // These will be available for reference in the module - finalConfig = { - ...config, - ...coreConfig, // Spread core config values directly into the module config - }; - - // Create a comment section to identify core values - coreSection = '\n# Core Configuration Values\n'; - } - - // Clean the config to remove any non-serializable values (like functions) - const cleanConfig = structuredClone(finalConfig); - - // Convert config to YAML - let yamlContent = yaml.stringify(cleanConfig, { - indent: 2, - lineWidth: 0, - minContentWidth: 0, - }); - - // If we have core values, reorganize the YAML to group them with their comment - if (coreSection && moduleName !== 'core') { - // Split the YAML into lines - const lines = yamlContent.split('\n'); - const moduleConfigLines = []; - const coreConfigLines = []; - - // Separate module-specific and core config lines - for (const line of lines) { - const key = line.split(':')[0].trim(); - if (Object.prototype.hasOwnProperty.call(coreConfig, key)) { - coreConfigLines.push(line); - } else { - moduleConfigLines.push(line); - } - } - - // Rebuild YAML with module config first, then core config with comment - yamlContent = moduleConfigLines.join('\n'); - if (coreConfigLines.length > 0) { - yamlContent += coreSection + coreConfigLines.join('\n'); - } - } - - // Write the clean config file with POSIX-compliant final newline - const content = header + yamlContent; - await fs.writeFile(configPath, content.endsWith('\n') ? content : content + '\n', 'utf8'); - - // Track the config file in installedFiles - this.installedFiles.add(configPath); - } - } - } - - /** - * Install core with resolved dependencies - * @param {string} bmadDir - BMAD installation directory - * @param {Object} coreFiles - Core files to install - */ - async installCoreWithDependencies(bmadDir, coreFiles) { - const sourcePath = getModulePath('core'); - const targetPath = path.join(bmadDir, 'core'); - await this.installCore(bmadDir); - } - - /** - * Install module with resolved dependencies - * @param {string} moduleName - Module name - * @param {string} bmadDir - BMAD installation directory - * @param {Object} moduleFiles - Module files to install - */ - async installModuleWithDependencies(moduleName, bmadDir, moduleFiles) { - // Get module configuration for conditional installation - const moduleConfig = this.configCollector.collectedConfig[moduleName] || {}; - - // Use existing module manager for full installation with file tracking - // Note: Module-specific installers are called separately after IDE setup - await this.moduleManager.install( - moduleName, - bmadDir, - (filePath) => { - this.installedFiles.add(filePath); - }, - { - skipModuleInstaller: true, // We'll run it later after IDE setup - moduleConfig: moduleConfig, // Pass module config for conditional filtering - installer: this, - silent: true, - }, - ); - - // Dependencies are already included in full module install - } - - /** - * Install partial module (only dependencies needed by other modules) - */ - async installPartialModule(moduleName, bmadDir, files) { - const sourceBase = getModulePath(moduleName); - const targetBase = path.join(bmadDir, moduleName); - - // Create module directory - await fs.ensureDir(targetBase); - - // Copy only the required dependency files - if (files.agents && files.agents.length > 0) { - const agentsDir = path.join(targetBase, 'agents'); - await fs.ensureDir(agentsDir); - - for (const agentPath of files.agents) { - const fileName = path.basename(agentPath); - const sourcePath = path.join(sourceBase, 'agents', fileName); - const targetPath = path.join(agentsDir, fileName); - - if (await fs.pathExists(sourcePath)) { - await this.copyFileWithPlaceholderReplacement(sourcePath, targetPath); - this.installedFiles.add(targetPath); - } - } - } - - if (files.tasks && files.tasks.length > 0) { - const tasksDir = path.join(targetBase, 'tasks'); - await fs.ensureDir(tasksDir); - - for (const taskPath of files.tasks) { - const fileName = path.basename(taskPath); - const sourcePath = path.join(sourceBase, 'tasks', fileName); - const targetPath = path.join(tasksDir, fileName); - - if (await fs.pathExists(sourcePath)) { - await this.copyFileWithPlaceholderReplacement(sourcePath, targetPath); - this.installedFiles.add(targetPath); - } - } - } - - if (files.tools && files.tools.length > 0) { - const toolsDir = path.join(targetBase, 'tools'); - await fs.ensureDir(toolsDir); - - for (const toolPath of files.tools) { - const fileName = path.basename(toolPath); - const sourcePath = path.join(sourceBase, 'tools', fileName); - const targetPath = path.join(toolsDir, fileName); - - if (await fs.pathExists(sourcePath)) { - await this.copyFileWithPlaceholderReplacement(sourcePath, targetPath); - this.installedFiles.add(targetPath); - } - } - } - - if (files.templates && files.templates.length > 0) { - const templatesDir = path.join(targetBase, 'templates'); - await fs.ensureDir(templatesDir); - - for (const templatePath of files.templates) { - const fileName = path.basename(templatePath); - const sourcePath = path.join(sourceBase, 'templates', fileName); - const targetPath = path.join(templatesDir, fileName); - - if (await fs.pathExists(sourcePath)) { - await this.copyFileWithPlaceholderReplacement(sourcePath, targetPath); - this.installedFiles.add(targetPath); - } - } - } - - if (files.data && files.data.length > 0) { - for (const dataPath of files.data) { - // Preserve directory structure for data files - const relative = path.relative(sourceBase, dataPath); - const targetPath = path.join(targetBase, relative); - - await fs.ensureDir(path.dirname(targetPath)); - - if (await fs.pathExists(dataPath)) { - await this.copyFileWithPlaceholderReplacement(dataPath, targetPath); - this.installedFiles.add(targetPath); - } - } - } - - // Create a marker file to indicate this is a partial installation - const markerPath = path.join(targetBase, '.partial'); - await fs.writeFile( - markerPath, - `This module contains only dependencies required by other modules.\nInstalled: ${new Date().toISOString()}\n`, - ); - } - - /** - * Private: Install core - * @param {string} bmadDir - BMAD installation directory - */ - async installCore(bmadDir) { - const sourcePath = getModulePath('core'); - const targetPath = path.join(bmadDir, 'core'); - - // Copy core files - await this.copyCoreFiles(sourcePath, targetPath); - } - - /** - * Copy core files (similar to copyModuleWithFiltering but for core) - * @param {string} sourcePath - Source path - * @param {string} targetPath - Target path - */ - async copyCoreFiles(sourcePath, targetPath) { - // Get all files in source - const files = await this.getFileList(sourcePath); - - for (const file of files) { - // Skip sub-modules directory - these are IDE-specific and handled separately - if (file.startsWith('sub-modules/')) { - continue; - } - - // Skip module.yaml at root - it's only needed at install time - if (file === 'module.yaml') { - continue; - } - - // Skip config.yaml templates - we'll generate clean ones with actual values - if (file === 'config.yaml' || file.endsWith('/config.yaml') || file === 'custom.yaml' || file.endsWith('/custom.yaml')) { - continue; - } - - const sourceFile = path.join(sourcePath, file); - const targetFile = path.join(targetPath, file); - - // Copy the file with placeholder replacement - await fs.ensureDir(path.dirname(targetFile)); - await this.copyFileWithPlaceholderReplacement(sourceFile, targetFile); - - // Track the installed file - this.installedFiles.add(targetFile); - } - } - - /** - * Get list of all files in a directory recursively - * @param {string} dir - Directory path - * @param {string} baseDir - Base directory for relative paths - * @returns {Array} List of relative file paths - */ - async getFileList(dir, baseDir = dir) { - const files = []; - const entries = await fs.readdir(dir, { withFileTypes: true }); - - for (const entry of entries) { - const fullPath = path.join(dir, entry.name); - - if (entry.isDirectory()) { - const subFiles = await this.getFileList(fullPath, baseDir); - files.push(...subFiles); - } else { - files.push(path.relative(baseDir, fullPath)); - } - } - - return files; - } - - /** - * Private: Update core - */ - async updateCore(bmadDir, force = false) { - const sourcePath = getModulePath('core'); - const targetPath = path.join(bmadDir, 'core'); - - if (force) { - await fs.remove(targetPath); - await this.installCore(bmadDir); - } else { - // Selective update - preserve user modifications - await this.fileOps.syncDirectory(sourcePath, targetPath); - } - } - - /** - * Quick update method - preserves all settings and only prompts for new config fields - * @param {Object} config - Configuration with directory - * @returns {Object} Update result - */ - async quickUpdate(config) { - const spinner = await prompts.spinner(); - spinner.start('Starting quick update...'); - - try { - const projectDir = path.resolve(config.directory); - const { bmadDir } = await this.findBmadDir(projectDir); - - // Check if bmad directory exists - if (!(await fs.pathExists(bmadDir))) { - spinner.stop('No BMAD installation found'); - throw new Error(`BMAD not installed at ${bmadDir}. Use regular install for first-time setup.`); - } - - spinner.message('Detecting installed modules and configuration...'); - - // Detect existing installation - const existingInstall = await this.detector.detect(bmadDir); - const installedModules = existingInstall.modules.map((m) => m.id); - const configuredIdes = existingInstall.ides || []; - const projectRoot = path.dirname(bmadDir); - - // Get custom module sources: first from --custom-content (re-cache from source), then from cache - const customModuleSources = new Map(); - if (config.customContent?.sources?.length > 0) { - for (const source of config.customContent.sources) { - if (source.id && source.path && (await fs.pathExists(source.path))) { - customModuleSources.set(source.id, { - id: source.id, - name: source.name || source.id, - sourcePath: source.path, - cached: false, // From CLI, will be re-cached - }); - } - } - } - const cacheDir = path.join(bmadDir, '_config', 'custom'); - if (await fs.pathExists(cacheDir)) { - const cachedModules = await fs.readdir(cacheDir, { withFileTypes: true }); - - for (const cachedModule of cachedModules) { - const moduleId = cachedModule.name; - const cachedPath = path.join(cacheDir, moduleId); - - // Skip if path doesn't exist (broken symlink, deleted dir) - avoids lstat ENOENT - if (!(await fs.pathExists(cachedPath))) { - continue; - } - if (!cachedModule.isDirectory()) { - continue; - } - - // Skip if we already have this module from manifest - if (customModuleSources.has(moduleId)) { - continue; - } - - // Check if this is an external official module - skip cache for those - const isExternal = await this.moduleManager.isExternalModule(moduleId); - if (isExternal) { - // External modules are handled via cloneExternalModule, not from cache - continue; - } - - // Check if this is actually a custom module (has module.yaml) - const moduleYamlPath = path.join(cachedPath, 'module.yaml'); - if (await fs.pathExists(moduleYamlPath)) { - // For quick update, we always rebuild from cache - customModuleSources.set(moduleId, { - id: moduleId, - name: moduleId, // We'll read the actual name if needed - sourcePath: cachedPath, - cached: true, // Flag to indicate this is from cache - }); - } - } - } - - // Load saved IDE configurations - const savedIdeConfigs = await this.ideConfigManager.loadAllIdeConfigs(bmadDir); - - // Get available modules (what we have source for) - const availableModulesData = await this.moduleManager.listAvailable(); - const availableModules = [...availableModulesData.modules, ...availableModulesData.customModules]; - - // Add external official modules to available modules - // These can always be obtained by cloning from their remote URLs - const { ExternalModuleManager } = require('../modules/external-manager'); - const externalManager = new ExternalModuleManager(); - const externalModules = await externalManager.listAvailable(); - for (const externalModule of externalModules) { - // Only add if not already in the list and is installed - if (installedModules.includes(externalModule.code) && !availableModules.some((m) => m.id === externalModule.code)) { - availableModules.push({ - id: externalModule.code, - name: externalModule.name, - isExternal: true, - fromExternal: true, - }); - } - } - - // Add custom modules from manifest if their sources exist - for (const [moduleId, customModule] of customModuleSources) { - // Use the absolute sourcePath - const sourcePath = customModule.sourcePath; - - // Check if source exists at the recorded path - if ( - sourcePath && - (await fs.pathExists(sourcePath)) && // Add to available modules if not already there - !availableModules.some((m) => m.id === moduleId) - ) { - availableModules.push({ - id: moduleId, - name: customModule.name || moduleId, - path: sourcePath, - isCustom: true, - fromManifest: true, - }); - } - } - - // Handle missing custom module sources using shared method - const customModuleResult = await this.handleMissingCustomSources( - customModuleSources, - bmadDir, - projectRoot, - 'update', - installedModules, - config.skipPrompts || false, - ); - - const { validCustomModules, keptModulesWithoutSources } = customModuleResult; - - const customModulesFromManifest = validCustomModules.map((m) => ({ - ...m, - isCustom: true, - hasUpdate: true, - })); - - const allAvailableModules = [...availableModules, ...customModulesFromManifest]; - const availableModuleIds = new Set(allAvailableModules.map((m) => m.id)); - - // Core module is special - never include it in update flow - const nonCoreInstalledModules = installedModules.filter((id) => id !== 'core'); - - // Only update modules that are BOTH installed AND available (we have source for) - const modulesToUpdate = nonCoreInstalledModules.filter((id) => availableModuleIds.has(id)); - const skippedModules = nonCoreInstalledModules.filter((id) => !availableModuleIds.has(id)); - - // Add custom modules that were kept without sources to the skipped modules - // This ensures their agents are preserved in the manifest - for (const keptModule of keptModulesWithoutSources) { - if (!skippedModules.includes(keptModule)) { - skippedModules.push(keptModule); - } - } - - spinner.stop(`Found ${modulesToUpdate.length} module(s) to update and ${configuredIdes.length} configured tool(s)`); - - if (skippedModules.length > 0) { - await prompts.log.warn(`Skipping ${skippedModules.length} module(s) - no source available: ${skippedModules.join(', ')}`); - } - - // Load existing configs and collect new fields (if any) - await prompts.log.info('Checking for new configuration options...'); - await this.configCollector.loadExistingConfig(projectDir); - - let promptedForNewFields = false; - - // Check core config for new fields - const corePrompted = await this.configCollector.collectModuleConfigQuick('core', projectDir, true); - if (corePrompted) { - promptedForNewFields = true; - } - - // Check each module we're updating for new fields (NOT skipped modules) - for (const moduleName of modulesToUpdate) { - const modulePrompted = await this.configCollector.collectModuleConfigQuick(moduleName, projectDir, true); - if (modulePrompted) { - promptedForNewFields = true; - } - } - - if (!promptedForNewFields) { - await prompts.log.success('All configuration is up to date, no new options to configure'); - } - - // Add metadata - this.configCollector.collectedConfig._meta = { - version: require(path.join(getProjectRoot(), 'package.json')).version, - installDate: new Date().toISOString(), - lastModified: new Date().toISOString(), - }; - - // Build the config object for the installer - const installConfig = { - directory: projectDir, - installCore: true, - modules: modulesToUpdate, // Only update modules we have source for - ides: configuredIdes, - skipIde: configuredIdes.length === 0, - coreConfig: this.configCollector.collectedConfig.core, - actionType: 'install', // Use regular install flow - _quickUpdate: true, // Flag to skip certain prompts - _preserveModules: skippedModules, // Preserve these in manifest even though we didn't update them - _savedIdeConfigs: savedIdeConfigs, // Pass saved IDE configs to installer - _customModuleSources: customModuleSources, // Pass custom module sources for updates - _existingModules: installedModules, // Pass all installed modules for manifest generation - customContent: config.customContent, // Pass through for re-caching from source - }; - - // Call the standard install method - const result = await this.install(installConfig); - - // Only succeed the spinner if it's still spinning - // (install method might have stopped it if folder name changed) - if (spinner.isSpinning) { - spinner.stop('Quick update complete!'); - } - - return { - success: true, - moduleCount: modulesToUpdate.length + 1, // +1 for core - hadNewFields: promptedForNewFields, - modules: ['core', ...modulesToUpdate], - skippedModules: skippedModules, - ides: configuredIdes, - }; - } catch (error) { - spinner.error('Quick update failed'); - throw error; - } - } - - /** - * Private: Prompt for update action - */ - async promptUpdateAction() { - const action = await prompts.select({ - message: 'What would you like to do?', - choices: [{ name: 'Update existing installation', value: 'update' }], - }); - return { action }; - } - - /** - * Handle legacy BMAD v4 detection with simple warning - * @param {string} _projectDir - Project directory (unused in simplified version) - * @param {Object} _legacyV4 - Legacy V4 detection result (unused in simplified version) - */ - async handleLegacyV4Migration(_projectDir, _legacyV4) { - await prompts.note( - 'Found .bmad-method folder from BMAD v4 installation.\n\n' + - 'Before continuing with installation, we recommend:\n' + - ' 1. Remove the .bmad-method folder, OR\n' + - ' 2. Back it up by renaming it to another name (e.g., bmad-method-backup)\n\n' + - 'If your v4 installation set up rules or commands, you should remove those as well.', - 'Legacy BMAD v4 detected', - ); - - const proceed = await prompts.select({ - message: 'What would you like to do?', - choices: [ - { - name: 'Exit and clean up manually (recommended)', - value: 'exit', - hint: 'Exit installation', - }, - { - name: 'Continue with installation anyway', - value: 'continue', - hint: 'Continue', - }, - ], - default: 'exit', - }); - - if (proceed === 'exit') { - await prompts.log.info('Please remove the .bmad-method folder and any v4 rules/commands, then run the installer again.'); - // Allow event loop to flush pending I/O before exit - setImmediate(() => process.exit(0)); - return; - } - - await prompts.log.warn('Proceeding with installation despite legacy v4 folder'); - } - - /** - * Read files-manifest.csv - * @param {string} bmadDir - BMAD installation directory - * @returns {Array} Array of file entries from files-manifest.csv - */ - async readFilesManifest(bmadDir) { - const filesManifestPath = path.join(bmadDir, '_config', 'files-manifest.csv'); - if (!(await fs.pathExists(filesManifestPath))) { - return []; - } - - try { - const content = await fs.readFile(filesManifestPath, 'utf8'); - const lines = content.split('\n'); - const files = []; - - for (let i = 1; i < lines.length; i++) { - // Skip header - const line = lines[i].trim(); - if (!line) continue; - - // Parse CSV line properly handling quoted values - const parts = []; - let current = ''; - let inQuotes = false; - - for (const char of line) { - if (char === '"') { - inQuotes = !inQuotes; - } else if (char === ',' && !inQuotes) { - parts.push(current); - current = ''; - } else { - current += char; - } - } - parts.push(current); // Add last part - - if (parts.length >= 4) { - files.push({ - type: parts[0], - name: parts[1], - module: parts[2], - path: parts[3], - hash: parts[4] || null, // Hash may not exist in old manifests - }); - } - } - - return files; - } catch (error) { - await prompts.log.warn('Could not read files-manifest.csv: ' + error.message); - return []; - } - } - - /** - * Detect custom and modified files - * @param {string} bmadDir - BMAD installation directory - * @param {Array} existingFilesManifest - Previous files from files-manifest.csv - * @returns {Object} Object with customFiles and modifiedFiles arrays - */ - async detectCustomFiles(bmadDir, existingFilesManifest) { - const customFiles = []; - const modifiedFiles = []; - - // Memory is always in _bmad/_memory - const bmadMemoryPath = '_memory'; - - // Check if the manifest has hashes - if not, we can't detect modifications - let manifestHasHashes = false; - if (existingFilesManifest && existingFilesManifest.length > 0) { - manifestHasHashes = existingFilesManifest.some((f) => f.hash); - } - - // Build map of previously installed files from files-manifest.csv with their hashes - const installedFilesMap = new Map(); - for (const fileEntry of existingFilesManifest) { - if (fileEntry.path) { - const absolutePath = path.join(bmadDir, fileEntry.path); - installedFilesMap.set(path.normalize(absolutePath), { - hash: fileEntry.hash, - relativePath: fileEntry.path, - }); - } - } - - // Recursively scan bmadDir for all files - const scanDirectory = async (dir) => { - try { - const entries = await fs.readdir(dir, { withFileTypes: true }); - for (const entry of entries) { - const fullPath = path.join(dir, entry.name); - - if (entry.isDirectory()) { - // Skip certain directories - if (entry.name === 'node_modules' || entry.name === '.git') { - continue; - } - await scanDirectory(fullPath); - } else if (entry.isFile()) { - const normalizedPath = path.normalize(fullPath); - const fileInfo = installedFilesMap.get(normalizedPath); - - // Skip certain system files that are auto-generated - const relativePath = path.relative(bmadDir, fullPath); - const fileName = path.basename(fullPath); - - // Skip _config directory EXCEPT for modified agent customizations - if (relativePath.startsWith('_config/') || relativePath.startsWith('_config\\')) { - // Special handling for .customize.yaml files - only preserve if modified - if (relativePath.includes('/agents/') && fileName.endsWith('.customize.yaml')) { - // Check if the customization file has been modified from manifest - const manifestPath = path.join(bmadDir, '_config', 'manifest.yaml'); - if (await fs.pathExists(manifestPath)) { - const crypto = require('node:crypto'); - const currentContent = await fs.readFile(fullPath, 'utf8'); - const currentHash = crypto.createHash('sha256').update(currentContent).digest('hex'); - - const yaml = require('yaml'); - const manifestContent = await fs.readFile(manifestPath, 'utf8'); - const manifestData = yaml.parse(manifestContent); - const originalHash = manifestData.agentCustomizations?.[relativePath]; - - // Only add to customFiles if hash differs (user modified) - if (originalHash && currentHash !== originalHash) { - customFiles.push(fullPath); - } - } - } - continue; - } - - if (relativePath.startsWith(bmadMemoryPath + '/') && path.dirname(relativePath).includes('-sidecar')) { - continue; - } - - // Skip config.yaml files - these are regenerated on each install/update - if (fileName === 'config.yaml') { - continue; - } - - if (!fileInfo) { - // File not in manifest = custom file - // EXCEPT: Agent .md files in module folders are generated files, not custom - // Only treat .md files under _config/agents/ as custom - if (!(fileName.endsWith('.md') && relativePath.includes('/agents/') && !relativePath.startsWith('_config/'))) { - customFiles.push(fullPath); - } - } else if (manifestHasHashes && fileInfo.hash) { - // File in manifest with hash - check if it was modified - const currentHash = await this.manifest.calculateFileHash(fullPath); - if (currentHash && currentHash !== fileInfo.hash) { - // Hash changed = file was modified - modifiedFiles.push({ - path: fullPath, - relativePath: fileInfo.relativePath, - }); - } - } - } - } - } catch { - // Ignore errors scanning directories - } - }; - - await scanDirectory(bmadDir); - return { customFiles, modifiedFiles }; - } - - /** - * Handle missing custom module sources interactively - * @param {Map} customModuleSources - Map of custom module ID to info - * @param {string} bmadDir - BMAD directory - * @param {string} projectRoot - Project root directory - * @param {string} operation - Current operation ('update', 'compile', etc.) - * @param {Array} installedModules - Array of installed module IDs (will be modified) - * @param {boolean} [skipPrompts=false] - Skip interactive prompts and keep all modules with missing sources - * @returns {Object} Object with validCustomModules array and keptModulesWithoutSources array - */ - async handleMissingCustomSources(customModuleSources, bmadDir, projectRoot, operation, installedModules, skipPrompts = false) { - const validCustomModules = []; - const keptModulesWithoutSources = []; // Track modules kept without sources - const customModulesWithMissingSources = []; - - // Check which sources exist - for (const [moduleId, customInfo] of customModuleSources) { - if (await fs.pathExists(customInfo.sourcePath)) { - validCustomModules.push({ - id: moduleId, - name: customInfo.name, - path: customInfo.sourcePath, - info: customInfo, - }); - } else { - // For cached modules that are missing, we just skip them without prompting - if (customInfo.cached) { - // Skip cached modules without prompting - keptModulesWithoutSources.push({ - id: moduleId, - name: customInfo.name, - cached: true, - }); - } else { - customModulesWithMissingSources.push({ - id: moduleId, - name: customInfo.name, - sourcePath: customInfo.sourcePath, - relativePath: customInfo.relativePath, - info: customInfo, - }); - } - } - } - - // If no missing sources, return immediately - if (customModulesWithMissingSources.length === 0) { - return { - validCustomModules, - keptModulesWithoutSources: [], - }; - } - - // Non-interactive mode: keep all modules with missing sources - if (skipPrompts) { - for (const missing of customModulesWithMissingSources) { - keptModulesWithoutSources.push(missing.id); - } - return { validCustomModules, keptModulesWithoutSources }; - } - - await prompts.log.warn(`Found ${customModulesWithMissingSources.length} custom module(s) with missing sources:`); - - let keptCount = 0; - let updatedCount = 0; - let removedCount = 0; - - for (const missing of customModulesWithMissingSources) { - await prompts.log.message( - `${missing.name} (${missing.id})\n Original source: ${missing.relativePath}\n Full path: ${missing.sourcePath}`, - ); - - const choices = [ - { - name: 'Keep installed (will not be processed)', - value: 'keep', - hint: 'Keep', - }, - { - name: 'Specify new source location', - value: 'update', - hint: 'Update', - }, - ]; - - // Only add remove option if not just compiling agents - if (operation !== 'compile-agents') { - choices.push({ - name: '⚠️ REMOVE module completely (destructive!)', - value: 'remove', - hint: 'Remove', - }); - } - - const action = await prompts.select({ - message: `How would you like to handle "${missing.name}"?`, - choices, - }); - - switch (action) { - case 'update': { - // Use sync validation because @clack/prompts doesn't support async validate - const newSourcePath = await prompts.text({ - message: 'Enter the new path to the custom module:', - default: missing.sourcePath, - validate: (input) => { - if (!input || input.trim() === '') { - return 'Please enter a path'; - } - const expandedPath = path.resolve(input.trim()); - if (!fs.pathExistsSync(expandedPath)) { - return 'Path does not exist'; - } - // Check if it looks like a valid module - const moduleYamlPath = path.join(expandedPath, 'module.yaml'); - const agentsPath = path.join(expandedPath, 'agents'); - const workflowsPath = path.join(expandedPath, 'workflows'); - - if (!fs.pathExistsSync(moduleYamlPath) && !fs.pathExistsSync(agentsPath) && !fs.pathExistsSync(workflowsPath)) { - return 'Path does not appear to contain a valid custom module'; - } - return; // clack expects undefined for valid input - }, - }); - - // Defensive: handleCancel should have exited, but guard against symbol propagation - if (typeof newSourcePath !== 'string') { - keptCount++; - keptModulesWithoutSources.push(missing.id); - continue; - } - - // Update the source in manifest - const resolvedPath = path.resolve(newSourcePath.trim()); - missing.info.sourcePath = resolvedPath; - // Remove relativePath - we only store absolute sourcePath now - delete missing.info.relativePath; - await this.manifest.addCustomModule(bmadDir, missing.info); - - validCustomModules.push({ - id: missing.id, - name: missing.name, - path: resolvedPath, - info: missing.info, - }); - - updatedCount++; - await prompts.log.success('Updated source location'); - - break; - } - case 'remove': { - // Extra confirmation for destructive remove - await prompts.log.error( - `WARNING: This will PERMANENTLY DELETE "${missing.name}" and all its files!\n Module location: ${path.join(bmadDir, missing.id)}`, - ); - - const confirmDelete = await prompts.confirm({ - message: 'Are you absolutely sure you want to delete this module?', - default: false, - }); - - if (confirmDelete) { - const typedConfirm = await prompts.text({ - message: 'Type "DELETE" to confirm permanent deletion:', - validate: (input) => { - if (input !== 'DELETE') { - return 'You must type "DELETE" exactly to proceed'; - } - return; // clack expects undefined for valid input - }, - }); - - if (typedConfirm === 'DELETE') { - // Remove the module from filesystem and manifest - const modulePath = path.join(bmadDir, missing.id); - if (await fs.pathExists(modulePath)) { - const fsExtra = require('fs-extra'); - await fsExtra.remove(modulePath); - await prompts.log.warn(`Deleted module directory: ${path.relative(projectRoot, modulePath)}`); - } - - await this.manifest.removeModule(bmadDir, missing.id); - await this.manifest.removeCustomModule(bmadDir, missing.id); - await prompts.log.warn('Removed from manifest'); - - // Also remove from installedModules list - if (installedModules && installedModules.includes(missing.id)) { - const index = installedModules.indexOf(missing.id); - if (index !== -1) { - installedModules.splice(index, 1); - } - } - - removedCount++; - await prompts.log.error(`"${missing.name}" has been permanently removed`); - } else { - await prompts.log.message('Removal cancelled - module will be kept'); - keptCount++; - } - } else { - await prompts.log.message('Removal cancelled - module will be kept'); - keptCount++; - } - - break; - } - case 'keep': { - keptCount++; - keptModulesWithoutSources.push(missing.id); - await prompts.log.message('Module will be kept as-is'); - - break; - } - // No default - } - } - - // Show summary - if (keptCount > 0 || updatedCount > 0 || removedCount > 0) { - let summary = 'Summary for custom modules with missing sources:'; - if (keptCount > 0) summary += `\n • ${keptCount} module(s) kept as-is`; - if (updatedCount > 0) summary += `\n • ${updatedCount} module(s) updated with new sources`; - if (removedCount > 0) summary += `\n • ${removedCount} module(s) permanently deleted`; - await prompts.log.message(summary); - } - - return { - validCustomModules, - keptModulesWithoutSources, - }; - } -} - -module.exports = { Installer }; diff --git a/tools/cli/installers/lib/ide/_base-ide.js b/tools/cli/installers/lib/ide/_base-ide.js deleted file mode 100644 index 8c970d130..000000000 --- a/tools/cli/installers/lib/ide/_base-ide.js +++ /dev/null @@ -1,657 +0,0 @@ -const path = require('node:path'); -const fs = require('fs-extra'); -const prompts = require('../../../lib/prompts'); -const { getSourcePath } = require('../../../lib/project-root'); -const { BMAD_FOLDER_NAME } = require('./shared/path-utils'); - -/** - * Base class for IDE-specific setup - * All IDE handlers should extend this class - */ -class BaseIdeSetup { - constructor(name, displayName = null, preferred = false) { - this.name = name; - this.displayName = displayName || name; // Human-readable name for UI - this.preferred = preferred; // Whether this IDE should be shown in preferred list - this.configDir = null; // Override in subclasses - this.rulesDir = null; // Override in subclasses - this.configFile = null; // Override in subclasses when detection is file-based - this.detectionPaths = []; // Additional paths that indicate the IDE is configured - this.bmadFolderName = BMAD_FOLDER_NAME; // Default, can be overridden - } - - /** - * Set the bmad folder name for placeholder replacement - * @param {string} bmadFolderName - The bmad folder name - */ - setBmadFolderName(bmadFolderName) { - this.bmadFolderName = bmadFolderName; - } - - /** - * Main setup method - must be implemented by subclasses - * @param {string} projectDir - Project directory - * @param {string} bmadDir - BMAD installation directory - * @param {Object} options - Setup options - */ - async setup(projectDir, bmadDir, options = {}) { - throw new Error(`setup() must be implemented by ${this.name} handler`); - } - - /** - * Cleanup IDE configuration - * @param {string} projectDir - Project directory - */ - async cleanup(projectDir, options = {}) { - // Default implementation - can be overridden - if (this.configDir) { - const configPath = path.join(projectDir, this.configDir); - if (await fs.pathExists(configPath)) { - const bmadRulesPath = path.join(configPath, BMAD_FOLDER_NAME); - if (await fs.pathExists(bmadRulesPath)) { - await fs.remove(bmadRulesPath); - if (!options.silent) await prompts.log.message(`Removed ${this.name} BMAD configuration`); - } - } - } - } - - /** - * Install a custom agent launcher - subclasses should override - * @param {string} projectDir - Project directory - * @param {string} agentName - Agent name (e.g., "fred-commit-poet") - * @param {string} agentPath - Path to compiled agent (relative to project root) - * @param {Object} metadata - Agent metadata - * @returns {Object|null} Info about created command, or null if not supported - */ - async installCustomAgentLauncher(projectDir, agentName, agentPath, metadata) { - // Default implementation - subclasses can override - return null; - } - - /** - * Detect whether this IDE already has configuration in the project - * Subclasses can override for custom logic - * @param {string} projectDir - Project directory - * @returns {boolean} - */ - async detect(projectDir) { - const pathsToCheck = []; - - if (this.configDir) { - pathsToCheck.push(path.join(projectDir, this.configDir)); - } - - if (this.configFile) { - pathsToCheck.push(path.join(projectDir, this.configFile)); - } - - if (Array.isArray(this.detectionPaths)) { - for (const candidate of this.detectionPaths) { - if (!candidate) continue; - const resolved = path.isAbsolute(candidate) ? candidate : path.join(projectDir, candidate); - pathsToCheck.push(resolved); - } - } - - for (const candidate of pathsToCheck) { - if (await fs.pathExists(candidate)) { - return true; - } - } - - return false; - } - - /** - * Get list of agents from BMAD installation - * @param {string} bmadDir - BMAD installation directory - * @returns {Array} List of agent files - */ - async getAgents(bmadDir) { - const agents = []; - - // Get core agents - const coreAgentsPath = path.join(bmadDir, 'core', 'agents'); - if (await fs.pathExists(coreAgentsPath)) { - const coreAgents = await this.scanDirectory(coreAgentsPath, '.md'); - agents.push( - ...coreAgents.map((a) => ({ - ...a, - module: 'core', - })), - ); - } - - // Get module agents - const entries = await fs.readdir(bmadDir, { withFileTypes: true }); - for (const entry of entries) { - if (entry.isDirectory() && entry.name !== 'core' && entry.name !== '_config' && entry.name !== 'agents') { - const moduleAgentsPath = path.join(bmadDir, entry.name, 'agents'); - if (await fs.pathExists(moduleAgentsPath)) { - const moduleAgents = await this.scanDirectory(moduleAgentsPath, '.md'); - agents.push( - ...moduleAgents.map((a) => ({ - ...a, - module: entry.name, - })), - ); - } - } - } - - // Get standalone agents from bmad/agents/ directory - const standaloneAgentsDir = path.join(bmadDir, 'agents'); - if (await fs.pathExists(standaloneAgentsDir)) { - const agentDirs = await fs.readdir(standaloneAgentsDir, { withFileTypes: true }); - - for (const agentDir of agentDirs) { - if (!agentDir.isDirectory()) continue; - - const agentDirPath = path.join(standaloneAgentsDir, agentDir.name); - const agentFiles = await fs.readdir(agentDirPath); - - for (const file of agentFiles) { - if (!file.endsWith('.md')) continue; - if (file.includes('.customize.')) continue; - - const filePath = path.join(agentDirPath, file); - const content = await fs.readFile(filePath, 'utf8'); - - if (content.includes('localskip="true"')) continue; - - agents.push({ - name: file.replace('.md', ''), - path: filePath, - relativePath: path.relative(standaloneAgentsDir, filePath), - filename: file, - module: 'standalone', // Mark as standalone agent - }); - } - } - } - - return agents; - } - - /** - * Get list of tasks from BMAD installation - * @param {string} bmadDir - BMAD installation directory - * @param {boolean} standaloneOnly - If true, only return standalone tasks - * @returns {Array} List of task files - */ - async getTasks(bmadDir, standaloneOnly = false) { - const tasks = []; - - // Get core tasks (scan for both .md and .xml) - const coreTasksPath = path.join(bmadDir, 'core', 'tasks'); - if (await fs.pathExists(coreTasksPath)) { - const coreTasks = await this.scanDirectoryWithStandalone(coreTasksPath, ['.md', '.xml']); - tasks.push( - ...coreTasks.map((t) => ({ - ...t, - module: 'core', - })), - ); - } - - // Get module tasks - const entries = await fs.readdir(bmadDir, { withFileTypes: true }); - for (const entry of entries) { - if (entry.isDirectory() && entry.name !== 'core' && entry.name !== '_config' && entry.name !== 'agents') { - const moduleTasksPath = path.join(bmadDir, entry.name, 'tasks'); - if (await fs.pathExists(moduleTasksPath)) { - const moduleTasks = await this.scanDirectoryWithStandalone(moduleTasksPath, ['.md', '.xml']); - tasks.push( - ...moduleTasks.map((t) => ({ - ...t, - module: entry.name, - })), - ); - } - } - } - - // Filter by standalone if requested - if (standaloneOnly) { - return tasks.filter((t) => t.standalone === true); - } - - return tasks; - } - - /** - * Get list of tools from BMAD installation - * @param {string} bmadDir - BMAD installation directory - * @param {boolean} standaloneOnly - If true, only return standalone tools - * @returns {Array} List of tool files - */ - async getTools(bmadDir, standaloneOnly = false) { - const tools = []; - - // Get core tools (scan for both .md and .xml) - const coreToolsPath = path.join(bmadDir, 'core', 'tools'); - if (await fs.pathExists(coreToolsPath)) { - const coreTools = await this.scanDirectoryWithStandalone(coreToolsPath, ['.md', '.xml']); - tools.push( - ...coreTools.map((t) => ({ - ...t, - module: 'core', - })), - ); - } - - // Get module tools - const entries = await fs.readdir(bmadDir, { withFileTypes: true }); - for (const entry of entries) { - if (entry.isDirectory() && entry.name !== 'core' && entry.name !== '_config' && entry.name !== 'agents') { - const moduleToolsPath = path.join(bmadDir, entry.name, 'tools'); - if (await fs.pathExists(moduleToolsPath)) { - const moduleTools = await this.scanDirectoryWithStandalone(moduleToolsPath, ['.md', '.xml']); - tools.push( - ...moduleTools.map((t) => ({ - ...t, - module: entry.name, - })), - ); - } - } - } - - // Filter by standalone if requested - if (standaloneOnly) { - return tools.filter((t) => t.standalone === true); - } - - return tools; - } - - /** - * Get list of workflows from BMAD installation - * @param {string} bmadDir - BMAD installation directory - * @param {boolean} standaloneOnly - If true, only return standalone workflows - * @returns {Array} List of workflow files - */ - async getWorkflows(bmadDir, standaloneOnly = false) { - const workflows = []; - - // Get core workflows - const coreWorkflowsPath = path.join(bmadDir, 'core', 'workflows'); - if (await fs.pathExists(coreWorkflowsPath)) { - const coreWorkflows = await this.findWorkflowFiles(coreWorkflowsPath); - workflows.push( - ...coreWorkflows.map((w) => ({ - ...w, - module: 'core', - })), - ); - } - - // Get module workflows - const entries = await fs.readdir(bmadDir, { withFileTypes: true }); - for (const entry of entries) { - if (entry.isDirectory() && entry.name !== 'core' && entry.name !== '_config' && entry.name !== 'agents') { - const moduleWorkflowsPath = path.join(bmadDir, entry.name, 'workflows'); - if (await fs.pathExists(moduleWorkflowsPath)) { - const moduleWorkflows = await this.findWorkflowFiles(moduleWorkflowsPath); - workflows.push( - ...moduleWorkflows.map((w) => ({ - ...w, - module: entry.name, - })), - ); - } - } - } - - // Filter by standalone if requested - if (standaloneOnly) { - return workflows.filter((w) => w.standalone === true); - } - - return workflows; - } - - /** - * Recursively find workflow.md files - * @param {string} dir - Directory to search - * @param {string} [rootDir] - Original root directory (used internally for recursion) - * @returns {Array} List of workflow file info objects - */ - async findWorkflowFiles(dir, rootDir = null) { - rootDir = rootDir || dir; - const workflows = []; - - if (!(await fs.pathExists(dir))) { - return workflows; - } - - const entries = await fs.readdir(dir, { withFileTypes: true }); - - for (const entry of entries) { - const fullPath = path.join(dir, entry.name); - - if (entry.isDirectory()) { - // Recursively search subdirectories - const subWorkflows = await this.findWorkflowFiles(fullPath, rootDir); - workflows.push(...subWorkflows); - } else if (entry.isFile() && entry.name === 'workflow.md') { - // Read workflow.md frontmatter to get name and standalone property - try { - const content = await fs.readFile(fullPath, 'utf8'); - const frontmatterMatch = content.match(/^---\r?\n([\s\S]*?)\r?\n---/); - if (!frontmatterMatch) continue; - - const workflowData = yaml.parse(frontmatterMatch[1]); - - if (workflowData && workflowData.name) { - // Workflows are standalone by default unless explicitly false - const standalone = workflowData.standalone !== false && workflowData.standalone !== 'false'; - workflows.push({ - name: workflowData.name, - path: fullPath, - relativePath: path.relative(rootDir, fullPath), - filename: entry.name, - description: workflowData.description || '', - standalone: standalone, - }); - } - } catch { - // Skip invalid workflow files - } - } - } - - return workflows; - } - - /** - * Scan a directory for files with specific extension(s) - * @param {string} dir - Directory to scan - * @param {string|Array} ext - File extension(s) to match (e.g., '.md' or ['.md', '.xml']) - * @param {string} [rootDir] - Original root directory (used internally for recursion) - * @returns {Array} List of file info objects - */ - async scanDirectory(dir, ext, rootDir = null) { - rootDir = rootDir || dir; - const files = []; - - if (!(await fs.pathExists(dir))) { - return files; - } - - // Normalize ext to array - const extensions = Array.isArray(ext) ? ext : [ext]; - - const entries = await fs.readdir(dir, { withFileTypes: true }); - - for (const entry of entries) { - const fullPath = path.join(dir, entry.name); - - if (entry.isDirectory()) { - // Recursively scan subdirectories - const subFiles = await this.scanDirectory(fullPath, ext, rootDir); - files.push(...subFiles); - } else if (entry.isFile()) { - // Check if file matches any of the extensions - const matchedExt = extensions.find((e) => entry.name.endsWith(e)); - if (matchedExt) { - files.push({ - name: path.basename(entry.name, matchedExt), - path: fullPath, - relativePath: path.relative(rootDir, fullPath), - filename: entry.name, - }); - } - } - } - - return files; - } - - /** - * Scan a directory for files with specific extension(s) and check standalone attribute - * @param {string} dir - Directory to scan - * @param {string|Array} ext - File extension(s) to match (e.g., '.md' or ['.md', '.xml']) - * @param {string} [rootDir] - Original root directory (used internally for recursion) - * @returns {Array} List of file info objects with standalone property - */ - async scanDirectoryWithStandalone(dir, ext, rootDir = null) { - rootDir = rootDir || dir; - const files = []; - - if (!(await fs.pathExists(dir))) { - return files; - } - - // Normalize ext to array - const extensions = Array.isArray(ext) ? ext : [ext]; - - const entries = await fs.readdir(dir, { withFileTypes: true }); - - for (const entry of entries) { - const fullPath = path.join(dir, entry.name); - - if (entry.isDirectory()) { - // Recursively scan subdirectories - const subFiles = await this.scanDirectoryWithStandalone(fullPath, ext, rootDir); - files.push(...subFiles); - } else if (entry.isFile()) { - // Check if file matches any of the extensions - const matchedExt = extensions.find((e) => entry.name.endsWith(e)); - if (matchedExt) { - // Read file content to check for standalone attribute - // All non-internal files are considered standalone by default - let standalone = true; - try { - const content = await fs.readFile(fullPath, 'utf8'); - - // Skip internal/engine files (not user-facing) - if (content.includes('internal="true"')) { - continue; - } - - // Check for explicit standalone: false - if (entry.name.endsWith('.xml')) { - // For XML files, check for standalone="false" attribute - const tagMatch = content.match(/<(task|tool)[^>]*standalone="false"/); - standalone = !tagMatch; - } else if (entry.name.endsWith('.md')) { - // For MD files, parse YAML frontmatter - const frontmatterMatch = content.match(/^---\r?\n([\s\S]*?)\r?\n---/); - if (frontmatterMatch) { - try { - const yaml = require('yaml'); - const frontmatter = yaml.parse(frontmatterMatch[1]); - standalone = frontmatter.standalone !== false && frontmatter.standalone !== 'false'; - } catch { - // If YAML parsing fails, default to standalone - } - } - // No frontmatter means standalone (default) - } - } catch { - // If we can't read the file, default to standalone - standalone = true; - } - - files.push({ - name: path.basename(entry.name, matchedExt), - path: fullPath, - relativePath: path.relative(rootDir, fullPath), - filename: entry.name, - standalone: standalone, - }); - } - } - } - - return files; - } - - /** - * Create IDE command/rule file from agent or task - * @param {string} content - File content - * @param {Object} metadata - File metadata - * @param {string} projectDir - The actual project directory path - * @returns {string} Processed content - */ - processContent(content, metadata = {}, projectDir = null) { - // Replace placeholders - let processed = content; - - // Only replace {project-root} if a specific projectDir is provided - // Otherwise leave the placeholder intact - // Note: Don't add trailing slash - paths in source include leading slash - if (projectDir) { - processed = processed.replaceAll('{project-root}', projectDir); - } - processed = processed.replaceAll('{module}', metadata.module || 'core'); - processed = processed.replaceAll('{agent}', metadata.name || ''); - processed = processed.replaceAll('{task}', metadata.name || ''); - - return processed; - } - - /** - * Ensure directory exists - * @param {string} dirPath - Directory path - */ - async ensureDir(dirPath) { - await fs.ensureDir(dirPath); - } - - /** - * Write file with content (replaces _bmad placeholder) - * @param {string} filePath - File path - * @param {string} content - File content - */ - async writeFile(filePath, content) { - // Replace _bmad placeholder if present - if (typeof content === 'string' && content.includes('_bmad')) { - content = content.replaceAll('_bmad', this.bmadFolderName); - } - - // Replace escape sequence _bmad with literal _bmad - if (typeof content === 'string' && content.includes('_bmad')) { - content = content.replaceAll('_bmad', '_bmad'); - } - await this.ensureDir(path.dirname(filePath)); - await fs.writeFile(filePath, content, 'utf8'); - } - - /** - * Copy file from source to destination (replaces _bmad placeholder in text files) - * @param {string} source - Source file path - * @param {string} dest - Destination file path - */ - async copyFile(source, dest) { - // List of text file extensions that should have placeholder replacement - const textExtensions = ['.md', '.yaml', '.yml', '.txt', '.json', '.js', '.ts', '.html', '.css', '.sh', '.bat', '.csv']; - const ext = path.extname(source).toLowerCase(); - - await this.ensureDir(path.dirname(dest)); - - // Check if this is a text file that might contain placeholders - if (textExtensions.includes(ext)) { - try { - // Read the file content - let content = await fs.readFile(source, 'utf8'); - - // Replace _bmad placeholder with actual folder name - if (content.includes('_bmad')) { - content = content.replaceAll('_bmad', this.bmadFolderName); - } - - // Replace escape sequence _bmad with literal _bmad - if (content.includes('_bmad')) { - content = content.replaceAll('_bmad', '_bmad'); - } - - // Write to dest with replaced content - await fs.writeFile(dest, content, 'utf8'); - } catch { - // If reading as text fails, fall back to regular copy - await fs.copy(source, dest, { overwrite: true }); - } - } else { - // Binary file or other file type - just copy directly - await fs.copy(source, dest, { overwrite: true }); - } - } - - /** - * Check if path exists - * @param {string} pathToCheck - Path to check - * @returns {boolean} True if path exists - */ - async exists(pathToCheck) { - return await fs.pathExists(pathToCheck); - } - - /** - * Alias for exists method - * @param {string} pathToCheck - Path to check - * @returns {boolean} True if path exists - */ - async pathExists(pathToCheck) { - return await fs.pathExists(pathToCheck); - } - - /** - * Read file content - * @param {string} filePath - File path - * @returns {string} File content - */ - async readFile(filePath) { - return await fs.readFile(filePath, 'utf8'); - } - - /** - * Format name as title - * @param {string} name - Name to format - * @returns {string} Formatted title - */ - formatTitle(name) { - return name - .split('-') - .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) - .join(' '); - } - - /** - * Flatten a relative path to a single filename for flat slash command naming - * @deprecated Use toColonPath() or toDashPath() from shared/path-utils.js instead - * Example: 'module/agents/name.md' -> 'bmad-module-agents-name.md' - * Used by IDEs that ignore directory structure for slash commands (e.g., Antigravity, Codex) - * @param {string} relativePath - Relative path to flatten - * @returns {string} Flattened filename with 'bmad-' prefix - */ - flattenFilename(relativePath) { - const sanitized = relativePath.replaceAll(/[/\\]/g, '-'); - return `bmad-${sanitized}`; - } - - /** - * Create agent configuration file - * @param {string} bmadDir - BMAD installation directory - * @param {Object} agent - Agent information - */ - async createAgentConfig(bmadDir, agent) { - const agentConfigDir = path.join(bmadDir, '_config', 'agents'); - await this.ensureDir(agentConfigDir); - - // Load agent config template - const templatePath = getSourcePath('utility', 'models', 'agent-config-template.md'); - const templateContent = await this.readFile(templatePath); - - const configContent = `# Agent Config: ${agent.name} - -${templateContent}`; - - const configPath = path.join(agentConfigDir, `${agent.module}-${agent.name}.md`); - await this.writeFile(configPath, configContent); - } -} - -module.exports = { BaseIdeSetup }; diff --git a/tools/cli/installers/lib/ide/platform-codes.js b/tools/cli/installers/lib/ide/platform-codes.js deleted file mode 100644 index d5d8e0a47..000000000 --- a/tools/cli/installers/lib/ide/platform-codes.js +++ /dev/null @@ -1,100 +0,0 @@ -const fs = require('fs-extra'); -const path = require('node:path'); -const yaml = require('yaml'); - -const PLATFORM_CODES_PATH = path.join(__dirname, 'platform-codes.yaml'); - -let _cachedPlatformCodes = null; - -/** - * Load the platform codes configuration from YAML - * @returns {Object} Platform codes configuration - */ -async function loadPlatformCodes() { - if (_cachedPlatformCodes) { - return _cachedPlatformCodes; - } - - if (!(await fs.pathExists(PLATFORM_CODES_PATH))) { - throw new Error(`Platform codes configuration not found at: ${PLATFORM_CODES_PATH}`); - } - - const content = await fs.readFile(PLATFORM_CODES_PATH, 'utf8'); - _cachedPlatformCodes = yaml.parse(content); - return _cachedPlatformCodes; -} - -/** - * Get platform information by code - * @param {string} platformCode - Platform code (e.g., 'claude-code', 'cursor') - * @returns {Object|null} Platform info or null if not found - */ -function getPlatformInfo(platformCode) { - if (!_cachedPlatformCodes) { - throw new Error('Platform codes not loaded. Call loadPlatformCodes() first.'); - } - - return _cachedPlatformCodes.platforms[platformCode] || null; -} - -/** - * Get all preferred platforms - * @returns {Promise} Array of preferred platform codes - */ -async function getPreferredPlatforms() { - const config = await loadPlatformCodes(); - return Object.entries(config.platforms) - .filter(([_, info]) => info.preferred) - .map(([code, _]) => code); -} - -/** - * Get all platform codes by category - * @param {string} category - Category to filter by (ide, cli, tool, etc.) - * @returns {Promise} Array of platform codes in the category - */ -async function getPlatformsByCategory(category) { - const config = await loadPlatformCodes(); - return Object.entries(config.platforms) - .filter(([_, info]) => info.category === category) - .map(([code, _]) => code); -} - -/** - * Get all platforms with installer config - * @returns {Promise} Array of platform codes that have installer config - */ -async function getConfigDrivenPlatforms() { - const config = await loadPlatformCodes(); - return Object.entries(config.platforms) - .filter(([_, info]) => info.installer) - .map(([code, _]) => code); -} - -/** - * Get platforms that use custom installers (no installer config) - * @returns {Promise} Array of platform codes with custom installers - */ -async function getCustomInstallerPlatforms() { - const config = await loadPlatformCodes(); - return Object.entries(config.platforms) - .filter(([_, info]) => !info.installer) - .map(([code, _]) => code); -} - -/** - * Clear the cached platform codes (useful for testing) - */ -function clearCache() { - _cachedPlatformCodes = null; -} - -module.exports = { - loadPlatformCodes, - getPlatformInfo, - getPreferredPlatforms, - getPlatformsByCategory, - getConfigDrivenPlatforms, - getCustomInstallerPlatforms, - clearCache, -}; diff --git a/tools/cli/installers/lib/ide/platform-codes.yaml b/tools/cli/installers/lib/ide/platform-codes.yaml deleted file mode 100644 index 2c4d2e920..000000000 --- a/tools/cli/installers/lib/ide/platform-codes.yaml +++ /dev/null @@ -1,341 +0,0 @@ -# BMAD Platform Codes Configuration -# Central configuration for all platform/IDE codes used in the BMAD system -# -# This file defines: -# 1. Platform metadata (name, preferred status, category, description) -# 2. Installer configuration (target directories, templates, artifact types) -# -# Format: -# code: Platform identifier used internally -# name: Display name shown to users -# preferred: Whether this platform is shown as a recommended option on install -# category: Type of platform (ide, cli, tool, service) -# description: Brief description of the platform -# installer: Installation configuration (optional - omit for custom installers) - -platforms: - antigravity: - name: "Google Antigravity" - preferred: false - category: ide - description: "Google's AI development environment" - installer: - legacy_targets: - - .agent/workflows - target_dir: .agent/skills - template_type: antigravity - skill_format: true - - auggie: - name: "Auggie" - preferred: false - category: cli - description: "AI development tool" - installer: - legacy_targets: - - .augment/commands - target_dir: .augment/skills - template_type: default - skill_format: true - - claude-code: - name: "Claude Code" - preferred: true - category: cli - description: "Anthropic's official CLI for Claude" - installer: - legacy_targets: - - .claude/commands - target_dir: .claude/skills - template_type: default - skill_format: true - ancestor_conflict_check: true - - cline: - name: "Cline" - preferred: false - category: ide - description: "AI coding assistant" - installer: - legacy_targets: - - .clinerules/workflows - target_dir: .cline/skills - template_type: default - skill_format: true - - codex: - name: "Codex" - preferred: false - category: cli - description: "OpenAI Codex integration" - installer: - legacy_targets: - - .codex/prompts - - ~/.codex/prompts - target_dir: .agents/skills - template_type: default - skill_format: true - ancestor_conflict_check: true - artifact_types: [agents, workflows, tasks] - - codebuddy: - name: "CodeBuddy" - preferred: false - category: ide - description: "Tencent Cloud Code Assistant - AI-powered coding companion" - installer: - legacy_targets: - - .codebuddy/commands - target_dir: .codebuddy/skills - template_type: default - skill_format: true - - crush: - name: "Crush" - preferred: false - category: ide - description: "AI development assistant" - installer: - legacy_targets: - - .crush/commands - target_dir: .crush/skills - template_type: default - skill_format: true - - cursor: - name: "Cursor" - preferred: true - category: ide - description: "AI-first code editor" - installer: - legacy_targets: - - .cursor/commands - target_dir: .cursor/skills - template_type: default - skill_format: true - - gemini: - name: "Gemini CLI" - preferred: false - category: cli - description: "Google's CLI for Gemini" - installer: - legacy_targets: - - .gemini/commands - target_dir: .gemini/skills - template_type: default - skill_format: true - - github-copilot: - name: "GitHub Copilot" - preferred: false - category: ide - description: "GitHub's AI pair programmer" - installer: - legacy_targets: - - .github/agents - - .github/prompts - target_dir: .github/skills - template_type: default - skill_format: true - - iflow: - name: "iFlow" - preferred: false - category: ide - description: "AI workflow automation" - installer: - legacy_targets: - - .iflow/commands - target_dir: .iflow/skills - template_type: default - skill_format: true - - kilo: - name: "KiloCoder" - preferred: false - category: ide - description: "AI coding platform" - suspended: "Kilo Code does not yet support the Agent Skills standard. Support is paused until they implement it. See https://github.com/kilocode/kilo-code/issues for updates." - installer: - legacy_targets: - - .kilocode/workflows - target_dir: .kilocode/skills - template_type: default - skill_format: true - - kiro: - name: "Kiro" - preferred: false - category: ide - description: "Amazon's AI-powered IDE" - installer: - legacy_targets: - - .kiro/steering - target_dir: .kiro/skills - template_type: kiro - skill_format: true - - ona: - name: "Ona" - preferred: false - category: ide - description: "Ona AI development environment" - installer: - target_dir: .ona/skills - template_type: default - skill_format: true - - opencode: - name: "OpenCode" - preferred: false - category: ide - description: "OpenCode terminal coding assistant" - installer: - legacy_targets: - - .opencode/agents - - .opencode/commands - - .opencode/agent - - .opencode/command - target_dir: .opencode/skills - template_type: opencode - skill_format: true - ancestor_conflict_check: true - - pi: - name: "Pi" - preferred: false - category: cli - description: "Provider-agnostic terminal-native AI coding agent" - installer: - target_dir: .pi/skills - template_type: default - skill_format: true - - qoder: - name: "Qoder" - preferred: false - category: ide - description: "Qoder AI coding assistant" - installer: - target_dir: .qoder/skills - template_type: default - skill_format: true - - qwen: - name: "QwenCoder" - preferred: false - category: ide - description: "Qwen AI coding assistant" - installer: - legacy_targets: - - .qwen/commands - target_dir: .qwen/skills - template_type: default - skill_format: true - - roo: - name: "Roo Code" - preferred: false - category: ide - description: "Enhanced Cline fork" - installer: - legacy_targets: - - .roo/commands - target_dir: .roo/skills - template_type: default - skill_format: true - - rovo-dev: - name: "Rovo Dev" - preferred: false - category: ide - description: "Atlassian's Rovo development environment" - installer: - legacy_targets: - - .rovodev/workflows - target_dir: .rovodev/skills - template_type: default - skill_format: true - - trae: - name: "Trae" - preferred: false - category: ide - description: "AI coding tool" - installer: - legacy_targets: - - .trae/rules - target_dir: .trae/skills - template_type: default - skill_format: true - - windsurf: - name: "Windsurf" - preferred: false - category: ide - description: "AI-powered IDE with cascade flows" - installer: - legacy_targets: - - .windsurf/workflows - target_dir: .windsurf/skills - template_type: windsurf - skill_format: true - -# ============================================================================ -# Installer Config Schema -# ============================================================================ -# -# installer: -# target_dir: string # Directory where artifacts are installed -# template_type: string # Default template type to use -# header_template: string (optional) # Override for header/frontmatter template -# body_template: string (optional) # Override for body/content template -# legacy_targets: array (optional) # Old target dirs to clean up on reinstall (migration) -# - string # Relative path, e.g. .opencode/agent -# targets: array (optional) # For multi-target installations -# - target_dir: string -# template_type: string -# artifact_types: [agents, workflows, tasks, tools] -# artifact_types: array (optional) # Filter which artifacts to install (default: all) -# skip_existing: boolean (optional) # Skip files that already exist (default: false) -# skill_format: boolean (optional) # Use directory-per-skill output: /SKILL.md -# # with clean frontmatter (name + description, unquoted) -# ancestor_conflict_check: boolean (optional) # Refuse install when ancestor dir has BMAD files -# # in the same target_dir (for IDEs that inherit -# # skills from parent directories) - -# ============================================================================ -# Platform Categories -# ============================================================================ - -categories: - ide: - name: "Integrated Development Environment" - description: "Full-featured code editors with AI assistance" - - cli: - name: "Command Line Interface" - description: "Terminal-based tools" - - tool: - name: "Development Tool" - description: "Standalone development utilities" - - service: - name: "Cloud Service" - description: "Cloud-based development platforms" - - extension: - name: "Editor Extension" - description: "Plugins for existing editors" - -# ============================================================================ -# Naming Conventions and Rules -# ============================================================================ - -conventions: - code_format: "lowercase-kebab-case" - name_format: "Title Case" - max_code_length: 20 - allowed_characters: "a-z0-9-" diff --git a/tools/cli/installers/lib/ide/templates/combined/claude-workflow-yaml.md b/tools/cli/installers/lib/ide/templates/combined/claude-workflow-yaml.md deleted file mode 120000 index 11f78e1d4..000000000 --- a/tools/cli/installers/lib/ide/templates/combined/claude-workflow-yaml.md +++ /dev/null @@ -1 +0,0 @@ -default-workflow-yaml.md \ No newline at end of file diff --git a/tools/cli/installers/lib/modules/external-manager.js b/tools/cli/installers/lib/modules/external-manager.js deleted file mode 100644 index f1ea2206e..000000000 --- a/tools/cli/installers/lib/modules/external-manager.js +++ /dev/null @@ -1,136 +0,0 @@ -const fs = require('fs-extra'); -const path = require('node:path'); -const yaml = require('yaml'); -const prompts = require('../../../lib/prompts'); - -/** - * Manages external official modules defined in external-official-modules.yaml - * These are modules hosted in external repositories that can be installed - * - * @class ExternalModuleManager - */ -class ExternalModuleManager { - constructor() { - this.externalModulesConfigPath = path.join(__dirname, '../../../external-official-modules.yaml'); - this.cachedModules = null; - } - - /** - * Load and parse the external-official-modules.yaml file - * @returns {Object} Parsed YAML content with modules object - */ - async loadExternalModulesConfig() { - if (this.cachedModules) { - return this.cachedModules; - } - - try { - const content = await fs.readFile(this.externalModulesConfigPath, 'utf8'); - const config = yaml.parse(content); - this.cachedModules = config; - return config; - } catch (error) { - await prompts.log.warn(`Failed to load external modules config: ${error.message}`); - return { modules: {} }; - } - } - - /** - * Get list of available external modules - * @returns {Array} Array of module info objects - */ - async listAvailable() { - const config = await this.loadExternalModulesConfig(); - const modules = []; - - for (const [key, moduleConfig] of Object.entries(config.modules || {})) { - modules.push({ - key, - url: moduleConfig.url, - moduleDefinition: moduleConfig['module-definition'], - code: moduleConfig.code, - name: moduleConfig.name, - header: moduleConfig.header, - subheader: moduleConfig.subheader, - description: moduleConfig.description || '', - defaultSelected: moduleConfig.defaultSelected === true, - type: moduleConfig.type || 'community', // bmad-org or community - npmPackage: moduleConfig.npmPackage || null, // Include npm package name - isExternal: true, - }); - } - - return modules; - } - - /** - * Get module info by code - * @param {string} code - The module code (e.g., 'cis') - * @returns {Object|null} Module info or null if not found - */ - async getModuleByCode(code) { - const modules = await this.listAvailable(); - return modules.find((m) => m.code === code) || null; - } - - /** - * Get module info by key - * @param {string} key - The module key (e.g., 'bmad-creative-intelligence-suite') - * @returns {Object|null} Module info or null if not found - */ - async getModuleByKey(key) { - const config = await this.loadExternalModulesConfig(); - const moduleConfig = config.modules?.[key]; - - if (!moduleConfig) { - return null; - } - - return { - key, - url: moduleConfig.url, - moduleDefinition: moduleConfig['module-definition'], - code: moduleConfig.code, - name: moduleConfig.name, - header: moduleConfig.header, - subheader: moduleConfig.subheader, - description: moduleConfig.description || '', - defaultSelected: moduleConfig.defaultSelected === true, - type: moduleConfig.type || 'community', // bmad-org or community - npmPackage: moduleConfig.npmPackage || null, // Include npm package name - isExternal: true, - }; - } - - /** - * Check if a module code exists in external modules - * @param {string} code - The module code to check - * @returns {boolean} True if the module exists - */ - async hasModule(code) { - const module = await this.getModuleByCode(code); - return module !== null; - } - - /** - * Get the URL for a module by code - * @param {string} code - The module code - * @returns {string|null} The URL or null if not found - */ - async getModuleUrl(code) { - const module = await this.getModuleByCode(code); - return module ? module.url : null; - } - - /** - * Get the module definition path for a module by code - * @param {string} code - The module code - * @returns {string|null} The module definition path or null if not found - */ - async getModuleDefinition(code) { - const module = await this.getModuleByCode(code); - return module ? module.moduleDefinition : null; - } -} - -module.exports = { ExternalModuleManager }; diff --git a/tools/cli/installers/lib/modules/manager.js b/tools/cli/installers/lib/modules/manager.js deleted file mode 100644 index 17a320c44..000000000 --- a/tools/cli/installers/lib/modules/manager.js +++ /dev/null @@ -1,928 +0,0 @@ -const path = require('node:path'); -const fs = require('fs-extra'); -const yaml = require('yaml'); -const prompts = require('../../../lib/prompts'); -const { getProjectRoot, getSourcePath, getModulePath } = require('../../../lib/project-root'); -const { ExternalModuleManager } = require('./external-manager'); -const { BMAD_FOLDER_NAME } = require('../ide/shared/path-utils'); - -/** - * Manages the installation, updating, and removal of BMAD modules. - * Handles module discovery, dependency resolution, and configuration processing. - * - * @class ModuleManager - * @requires fs-extra - * @requires yaml - * @requires prompts - * - * @example - * const manager = new ModuleManager(); - * const modules = await manager.listAvailable(); - * await manager.install('core-module', '/path/to/bmad'); - */ -class ModuleManager { - constructor(options = {}) { - this.bmadFolderName = BMAD_FOLDER_NAME; // Default, can be overridden - this.customModulePaths = new Map(); // Initialize custom module paths - this.externalModuleManager = new ExternalModuleManager(); // For external official modules - } - - /** - * Set the bmad folder name for placeholder replacement - * @param {string} bmadFolderName - The bmad folder name - */ - setBmadFolderName(bmadFolderName) { - this.bmadFolderName = bmadFolderName; - } - - /** - * Set the core configuration for access during module installation - * @param {Object} coreConfig - Core configuration object - */ - setCoreConfig(coreConfig) { - this.coreConfig = coreConfig; - } - - /** - * Set custom module paths for priority lookup - * @param {Map} customModulePaths - Map of module ID to source path - */ - setCustomModulePaths(customModulePaths) { - this.customModulePaths = customModulePaths; - } - - /** - * Copy a file to the target location - * @param {string} sourcePath - Source file path - * @param {string} targetPath - Target file path - * @param {boolean} overwrite - Whether to overwrite existing files (default: true) - */ - async copyFileWithPlaceholderReplacement(sourcePath, targetPath, overwrite = true) { - await fs.copy(sourcePath, targetPath, { overwrite }); - } - - /** - * Copy a directory recursively - * @param {string} sourceDir - Source directory path - * @param {string} targetDir - Target directory path - * @param {boolean} overwrite - Whether to overwrite existing files (default: true) - */ - async copyDirectoryWithPlaceholderReplacement(sourceDir, targetDir, overwrite = true) { - await fs.ensureDir(targetDir); - const entries = await fs.readdir(sourceDir, { withFileTypes: true }); - - for (const entry of entries) { - const sourcePath = path.join(sourceDir, entry.name); - const targetPath = path.join(targetDir, entry.name); - - if (entry.isDirectory()) { - await this.copyDirectoryWithPlaceholderReplacement(sourcePath, targetPath, overwrite); - } else { - await this.copyFileWithPlaceholderReplacement(sourcePath, targetPath, overwrite); - } - } - } - - /** - * List all available modules (excluding core which is always installed) - * bmm is the only built-in module, directly under src/bmm-skills - * All other modules come from external-official-modules.yaml - * @returns {Object} Object with modules array and customModules array - */ - async listAvailable() { - const modules = []; - const customModules = []; - - // Add built-in bmm module (directly under src/bmm-skills) - const bmmPath = getSourcePath('bmm-skills'); - if (await fs.pathExists(bmmPath)) { - const bmmInfo = await this.getModuleInfo(bmmPath, 'bmm', 'src/bmm-skills'); - if (bmmInfo) { - modules.push(bmmInfo); - } - } - - // Check for cached custom modules in _config/custom/ - if (this.bmadDir) { - const customCacheDir = path.join(this.bmadDir, '_config', 'custom'); - if (await fs.pathExists(customCacheDir)) { - const cacheEntries = await fs.readdir(customCacheDir, { withFileTypes: true }); - for (const entry of cacheEntries) { - if (entry.isDirectory()) { - const cachePath = path.join(customCacheDir, entry.name); - const moduleInfo = await this.getModuleInfo(cachePath, entry.name, '_config/custom'); - if (moduleInfo && !modules.some((m) => m.id === moduleInfo.id) && !customModules.some((m) => m.id === moduleInfo.id)) { - moduleInfo.isCustom = true; - moduleInfo.fromCache = true; - customModules.push(moduleInfo); - } - } - } - } - } - - return { modules, customModules }; - } - - /** - * Get module information from a module path - * @param {string} modulePath - Path to the module directory - * @param {string} defaultName - Default name for the module - * @param {string} sourceDescription - Description of where the module was found - * @returns {Object|null} Module info or null if not a valid module - */ - async getModuleInfo(modulePath, defaultName, sourceDescription) { - // Check for module structure (module.yaml OR custom.yaml) - const moduleConfigPath = path.join(modulePath, 'module.yaml'); - const rootCustomConfigPath = path.join(modulePath, 'custom.yaml'); - let configPath = null; - - if (await fs.pathExists(moduleConfigPath)) { - configPath = moduleConfigPath; - } else if (await fs.pathExists(rootCustomConfigPath)) { - configPath = rootCustomConfigPath; - } - - // Skip if this doesn't look like a module - if (!configPath) { - return null; - } - - // Mark as custom if it's using custom.yaml OR if it's outside src/bmm or src/core - const isCustomSource = - sourceDescription !== 'src/bmm-skills' && sourceDescription !== 'src/core-skills' && sourceDescription !== 'src/modules'; - const moduleInfo = { - id: defaultName, - path: modulePath, - name: defaultName - .split('-') - .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) - .join(' '), - description: 'BMAD Module', - version: '5.0.0', - source: sourceDescription, - isCustom: configPath === rootCustomConfigPath || isCustomSource, - }; - - // Read module config for metadata - try { - const configContent = await fs.readFile(configPath, 'utf8'); - const config = yaml.parse(configContent); - - // Use the code property as the id if available - if (config.code) { - moduleInfo.id = config.code; - } - - moduleInfo.name = config.name || moduleInfo.name; - moduleInfo.description = config.description || moduleInfo.description; - moduleInfo.version = config.version || moduleInfo.version; - moduleInfo.dependencies = config.dependencies || []; - moduleInfo.defaultSelected = config.default_selected === undefined ? false : config.default_selected; - } catch (error) { - await prompts.log.warn(`Failed to read config for ${defaultName}: ${error.message}`); - } - - return moduleInfo; - } - - /** - * Find the source path for a module by searching all possible locations - * @param {string} moduleCode - Code of the module to find (from module.yaml) - * @returns {string|null} Path to the module source or null if not found - */ - async findModuleSource(moduleCode, options = {}) { - const projectRoot = getProjectRoot(); - - // First check custom module paths if they exist - if (this.customModulePaths && this.customModulePaths.has(moduleCode)) { - return this.customModulePaths.get(moduleCode); - } - - // Check for built-in bmm module (directly under src/bmm-skills) - if (moduleCode === 'bmm') { - const bmmPath = getSourcePath('bmm-skills'); - if (await fs.pathExists(bmmPath)) { - return bmmPath; - } - } - - // Check external official modules - const externalSource = await this.findExternalModuleSource(moduleCode, options); - if (externalSource) { - return externalSource; - } - - return null; - } - - /** - * Check if a module is an external official module - * @param {string} moduleCode - Code of the module to check - * @returns {boolean} True if the module is external - */ - async isExternalModule(moduleCode) { - return await this.externalModuleManager.hasModule(moduleCode); - } - - /** - * Get the cache directory for external modules - * @returns {string} Path to the external modules cache directory - */ - getExternalCacheDir() { - const os = require('node:os'); - const cacheDir = path.join(os.homedir(), '.bmad', 'cache', 'external-modules'); - return cacheDir; - } - - /** - * Clone an external module repository to cache - * @param {string} moduleCode - Code of the external module - * @returns {string} Path to the cloned repository - */ - async cloneExternalModule(moduleCode, options = {}) { - const { execSync } = require('node:child_process'); - const moduleInfo = await this.externalModuleManager.getModuleByCode(moduleCode); - - if (!moduleInfo) { - throw new Error(`External module '${moduleCode}' not found in external-official-modules.yaml`); - } - - const cacheDir = this.getExternalCacheDir(); - const moduleCacheDir = path.join(cacheDir, moduleCode); - const silent = options.silent || false; - - // Create cache directory if it doesn't exist - await fs.ensureDir(cacheDir); - - // Helper to create a spinner or a no-op when silent - const createSpinner = async () => { - if (silent) { - return { - start() {}, - stop() {}, - error() {}, - message() {}, - cancel() {}, - clear() {}, - get isSpinning() { - return false; - }, - get isCancelled() { - return false; - }, - }; - } - return await prompts.spinner(); - }; - - // Track if we need to install dependencies - let needsDependencyInstall = false; - let wasNewClone = false; - - // Check if already cloned - if (await fs.pathExists(moduleCacheDir)) { - // Try to update if it's a git repo - const fetchSpinner = await createSpinner(); - fetchSpinner.start(`Fetching ${moduleInfo.name}...`); - try { - const currentRef = execSync('git rev-parse HEAD', { cwd: moduleCacheDir, stdio: 'pipe' }).toString().trim(); - // Fetch and reset to remote - works better with shallow clones than pull - execSync('git fetch origin --depth 1', { - cwd: moduleCacheDir, - stdio: ['ignore', 'pipe', 'pipe'], - env: { ...process.env, GIT_TERMINAL_PROMPT: '0' }, - }); - execSync('git reset --hard origin/HEAD', { - cwd: moduleCacheDir, - stdio: ['ignore', 'pipe', 'pipe'], - env: { ...process.env, GIT_TERMINAL_PROMPT: '0' }, - }); - const newRef = execSync('git rev-parse HEAD', { cwd: moduleCacheDir, stdio: 'pipe' }).toString().trim(); - - fetchSpinner.stop(`Fetched ${moduleInfo.name}`); - // Force dependency install if we got new code - if (currentRef !== newRef) { - needsDependencyInstall = true; - } - } catch { - fetchSpinner.error(`Fetch failed, re-downloading ${moduleInfo.name}`); - // If update fails, remove and re-clone - await fs.remove(moduleCacheDir); - wasNewClone = true; - } - } else { - wasNewClone = true; - } - - // Clone if not exists or was removed - if (wasNewClone) { - const fetchSpinner = await createSpinner(); - fetchSpinner.start(`Fetching ${moduleInfo.name}...`); - try { - execSync(`git clone --depth 1 "${moduleInfo.url}" "${moduleCacheDir}"`, { - stdio: ['ignore', 'pipe', 'pipe'], - env: { ...process.env, GIT_TERMINAL_PROMPT: '0' }, - }); - fetchSpinner.stop(`Fetched ${moduleInfo.name}`); - } catch (error) { - fetchSpinner.error(`Failed to fetch ${moduleInfo.name}`); - throw new Error(`Failed to clone external module '${moduleCode}': ${error.message}`); - } - } - - // Install dependencies if package.json exists - const packageJsonPath = path.join(moduleCacheDir, 'package.json'); - const nodeModulesPath = path.join(moduleCacheDir, 'node_modules'); - if (await fs.pathExists(packageJsonPath)) { - // Install if node_modules doesn't exist, or if package.json is newer (dependencies changed) - const nodeModulesMissing = !(await fs.pathExists(nodeModulesPath)); - - // Force install if we updated or cloned new - if (needsDependencyInstall || wasNewClone || nodeModulesMissing) { - const installSpinner = await createSpinner(); - installSpinner.start(`Installing dependencies for ${moduleInfo.name}...`); - try { - execSync('npm install --omit=dev --no-audit --no-fund --no-progress --legacy-peer-deps', { - cwd: moduleCacheDir, - stdio: ['ignore', 'pipe', 'pipe'], - timeout: 120_000, // 2 minute timeout - }); - installSpinner.stop(`Installed dependencies for ${moduleInfo.name}`); - } catch (error) { - installSpinner.error(`Failed to install dependencies for ${moduleInfo.name}`); - if (!silent) await prompts.log.warn(` ${error.message}`); - } - } else { - // Check if package.json is newer than node_modules - let packageJsonNewer = false; - try { - const packageStats = await fs.stat(packageJsonPath); - const nodeModulesStats = await fs.stat(nodeModulesPath); - packageJsonNewer = packageStats.mtime > nodeModulesStats.mtime; - } catch { - // If stat fails, assume we need to install - packageJsonNewer = true; - } - - if (packageJsonNewer) { - const installSpinner = await createSpinner(); - installSpinner.start(`Installing dependencies for ${moduleInfo.name}...`); - try { - execSync('npm install --omit=dev --no-audit --no-fund --no-progress --legacy-peer-deps', { - cwd: moduleCacheDir, - stdio: ['ignore', 'pipe', 'pipe'], - timeout: 120_000, // 2 minute timeout - }); - installSpinner.stop(`Installed dependencies for ${moduleInfo.name}`); - } catch (error) { - installSpinner.error(`Failed to install dependencies for ${moduleInfo.name}`); - if (!silent) await prompts.log.warn(` ${error.message}`); - } - } - } - } - - return moduleCacheDir; - } - - /** - * Find the source path for an external module - * @param {string} moduleCode - Code of the external module - * @returns {string|null} Path to the module source or null if not found - */ - async findExternalModuleSource(moduleCode, options = {}) { - const moduleInfo = await this.externalModuleManager.getModuleByCode(moduleCode); - - if (!moduleInfo) { - return null; - } - - // Clone the external module repo - const cloneDir = await this.cloneExternalModule(moduleCode, options); - - // The module-definition specifies the path to module.yaml relative to repo root - // We need to return the directory containing module.yaml - const moduleDefinitionPath = moduleInfo.moduleDefinition; // e.g., 'src/module.yaml' - const moduleDir = path.dirname(path.join(cloneDir, moduleDefinitionPath)); - - return moduleDir; - } - - /** - * Install a module - * @param {string} moduleName - Code of the module to install (from module.yaml) - * @param {string} bmadDir - Target bmad directory - * @param {Function} fileTrackingCallback - Optional callback to track installed files - * @param {Object} options - Additional installation options - * @param {Array} options.installedIDEs - Array of IDE codes that were installed - * @param {Object} options.moduleConfig - Module configuration from config collector - * @param {Object} options.logger - Logger instance for output - */ - async install(moduleName, bmadDir, fileTrackingCallback = null, options = {}) { - const sourcePath = await this.findModuleSource(moduleName, { silent: options.silent }); - const targetPath = path.join(bmadDir, moduleName); - - // Check if source module exists - if (!sourcePath) { - // Provide a more user-friendly error message - throw new Error( - `Source for module '${moduleName}' is not available. It will be retained but cannot be updated without its source files.`, - ); - } - - // Check if this is a custom module and read its custom.yaml values - let customConfig = null; - const rootCustomConfigPath = path.join(sourcePath, 'custom.yaml'); - - if (await fs.pathExists(rootCustomConfigPath)) { - try { - const customContent = await fs.readFile(rootCustomConfigPath, 'utf8'); - customConfig = yaml.parse(customContent); - } catch (error) { - await prompts.log.warn(`Failed to read custom.yaml for ${moduleName}: ${error.message}`); - } - } - - // If this is a custom module, merge its values into the module config - if (customConfig) { - options.moduleConfig = { ...options.moduleConfig, ...customConfig }; - if (options.logger) { - await options.logger.log(` Merged custom configuration for ${moduleName}`); - } - } - - // Check if already installed - if (await fs.pathExists(targetPath)) { - await fs.remove(targetPath); - } - - // Copy module files with filtering - await this.copyModuleWithFiltering(sourcePath, targetPath, fileTrackingCallback, options.moduleConfig); - - // Create directories declared in module.yaml (unless explicitly skipped) - if (!options.skipModuleInstaller) { - await this.createModuleDirectories(moduleName, bmadDir, options); - } - - // Capture version info for manifest - const { Manifest } = require('../core/manifest'); - const manifestObj = new Manifest(); - const versionInfo = await manifestObj.getModuleVersionInfo(moduleName, bmadDir, sourcePath); - - await manifestObj.addModule(bmadDir, moduleName, { - version: versionInfo.version, - source: versionInfo.source, - npmPackage: versionInfo.npmPackage, - repoUrl: versionInfo.repoUrl, - }); - - return { - success: true, - module: moduleName, - path: targetPath, - versionInfo, - }; - } - - /** - * Update an existing module - * @param {string} moduleName - Name of the module to update - * @param {string} bmadDir - Target bmad directory - * @param {boolean} force - Force update (overwrite modifications) - */ - async update(moduleName, bmadDir, force = false, options = {}) { - const sourcePath = await this.findModuleSource(moduleName); - const targetPath = path.join(bmadDir, moduleName); - - // Check if source module exists - if (!sourcePath) { - throw new Error(`Module '${moduleName}' not found in any source location`); - } - - // Check if module is installed - if (!(await fs.pathExists(targetPath))) { - throw new Error(`Module '${moduleName}' is not installed`); - } - - if (force) { - // Force update - remove and reinstall - await fs.remove(targetPath); - return await this.install(moduleName, bmadDir, null, { installer: options.installer }); - } else { - // Selective update - preserve user modifications - await this.syncModule(sourcePath, targetPath); - } - - return { - success: true, - module: moduleName, - path: targetPath, - }; - } - - /** - * Remove a module - * @param {string} moduleName - Name of the module to remove - * @param {string} bmadDir - Target bmad directory - */ - async remove(moduleName, bmadDir) { - const targetPath = path.join(bmadDir, moduleName); - - if (!(await fs.pathExists(targetPath))) { - throw new Error(`Module '${moduleName}' is not installed`); - } - - await fs.remove(targetPath); - - return { - success: true, - module: moduleName, - }; - } - - /** - * Check if a module is installed - * @param {string} moduleName - Name of the module - * @param {string} bmadDir - Target bmad directory - * @returns {boolean} True if module is installed - */ - async isInstalled(moduleName, bmadDir) { - const targetPath = path.join(bmadDir, moduleName); - return await fs.pathExists(targetPath); - } - - /** - * Get installed module info - * @param {string} moduleName - Name of the module - * @param {string} bmadDir - Target bmad directory - * @returns {Object|null} Module info or null if not installed - */ - async getInstalledInfo(moduleName, bmadDir) { - const targetPath = path.join(bmadDir, moduleName); - - if (!(await fs.pathExists(targetPath))) { - return null; - } - - const configPath = path.join(targetPath, 'config.yaml'); - const moduleInfo = { - id: moduleName, - path: targetPath, - installed: true, - }; - - if (await fs.pathExists(configPath)) { - try { - const configContent = await fs.readFile(configPath, 'utf8'); - const config = yaml.parse(configContent); - Object.assign(moduleInfo, config); - } catch (error) { - await prompts.log.warn(`Failed to read installed module config: ${error.message}`); - } - } - - return moduleInfo; - } - - /** - * Copy module with filtering for localskip agents and conditional content - * @param {string} sourcePath - Source module path - * @param {string} targetPath - Target module path - * @param {Function} fileTrackingCallback - Optional callback to track installed files - * @param {Object} moduleConfig - Module configuration with conditional flags - */ - async copyModuleWithFiltering(sourcePath, targetPath, fileTrackingCallback = null, moduleConfig = {}) { - // Get all files in source - const sourceFiles = await this.getFileList(sourcePath); - - for (const file of sourceFiles) { - // Skip sub-modules directory - these are IDE-specific and handled separately - if (file.startsWith('sub-modules/')) { - continue; - } - - // Skip sidecar directories - these contain agent-specific assets not needed at install time - const isInSidecarDirectory = path - .dirname(file) - .split('/') - .some((dir) => dir.toLowerCase().endsWith('-sidecar')); - - if (isInSidecarDirectory) { - continue; - } - - // Skip module.yaml at root - it's only needed at install time - if (file === 'module.yaml') { - continue; - } - - // Skip module root config.yaml only - generated by config collector with actual values - // Workflow-level config.yaml (e.g. workflows/orchestrate-story/config.yaml) must be copied - // for custom modules that use workflow-specific configuration - if (file === 'config.yaml') { - continue; - } - - const sourceFile = path.join(sourcePath, file); - const targetFile = path.join(targetPath, file); - - // Check if this is an agent file - if (file.startsWith('agents/') && file.endsWith('.md')) { - // Read the file to check for localskip - const content = await fs.readFile(sourceFile, 'utf8'); - - // Check for localskip="true" in the agent tag - const agentMatch = content.match(/]*\slocalskip="true"[^>]*>/); - if (agentMatch) { - await prompts.log.message(` Skipping web-only agent: ${path.basename(file)}`); - continue; // Skip this agent - } - } - - // Copy the file with placeholder replacement - await this.copyFileWithPlaceholderReplacement(sourceFile, targetFile); - - // Track the file if callback provided - if (fileTrackingCallback) { - fileTrackingCallback(targetFile); - } - } - } - - /** - * Find all .md agent files recursively in a directory - * @param {string} dir - Directory to search - * @returns {Array} List of .md agent file paths - */ - async findAgentMdFiles(dir) { - const agentFiles = []; - - async function searchDirectory(searchDir) { - const entries = await fs.readdir(searchDir, { withFileTypes: true }); - - for (const entry of entries) { - const fullPath = path.join(searchDir, entry.name); - - if (entry.isFile() && entry.name.endsWith('.md')) { - agentFiles.push(fullPath); - } else if (entry.isDirectory()) { - await searchDirectory(fullPath); - } - } - } - - await searchDirectory(dir); - return agentFiles; - } - - /** - * Create directories declared in module.yaml's `directories` key - * This replaces the security-risky module installer pattern with declarative config - * During updates, if a directory path changed, moves the old directory to the new path - * @param {string} moduleName - Name of the module - * @param {string} bmadDir - Target bmad directory - * @param {Object} options - Installation options - * @param {Object} options.moduleConfig - Module configuration from config collector - * @param {Object} options.existingModuleConfig - Previous module config (for detecting path changes during updates) - * @param {Object} options.coreConfig - Core configuration - * @returns {Promise<{createdDirs: string[], movedDirs: string[], createdWdsFolders: string[]}>} Created directories info - */ - async createModuleDirectories(moduleName, bmadDir, options = {}) { - const moduleConfig = options.moduleConfig || {}; - const existingModuleConfig = options.existingModuleConfig || {}; - const projectRoot = path.dirname(bmadDir); - const emptyResult = { createdDirs: [], movedDirs: [], createdWdsFolders: [] }; - - // Special handling for core module - it's in src/core-skills not src/modules - let sourcePath; - if (moduleName === 'core') { - sourcePath = getSourcePath('core-skills'); - } else { - sourcePath = await this.findModuleSource(moduleName, { silent: true }); - if (!sourcePath) { - return emptyResult; // No source found, skip - } - } - - // Read module.yaml to find the `directories` key - const moduleYamlPath = path.join(sourcePath, 'module.yaml'); - if (!(await fs.pathExists(moduleYamlPath))) { - return emptyResult; // No module.yaml, skip - } - - let moduleYaml; - try { - const yamlContent = await fs.readFile(moduleYamlPath, 'utf8'); - moduleYaml = yaml.parse(yamlContent); - } catch { - return emptyResult; // Invalid YAML, skip - } - - if (!moduleYaml || !moduleYaml.directories) { - return emptyResult; // No directories declared, skip - } - - const directories = moduleYaml.directories; - const wdsFolders = moduleYaml.wds_folders || []; - const createdDirs = []; - const movedDirs = []; - const createdWdsFolders = []; - - for (const dirRef of directories) { - // Parse variable reference like "{design_artifacts}" - const varMatch = dirRef.match(/^\{([^}]+)\}$/); - if (!varMatch) { - // Not a variable reference, skip - continue; - } - - const configKey = varMatch[1]; - const dirValue = moduleConfig[configKey]; - if (!dirValue || typeof dirValue !== 'string') { - continue; // No value or not a string, skip - } - - // Strip {project-root}/ prefix if present - let dirPath = dirValue.replace(/^\{project-root\}\/?/, ''); - - // Handle remaining {project-root} anywhere in the path - dirPath = dirPath.replaceAll('{project-root}', ''); - - // Resolve to absolute path - const fullPath = path.join(projectRoot, dirPath); - - // Validate path is within project root (prevent directory traversal) - const normalizedPath = path.normalize(fullPath); - const normalizedRoot = path.normalize(projectRoot); - if (!normalizedPath.startsWith(normalizedRoot + path.sep) && normalizedPath !== normalizedRoot) { - const color = await prompts.getColor(); - await prompts.log.warn(color.yellow(`${configKey} path escapes project root, skipping: ${dirPath}`)); - continue; - } - - // Check if directory path changed from previous config (update/modify scenario) - const oldDirValue = existingModuleConfig[configKey]; - let oldFullPath = null; - let oldDirPath = null; - if (oldDirValue && typeof oldDirValue === 'string') { - // F3: Normalize both values before comparing to avoid false negatives - // from trailing slashes, separator differences, or prefix format variations - let normalizedOld = oldDirValue.replace(/^\{project-root\}\/?/, ''); - normalizedOld = path.normalize(normalizedOld.replaceAll('{project-root}', '')); - const normalizedNew = path.normalize(dirPath); - - if (normalizedOld !== normalizedNew) { - oldDirPath = normalizedOld; - oldFullPath = path.join(projectRoot, oldDirPath); - const normalizedOldAbsolute = path.normalize(oldFullPath); - if (!normalizedOldAbsolute.startsWith(normalizedRoot + path.sep) && normalizedOldAbsolute !== normalizedRoot) { - oldFullPath = null; // Old path escapes project root, ignore it - } - - // F13: Prevent parent/child move (e.g. docs/planning → docs/planning/v2) - if (oldFullPath) { - const normalizedNewAbsolute = path.normalize(fullPath); - if ( - normalizedOldAbsolute.startsWith(normalizedNewAbsolute + path.sep) || - normalizedNewAbsolute.startsWith(normalizedOldAbsolute + path.sep) - ) { - const color = await prompts.getColor(); - await prompts.log.warn( - color.yellow( - `${configKey}: cannot move between parent/child paths (${oldDirPath} / ${dirPath}), creating new directory instead`, - ), - ); - oldFullPath = null; - } - } - } - } - - const dirName = configKey.replaceAll('_', ' '); - - if (oldFullPath && (await fs.pathExists(oldFullPath)) && !(await fs.pathExists(fullPath))) { - // Path changed and old dir exists → move old to new location - // F1: Use fs.move() instead of fs.rename() for cross-device/volume support - // F2: Wrap in try/catch — fallback to creating new dir on failure - try { - await fs.ensureDir(path.dirname(fullPath)); - await fs.move(oldFullPath, fullPath); - movedDirs.push(`${dirName}: ${oldDirPath} → ${dirPath}`); - } catch (moveError) { - const color = await prompts.getColor(); - await prompts.log.warn( - color.yellow( - `Failed to move ${oldDirPath} → ${dirPath}: ${moveError.message}\n Creating new directory instead. Please move contents from the old directory manually.`, - ), - ); - await fs.ensureDir(fullPath); - createdDirs.push(`${dirName}: ${dirPath}`); - } - } else if (oldFullPath && (await fs.pathExists(oldFullPath)) && (await fs.pathExists(fullPath))) { - // F5: Both old and new directories exist — warn user about potential orphaned documents - const color = await prompts.getColor(); - await prompts.log.warn( - color.yellow( - `${dirName}: path changed but both directories exist:\n Old: ${oldDirPath}\n New: ${dirPath}\n Old directory may contain orphaned documents — please review and merge manually.`, - ), - ); - } else if (!(await fs.pathExists(fullPath))) { - // New directory doesn't exist yet → create it - createdDirs.push(`${dirName}: ${dirPath}`); - await fs.ensureDir(fullPath); - } - - // Create WDS subfolders if this is the design_artifacts directory - if (configKey === 'design_artifacts' && wdsFolders.length > 0) { - for (const subfolder of wdsFolders) { - const subPath = path.join(fullPath, subfolder); - if (!(await fs.pathExists(subPath))) { - await fs.ensureDir(subPath); - createdWdsFolders.push(subfolder); - } - } - } - } - - return { createdDirs, movedDirs, createdWdsFolders }; - } - - /** - * Private: Process module configuration - * @param {string} modulePath - Path to installed module - * @param {string} moduleName - Module name - */ - async processModuleConfig(modulePath, moduleName) { - const configPath = path.join(modulePath, 'config.yaml'); - - if (await fs.pathExists(configPath)) { - try { - let configContent = await fs.readFile(configPath, 'utf8'); - - // Replace path placeholders - configContent = configContent.replaceAll('{project-root}', `bmad/${moduleName}`); - configContent = configContent.replaceAll('{module}', moduleName); - - await fs.writeFile(configPath, configContent, 'utf8'); - } catch (error) { - await prompts.log.warn(`Failed to process module config: ${error.message}`); - } - } - } - - /** - * Private: Sync module files (preserving user modifications) - * @param {string} sourcePath - Source module path - * @param {string} targetPath - Target module path - */ - async syncModule(sourcePath, targetPath) { - // Get list of all source files - const sourceFiles = await this.getFileList(sourcePath); - - for (const file of sourceFiles) { - const sourceFile = path.join(sourcePath, file); - const targetFile = path.join(targetPath, file); - - // Check if target file exists and has been modified - if (await fs.pathExists(targetFile)) { - const sourceStats = await fs.stat(sourceFile); - const targetStats = await fs.stat(targetFile); - - // Skip if target is newer (user modified) - if (targetStats.mtime > sourceStats.mtime) { - continue; - } - } - - // Copy file with placeholder replacement - await this.copyFileWithPlaceholderReplacement(sourceFile, targetFile); - } - } - - /** - * Private: Get list of all files in a directory - * @param {string} dir - Directory path - * @param {string} baseDir - Base directory for relative paths - * @returns {Array} List of relative file paths - */ - async getFileList(dir, baseDir = dir) { - const files = []; - const entries = await fs.readdir(dir, { withFileTypes: true }); - - for (const entry of entries) { - const fullPath = path.join(dir, entry.name); - - if (entry.isDirectory()) { - const subFiles = await this.getFileList(fullPath, baseDir); - files.push(...subFiles); - } else { - files.push(path.relative(baseDir, fullPath)); - } - } - - return files; - } -} - -module.exports = { ModuleManager }; diff --git a/tools/cli/lib/config.js b/tools/cli/lib/config.js deleted file mode 100644 index a78250305..000000000 --- a/tools/cli/lib/config.js +++ /dev/null @@ -1,213 +0,0 @@ -const fs = require('fs-extra'); -const yaml = require('yaml'); -const path = require('node:path'); -const packageJson = require('../../../package.json'); - -/** - * Configuration utility class - */ -class Config { - /** - * Load a YAML configuration file - * @param {string} configPath - Path to config file - * @returns {Object} Parsed configuration - */ - async loadYaml(configPath) { - if (!(await fs.pathExists(configPath))) { - throw new Error(`Configuration file not found: ${configPath}`); - } - - const content = await fs.readFile(configPath, 'utf8'); - return yaml.parse(content); - } - - /** - * Save configuration to YAML file - * @param {string} configPath - Path to config file - * @param {Object} config - Configuration object - */ - async saveYaml(configPath, config) { - const yamlContent = yaml.dump(config, { - indent: 2, - lineWidth: 120, - noRefs: true, - }); - - await fs.ensureDir(path.dirname(configPath)); - // Ensure POSIX-compliant final newline - const content = yamlContent.endsWith('\n') ? yamlContent : yamlContent + '\n'; - await fs.writeFile(configPath, content, 'utf8'); - } - - /** - * Process configuration file (replace placeholders) - * @param {string} configPath - Path to config file - * @param {Object} replacements - Replacement values - */ - async processConfig(configPath, replacements = {}) { - let content = await fs.readFile(configPath, 'utf8'); - - // Standard replacements - const standardReplacements = { - '{project-root}': replacements.root || '', - '{module}': replacements.module || '', - '{version}': replacements.version || packageJson.version, - '{date}': new Date().toISOString().split('T')[0], - }; - - // Apply all replacements - const allReplacements = { ...standardReplacements, ...replacements }; - - for (const [placeholder, value] of Object.entries(allReplacements)) { - if (typeof placeholder === 'string' && typeof value === 'string') { - const regex = new RegExp(placeholder.replaceAll(/[.*+?^${}()|[\]\\]/g, String.raw`\$&`), 'g'); - content = content.replace(regex, value); - } - } - - await fs.writeFile(configPath, content, 'utf8'); - } - - /** - * Merge configurations - * @param {Object} base - Base configuration - * @param {Object} override - Override configuration - * @returns {Object} Merged configuration - */ - mergeConfigs(base, override) { - return this.deepMerge(base, override); - } - - /** - * Deep merge two objects - * @param {Object} target - Target object - * @param {Object} source - Source object - * @returns {Object} Merged object - */ - deepMerge(target, source) { - const output = { ...target }; - - if (this.isObject(target) && this.isObject(source)) { - for (const key of Object.keys(source)) { - if (this.isObject(source[key])) { - if (key in target) { - output[key] = this.deepMerge(target[key], source[key]); - } else { - output[key] = source[key]; - } - } else { - output[key] = source[key]; - } - } - } - - return output; - } - - /** - * Check if value is an object - * @param {*} item - Item to check - * @returns {boolean} True if object - */ - isObject(item) { - return item && typeof item === 'object' && !Array.isArray(item); - } - - /** - * Validate configuration against schema - * @param {Object} config - Configuration to validate - * @param {Object} schema - Validation schema - * @returns {Object} Validation result - */ - validateConfig(config, schema) { - const errors = []; - const warnings = []; - - // Check required fields - if (schema.required) { - for (const field of schema.required) { - if (!(field in config)) { - errors.push(`Missing required field: ${field}`); - } - } - } - - // Check field types - if (schema.properties) { - for (const [field, spec] of Object.entries(schema.properties)) { - if (field in config) { - const value = config[field]; - const expectedType = spec.type; - - if (expectedType === 'array' && !Array.isArray(value)) { - errors.push(`Field '${field}' should be an array`); - } else if (expectedType === 'object' && !this.isObject(value)) { - errors.push(`Field '${field}' should be an object`); - } else if (expectedType === 'string' && typeof value !== 'string') { - errors.push(`Field '${field}' should be a string`); - } else if (expectedType === 'number' && typeof value !== 'number') { - errors.push(`Field '${field}' should be a number`); - } else if (expectedType === 'boolean' && typeof value !== 'boolean') { - errors.push(`Field '${field}' should be a boolean`); - } - - // Check enum values - if (spec.enum && !spec.enum.includes(value)) { - errors.push(`Field '${field}' must be one of: ${spec.enum.join(', ')}`); - } - } - } - } - - return { - valid: errors.length === 0, - errors, - warnings, - }; - } - - /** - * Get configuration value with fallback - * @param {Object} config - Configuration object - * @param {string} path - Dot-notation path to value - * @param {*} defaultValue - Default value if not found - * @returns {*} Configuration value - */ - getValue(config, path, defaultValue = null) { - const keys = path.split('.'); - let current = config; - - for (const key of keys) { - if (current && typeof current === 'object' && key in current) { - current = current[key]; - } else { - return defaultValue; - } - } - - return current; - } - - /** - * Set configuration value - * @param {Object} config - Configuration object - * @param {string} path - Dot-notation path to value - * @param {*} value - Value to set - */ - setValue(config, path, value) { - const keys = path.split('.'); - const lastKey = keys.pop(); - let current = config; - - for (const key of keys) { - if (!(key in current) || typeof current[key] !== 'object') { - current[key] = {}; - } - current = current[key]; - } - - current[lastKey] = value; - } -} - -module.exports = { Config }; diff --git a/tools/cli/lib/platform-codes.js b/tools/cli/lib/platform-codes.js deleted file mode 100644 index bdf0e48c9..000000000 --- a/tools/cli/lib/platform-codes.js +++ /dev/null @@ -1,116 +0,0 @@ -const fs = require('fs-extra'); -const path = require('node:path'); -const yaml = require('yaml'); -const { getProjectRoot } = require('./project-root'); - -/** - * Platform Codes Manager - * Loads and provides access to the centralized platform codes configuration - */ -class PlatformCodes { - constructor() { - this.configPath = path.join(getProjectRoot(), 'tools', 'platform-codes.yaml'); - this.loadConfig(); - } - - /** - * Load the platform codes configuration - */ - loadConfig() { - try { - if (fs.existsSync(this.configPath)) { - const content = fs.readFileSync(this.configPath, 'utf8'); - this.config = yaml.parse(content); - } else { - console.warn(`Platform codes config not found at ${this.configPath}`); - this.config = { platforms: {} }; - } - } catch (error) { - console.error(`Error loading platform codes: ${error.message}`); - this.config = { platforms: {} }; - } - } - - /** - * Get all platform codes - * @returns {Object} All platform configurations - */ - getAllPlatforms() { - return this.config.platforms || {}; - } - - /** - * Get a specific platform configuration - * @param {string} code - Platform code - * @returns {Object|null} Platform configuration or null if not found - */ - getPlatform(code) { - return this.config.platforms[code] || null; - } - - /** - * Check if a platform code is valid - * @param {string} code - Platform code to validate - * @returns {boolean} True if valid - */ - isValidPlatform(code) { - return code in this.config.platforms; - } - - /** - * Get all preferred platforms - * @returns {Array} Array of preferred platform codes - */ - getPreferredPlatforms() { - return Object.entries(this.config.platforms) - .filter(([, config]) => config.preferred) - .map(([code]) => code); - } - - /** - * Get platforms by category - * @param {string} category - Category to filter by - * @returns {Array} Array of platform codes in the category - */ - getPlatformsByCategory(category) { - return Object.entries(this.config.platforms) - .filter(([, config]) => config.category === category) - .map(([code]) => code); - } - - /** - * Get platform display name - * @param {string} code - Platform code - * @returns {string} Display name or code if not found - */ - getDisplayName(code) { - const platform = this.getPlatform(code); - return platform ? platform.name : code; - } - - /** - * Validate platform code format - * @param {string} code - Platform code to validate - * @returns {boolean} True if format is valid - */ - isValidFormat(code) { - const conventions = this.config.conventions || {}; - const pattern = conventions.allowed_characters || 'a-z0-9-'; - const maxLength = conventions.max_code_length || 20; - - const regex = new RegExp(`^[${pattern}]+$`); - return regex.test(code) && code.length <= maxLength; - } - - /** - * Get all platform codes as array - * @returns {Array} Array of platform codes - */ - getCodes() { - return Object.keys(this.config.platforms); - } - config = null; -} - -// Export singleton instance -module.exports = new PlatformCodes(); diff --git a/tools/docs/_prompt-external-modules-page.md b/tools/docs/_prompt-external-modules-page.md index f5e124373..414f977a8 100644 --- a/tools/docs/_prompt-external-modules-page.md +++ b/tools/docs/_prompt-external-modules-page.md @@ -6,7 +6,7 @@ Create a reference documentation page at `docs/reference/modules.md` that lists ## Source of Truth -Read `tools/cli/external-official-modules.yaml` — this is the authoritative registry of official external modules. Use the module names, codes, npm package names, and repository URLs from this file. +Read `tools/installer/external-official-modules.yaml` — this is the authoritative registry of official external modules. Use the module names, codes, npm package names, and repository URLs from this file. ## Research Step diff --git a/tools/cli/README.md b/tools/installer/README.md similarity index 100% rename from tools/cli/README.md rename to tools/installer/README.md diff --git a/tools/cli/bmad-cli.js b/tools/installer/bmad-cli.js similarity index 98% rename from tools/cli/bmad-cli.js rename to tools/installer/bmad-cli.js index 31db41fbf..042714e45 100755 --- a/tools/cli/bmad-cli.js +++ b/tools/installer/bmad-cli.js @@ -1,9 +1,11 @@ +#!/usr/bin/env node + const { program } = require('commander'); const path = require('node:path'); const fs = require('node:fs'); const { execSync } = require('node:child_process'); const semver = require('semver'); -const prompts = require('./lib/prompts'); +const prompts = require('./prompts'); // The installer flow uses many sequential @clack/prompts, each adding keypress // listeners to stdin. Raise the limit to avoid spurious EventEmitter warnings. diff --git a/tools/cli/lib/cli-utils.js b/tools/installer/cli-utils.js similarity index 96% rename from tools/cli/lib/cli-utils.js rename to tools/installer/cli-utils.js index 569f1c44c..6ca615534 100644 --- a/tools/cli/lib/cli-utils.js +++ b/tools/installer/cli-utils.js @@ -8,7 +8,7 @@ const CLIUtils = { */ getVersion() { try { - const packageJson = require(path.join(__dirname, '..', '..', '..', 'package.json')); + const packageJson = require(path.join(__dirname, '..', '..', 'package.json')); return packageJson.version || 'Unknown'; } catch { return 'Unknown'; @@ -16,10 +16,9 @@ const CLIUtils = { }, /** - * Display BMAD logo using @clack intro + box - * @param {boolean} _clearScreen - Deprecated, ignored (no longer clears screen) + * Display BMAD logo and version using @clack intro + box */ - async displayLogo(_clearScreen = true) { + async displayLogo() { const version = this.getVersion(); const color = await prompts.getColor(); diff --git a/tools/cli/commands/install.js b/tools/installer/commands/install.js similarity index 95% rename from tools/cli/commands/install.js rename to tools/installer/commands/install.js index 3577116d7..96f536ef4 100644 --- a/tools/cli/commands/install.js +++ b/tools/installer/commands/install.js @@ -1,7 +1,7 @@ const path = require('node:path'); -const prompts = require('../lib/prompts'); -const { Installer } = require('../installers/lib/core/installer'); -const { UI } = require('../lib/ui'); +const prompts = require('../prompts'); +const { Installer } = require('../core/installer'); +const { UI } = require('../ui'); const installer = new Installer(); const ui = new UI(); diff --git a/tools/cli/commands/status.js b/tools/installer/commands/status.js similarity index 89% rename from tools/cli/commands/status.js rename to tools/installer/commands/status.js index ec931fe46..49c0afd73 100644 --- a/tools/cli/commands/status.js +++ b/tools/installer/commands/status.js @@ -1,8 +1,8 @@ const path = require('node:path'); -const prompts = require('../lib/prompts'); -const { Installer } = require('../installers/lib/core/installer'); -const { Manifest } = require('../installers/lib/core/manifest'); -const { UI } = require('../lib/ui'); +const prompts = require('../prompts'); +const { Installer } = require('../core/installer'); +const { Manifest } = require('../core/manifest'); +const { UI } = require('../ui'); const installer = new Installer(); const manifest = new Manifest(); diff --git a/tools/cli/commands/uninstall.js b/tools/installer/commands/uninstall.js similarity index 94% rename from tools/cli/commands/uninstall.js rename to tools/installer/commands/uninstall.js index 99734791e..d0e168a15 100644 --- a/tools/cli/commands/uninstall.js +++ b/tools/installer/commands/uninstall.js @@ -1,7 +1,7 @@ const path = require('node:path'); const fs = require('fs-extra'); -const prompts = require('../lib/prompts'); -const { Installer } = require('../installers/lib/core/installer'); +const prompts = require('../prompts'); +const { Installer } = require('../core/installer'); const installer = new Installer(); @@ -62,9 +62,9 @@ module.exports = { } const existingInstall = await installer.getStatus(projectDir); - const version = existingInstall.version || 'unknown'; - const modules = (existingInstall.modules || []).map((m) => m.id || m.name).join(', '); - const ides = (existingInstall.ides || []).join(', '); + const version = existingInstall.installed ? existingInstall.version : 'unknown'; + const modules = existingInstall.moduleIds.join(', '); + const ides = existingInstall.ides.join(', '); const outputFolder = await installer.getOutputFolder(projectDir); diff --git a/tools/installer/core/config.js b/tools/installer/core/config.js new file mode 100644 index 000000000..c844e2d00 --- /dev/null +++ b/tools/installer/core/config.js @@ -0,0 +1,52 @@ +/** + * Clean install configuration built from user input. + * User input comes from either UI answers or headless CLI flags. + */ +class Config { + constructor({ directory, modules, ides, skipPrompts, verbose, actionType, coreConfig, moduleConfigs, quickUpdate }) { + this.directory = directory; + this.modules = Object.freeze([...modules]); + this.ides = Object.freeze([...ides]); + this.skipPrompts = skipPrompts; + this.verbose = verbose; + this.actionType = actionType; + this.coreConfig = coreConfig; + this.moduleConfigs = moduleConfigs; + this._quickUpdate = quickUpdate; + Object.freeze(this); + } + + /** + * Build a clean install config from raw user input. + * @param {Object} userInput - UI answers or CLI flags + * @returns {Config} + */ + static build(userInput) { + const modules = [...(userInput.modules || [])]; + if (userInput.installCore && !modules.includes('core')) { + modules.unshift('core'); + } + + return new Config({ + directory: userInput.directory, + modules, + ides: userInput.skipIde ? [] : [...(userInput.ides || [])], + skipPrompts: userInput.skipPrompts || false, + verbose: userInput.verbose || false, + actionType: userInput.actionType, + coreConfig: userInput.coreConfig || {}, + moduleConfigs: userInput.moduleConfigs || null, + quickUpdate: userInput._quickUpdate || false, + }); + } + + hasCoreConfig() { + return this.coreConfig && Object.keys(this.coreConfig).length > 0; + } + + isQuickUpdate() { + return this._quickUpdate; + } +} + +module.exports = { Config }; diff --git a/tools/cli/installers/lib/core/custom-module-cache.js b/tools/installer/core/custom-module-cache.js similarity index 99% rename from tools/cli/installers/lib/core/custom-module-cache.js rename to tools/installer/core/custom-module-cache.js index b1cc3d0f7..4afe77884 100644 --- a/tools/cli/installers/lib/core/custom-module-cache.js +++ b/tools/installer/core/custom-module-cache.js @@ -7,7 +7,7 @@ const fs = require('fs-extra'); const path = require('node:path'); const crypto = require('node:crypto'); -const prompts = require('../../../lib/prompts'); +const prompts = require('../prompts'); class CustomModuleCache { constructor(bmadDir) { diff --git a/tools/installer/core/existing-install.js b/tools/installer/core/existing-install.js new file mode 100644 index 000000000..8e86f4b03 --- /dev/null +++ b/tools/installer/core/existing-install.js @@ -0,0 +1,127 @@ +const path = require('node:path'); +const fs = require('fs-extra'); +const yaml = require('yaml'); +const { Manifest } = require('./manifest'); + +/** + * Immutable snapshot of an existing BMAD installation. + * Pure query object — no filesystem operations after construction. + */ +class ExistingInstall { + #version; + + constructor({ installed, version, hasCore, modules, ides, customModules }) { + this.installed = installed; + this.#version = version; + this.hasCore = hasCore; + this.modules = Object.freeze(modules.map((m) => Object.freeze({ ...m }))); + this.moduleIds = Object.freeze(this.modules.map((m) => m.id)); + this.ides = Object.freeze([...ides]); + this.customModules = Object.freeze([...customModules]); + Object.freeze(this); + } + + get version() { + if (!this.installed) { + throw new Error('version is not available when nothing is installed'); + } + return this.#version; + } + + static empty() { + return new ExistingInstall({ + installed: false, + version: null, + hasCore: false, + modules: [], + ides: [], + customModules: [], + }); + } + + /** + * Scan a bmad directory and return an immutable snapshot of what's installed. + * @param {string} bmadDir - Path to bmad directory + * @returns {Promise} + */ + static async detect(bmadDir) { + if (!(await fs.pathExists(bmadDir))) { + return ExistingInstall.empty(); + } + + let version = null; + let hasCore = false; + const modules = []; + let ides = []; + let customModules = []; + + const manifest = new Manifest(); + const manifestData = await manifest.read(bmadDir); + if (manifestData) { + version = manifestData.version; + if (manifestData.customModules) { + customModules = manifestData.customModules; + } + if (manifestData.ides) { + ides = manifestData.ides.filter((ide) => ide && typeof ide === 'string'); + } + } + + const corePath = path.join(bmadDir, 'core'); + if (await fs.pathExists(corePath)) { + hasCore = true; + + if (!version) { + const coreConfigPath = path.join(corePath, 'config.yaml'); + if (await fs.pathExists(coreConfigPath)) { + try { + const configContent = await fs.readFile(coreConfigPath, 'utf8'); + const config = yaml.parse(configContent); + if (config.version) { + version = config.version; + } + } catch { + // Ignore config read errors + } + } + } + } + + if (manifestData && manifestData.modules && manifestData.modules.length > 0) { + for (const moduleId of manifestData.modules) { + const modulePath = path.join(bmadDir, moduleId); + const moduleConfigPath = path.join(modulePath, 'config.yaml'); + + const moduleInfo = { + id: moduleId, + path: modulePath, + version: 'unknown', + }; + + if (await fs.pathExists(moduleConfigPath)) { + try { + const configContent = await fs.readFile(moduleConfigPath, 'utf8'); + const config = yaml.parse(configContent); + moduleInfo.version = config.version || 'unknown'; + moduleInfo.name = config.name || moduleId; + moduleInfo.description = config.description; + } catch { + // Ignore config read errors + } + } + + modules.push(moduleInfo); + } + } + + const installed = hasCore || modules.length > 0 || !!manifestData; + + if (!installed) { + return ExistingInstall.empty(); + } + + return new ExistingInstall({ installed, version, hasCore, modules, ides, customModules }); + } +} + +module.exports = { ExistingInstall }; diff --git a/tools/installer/core/install-paths.js b/tools/installer/core/install-paths.js new file mode 100644 index 000000000..7383f9bfd --- /dev/null +++ b/tools/installer/core/install-paths.js @@ -0,0 +1,129 @@ +const path = require('node:path'); +const fs = require('fs-extra'); +const { getProjectRoot } = require('../project-root'); +const { BMAD_FOLDER_NAME } = require('../ide/shared/path-utils'); + +class InstallPaths { + static async create(config) { + const srcDir = getProjectRoot(); + await assertReadableDir(srcDir, 'BMAD source root'); + + const pkgPath = path.join(srcDir, 'package.json'); + await assertReadableFile(pkgPath, 'package.json'); + const version = require(pkgPath).version; + + const projectRoot = path.resolve(config.directory); + await ensureWritableDir(projectRoot, 'project root'); + + const bmadDir = path.join(projectRoot, BMAD_FOLDER_NAME); + const isUpdate = await fs.pathExists(bmadDir); + + const configDir = path.join(bmadDir, '_config'); + const agentsDir = path.join(configDir, 'agents'); + const customCacheDir = path.join(configDir, 'custom'); + const coreDir = path.join(bmadDir, 'core'); + + for (const [dir, label] of [ + [bmadDir, 'bmad directory'], + [configDir, 'config directory'], + [agentsDir, 'agents config directory'], + [customCacheDir, 'custom modules cache'], + [coreDir, 'core module directory'], + ]) { + await ensureWritableDir(dir, label); + } + + return new InstallPaths({ + srcDir, + version, + projectRoot, + bmadDir, + configDir, + agentsDir, + customCacheDir, + coreDir, + isUpdate, + }); + } + + constructor(props) { + Object.assign(this, props); + Object.freeze(this); + } + + manifestFile() { + return path.join(this.configDir, 'manifest.yaml'); + } + agentManifest() { + return path.join(this.configDir, 'agent-manifest.csv'); + } + filesManifest() { + return path.join(this.configDir, 'files-manifest.csv'); + } + helpCatalog() { + return path.join(this.configDir, 'bmad-help.csv'); + } + moduleDir(name) { + return path.join(this.bmadDir, name); + } + moduleConfig(name) { + return path.join(this.bmadDir, name, 'config.yaml'); + } +} + +async function assertReadableDir(dirPath, label) { + const stat = await fs.stat(dirPath).catch(() => null); + if (!stat) { + throw new Error(`${label} does not exist: ${dirPath}`); + } + if (!stat.isDirectory()) { + throw new Error(`${label} is not a directory: ${dirPath}`); + } + try { + await fs.access(dirPath, fs.constants.R_OK); + } catch { + throw new Error(`${label} is not readable: ${dirPath}`); + } +} + +async function assertReadableFile(filePath, label) { + const stat = await fs.stat(filePath).catch(() => null); + if (!stat) { + throw new Error(`${label} does not exist: ${filePath}`); + } + if (!stat.isFile()) { + throw new Error(`${label} is not a file: ${filePath}`); + } + try { + await fs.access(filePath, fs.constants.R_OK); + } catch { + throw new Error(`${label} is not readable: ${filePath}`); + } +} + +async function ensureWritableDir(dirPath, label) { + const stat = await fs.stat(dirPath).catch(() => null); + if (stat && !stat.isDirectory()) { + throw new Error(`${label} exists but is not a directory: ${dirPath}`); + } + + try { + await fs.ensureDir(dirPath); + } catch (error) { + if (error.code === 'EACCES') { + throw new Error(`${label}: permission denied creating directory: ${dirPath}`); + } + if (error.code === 'ENOSPC') { + throw new Error(`${label}: no space left on device: ${dirPath}`); + } + throw new Error(`${label}: cannot create directory: ${dirPath} (${error.message})`); + } + + try { + await fs.access(dirPath, fs.constants.R_OK | fs.constants.W_OK); + } catch { + throw new Error(`${label} is not writable: ${dirPath}`); + } +} + +module.exports = { InstallPaths }; diff --git a/tools/installer/core/installer.js b/tools/installer/core/installer.js new file mode 100644 index 000000000..111c88b54 --- /dev/null +++ b/tools/installer/core/installer.js @@ -0,0 +1,1790 @@ +const path = require('node:path'); +const fs = require('fs-extra'); +const { Manifest } = require('./manifest'); +const { OfficialModules } = require('../modules/official-modules'); +const { CustomModules } = require('../modules/custom-modules'); +const { IdeManager } = require('../ide/manager'); +const { FileOps } = require('../file-ops'); +const { Config } = require('./config'); +const { getProjectRoot, getSourcePath } = require('../project-root'); +const { ManifestGenerator } = require('./manifest-generator'); +const prompts = require('../prompts'); +const { BMAD_FOLDER_NAME } = require('../ide/shared/path-utils'); +const { InstallPaths } = require('./install-paths'); +const { ExternalModuleManager } = require('../modules/external-manager'); + +const { ExistingInstall } = require('./existing-install'); + +class Installer { + constructor() { + this.externalModuleManager = new ExternalModuleManager(); + this.manifest = new Manifest(); + this.customModules = new CustomModules(); + this.ideManager = new IdeManager(); + this.fileOps = new FileOps(); + this.installedFiles = new Set(); // Track all installed files + this.bmadFolderName = BMAD_FOLDER_NAME; + } + + /** + * Main installation method + * @param {Object} config - Installation configuration + * @param {string} config.directory - Target directory + * @param {string[]} config.modules - Modules to install (including 'core') + * @param {string[]} config.ides - IDEs to configure + */ + async install(originalConfig) { + let updateState = null; + + try { + const config = Config.build(originalConfig); + const paths = await InstallPaths.create(config); + const officialModules = await OfficialModules.build(config, paths); + const existingInstall = await ExistingInstall.detect(paths.bmadDir); + + await this.customModules.discoverPaths(originalConfig, paths); + + if (existingInstall.installed) { + await this._removeDeselectedModules(existingInstall, config, paths); + updateState = await this._prepareUpdateState(paths, config, existingInstall, officialModules); + await this._removeDeselectedIdes(existingInstall, config, paths); + } + + await this._validateIdeSelection(config); + + // Results collector for consolidated summary + const results = []; + const addResult = (step, status, detail = '') => results.push({ step, status, detail }); + + await this._cacheCustomModules(paths, addResult); + + // Compute module lists: official = selected minus custom, all = both + const customModuleIds = new Set(this.customModules.paths.keys()); + const officialModuleIds = (config.modules || []).filter((m) => !customModuleIds.has(m)); + const allModules = [...officialModuleIds, ...[...customModuleIds].filter((id) => !officialModuleIds.includes(id))]; + + await this._installAndConfigure(config, originalConfig, paths, officialModuleIds, allModules, addResult, officialModules); + + await this._setupIdes(config, allModules, paths, addResult); + + const restoreResult = await this._restoreUserFiles(paths, updateState); + + // Render consolidated summary + await this.renderInstallSummary(results, { + bmadDir: paths.bmadDir, + modules: config.modules, + ides: config.ides, + customFiles: restoreResult.customFiles.length > 0 ? restoreResult.customFiles : undefined, + modifiedFiles: restoreResult.modifiedFiles.length > 0 ? restoreResult.modifiedFiles : undefined, + }); + + return { + success: true, + path: paths.bmadDir, + modules: config.modules, + ides: config.ides, + projectDir: paths.projectRoot, + }; + } catch (error) { + await prompts.log.error('Installation failed'); + + // Clean up any temp backup directories that were created before the failure + try { + if (updateState?.tempBackupDir && (await fs.pathExists(updateState.tempBackupDir))) { + await fs.remove(updateState.tempBackupDir); + } + if (updateState?.tempModifiedBackupDir && (await fs.pathExists(updateState.tempModifiedBackupDir))) { + await fs.remove(updateState.tempModifiedBackupDir); + } + } catch { + // Best-effort cleanup — don't mask the original error + } + + throw error; + } + } + + /** + * Remove modules that were previously installed but are no longer selected. + * No confirmation — the user's module selection is the decision. + */ + async _removeDeselectedModules(existingInstall, config, paths) { + const previouslyInstalled = new Set(existingInstall.moduleIds); + const newlySelected = new Set(config.modules || []); + const toRemove = [...previouslyInstalled].filter((m) => !newlySelected.has(m) && m !== 'core'); + + for (const moduleId of toRemove) { + const modulePath = paths.moduleDir(moduleId); + try { + if (await fs.pathExists(modulePath)) { + await fs.remove(modulePath); + } + } catch (error) { + await prompts.log.warn(`Warning: Failed to remove ${moduleId}: ${error.message}`); + } + } + } + + /** + * Fail fast if all selected IDEs are suspended. + */ + async _validateIdeSelection(config) { + if (!config.ides || config.ides.length === 0) return; + + await this.ideManager.ensureInitialized(); + const suspendedIdes = config.ides.filter((ide) => { + const handler = this.ideManager.handlers.get(ide); + return handler?.platformConfig?.suspended; + }); + + if (suspendedIdes.length > 0 && suspendedIdes.length === config.ides.length) { + for (const ide of suspendedIdes) { + const handler = this.ideManager.handlers.get(ide); + await prompts.log.error(`${handler.displayName || ide}: ${handler.platformConfig.suspended}`); + } + throw new Error( + `All selected tool(s) are suspended: ${suspendedIdes.join(', ')}. Installation aborted to prevent upgrading _bmad/ without a working IDE configuration.`, + ); + } + } + + /** + * Remove IDEs that were previously installed but are no longer selected. + * No confirmation — the user's IDE selection is the decision. + */ + async _removeDeselectedIdes(existingInstall, config, paths) { + const previouslyInstalled = new Set(existingInstall.ides); + const newlySelected = new Set(config.ides || []); + const toRemove = [...previouslyInstalled].filter((ide) => !newlySelected.has(ide)); + + if (toRemove.length === 0) return; + + await this.ideManager.ensureInitialized(); + for (const ide of toRemove) { + try { + const handler = this.ideManager.handlers.get(ide); + if (handler) { + await handler.cleanup(paths.projectRoot); + } + } catch (error) { + await prompts.log.warn(`Warning: Failed to remove ${ide}: ${error.message}`); + } + } + } + + /** + * Cache custom modules into the local cache directory. + * Updates this.customModules.paths in place with cached locations. + */ + async _cacheCustomModules(paths, addResult) { + if (!this.customModules.paths || this.customModules.paths.size === 0) return; + + const { CustomModuleCache } = require('./custom-module-cache'); + const customCache = new CustomModuleCache(paths.bmadDir); + + for (const [moduleId, sourcePath] of this.customModules.paths) { + const cachedInfo = await customCache.cacheModule(moduleId, sourcePath, { + sourcePath: sourcePath, + }); + this.customModules.paths.set(moduleId, cachedInfo.cachePath); + } + + addResult('Custom modules cached', 'ok'); + } + + /** + * Install modules, create directories, generate configs and manifests. + */ + async _installAndConfigure(config, originalConfig, paths, officialModuleIds, allModules, addResult, officialModules) { + const isQuickUpdate = config.isQuickUpdate(); + const moduleConfigs = officialModules.moduleConfigs; + + const dirResults = { createdDirs: [], movedDirs: [], createdWdsFolders: [] }; + + const installTasks = []; + + if (allModules.length > 0) { + installTasks.push({ + title: isQuickUpdate ? `Updating ${allModules.length} module(s)` : `Installing ${allModules.length} module(s)`, + task: async (message) => { + const installedModuleNames = new Set(); + + await this._installOfficialModules(config, paths, officialModuleIds, addResult, isQuickUpdate, officialModules, { + message, + installedModuleNames, + }); + + await this._installCustomModules(config, paths, addResult, officialModules, { + message, + installedModuleNames, + }); + + return `${allModules.length} module(s) ${isQuickUpdate ? 'updated' : 'installed'}`; + }, + }); + } + + installTasks.push({ + title: 'Creating module directories', + task: async (message) => { + const verboseMode = process.env.BMAD_VERBOSE_INSTALL === 'true' || config.verbose; + const moduleLogger = { + log: async (msg) => (verboseMode ? await prompts.log.message(msg) : undefined), + error: async (msg) => await prompts.log.error(msg), + warn: async (msg) => await prompts.log.warn(msg), + }; + + if (config.modules && config.modules.length > 0) { + for (const moduleName of config.modules) { + message(`Setting up ${moduleName}...`); + const result = await officialModules.createModuleDirectories(moduleName, paths.bmadDir, { + installedIDEs: config.ides || [], + moduleConfig: moduleConfigs[moduleName] || {}, + existingModuleConfig: officialModules.existingConfig?.[moduleName] || {}, + coreConfig: moduleConfigs.core || {}, + logger: moduleLogger, + silent: true, + }); + if (result) { + dirResults.createdDirs.push(...result.createdDirs); + dirResults.movedDirs.push(...(result.movedDirs || [])); + dirResults.createdWdsFolders.push(...result.createdWdsFolders); + } + } + } + + addResult('Module directories', 'ok'); + return 'Module directories created'; + }, + }); + + const configTask = { + title: 'Generating configurations', + task: async (message) => { + await this.generateModuleConfigs(paths.bmadDir, moduleConfigs); + addResult('Configurations', 'ok', 'generated'); + + this.installedFiles.add(paths.manifestFile()); + this.installedFiles.add(paths.agentManifest()); + + message('Generating manifests...'); + const manifestGen = new ManifestGenerator(); + + const allModulesForManifest = config.isQuickUpdate() + ? originalConfig._existingModules || allModules || [] + : originalConfig._preserveModules + ? [...allModules, ...originalConfig._preserveModules] + : allModules || []; + + let modulesForCsvPreserve; + if (config.isQuickUpdate()) { + modulesForCsvPreserve = originalConfig._existingModules || allModules || []; + } else { + modulesForCsvPreserve = originalConfig._preserveModules ? [...allModules, ...originalConfig._preserveModules] : allModules; + } + + await manifestGen.generateManifests(paths.bmadDir, allModulesForManifest, [...this.installedFiles], { + ides: config.ides || [], + preservedModules: modulesForCsvPreserve, + }); + + message('Generating help catalog...'); + await this.mergeModuleHelpCatalogs(paths.bmadDir); + addResult('Help catalog', 'ok'); + + return 'Configurations generated'; + }, + }; + installTasks.push(configTask); + + // Run install + dirs first, then render dir output, then run config generation + const mainTasks = installTasks.filter((t) => t !== configTask); + await prompts.tasks(mainTasks); + + const color = await prompts.getColor(); + if (dirResults.movedDirs.length > 0) { + const lines = dirResults.movedDirs.map((d) => ` ${d}`).join('\n'); + await prompts.log.message(color.cyan(`Moved directories:\n${lines}`)); + } + if (dirResults.createdDirs.length > 0) { + const lines = dirResults.createdDirs.map((d) => ` ${d}`).join('\n'); + await prompts.log.message(color.yellow(`Created directories:\n${lines}`)); + } + if (dirResults.createdWdsFolders.length > 0) { + const lines = dirResults.createdWdsFolders.map((f) => color.dim(` \u2713 ${f}/`)).join('\n'); + await prompts.log.message(color.cyan(`Created WDS folder structure:\n${lines}`)); + } + + await prompts.tasks([configTask]); + } + + /** + * Set up IDE integrations for each selected IDE. + */ + async _setupIdes(config, allModules, paths, addResult) { + if (config.skipIde || !config.ides || config.ides.length === 0) return; + + await this.ideManager.ensureInitialized(); + const validIdes = config.ides.filter((ide) => ide && typeof ide === 'string'); + + if (validIdes.length === 0) { + addResult('IDE configuration', 'warn', 'no valid IDEs selected'); + return; + } + + for (const ide of validIdes) { + const setupResult = await this.ideManager.setup(ide, paths.projectRoot, paths.bmadDir, { + selectedModules: allModules || [], + verbose: config.verbose, + }); + + if (setupResult.success) { + addResult(ide, 'ok', setupResult.detail || ''); + } else { + addResult(ide, 'error', setupResult.error || 'failed'); + } + } + } + + /** + * Restore custom and modified files that were backed up before the update. + * No-op for fresh installs (updateState is null). + * @param {Object} paths - InstallPaths instance + * @param {Object|null} updateState - From _prepareUpdateState, or null for fresh installs + * @returns {Object} { customFiles, modifiedFiles } — lists of restored files + */ + async _restoreUserFiles(paths, updateState) { + const noFiles = { customFiles: [], modifiedFiles: [] }; + + if (!updateState || (updateState.customFiles.length === 0 && updateState.modifiedFiles.length === 0)) { + return noFiles; + } + + let restoredCustomFiles = []; + let restoredModifiedFiles = []; + + await prompts.tasks([ + { + title: 'Finalizing installation', + task: async (message) => { + if (updateState.customFiles.length > 0) { + message(`Restoring ${updateState.customFiles.length} custom files...`); + + for (const originalPath of updateState.customFiles) { + const relativePath = path.relative(paths.bmadDir, originalPath); + const backupPath = path.join(updateState.tempBackupDir, relativePath); + + if (await fs.pathExists(backupPath)) { + await fs.ensureDir(path.dirname(originalPath)); + await fs.copy(backupPath, originalPath, { overwrite: true }); + } + } + + if (updateState.tempBackupDir && (await fs.pathExists(updateState.tempBackupDir))) { + await fs.remove(updateState.tempBackupDir); + } + + restoredCustomFiles = updateState.customFiles; + } + + if (updateState.modifiedFiles.length > 0) { + restoredModifiedFiles = updateState.modifiedFiles; + + if (updateState.tempModifiedBackupDir && (await fs.pathExists(updateState.tempModifiedBackupDir))) { + message(`Restoring ${restoredModifiedFiles.length} modified files as .bak...`); + + for (const modifiedFile of restoredModifiedFiles) { + const relativePath = path.relative(paths.bmadDir, modifiedFile.path); + const tempBackupPath = path.join(updateState.tempModifiedBackupDir, relativePath); + const bakPath = modifiedFile.path + '.bak'; + + if (await fs.pathExists(tempBackupPath)) { + await fs.ensureDir(path.dirname(bakPath)); + await fs.copy(tempBackupPath, bakPath, { overwrite: true }); + } + } + + await fs.remove(updateState.tempModifiedBackupDir); + } + } + + return 'Installation finalized'; + }, + }, + ]); + + return { customFiles: restoredCustomFiles, modifiedFiles: restoredModifiedFiles }; + } + + /** + * Scan the custom module cache directory and register any cached custom modules + * that aren't already known from the manifest or external module list. + * @param {Object} paths - InstallPaths instance + */ + async _scanCachedCustomModules(paths) { + const cacheDir = paths.customCacheDir; + if (!(await fs.pathExists(cacheDir))) { + return; + } + + const cachedModules = await fs.readdir(cacheDir, { withFileTypes: true }); + + for (const cachedModule of cachedModules) { + const moduleId = cachedModule.name; + const cachedPath = path.join(cacheDir, moduleId); + + // Skip if path doesn't exist (broken symlink, deleted dir) - avoids lstat ENOENT + if (!(await fs.pathExists(cachedPath)) || !cachedModule.isDirectory()) { + continue; + } + + // Skip if we already have this module from manifest + if (this.customModules.paths.has(moduleId)) { + continue; + } + + // Check if this is an external official module - skip cache for those + const isExternal = await this.externalModuleManager.hasModule(moduleId); + if (isExternal) { + continue; + } + + // Check if this is actually a custom module (has module.yaml) + const moduleYamlPath = path.join(cachedPath, 'module.yaml'); + if (await fs.pathExists(moduleYamlPath)) { + this.customModules.paths.set(moduleId, cachedPath); + } + } + } + + /** + * Common update preparation: detect files, preserve core config, scan cache, back up. + * @param {Object} paths - InstallPaths instance + * @param {Object} config - Clean config (may have coreConfig updated) + * @param {Object} existingInstall - Detection result + * @param {Object} officialModules - OfficialModules instance + * @returns {Object} Update state: { customFiles, modifiedFiles, tempBackupDir, tempModifiedBackupDir } + */ + async _prepareUpdateState(paths, config, existingInstall, officialModules) { + // Detect custom and modified files BEFORE updating (compare current files vs files-manifest.csv) + const existingFilesManifest = await this.readFilesManifest(paths.bmadDir); + const { customFiles, modifiedFiles } = await this.detectCustomFiles(paths.bmadDir, existingFilesManifest); + + // Preserve existing core configuration during updates + // (no-op for quick-update which already has core config from collectModuleConfigQuick) + const coreConfigPath = paths.moduleConfig('core'); + if ((await fs.pathExists(coreConfigPath)) && (!config.coreConfig || Object.keys(config.coreConfig).length === 0)) { + try { + const yaml = require('yaml'); + const coreConfigContent = await fs.readFile(coreConfigPath, 'utf8'); + const existingCoreConfig = yaml.parse(coreConfigContent); + + config.coreConfig = existingCoreConfig; + officialModules.moduleConfigs.core = existingCoreConfig; + } catch (error) { + await prompts.log.warn(`Warning: Could not read existing core config: ${error.message}`); + } + } + + await this._scanCachedCustomModules(paths); + + const backupDirs = await this._backupUserFiles(paths, customFiles, modifiedFiles); + + return { + customFiles, + modifiedFiles, + tempBackupDir: backupDirs.tempBackupDir, + tempModifiedBackupDir: backupDirs.tempModifiedBackupDir, + }; + } + + /** + * Back up custom and modified files to temp directories before overwriting. + * Returns the temp directory paths (or undefined if no files to back up). + * @param {Object} paths - InstallPaths instance + * @param {string[]} customFiles - Absolute paths of custom (user-added) files + * @param {Object[]} modifiedFiles - Array of { path, relativePath } for modified files + * @returns {Object} { tempBackupDir, tempModifiedBackupDir } — undefined if no files + */ + async _backupUserFiles(paths, customFiles, modifiedFiles) { + let tempBackupDir; + let tempModifiedBackupDir; + + if (customFiles.length > 0) { + tempBackupDir = path.join(paths.projectRoot, '_bmad-custom-backup-temp'); + await fs.ensureDir(tempBackupDir); + + for (const customFile of customFiles) { + const relativePath = path.relative(paths.bmadDir, customFile); + const backupPath = path.join(tempBackupDir, relativePath); + await fs.ensureDir(path.dirname(backupPath)); + await fs.copy(customFile, backupPath); + } + } + + if (modifiedFiles.length > 0) { + tempModifiedBackupDir = path.join(paths.projectRoot, '_bmad-modified-backup-temp'); + await fs.ensureDir(tempModifiedBackupDir); + + for (const modifiedFile of modifiedFiles) { + const relativePath = path.relative(paths.bmadDir, modifiedFile.path); + const tempBackupPath = path.join(tempModifiedBackupDir, relativePath); + await fs.ensureDir(path.dirname(tempBackupPath)); + await fs.copy(modifiedFile.path, tempBackupPath, { overwrite: true }); + } + } + + return { tempBackupDir, tempModifiedBackupDir }; + } + + /** + * Install official (non-custom) modules. + * @param {Object} config - Installation configuration + * @param {Object} paths - InstallPaths instance + * @param {string[]} officialModuleIds - Official module IDs to install + * @param {Function} addResult - Callback to record installation results + * @param {boolean} isQuickUpdate - Whether this is a quick update + * @param {Object} ctx - Shared context: { message, installedModuleNames } + */ + async _installOfficialModules(config, paths, officialModuleIds, addResult, isQuickUpdate, officialModules, ctx) { + const { message, installedModuleNames } = ctx; + + for (const moduleName of officialModuleIds) { + if (installedModuleNames.has(moduleName)) continue; + installedModuleNames.add(moduleName); + + message(`${isQuickUpdate ? 'Updating' : 'Installing'} ${moduleName}...`); + + const moduleConfig = officialModules.moduleConfigs[moduleName] || {}; + await officialModules.install( + moduleName, + paths.bmadDir, + (filePath) => { + this.installedFiles.add(filePath); + }, + { + skipModuleInstaller: true, + moduleConfig: moduleConfig, + installer: this, + silent: true, + }, + ); + + addResult(`Module: ${moduleName}`, 'ok', isQuickUpdate ? 'updated' : 'installed'); + } + } + + /** + * Install custom modules using CustomModules.install(). + * Source paths come from this.customModules.paths (populated by discoverPaths). + */ + async _installCustomModules(config, paths, addResult, officialModules, ctx) { + const { message, installedModuleNames } = ctx; + const isQuickUpdate = config.isQuickUpdate(); + + for (const [moduleName, sourcePath] of this.customModules.paths) { + if (installedModuleNames.has(moduleName)) continue; + installedModuleNames.add(moduleName); + + message(`${isQuickUpdate ? 'Updating' : 'Installing'} ${moduleName}...`); + + const collectedModuleConfig = officialModules.moduleConfigs[moduleName] || {}; + const result = await this.customModules.install(moduleName, paths.bmadDir, (filePath) => this.installedFiles.add(filePath), { + moduleConfig: collectedModuleConfig, + }); + + // Generate runtime config.yaml with merged values + await this.generateModuleConfigs(paths.bmadDir, { + [moduleName]: { ...config.coreConfig, ...result.moduleConfig, ...collectedModuleConfig }, + }); + + addResult(`Module: ${moduleName}`, 'ok', isQuickUpdate ? 'updated' : 'installed'); + } + } + + /** + * Read files-manifest.csv + * @param {string} bmadDir - BMAD installation directory + * @returns {Array} Array of file entries from files-manifest.csv + */ + async readFilesManifest(bmadDir) { + const filesManifestPath = path.join(bmadDir, '_config', 'files-manifest.csv'); + if (!(await fs.pathExists(filesManifestPath))) { + return []; + } + + try { + const content = await fs.readFile(filesManifestPath, 'utf8'); + const lines = content.split('\n'); + const files = []; + + for (let i = 1; i < lines.length; i++) { + // Skip header + const line = lines[i].trim(); + if (!line) continue; + + // Parse CSV line properly handling quoted values + const parts = []; + let current = ''; + let inQuotes = false; + + for (const char of line) { + if (char === '"') { + inQuotes = !inQuotes; + } else if (char === ',' && !inQuotes) { + parts.push(current); + current = ''; + } else { + current += char; + } + } + parts.push(current); // Add last part + + if (parts.length >= 4) { + files.push({ + type: parts[0], + name: parts[1], + module: parts[2], + path: parts[3], + hash: parts[4] || null, // Hash may not exist in old manifests + }); + } + } + + return files; + } catch (error) { + await prompts.log.warn('Could not read files-manifest.csv: ' + error.message); + return []; + } + } + + /** + * Detect custom and modified files + * @param {string} bmadDir - BMAD installation directory + * @param {Array} existingFilesManifest - Previous files from files-manifest.csv + * @returns {Object} Object with customFiles and modifiedFiles arrays + */ + async detectCustomFiles(bmadDir, existingFilesManifest) { + const customFiles = []; + const modifiedFiles = []; + + // Memory is always in _bmad/_memory + const bmadMemoryPath = '_memory'; + + // Check if the manifest has hashes - if not, we can't detect modifications + let manifestHasHashes = false; + if (existingFilesManifest && existingFilesManifest.length > 0) { + manifestHasHashes = existingFilesManifest.some((f) => f.hash); + } + + // Build map of previously installed files from files-manifest.csv with their hashes + const installedFilesMap = new Map(); + for (const fileEntry of existingFilesManifest) { + if (fileEntry.path) { + const absolutePath = path.join(bmadDir, fileEntry.path); + installedFilesMap.set(path.normalize(absolutePath), { + hash: fileEntry.hash, + relativePath: fileEntry.path, + }); + } + } + + // Recursively scan bmadDir for all files + const scanDirectory = async (dir) => { + try { + const entries = await fs.readdir(dir, { withFileTypes: true }); + for (const entry of entries) { + const fullPath = path.join(dir, entry.name); + + if (entry.isDirectory()) { + // Skip certain directories + if (entry.name === 'node_modules' || entry.name === '.git') { + continue; + } + await scanDirectory(fullPath); + } else if (entry.isFile()) { + const normalizedPath = path.normalize(fullPath); + const fileInfo = installedFilesMap.get(normalizedPath); + + // Skip certain system files that are auto-generated + const relativePath = path.relative(bmadDir, fullPath); + const fileName = path.basename(fullPath); + + // Skip _config directory EXCEPT for modified agent customizations + if (relativePath.startsWith('_config/') || relativePath.startsWith('_config\\')) { + // Special handling for .customize.yaml files - only preserve if modified + if (relativePath.includes('/agents/') && fileName.endsWith('.customize.yaml')) { + // Check if the customization file has been modified from manifest + const manifestPath = path.join(bmadDir, '_config', 'manifest.yaml'); + if (await fs.pathExists(manifestPath)) { + const crypto = require('node:crypto'); + const currentContent = await fs.readFile(fullPath, 'utf8'); + const currentHash = crypto.createHash('sha256').update(currentContent).digest('hex'); + + const yaml = require('yaml'); + const manifestContent = await fs.readFile(manifestPath, 'utf8'); + const manifestData = yaml.parse(manifestContent); + const originalHash = manifestData.agentCustomizations?.[relativePath]; + + // Only add to customFiles if hash differs (user modified) + if (originalHash && currentHash !== originalHash) { + customFiles.push(fullPath); + } + } + } + continue; + } + + if (relativePath.startsWith(bmadMemoryPath + '/') && path.dirname(relativePath).includes('-sidecar')) { + continue; + } + + // Skip config.yaml files - these are regenerated on each install/update + if (fileName === 'config.yaml') { + continue; + } + + if (!fileInfo) { + // File not in manifest = custom file + // EXCEPT: Agent .md files in module folders are generated files, not custom + // Only treat .md files under _config/agents/ as custom + if (!(fileName.endsWith('.md') && relativePath.includes('/agents/') && !relativePath.startsWith('_config/'))) { + customFiles.push(fullPath); + } + } else if (manifestHasHashes && fileInfo.hash) { + // File in manifest with hash - check if it was modified + const currentHash = await this.manifest.calculateFileHash(fullPath); + if (currentHash && currentHash !== fileInfo.hash) { + // Hash changed = file was modified + modifiedFiles.push({ + path: fullPath, + relativePath: fileInfo.relativePath, + }); + } + } + } + } + } catch { + // Ignore errors scanning directories + } + }; + + await scanDirectory(bmadDir); + return { customFiles, modifiedFiles }; + } + + /** + * Generate clean config.yaml files for each installed module + * @param {string} bmadDir - BMAD installation directory + * @param {Object} moduleConfigs - Collected configuration values + */ + async generateModuleConfigs(bmadDir, moduleConfigs) { + const yaml = require('yaml'); + + // Extract core config values to share with other modules + const coreConfig = moduleConfigs.core || {}; + + // Get all installed module directories + const entries = await fs.readdir(bmadDir, { withFileTypes: true }); + const installedModules = entries + .filter((entry) => entry.isDirectory() && entry.name !== '_config' && entry.name !== 'docs') + .map((entry) => entry.name); + + // Generate config.yaml for each installed module + for (const moduleName of installedModules) { + const modulePath = path.join(bmadDir, moduleName); + + // Get module-specific config or use empty object if none + const config = moduleConfigs[moduleName] || {}; + + if (await fs.pathExists(modulePath)) { + const configPath = path.join(modulePath, 'config.yaml'); + + // Create header + const packageJson = require(path.join(getProjectRoot(), 'package.json')); + const header = `# ${moduleName.toUpperCase()} Module Configuration +# Generated by BMAD installer +# Version: ${packageJson.version} +# Date: ${new Date().toISOString()} + +`; + + // For non-core modules, add core config values directly + let finalConfig = { ...config }; + let coreSection = ''; + + if (moduleName !== 'core' && coreConfig && Object.keys(coreConfig).length > 0) { + // Add core values directly to the module config + // These will be available for reference in the module + finalConfig = { + ...config, + ...coreConfig, // Spread core config values directly into the module config + }; + + // Create a comment section to identify core values + coreSection = '\n# Core Configuration Values\n'; + } + + // Clean the config to remove any non-serializable values (like functions) + const cleanConfig = structuredClone(finalConfig); + + // Convert config to YAML + let yamlContent = yaml.stringify(cleanConfig, { + indent: 2, + lineWidth: 0, + minContentWidth: 0, + }); + + // If we have core values, reorganize the YAML to group them with their comment + if (coreSection && moduleName !== 'core') { + // Split the YAML into lines + const lines = yamlContent.split('\n'); + const moduleConfigLines = []; + const coreConfigLines = []; + + // Separate module-specific and core config lines + for (const line of lines) { + const key = line.split(':')[0].trim(); + if (Object.prototype.hasOwnProperty.call(coreConfig, key)) { + coreConfigLines.push(line); + } else { + moduleConfigLines.push(line); + } + } + + // Rebuild YAML with module config first, then core config with comment + yamlContent = moduleConfigLines.join('\n'); + if (coreConfigLines.length > 0) { + yamlContent += coreSection + coreConfigLines.join('\n'); + } + } + + // Write the clean config file with POSIX-compliant final newline + const content = header + yamlContent; + await fs.writeFile(configPath, content.endsWith('\n') ? content : content + '\n', 'utf8'); + + // Track the config file in installedFiles + this.installedFiles.add(configPath); + } + } + } + + /** + * Merge all module-help.csv files into a single bmad-help.csv + * Scans all installed modules for module-help.csv and merges them + * Enriches agent info from agent-manifest.csv + * Output is written to _bmad/_config/bmad-help.csv + * @param {string} bmadDir - BMAD installation directory + */ + async mergeModuleHelpCatalogs(bmadDir) { + const allRows = []; + const headerRow = + 'module,phase,name,code,sequence,workflow-file,command,required,agent-name,agent-command,agent-display-name,agent-title,options,description,output-location,outputs'; + + // Load agent manifest for agent info lookup + const agentManifestPath = path.join(bmadDir, '_config', 'agent-manifest.csv'); + const agentInfo = new Map(); // agent-name -> {command, displayName, title+icon} + + if (await fs.pathExists(agentManifestPath)) { + const manifestContent = await fs.readFile(agentManifestPath, 'utf8'); + const lines = manifestContent.split('\n').filter((line) => line.trim()); + + for (const line of lines) { + if (line.startsWith('name,')) continue; // Skip header + + const cols = line.split(','); + if (cols.length >= 4) { + const agentName = cols[0].replaceAll('"', '').trim(); + const displayName = cols[1].replaceAll('"', '').trim(); + const title = cols[2].replaceAll('"', '').trim(); + const icon = cols[3].replaceAll('"', '').trim(); + const module = cols[10] ? cols[10].replaceAll('"', '').trim() : ''; + + // Build agent command: bmad:module:agent:name + const agentCommand = module ? `bmad:${module}:agent:${agentName}` : `bmad:agent:${agentName}`; + + agentInfo.set(agentName, { + command: agentCommand, + displayName: displayName || agentName, + title: icon && title ? `${icon} ${title}` : title || agentName, + }); + } + } + } + + // Get all installed module directories + const entries = await fs.readdir(bmadDir, { withFileTypes: true }); + const installedModules = entries + .filter((entry) => entry.isDirectory() && entry.name !== '_config' && entry.name !== 'docs' && entry.name !== '_memory') + .map((entry) => entry.name); + + // Add core module to scan (it's installed at root level as _config, but we check src/core-skills) + const coreModulePath = getSourcePath('core-skills'); + const modulePaths = new Map(); + + // Map all module source paths + if (await fs.pathExists(coreModulePath)) { + modulePaths.set('core', coreModulePath); + } + + // Map installed module paths + for (const moduleName of installedModules) { + const modulePath = path.join(bmadDir, moduleName); + modulePaths.set(moduleName, modulePath); + } + + // Scan each module for module-help.csv + for (const [moduleName, modulePath] of modulePaths) { + const helpFilePath = path.join(modulePath, 'module-help.csv'); + + if (await fs.pathExists(helpFilePath)) { + try { + const content = await fs.readFile(helpFilePath, 'utf8'); + const lines = content.split('\n').filter((line) => line.trim() && !line.startsWith('#')); + + for (const line of lines) { + // Skip header row + if (line.startsWith('module,')) { + continue; + } + + // Parse the line - handle quoted fields with commas + const columns = this.parseCSVLine(line); + if (columns.length >= 12) { + // Map old schema to new schema + // Old: module,phase,name,code,sequence,workflow-file,command,required,agent,options,description,output-location,outputs + // New: module,phase,name,code,sequence,workflow-file,command,required,agent-name,agent-command,agent-display-name,agent-title,options,description,output-location,outputs + + const [ + module, + phase, + name, + code, + sequence, + workflowFile, + command, + required, + agentName, + options, + description, + outputLocation, + outputs, + ] = columns; + + // If module column is empty, set it to this module's name (except for core which stays empty for universal tools) + const finalModule = (!module || module.trim() === '') && moduleName !== 'core' ? moduleName : module || ''; + + // Lookup agent info + const cleanAgentName = agentName ? agentName.trim() : ''; + const agentData = agentInfo.get(cleanAgentName) || { command: '', displayName: '', title: '' }; + + // Build new row with agent info + const newRow = [ + finalModule, + phase || '', + name || '', + code || '', + sequence || '', + workflowFile || '', + command || '', + required || 'false', + cleanAgentName, + agentData.command, + agentData.displayName, + agentData.title, + options || '', + description || '', + outputLocation || '', + outputs || '', + ]; + + allRows.push(newRow.map((c) => this.escapeCSVField(c)).join(',')); + } + } + + if (process.env.BMAD_VERBOSE_INSTALL === 'true') { + await prompts.log.message(` Merged module-help from: ${moduleName}`); + } + } catch (error) { + await prompts.log.warn(` Warning: Failed to read module-help.csv from ${moduleName}: ${error.message}`); + } + } + } + + // Sort by module, then phase, then sequence + allRows.sort((a, b) => { + const colsA = this.parseCSVLine(a); + const colsB = this.parseCSVLine(b); + + // Module comparison (empty module/universal tools come first) + const moduleA = (colsA[0] || '').toLowerCase(); + const moduleB = (colsB[0] || '').toLowerCase(); + if (moduleA !== moduleB) { + return moduleA.localeCompare(moduleB); + } + + // Phase comparison + const phaseA = colsA[1] || ''; + const phaseB = colsB[1] || ''; + if (phaseA !== phaseB) { + return phaseA.localeCompare(phaseB); + } + + // Sequence comparison + const seqA = parseInt(colsA[4] || '0', 10); + const seqB = parseInt(colsB[4] || '0', 10); + return seqA - seqB; + }); + + // Write merged catalog + const outputDir = path.join(bmadDir, '_config'); + await fs.ensureDir(outputDir); + const outputPath = path.join(outputDir, 'bmad-help.csv'); + + const mergedContent = [headerRow, ...allRows].join('\n'); + await fs.writeFile(outputPath, mergedContent, 'utf8'); + + // Track the installed file + this.installedFiles.add(outputPath); + + if (process.env.BMAD_VERBOSE_INSTALL === 'true') { + await prompts.log.message(` Generated bmad-help.csv: ${allRows.length} workflows`); + } + } + + /** + * Render a consolidated install summary using prompts.note() + * @param {Array} results - Array of {step, status: 'ok'|'error'|'warn', detail} + * @param {Object} context - {bmadDir, modules, ides, customFiles, modifiedFiles} + */ + async renderInstallSummary(results, context = {}) { + const color = await prompts.getColor(); + const selectedIdes = new Set((context.ides || []).map((ide) => String(ide).toLowerCase())); + + // Build step lines with status indicators + const lines = []; + for (const r of results) { + let stepLabel = null; + + if (r.status !== 'ok') { + stepLabel = r.step; + } else if (r.step === 'Core') { + stepLabel = 'BMAD'; + } else if (r.step.startsWith('Module: ')) { + stepLabel = r.step; + } else if (selectedIdes.has(String(r.step).toLowerCase())) { + stepLabel = r.step; + } + + if (!stepLabel) { + continue; + } + + let icon; + if (r.status === 'ok') { + icon = color.green('\u2713'); + } else if (r.status === 'warn') { + icon = color.yellow('!'); + } else { + icon = color.red('\u2717'); + } + const detail = r.detail ? color.dim(` (${r.detail})`) : ''; + lines.push(` ${icon} ${stepLabel}${detail}`); + } + + if ((context.ides || []).length === 0) { + lines.push(` ${color.green('\u2713')} No IDE selected ${color.dim('(installed in _bmad only)')}`); + } + + // Context and warnings + lines.push(''); + if (context.bmadDir) { + lines.push(` Installed to: ${color.dim(context.bmadDir)}`); + } + if (context.customFiles && context.customFiles.length > 0) { + lines.push(` ${color.cyan(`Custom files preserved: ${context.customFiles.length}`)}`); + } + if (context.modifiedFiles && context.modifiedFiles.length > 0) { + lines.push(` ${color.yellow(`Modified files backed up (.bak): ${context.modifiedFiles.length}`)}`); + } + + // Next steps + lines.push( + '', + ' Next steps:', + ` Read our new Docs Site: ${color.dim('https://docs.bmad-method.org/')}`, + ` Join our Discord: ${color.dim('https://discord.gg/gk8jAdXWmj')}`, + ` Star us on GitHub: ${color.dim('https://github.com/bmad-code-org/BMAD-METHOD/')}`, + ` Subscribe on YouTube: ${color.dim('https://www.youtube.com/@BMadCode')}`, + ); + if (context.ides && context.ides.length > 0) { + lines.push(` Invoke the ${color.cyan('bmad-help')} skill in your IDE Agent to get started`); + } + + await prompts.note(lines.join('\n'), 'BMAD is ready to use!'); + } + + /** + * Quick update method - preserves all settings and only prompts for new config fields + * @param {Object} config - Configuration with directory + * @returns {Object} Update result + */ + async quickUpdate(config) { + const projectDir = path.resolve(config.directory); + const { bmadDir } = await this.findBmadDir(projectDir); + + // Check if bmad directory exists + if (!(await fs.pathExists(bmadDir))) { + throw new Error(`BMAD not installed at ${bmadDir}. Use regular install for first-time setup.`); + } + + // Detect existing installation + const existingInstall = await ExistingInstall.detect(bmadDir); + const installedModules = existingInstall.moduleIds; + const configuredIdes = existingInstall.ides; + const projectRoot = path.dirname(bmadDir); + + // Get custom module sources: first from --custom-content (re-cache from source), then from cache + const customModuleSources = new Map(); + if (config.customContent?.sources?.length > 0) { + for (const source of config.customContent.sources) { + if (source.id && source.path && (await fs.pathExists(source.path))) { + customModuleSources.set(source.id, { + id: source.id, + name: source.name || source.id, + sourcePath: source.path, + cached: false, // From CLI, will be re-cached + }); + } + } + } + const cacheDir = path.join(bmadDir, '_config', 'custom'); + if (await fs.pathExists(cacheDir)) { + const cachedModules = await fs.readdir(cacheDir, { withFileTypes: true }); + + for (const cachedModule of cachedModules) { + const moduleId = cachedModule.name; + const cachedPath = path.join(cacheDir, moduleId); + + // Skip if path doesn't exist (broken symlink, deleted dir) - avoids lstat ENOENT + if (!(await fs.pathExists(cachedPath))) { + continue; + } + if (!cachedModule.isDirectory()) { + continue; + } + + // Skip if we already have this module from manifest + if (customModuleSources.has(moduleId)) { + continue; + } + + // Check if this is an external official module - skip cache for those + const isExternal = await this.externalModuleManager.hasModule(moduleId); + if (isExternal) { + continue; + } + + // Check if this is actually a custom module (has module.yaml) + const moduleYamlPath = path.join(cachedPath, 'module.yaml'); + if (await fs.pathExists(moduleYamlPath)) { + customModuleSources.set(moduleId, { + id: moduleId, + name: moduleId, + sourcePath: cachedPath, + cached: true, + }); + } + } + } + + // Get available modules (what we have source for) + const availableModulesData = await new OfficialModules().listAvailable(); + const availableModules = [...availableModulesData.modules, ...availableModulesData.customModules]; + + // Add external official modules to available modules + const externalModules = await this.externalModuleManager.listAvailable(); + for (const externalModule of externalModules) { + if (installedModules.includes(externalModule.code) && !availableModules.some((m) => m.id === externalModule.code)) { + availableModules.push({ + id: externalModule.code, + name: externalModule.name, + isExternal: true, + fromExternal: true, + }); + } + } + + // Add custom modules from manifest if their sources exist + for (const [moduleId, customModule] of customModuleSources) { + const sourcePath = customModule.sourcePath; + if (sourcePath && (await fs.pathExists(sourcePath)) && !availableModules.some((m) => m.id === moduleId)) { + availableModules.push({ + id: moduleId, + name: customModule.name || moduleId, + path: sourcePath, + isCustom: true, + fromManifest: true, + }); + } + } + + // Handle missing custom module sources + const customModuleResult = await this.handleMissingCustomSources( + customModuleSources, + bmadDir, + projectRoot, + 'update', + installedModules, + config.skipPrompts || false, + ); + + const { validCustomModules, keptModulesWithoutSources } = customModuleResult; + + const customModulesFromManifest = validCustomModules.map((m) => ({ + ...m, + isCustom: true, + hasUpdate: true, + })); + + const allAvailableModules = [...availableModules, ...customModulesFromManifest]; + const availableModuleIds = new Set(allAvailableModules.map((m) => m.id)); + + // Only update modules that are BOTH installed AND available (we have source for) + const modulesToUpdate = installedModules.filter((id) => availableModuleIds.has(id)); + const skippedModules = installedModules.filter((id) => !availableModuleIds.has(id)); + + // Add custom modules that were kept without sources to the skipped modules + for (const keptModule of keptModulesWithoutSources) { + if (!skippedModules.includes(keptModule)) { + skippedModules.push(keptModule); + } + } + + if (skippedModules.length > 0) { + await prompts.log.warn(`Skipping ${skippedModules.length} module(s) - no source available: ${skippedModules.join(', ')}`); + } + + // Load existing configs and collect new fields (if any) + await prompts.log.info('Checking for new configuration options...'); + const quickModules = new OfficialModules(); + await quickModules.loadExistingConfig(projectDir); + + let promptedForNewFields = false; + + const corePrompted = await quickModules.collectModuleConfigQuick('core', projectDir, true); + if (corePrompted) { + promptedForNewFields = true; + } + + for (const moduleName of modulesToUpdate) { + const modulePrompted = await quickModules.collectModuleConfigQuick(moduleName, projectDir, true); + if (modulePrompted) { + promptedForNewFields = true; + } + } + + if (!promptedForNewFields) { + await prompts.log.success('All configuration is up to date, no new options to configure'); + } + + quickModules.collectedConfig._meta = { + version: require(path.join(getProjectRoot(), 'package.json')).version, + installDate: new Date().toISOString(), + lastModified: new Date().toISOString(), + }; + + // Build config and delegate to install() + const installConfig = { + directory: projectDir, + modules: modulesToUpdate, + ides: configuredIdes, + coreConfig: quickModules.collectedConfig.core, + moduleConfigs: quickModules.collectedConfig, + actionType: 'install', + _quickUpdate: true, + _preserveModules: skippedModules, + _customModuleSources: customModuleSources, + _existingModules: installedModules, + customContent: config.customContent, + }; + + await this.install(installConfig); + + return { + success: true, + moduleCount: modulesToUpdate.length, + hadNewFields: promptedForNewFields, + modules: modulesToUpdate, + skippedModules: skippedModules, + ides: configuredIdes, + }; + } + + /** + * Uninstall BMAD with selective removal options + * @param {string} directory - Project directory + * @param {Object} options - Uninstall options + * @param {boolean} [options.removeModules=true] - Remove _bmad/ directory + * @param {boolean} [options.removeIdeConfigs=true] - Remove IDE configurations + * @param {boolean} [options.removeOutputFolder=false] - Remove user artifacts output folder + * @returns {Object} Result with success status and removed components + */ + async uninstall(directory, options = {}) { + const projectDir = path.resolve(directory); + const { bmadDir } = await this.findBmadDir(projectDir); + + if (!(await fs.pathExists(bmadDir))) { + return { success: false, reason: 'not-installed' }; + } + + // 1. DETECT: Read state BEFORE deleting anything + const existingInstall = await ExistingInstall.detect(bmadDir); + const outputFolder = await this._readOutputFolder(bmadDir); + + const removed = { modules: false, ideConfigs: false, outputFolder: false }; + + // 2. IDE CLEANUP (before _bmad/ deletion so configs are accessible) + if (options.removeIdeConfigs !== false) { + await this.uninstallIdeConfigs(projectDir, existingInstall, { silent: options.silent }); + removed.ideConfigs = true; + } + + // 3. OUTPUT FOLDER (only if explicitly requested) + if (options.removeOutputFolder === true && outputFolder) { + removed.outputFolder = await this.uninstallOutputFolder(projectDir, outputFolder); + } + + // 4. BMAD DIRECTORY (last, after everything that needs it) + if (options.removeModules !== false) { + removed.modules = await this.uninstallModules(projectDir); + } + + return { success: true, removed, version: existingInstall.installed ? existingInstall.version : null }; + } + + /** + * Uninstall IDE configurations only + * @param {string} projectDir - Project directory + * @param {Object} existingInstall - Detection result from detector.detect() + * @param {Object} [options] - Options (e.g. { silent: true }) + * @returns {Promise} Results from IDE cleanup + */ + async uninstallIdeConfigs(projectDir, existingInstall, options = {}) { + await this.ideManager.ensureInitialized(); + const cleanupOptions = { isUninstall: true, silent: options.silent }; + const ideList = existingInstall.ides; + if (ideList.length > 0) { + return this.ideManager.cleanupByList(projectDir, ideList, cleanupOptions); + } + return this.ideManager.cleanup(projectDir, cleanupOptions); + } + + /** + * Remove user artifacts output folder + * @param {string} projectDir - Project directory + * @param {string} outputFolder - Output folder name (relative) + * @returns {Promise} Whether the folder was removed + */ + async uninstallOutputFolder(projectDir, outputFolder) { + if (!outputFolder) return false; + const resolvedProject = path.resolve(projectDir); + const outputPath = path.resolve(resolvedProject, outputFolder); + if (!outputPath.startsWith(resolvedProject + path.sep)) { + return false; + } + if (await fs.pathExists(outputPath)) { + await fs.remove(outputPath); + return true; + } + return false; + } + + /** + * Remove the _bmad/ directory + * @param {string} projectDir - Project directory + * @returns {Promise} Whether the directory was removed + */ + async uninstallModules(projectDir) { + const { bmadDir } = await this.findBmadDir(projectDir); + if (await fs.pathExists(bmadDir)) { + await fs.remove(bmadDir); + return true; + } + return false; + } + + /** + * Get installation status + */ + async getStatus(directory) { + const projectDir = path.resolve(directory); + const { bmadDir } = await this.findBmadDir(projectDir); + return await ExistingInstall.detect(bmadDir); + } + + /** + * Get available modules + */ + async getAvailableModules() { + return await new OfficialModules().listAvailable(); + } + + /** + * Get the configured output folder name for a project + * Resolves bmadDir internally from projectDir + * @param {string} projectDir - Project directory + * @returns {string} Output folder name (relative, default: '_bmad-output') + */ + async getOutputFolder(projectDir) { + const { bmadDir } = await this.findBmadDir(projectDir); + return this._readOutputFolder(bmadDir); + } + + /** + * Handle missing custom module sources interactively + * @param {Map} customModuleSources - Map of custom module ID to info + * @param {string} bmadDir - BMAD directory + * @param {string} projectRoot - Project root directory + * @param {string} operation - Current operation ('update', 'compile', etc.) + * @param {Array} installedModules - Array of installed module IDs (will be modified) + * @param {boolean} [skipPrompts=false] - Skip interactive prompts and keep all modules with missing sources + * @returns {Object} Object with validCustomModules array and keptModulesWithoutSources array + */ + async handleMissingCustomSources(customModuleSources, bmadDir, projectRoot, operation, installedModules, skipPrompts = false) { + const validCustomModules = []; + const keptModulesWithoutSources = []; // Track modules kept without sources + const customModulesWithMissingSources = []; + + // Check which sources exist + for (const [moduleId, customInfo] of customModuleSources) { + if (await fs.pathExists(customInfo.sourcePath)) { + validCustomModules.push({ + id: moduleId, + name: customInfo.name, + path: customInfo.sourcePath, + info: customInfo, + }); + } else { + // For cached modules that are missing, we just skip them without prompting + if (customInfo.cached) { + // Skip cached modules without prompting + keptModulesWithoutSources.push({ + id: moduleId, + name: customInfo.name, + cached: true, + }); + } else { + customModulesWithMissingSources.push({ + id: moduleId, + name: customInfo.name, + sourcePath: customInfo.sourcePath, + relativePath: customInfo.relativePath, + info: customInfo, + }); + } + } + } + + // If no missing sources, return immediately + if (customModulesWithMissingSources.length === 0) { + return { + validCustomModules, + keptModulesWithoutSources: [], + }; + } + + // Non-interactive mode: keep all modules with missing sources + if (skipPrompts) { + for (const missing of customModulesWithMissingSources) { + keptModulesWithoutSources.push(missing.id); + } + return { validCustomModules, keptModulesWithoutSources }; + } + + await prompts.log.warn(`Found ${customModulesWithMissingSources.length} custom module(s) with missing sources:`); + + let keptCount = 0; + let updatedCount = 0; + let removedCount = 0; + + for (const missing of customModulesWithMissingSources) { + await prompts.log.message( + `${missing.name} (${missing.id})\n Original source: ${missing.relativePath}\n Full path: ${missing.sourcePath}`, + ); + + const choices = [ + { + name: 'Keep installed (will not be processed)', + value: 'keep', + hint: 'Keep', + }, + { + name: 'Specify new source location', + value: 'update', + hint: 'Update', + }, + ]; + + // Only add remove option if not just compiling agents + if (operation !== 'compile-agents') { + choices.push({ + name: '⚠️ REMOVE module completely (destructive!)', + value: 'remove', + hint: 'Remove', + }); + } + + const action = await prompts.select({ + message: `How would you like to handle "${missing.name}"?`, + choices, + }); + + switch (action) { + case 'update': { + // Use sync validation because @clack/prompts doesn't support async validate + const newSourcePath = await prompts.text({ + message: 'Enter the new path to the custom module:', + default: missing.sourcePath, + validate: (input) => { + if (!input || input.trim() === '') { + return 'Please enter a path'; + } + const expandedPath = path.resolve(input.trim()); + if (!fs.pathExistsSync(expandedPath)) { + return 'Path does not exist'; + } + // Check if it looks like a valid module + const moduleYamlPath = path.join(expandedPath, 'module.yaml'); + const agentsPath = path.join(expandedPath, 'agents'); + const workflowsPath = path.join(expandedPath, 'workflows'); + + if (!fs.pathExistsSync(moduleYamlPath) && !fs.pathExistsSync(agentsPath) && !fs.pathExistsSync(workflowsPath)) { + return 'Path does not appear to contain a valid custom module'; + } + return; // clack expects undefined for valid input + }, + }); + + // Defensive: handleCancel should have exited, but guard against symbol propagation + if (typeof newSourcePath !== 'string') { + keptCount++; + keptModulesWithoutSources.push(missing.id); + continue; + } + + // Update the source in manifest + const resolvedPath = path.resolve(newSourcePath.trim()); + missing.info.sourcePath = resolvedPath; + // Remove relativePath - we only store absolute sourcePath now + delete missing.info.relativePath; + await this.manifest.addCustomModule(bmadDir, missing.info); + + validCustomModules.push({ + id: missing.id, + name: missing.name, + path: resolvedPath, + info: missing.info, + }); + + updatedCount++; + await prompts.log.success('Updated source location'); + + break; + } + case 'remove': { + // Extra confirmation for destructive remove + await prompts.log.error( + `WARNING: This will PERMANENTLY DELETE "${missing.name}" and all its files!\n Module location: ${path.join(bmadDir, missing.id)}`, + ); + + const confirmDelete = await prompts.confirm({ + message: 'Are you absolutely sure you want to delete this module?', + default: false, + }); + + if (confirmDelete) { + const typedConfirm = await prompts.text({ + message: 'Type "DELETE" to confirm permanent deletion:', + validate: (input) => { + if (input !== 'DELETE') { + return 'You must type "DELETE" exactly to proceed'; + } + return; // clack expects undefined for valid input + }, + }); + + if (typedConfirm === 'DELETE') { + // Remove the module from filesystem and manifest + const modulePath = path.join(bmadDir, missing.id); + if (await fs.pathExists(modulePath)) { + const fsExtra = require('fs-extra'); + await fsExtra.remove(modulePath); + await prompts.log.warn(`Deleted module directory: ${path.relative(projectRoot, modulePath)}`); + } + + await this.manifest.removeModule(bmadDir, missing.id); + await this.manifest.removeCustomModule(bmadDir, missing.id); + await prompts.log.warn('Removed from manifest'); + + // Also remove from installedModules list + if (installedModules && installedModules.includes(missing.id)) { + const index = installedModules.indexOf(missing.id); + if (index !== -1) { + installedModules.splice(index, 1); + } + } + + removedCount++; + await prompts.log.error(`"${missing.name}" has been permanently removed`); + } else { + await prompts.log.message('Removal cancelled - module will be kept'); + keptCount++; + } + } else { + await prompts.log.message('Removal cancelled - module will be kept'); + keptCount++; + } + + break; + } + case 'keep': { + keptCount++; + keptModulesWithoutSources.push(missing.id); + await prompts.log.message('Module will be kept as-is'); + + break; + } + // No default + } + } + + // Show summary + if (keptCount > 0 || updatedCount > 0 || removedCount > 0) { + let summary = 'Summary for custom modules with missing sources:'; + if (keptCount > 0) summary += `\n • ${keptCount} module(s) kept as-is`; + if (updatedCount > 0) summary += `\n • ${updatedCount} module(s) updated with new sources`; + if (removedCount > 0) summary += `\n • ${removedCount} module(s) permanently deleted`; + await prompts.log.message(summary); + } + + return { + validCustomModules, + keptModulesWithoutSources, + }; + } + + /** + * Find the bmad installation directory in a project + * Always uses the standard _bmad folder name + * @param {string} projectDir - Project directory + * @returns {Promise} { bmadDir: string } + */ + async findBmadDir(projectDir) { + const bmadDir = path.join(projectDir, BMAD_FOLDER_NAME); + return { bmadDir }; + } + + /** + * Read the output_folder setting from module config files + * Checks bmm/config.yaml first, then other module configs + * @param {string} bmadDir - BMAD installation directory + * @returns {string} Output folder path or default + */ + async _readOutputFolder(bmadDir) { + const yaml = require('yaml'); + + // Check bmm/config.yaml first (most common) + const bmmConfigPath = path.join(bmadDir, 'bmm', 'config.yaml'); + if (await fs.pathExists(bmmConfigPath)) { + try { + const content = await fs.readFile(bmmConfigPath, 'utf8'); + const config = yaml.parse(content); + if (config && config.output_folder) { + // Strip {project-root}/ prefix if present + return config.output_folder.replace(/^\{project-root\}[/\\]/, ''); + } + } catch { + // Fall through to other modules + } + } + + // Scan other module config.yaml files + try { + const entries = await fs.readdir(bmadDir, { withFileTypes: true }); + for (const entry of entries) { + if (!entry.isDirectory() || entry.name === 'bmm' || entry.name.startsWith('_')) continue; + const configPath = path.join(bmadDir, entry.name, 'config.yaml'); + if (await fs.pathExists(configPath)) { + try { + const content = await fs.readFile(configPath, 'utf8'); + const config = yaml.parse(content); + if (config && config.output_folder) { + return config.output_folder.replace(/^\{project-root\}[/\\]/, ''); + } + } catch { + // Continue scanning + } + } + } + } catch { + // Directory scan failed + } + + // Default fallback + return '_bmad-output'; + } + + /** + * Parse a CSV line, handling quoted fields + * @param {string} line - CSV line to parse + * @returns {Array} Array of field values + */ + parseCSVLine(line) { + const result = []; + let current = ''; + let inQuotes = false; + + for (let i = 0; i < line.length; i++) { + const char = line[i]; + const nextChar = line[i + 1]; + + if (char === '"') { + if (inQuotes && nextChar === '"') { + // Escaped quote + current += '"'; + i++; // Skip next quote + } else { + // Toggle quote mode + inQuotes = !inQuotes; + } + } else if (char === ',' && !inQuotes) { + result.push(current); + current = ''; + } else { + current += char; + } + } + result.push(current); + return result; + } + + /** + * Escape a CSV field if it contains special characters + * @param {string} field - Field value to escape + * @returns {string} Escaped field + */ + escapeCSVField(field) { + if (field === null || field === undefined) { + return ''; + } + const str = String(field); + // If field contains comma, quote, or newline, wrap in quotes and escape inner quotes + if (str.includes(',') || str.includes('"') || str.includes('\n')) { + return `"${str.replaceAll('"', '""')}"`; + } + return str; + } +} + +module.exports = { Installer }; diff --git a/tools/cli/installers/lib/core/manifest-generator.js b/tools/installer/core/manifest-generator.js similarity index 99% rename from tools/cli/installers/lib/core/manifest-generator.js rename to tools/installer/core/manifest-generator.js index 14fd8887e..65e0f4ed3 100644 --- a/tools/cli/installers/lib/core/manifest-generator.js +++ b/tools/installer/core/manifest-generator.js @@ -3,8 +3,8 @@ const fs = require('fs-extra'); const yaml = require('yaml'); const crypto = require('node:crypto'); const csv = require('csv-parse/sync'); -const { getSourcePath, getModulePath } = require('../../../lib/project-root'); -const prompts = require('../../../lib/prompts'); +const { getSourcePath, getModulePath } = require('../project-root'); +const prompts = require('../prompts'); const { loadSkillManifest: loadSkillManifestShared, getCanonicalId: getCanonicalIdShared, @@ -13,7 +13,7 @@ const { } = require('../ide/shared/skill-manifest'); // Load package.json for version info -const packageJson = require('../../../../../package.json'); +const packageJson = require('../../../package.json'); /** * Generates manifest files for installed skills and agents diff --git a/tools/cli/installers/lib/core/manifest.js b/tools/installer/core/manifest.js similarity index 99% rename from tools/cli/installers/lib/core/manifest.js rename to tools/installer/core/manifest.js index 0b5fc447b..d6eade648 100644 --- a/tools/cli/installers/lib/core/manifest.js +++ b/tools/installer/core/manifest.js @@ -1,8 +1,8 @@ const path = require('node:path'); const fs = require('fs-extra'); const crypto = require('node:crypto'); -const { getProjectRoot } = require('../../../lib/project-root'); -const prompts = require('../../../lib/prompts'); +const { getProjectRoot } = require('../project-root'); +const prompts = require('../prompts'); class Manifest { /** diff --git a/tools/cli/installers/lib/custom/handler.js b/tools/installer/custom-handler.js similarity index 98% rename from tools/cli/installers/lib/custom/handler.js rename to tools/installer/custom-handler.js index fbd6c728f..a1966b7e7 100644 --- a/tools/cli/installers/lib/custom/handler.js +++ b/tools/installer/custom-handler.js @@ -1,7 +1,7 @@ const path = require('node:path'); const fs = require('fs-extra'); const yaml = require('yaml'); -const prompts = require('../../../lib/prompts'); +const prompts = require('./prompts'); /** * Handler for custom content (custom.yaml) * Discovers custom agents and workflows in the project diff --git a/tools/cli/external-official-modules.yaml b/tools/installer/external-official-modules.yaml similarity index 100% rename from tools/cli/external-official-modules.yaml rename to tools/installer/external-official-modules.yaml diff --git a/tools/cli/lib/file-ops.js b/tools/installer/file-ops.js similarity index 100% rename from tools/cli/lib/file-ops.js rename to tools/installer/file-ops.js diff --git a/tools/cli/installers/lib/ide/_config-driven.js b/tools/installer/ide/_config-driven.js similarity index 54% rename from tools/cli/installers/lib/ide/_config-driven.js rename to tools/installer/ide/_config-driven.js index 5fb4c595a..603ffc7a4 100644 --- a/tools/cli/installers/lib/ide/_config-driven.js +++ b/tools/installer/ide/_config-driven.js @@ -2,9 +2,9 @@ const os = require('node:os'); const path = require('node:path'); const fs = require('fs-extra'); const yaml = require('yaml'); -const { BaseIdeSetup } = require('./_base-ide'); -const prompts = require('../../../lib/prompts'); +const prompts = require('../prompts'); const csv = require('csv-parse/sync'); +const { BMAD_FOLDER_NAME } = require('./shared/path-utils'); /** * Config-driven IDE setup handler @@ -15,43 +15,45 @@ const csv = require('csv-parse/sync'); * * Features: * - Config-driven from platform-codes.yaml - * - Template-based content generation - * - Multi-target installation support (e.g., GitHub Copilot) - * - Artifact type filtering (agents, workflows, tasks, tools) + * - Verbatim skill installation from skill-manifest.csv + * - Legacy directory cleanup and IDE-specific marker removal */ -class ConfigDrivenIdeSetup extends BaseIdeSetup { +class ConfigDrivenIdeSetup { constructor(platformCode, platformConfig) { - super(platformCode, platformConfig.name, platformConfig.preferred); + this.name = platformCode; + this.displayName = platformConfig.name || platformCode; + this.preferred = platformConfig.preferred || false; this.platformConfig = platformConfig; this.installerConfig = platformConfig.installer || null; + this.bmadFolderName = BMAD_FOLDER_NAME; - // Set configDir from target_dir so base-class detect() works - if (this.installerConfig?.target_dir) { - this.configDir = this.installerConfig.target_dir; - } + // Set configDir from target_dir so detect() works + this.configDir = this.installerConfig?.target_dir || null; + } + + setBmadFolderName(bmadFolderName) { + this.bmadFolderName = bmadFolderName; } /** * Detect whether this IDE already has configuration in the project. - * For skill_format platforms, checks for bmad-prefixed entries in target_dir - * (matching old codex.js behavior) instead of just checking directory existence. + * Checks for bmad-prefixed entries in target_dir. * @param {string} projectDir - Project directory * @returns {Promise} */ async detect(projectDir) { - if (this.installerConfig?.skill_format && this.configDir) { - const dir = path.join(projectDir || process.cwd(), this.configDir); - if (await fs.pathExists(dir)) { - try { - const entries = await fs.readdir(dir); - return entries.some((e) => typeof e === 'string' && e.startsWith('bmad')); - } catch { - return false; - } + if (!this.configDir) return false; + + const dir = path.join(projectDir || process.cwd(), this.configDir); + if (await fs.pathExists(dir)) { + try { + const entries = await fs.readdir(dir); + return entries.some((e) => typeof e === 'string' && e.startsWith('bmad')); + } catch { + return false; } - return false; } - return super.detect(projectDir); + return false; } /** @@ -90,12 +92,6 @@ class ConfigDrivenIdeSetup extends BaseIdeSetup { return { success: false, reason: 'no-config' }; } - // Handle multi-target installations (e.g., GitHub Copilot) - if (this.installerConfig.targets) { - return this.installToMultipleTargets(projectDir, bmadDir, this.installerConfig.targets, options); - } - - // Handle single-target installations if (this.installerConfig.target_dir) { return this.installToTarget(projectDir, bmadDir, this.installerConfig, options); } @@ -113,13 +109,8 @@ class ConfigDrivenIdeSetup extends BaseIdeSetup { */ async installToTarget(projectDir, bmadDir, config, options) { const { target_dir } = config; - - if (!config.skill_format) { - return { success: false, reason: 'missing-skill-format', error: 'Installer config missing skill_format — cannot install skills' }; - } - const targetPath = path.join(projectDir, target_dir); - await this.ensureDir(targetPath); + await fs.ensureDir(targetPath); this.skillWriteTracker = new Set(); const results = { skills: 0 }; @@ -132,351 +123,6 @@ class ConfigDrivenIdeSetup extends BaseIdeSetup { return { success: true, results }; } - /** - * Install to multiple target directories - * @param {string} projectDir - Project directory - * @param {string} bmadDir - BMAD installation directory - * @param {Array} targets - Array of target configurations - * @param {Object} options - Setup options - * @returns {Promise} Installation result - */ - async installToMultipleTargets(projectDir, bmadDir, targets, options) { - const allResults = { skills: 0 }; - - for (const target of targets) { - const result = await this.installToTarget(projectDir, bmadDir, target, options); - if (result.success) { - allResults.skills += result.results.skills || 0; - } - } - - return { success: true, results: allResults }; - } - - /** - * Load template based on type and configuration - * @param {string} templateType - Template type (claude, windsurf, etc.) - * @param {string} artifactType - Artifact type (agent, workflow, task, tool) - * @param {Object} config - Installation configuration - * @param {string} fallbackTemplateType - Fallback template type if requested template not found - * @returns {Promise<{content: string, extension: string}>} Template content and extension - */ - async loadTemplate(templateType, artifactType, config = {}, fallbackTemplateType = null) { - const { header_template, body_template } = config; - - // Check for separate header/body templates - if (header_template || body_template) { - const content = await this.loadSplitTemplates(templateType, artifactType, header_template, body_template); - // Allow config to override extension, default to .md - const ext = config.extension || '.md'; - const normalizedExt = ext.startsWith('.') ? ext : `.${ext}`; - return { content, extension: normalizedExt }; - } - - // Load combined template - try multiple extensions - // If artifactType is empty, templateType already contains full name (e.g., 'gemini-workflow-yaml') - const templateBaseName = artifactType ? `${templateType}-${artifactType}` : templateType; - const templateDir = path.join(__dirname, 'templates', 'combined'); - const extensions = ['.md', '.toml', '.yaml', '.yml']; - - for (const ext of extensions) { - const templatePath = path.join(templateDir, templateBaseName + ext); - if (await fs.pathExists(templatePath)) { - const content = await fs.readFile(templatePath, 'utf8'); - return { content, extension: ext }; - } - } - - // Fall back to default template (if provided) - if (fallbackTemplateType) { - for (const ext of extensions) { - const fallbackPath = path.join(templateDir, `${fallbackTemplateType}${ext}`); - if (await fs.pathExists(fallbackPath)) { - const content = await fs.readFile(fallbackPath, 'utf8'); - return { content, extension: ext }; - } - } - } - - // Ultimate fallback - minimal template - return { content: this.getDefaultTemplate(artifactType), extension: '.md' }; - } - - /** - * Load split templates (header + body) - * @param {string} templateType - Template type - * @param {string} artifactType - Artifact type - * @param {string} headerTpl - Header template name - * @param {string} bodyTpl - Body template name - * @returns {Promise} Combined template content - */ - async loadSplitTemplates(templateType, artifactType, headerTpl, bodyTpl) { - let header = ''; - let body = ''; - - // Load header template - if (headerTpl) { - const headerPath = path.join(__dirname, 'templates', 'split', headerTpl); - if (await fs.pathExists(headerPath)) { - header = await fs.readFile(headerPath, 'utf8'); - } - } else { - // Use default header for template type - const defaultHeaderPath = path.join(__dirname, 'templates', 'split', templateType, 'header.md'); - if (await fs.pathExists(defaultHeaderPath)) { - header = await fs.readFile(defaultHeaderPath, 'utf8'); - } - } - - // Load body template - if (bodyTpl) { - const bodyPath = path.join(__dirname, 'templates', 'split', bodyTpl); - if (await fs.pathExists(bodyPath)) { - body = await fs.readFile(bodyPath, 'utf8'); - } - } else { - // Use default body for template type - const defaultBodyPath = path.join(__dirname, 'templates', 'split', templateType, 'body.md'); - if (await fs.pathExists(defaultBodyPath)) { - body = await fs.readFile(defaultBodyPath, 'utf8'); - } - } - - // Combine header and body - return `${header}\n${body}`; - } - - /** - * Get default minimal template - * @param {string} artifactType - Artifact type - * @returns {string} Default template - */ - getDefaultTemplate(artifactType) { - if (artifactType === 'agent') { - return `--- -name: '{{name}}' -description: '{{description}}' -disable-model-invocation: true ---- - -You must fully embody this agent's persona and follow all activation instructions exactly as specified. - - -1. LOAD the FULL agent file from {project-root}/{{bmadFolderName}}/{{path}} -2. READ its entire contents - this contains the complete agent persona, menu, and instructions -3. FOLLOW every step in the section precisely - -`; - } - return `--- -name: '{{name}}' -description: '{{description}}' ---- - -# {{name}} - -LOAD and execute from: {project-root}/{{bmadFolderName}}/{{path}} -`; - } - - /** - * Render template with artifact data - * @param {string} template - Template content - * @param {Object} artifact - Artifact data - * @returns {string} Rendered content - */ - renderTemplate(template, artifact) { - // Use the appropriate path property based on artifact type - let pathToUse = artifact.relativePath || ''; - switch (artifact.type) { - case 'agent-launcher': { - pathToUse = artifact.agentPath || artifact.relativePath || ''; - - break; - } - case 'workflow-command': { - pathToUse = artifact.workflowPath || artifact.relativePath || ''; - - break; - } - case 'task': - case 'tool': { - pathToUse = artifact.path || artifact.relativePath || ''; - - break; - } - // No default - } - - // Replace _bmad placeholder with actual folder name BEFORE inserting paths, - // so that paths containing '_bmad' are not corrupted by the blanket replacement. - let rendered = template.replaceAll('_bmad', this.bmadFolderName); - - // Replace {{bmadFolderName}} placeholder if present - rendered = rendered.replaceAll('{{bmadFolderName}}', this.bmadFolderName); - - rendered = rendered - .replaceAll('{{name}}', artifact.name || '') - .replaceAll('{{module}}', artifact.module || 'core') - .replaceAll('{{path}}', pathToUse) - .replaceAll('{{description}}', artifact.description || `${artifact.name} ${artifact.type || ''}`) - .replaceAll('{{workflow_path}}', pathToUse); - - return rendered; - } - - /** - * Write artifact as a skill directory with SKILL.md inside. - * Writes artifact as a skill directory with SKILL.md inside. - * @param {string} targetPath - Base skills directory - * @param {Object} artifact - Artifact data - * @param {string} content - Rendered template content - */ - async writeSkillFile(targetPath, artifact, content) { - const { resolveSkillName } = require('./shared/path-utils'); - - // Get the skill name (prefers canonicalId, falls back to path-derived) and remove .md - const flatName = resolveSkillName(artifact); - const skillName = path.basename(flatName.replace(/\.md$/, '')); - - if (!skillName) { - throw new Error(`Cannot derive skill name for artifact: ${artifact.relativePath || JSON.stringify(artifact)}`); - } - - // Create skill directory - const skillDir = path.join(targetPath, skillName); - await this.ensureDir(skillDir); - this.skillWriteTracker?.add(skillName); - - // Transform content: rewrite frontmatter for skills format - const skillContent = this.transformToSkillFormat(content, skillName); - - await this.writeFile(path.join(skillDir, 'SKILL.md'), skillContent); - } - - /** - * Transform artifact content to Agent Skills format. - * Rewrites frontmatter to contain only unquoted name and description. - * @param {string} content - Original content with YAML frontmatter - * @param {string} skillName - Skill name (must match directory name) - * @returns {string} Transformed content - */ - transformToSkillFormat(content, skillName) { - // Normalize line endings - content = content.replaceAll('\r\n', '\n').replaceAll('\r', '\n'); - - // Parse frontmatter - const fmMatch = content.match(/^---\n([\s\S]*?)\n---\n?([\s\S]*)$/); - if (!fmMatch) { - // No frontmatter -- wrap with minimal frontmatter - const fm = yaml.stringify({ name: skillName, description: skillName }).trimEnd(); - return `---\n${fm}\n---\n\n${content}`; - } - - const frontmatter = fmMatch[1]; - const body = fmMatch[2]; - - // Parse frontmatter with yaml library to extract description - let description; - try { - const parsed = yaml.parse(frontmatter); - const rawDesc = parsed?.description; - description = typeof rawDesc === 'string' && rawDesc ? rawDesc : `${skillName} skill`; - } catch { - description = `${skillName} skill`; - } - - // Build new frontmatter with only name and description, unquoted - const newFrontmatter = yaml.stringify({ name: skillName, description: String(description) }, { lineWidth: 0 }).trimEnd(); - return `---\n${newFrontmatter}\n---\n${body}`; - } - - /** - * Install a custom agent launcher. - * For skill_format platforms, produces /SKILL.md. - * For flat platforms, produces a single file in target_dir. - * @param {string} projectDir - Project directory - * @param {string} agentName - Agent name (e.g., "fred-commit-poet") - * @param {string} agentPath - Path to compiled agent (relative to project root) - * @param {Object} metadata - Agent metadata - * @returns {Object|null} Info about created file/skill - */ - async installCustomAgentLauncher(projectDir, agentName, agentPath, metadata) { - if (!this.installerConfig?.target_dir) return null; - - const { customAgentDashName } = require('./shared/path-utils'); - const targetPath = path.join(projectDir, this.installerConfig.target_dir); - await this.ensureDir(targetPath); - - // Build artifact to reuse existing template rendering. - // The default-agent template already includes the _bmad/ prefix before {{path}}, - // but agentPath is relative to project root (e.g. "_bmad/custom/agents/fred.md"). - // Strip the bmadFolderName prefix so the template doesn't produce a double path. - const bmadPrefix = this.bmadFolderName + '/'; - const normalizedPath = agentPath.startsWith(bmadPrefix) ? agentPath.slice(bmadPrefix.length) : agentPath; - - const artifact = { - type: 'agent-launcher', - name: agentName, - description: metadata?.description || `${agentName} agent`, - agentPath: normalizedPath, - relativePath: normalizedPath, - module: 'custom', - }; - - const { content: template } = await this.loadTemplate( - this.installerConfig.template_type || 'default', - 'agent', - this.installerConfig, - 'default-agent', - ); - const content = this.renderTemplate(template, artifact); - - if (this.installerConfig.skill_format) { - const skillName = customAgentDashName(agentName).replace(/\.md$/, ''); - const skillDir = path.join(targetPath, skillName); - await this.ensureDir(skillDir); - const skillContent = this.transformToSkillFormat(content, skillName); - const skillPath = path.join(skillDir, 'SKILL.md'); - await this.writeFile(skillPath, skillContent); - return { path: path.relative(projectDir, skillPath), command: `$${skillName}` }; - } - - // Flat file output - const filename = customAgentDashName(agentName); - const filePath = path.join(targetPath, filename); - await this.writeFile(filePath, content); - return { path: path.relative(projectDir, filePath), command: agentName }; - } - - /** - * Generate filename for artifact - * @param {Object} artifact - Artifact data - * @param {string} artifactType - Artifact type (agent, workflow, task, tool) - * @param {string} extension - File extension to use (e.g., '.md', '.toml') - * @returns {string} Generated filename - */ - generateFilename(artifact, artifactType, extension = '.md') { - const { resolveSkillName } = require('./shared/path-utils'); - - // Reuse central logic to ensure consistent naming conventions - // Prefers canonicalId from manifest when available, falls back to path-derived name - const standardName = resolveSkillName(artifact); - - // Clean up potential double extensions from source files (e.g. .yaml.md, .xml.md -> .md) - // This handles any extensions that might slip through toDashPath() - const baseName = standardName.replace(/\.(md|yaml|yml|json|xml|toml)\.md$/i, '.md'); - - // If using default markdown, preserve the bmad-agent- prefix for agents - if (extension === '.md') { - return baseName; - } - - // For other extensions (e.g., .toml), replace .md extension - // Note: agent prefix is preserved even with non-markdown extensions - return baseName.replace(/\.md$/, extension); - } - /** * Install verbatim native SKILL.md directories from skill-manifest.csv. * Copies the entire source directory as-is into the IDE skill directory. @@ -598,22 +244,8 @@ LOAD and execute from: {project-root}/{{bmadFolderName}}/{{path}} await this.cleanupRovoDevPrompts(projectDir, options); } - // Clean all target directories - if (this.installerConfig?.targets) { - const parentDirs = new Set(); - for (const target of this.installerConfig.targets) { - await this.cleanupTarget(projectDir, target.target_dir, options); - // Track parent directories for empty-dir cleanup - const parentDir = path.dirname(target.target_dir); - if (parentDir && parentDir !== '.') { - parentDirs.add(parentDir); - } - } - // After all targets cleaned, remove empty parent directories (recursive up to projectDir) - for (const parentDir of parentDirs) { - await this.removeEmptyParents(projectDir, parentDir); - } - } else if (this.installerConfig?.target_dir) { + // Clean target directory + if (this.installerConfig?.target_dir) { await this.cleanupTarget(projectDir, this.installerConfig.target_dir, options); } } @@ -711,6 +343,7 @@ LOAD and execute from: {project-root}/{{bmadFolderName}}/{{path}} } } } + /** * Strip BMAD-owned content from .github/copilot-instructions.md. * The old custom installer injected content between and markers. diff --git a/tools/cli/installers/lib/ide/manager.js b/tools/installer/ide/manager.js similarity index 82% rename from tools/cli/installers/lib/ide/manager.js rename to tools/installer/ide/manager.js index 0d7f91209..ac49a8773 100644 --- a/tools/cli/installers/lib/ide/manager.js +++ b/tools/installer/ide/manager.js @@ -1,5 +1,5 @@ const { BMAD_FOLDER_NAME } = require('./shared/path-utils'); -const prompts = require('../../../lib/prompts'); +const prompts = require('../prompts'); /** * IDE Manager - handles IDE-specific setup @@ -226,23 +226,6 @@ class IdeManager { return results; } - /** - * Get list of supported IDEs - * @returns {Array} List of supported IDE names - */ - getSupportedIdes() { - return [...this.handlers.keys()]; - } - - /** - * Check if an IDE is supported - * @param {string} ideName - Name of the IDE - * @returns {boolean} True if IDE is supported - */ - isSupported(ideName) { - return this.handlers.has(ideName.toLowerCase()); - } - /** * Detect installed IDEs * @param {string} projectDir - Project directory @@ -259,41 +242,6 @@ class IdeManager { return detected; } - - /** - * Install custom agent launchers for specified IDEs - * @param {Array} ides - List of IDE names to install for - * @param {string} projectDir - Project directory - * @param {string} agentName - Agent name (e.g., "fred-commit-poet") - * @param {string} agentPath - Path to compiled agent (relative to project root) - * @param {Object} metadata - Agent metadata - * @returns {Object} Results for each IDE - */ - async installCustomAgentLaunchers(ides, projectDir, agentName, agentPath, metadata) { - const results = {}; - - for (const ideName of ides) { - const handler = this.handlers.get(ideName.toLowerCase()); - - if (!handler) { - await prompts.log.warn(`IDE '${ideName}' is not yet supported for custom agent installation`); - continue; - } - - try { - if (typeof handler.installCustomAgentLauncher === 'function') { - const result = await handler.installCustomAgentLauncher(projectDir, agentName, agentPath, metadata); - if (result) { - results[ideName] = result; - } - } - } catch (error) { - await prompts.log.warn(`Failed to install ${ideName} launcher: ${error.message}`); - } - } - - return results; - } } module.exports = { IdeManager }; diff --git a/tools/installer/ide/platform-codes.js b/tools/installer/ide/platform-codes.js new file mode 100644 index 000000000..32d82e9cc --- /dev/null +++ b/tools/installer/ide/platform-codes.js @@ -0,0 +1,37 @@ +const fs = require('fs-extra'); +const path = require('node:path'); +const yaml = require('yaml'); + +const PLATFORM_CODES_PATH = path.join(__dirname, 'platform-codes.yaml'); + +let _cachedPlatformCodes = null; + +/** + * Load the platform codes configuration from YAML + * @returns {Object} Platform codes configuration + */ +async function loadPlatformCodes() { + if (_cachedPlatformCodes) { + return _cachedPlatformCodes; + } + + if (!(await fs.pathExists(PLATFORM_CODES_PATH))) { + throw new Error(`Platform codes configuration not found at: ${PLATFORM_CODES_PATH}`); + } + + const content = await fs.readFile(PLATFORM_CODES_PATH, 'utf8'); + _cachedPlatformCodes = yaml.parse(content); + return _cachedPlatformCodes; +} + +/** + * Clear the cached platform codes (useful for testing) + */ +function clearCache() { + _cachedPlatformCodes = null; +} + +module.exports = { + loadPlatformCodes, + clearCache, +}; diff --git a/tools/installer/ide/platform-codes.yaml b/tools/installer/ide/platform-codes.yaml new file mode 100644 index 000000000..3f3e068be --- /dev/null +++ b/tools/installer/ide/platform-codes.yaml @@ -0,0 +1,190 @@ +# BMAD Platform Codes Configuration +# +# Each platform entry has: +# name: Display name shown to users +# preferred: Whether shown as a recommended option on install +# suspended: (optional) Message explaining why install is blocked +# installer: +# target_dir: Directory where skill directories are installed +# legacy_targets: (optional) Old target dirs to clean up on reinstall +# ancestor_conflict_check: (optional) Refuse install when ancestor dir has BMAD files + +platforms: + antigravity: + name: "Google Antigravity" + preferred: false + installer: + legacy_targets: + - .agent/workflows + target_dir: .agent/skills + + auggie: + name: "Auggie" + preferred: false + installer: + legacy_targets: + - .augment/commands + target_dir: .augment/skills + + claude-code: + name: "Claude Code" + preferred: true + installer: + legacy_targets: + - .claude/commands + target_dir: .claude/skills + ancestor_conflict_check: true + + cline: + name: "Cline" + preferred: false + installer: + legacy_targets: + - .clinerules/workflows + target_dir: .cline/skills + + codex: + name: "Codex" + preferred: false + installer: + legacy_targets: + - .codex/prompts + - ~/.codex/prompts + target_dir: .agents/skills + ancestor_conflict_check: true + + codebuddy: + name: "CodeBuddy" + preferred: false + installer: + legacy_targets: + - .codebuddy/commands + target_dir: .codebuddy/skills + + crush: + name: "Crush" + preferred: false + installer: + legacy_targets: + - .crush/commands + target_dir: .crush/skills + + cursor: + name: "Cursor" + preferred: true + installer: + legacy_targets: + - .cursor/commands + target_dir: .cursor/skills + + gemini: + name: "Gemini CLI" + preferred: false + installer: + legacy_targets: + - .gemini/commands + target_dir: .gemini/skills + + github-copilot: + name: "GitHub Copilot" + preferred: false + installer: + legacy_targets: + - .github/agents + - .github/prompts + target_dir: .github/skills + + iflow: + name: "iFlow" + preferred: false + installer: + legacy_targets: + - .iflow/commands + target_dir: .iflow/skills + + kilo: + name: "KiloCoder" + preferred: false + suspended: "Kilo Code does not yet support the Agent Skills standard. Support is paused until they implement it. See https://github.com/kilocode/kilo-code/issues for updates." + installer: + legacy_targets: + - .kilocode/workflows + target_dir: .kilocode/skills + + kiro: + name: "Kiro" + preferred: false + installer: + legacy_targets: + - .kiro/steering + target_dir: .kiro/skills + + ona: + name: "Ona" + preferred: false + installer: + target_dir: .ona/skills + + opencode: + name: "OpenCode" + preferred: false + installer: + legacy_targets: + - .opencode/agents + - .opencode/commands + - .opencode/agent + - .opencode/command + target_dir: .opencode/skills + ancestor_conflict_check: true + + pi: + name: "Pi" + preferred: false + installer: + target_dir: .pi/skills + + qoder: + name: "Qoder" + preferred: false + installer: + target_dir: .qoder/skills + + qwen: + name: "QwenCoder" + preferred: false + installer: + legacy_targets: + - .qwen/commands + target_dir: .qwen/skills + + roo: + name: "Roo Code" + preferred: false + installer: + legacy_targets: + - .roo/commands + target_dir: .roo/skills + + rovo-dev: + name: "Rovo Dev" + preferred: false + installer: + legacy_targets: + - .rovodev/workflows + target_dir: .rovodev/skills + + trae: + name: "Trae" + preferred: false + installer: + legacy_targets: + - .trae/rules + target_dir: .trae/skills + + windsurf: + name: "Windsurf" + preferred: false + installer: + legacy_targets: + - .windsurf/workflows + target_dir: .windsurf/skills diff --git a/tools/cli/installers/lib/ide/shared/agent-command-generator.js b/tools/installer/ide/shared/agent-command-generator.js similarity index 100% rename from tools/cli/installers/lib/ide/shared/agent-command-generator.js rename to tools/installer/ide/shared/agent-command-generator.js diff --git a/tools/cli/installers/lib/ide/shared/bmad-artifacts.js b/tools/installer/ide/shared/bmad-artifacts.js similarity index 100% rename from tools/cli/installers/lib/ide/shared/bmad-artifacts.js rename to tools/installer/ide/shared/bmad-artifacts.js diff --git a/tools/cli/installers/lib/ide/shared/module-injections.js b/tools/installer/ide/shared/module-injections.js similarity index 98% rename from tools/cli/installers/lib/ide/shared/module-injections.js rename to tools/installer/ide/shared/module-injections.js index fe3f999d8..3090c5da4 100644 --- a/tools/cli/installers/lib/ide/shared/module-injections.js +++ b/tools/installer/ide/shared/module-injections.js @@ -2,7 +2,7 @@ const path = require('node:path'); const fs = require('fs-extra'); const yaml = require('yaml'); const { glob } = require('glob'); -const { getSourcePath } = require('../../../../lib/project-root'); +const { getSourcePath } = require('../../project-root'); async function loadModuleInjectionConfig(handler, moduleName) { const sourceModulesPath = getSourcePath('modules'); diff --git a/tools/cli/installers/lib/ide/shared/path-utils.js b/tools/installer/ide/shared/path-utils.js similarity index 100% rename from tools/cli/installers/lib/ide/shared/path-utils.js rename to tools/installer/ide/shared/path-utils.js diff --git a/tools/cli/installers/lib/ide/shared/skill-manifest.js b/tools/installer/ide/shared/skill-manifest.js similarity index 100% rename from tools/cli/installers/lib/ide/shared/skill-manifest.js rename to tools/installer/ide/shared/skill-manifest.js diff --git a/tools/cli/installers/lib/ide/templates/agent-command-template.md b/tools/installer/ide/templates/agent-command-template.md similarity index 100% rename from tools/cli/installers/lib/ide/templates/agent-command-template.md rename to tools/installer/ide/templates/agent-command-template.md diff --git a/tools/cli/installers/lib/ide/templates/combined/antigravity.md b/tools/installer/ide/templates/combined/antigravity.md similarity index 100% rename from tools/cli/installers/lib/ide/templates/combined/antigravity.md rename to tools/installer/ide/templates/combined/antigravity.md diff --git a/tools/cli/installers/lib/ide/templates/combined/claude-agent.md b/tools/installer/ide/templates/combined/claude-agent.md similarity index 100% rename from tools/cli/installers/lib/ide/templates/combined/claude-agent.md rename to tools/installer/ide/templates/combined/claude-agent.md diff --git a/tools/cli/installers/lib/ide/templates/combined/claude-workflow.md b/tools/installer/ide/templates/combined/claude-workflow.md similarity index 100% rename from tools/cli/installers/lib/ide/templates/combined/claude-workflow.md rename to tools/installer/ide/templates/combined/claude-workflow.md diff --git a/tools/cli/installers/lib/ide/templates/combined/default-agent.md b/tools/installer/ide/templates/combined/default-agent.md similarity index 100% rename from tools/cli/installers/lib/ide/templates/combined/default-agent.md rename to tools/installer/ide/templates/combined/default-agent.md diff --git a/tools/cli/installers/lib/ide/templates/combined/default-task.md b/tools/installer/ide/templates/combined/default-task.md similarity index 100% rename from tools/cli/installers/lib/ide/templates/combined/default-task.md rename to tools/installer/ide/templates/combined/default-task.md diff --git a/tools/cli/installers/lib/ide/templates/combined/default-tool.md b/tools/installer/ide/templates/combined/default-tool.md similarity index 100% rename from tools/cli/installers/lib/ide/templates/combined/default-tool.md rename to tools/installer/ide/templates/combined/default-tool.md diff --git a/tools/cli/installers/lib/ide/templates/combined/default-workflow.md b/tools/installer/ide/templates/combined/default-workflow.md similarity index 100% rename from tools/cli/installers/lib/ide/templates/combined/default-workflow.md rename to tools/installer/ide/templates/combined/default-workflow.md diff --git a/tools/cli/installers/lib/ide/templates/combined/gemini-agent.toml b/tools/installer/ide/templates/combined/gemini-agent.toml similarity index 100% rename from tools/cli/installers/lib/ide/templates/combined/gemini-agent.toml rename to tools/installer/ide/templates/combined/gemini-agent.toml diff --git a/tools/cli/installers/lib/ide/templates/combined/gemini-task.toml b/tools/installer/ide/templates/combined/gemini-task.toml similarity index 100% rename from tools/cli/installers/lib/ide/templates/combined/gemini-task.toml rename to tools/installer/ide/templates/combined/gemini-task.toml diff --git a/tools/cli/installers/lib/ide/templates/combined/gemini-tool.toml b/tools/installer/ide/templates/combined/gemini-tool.toml similarity index 100% rename from tools/cli/installers/lib/ide/templates/combined/gemini-tool.toml rename to tools/installer/ide/templates/combined/gemini-tool.toml diff --git a/tools/cli/installers/lib/ide/templates/combined/gemini-workflow-yaml.toml b/tools/installer/ide/templates/combined/gemini-workflow-yaml.toml similarity index 100% rename from tools/cli/installers/lib/ide/templates/combined/gemini-workflow-yaml.toml rename to tools/installer/ide/templates/combined/gemini-workflow-yaml.toml diff --git a/tools/cli/installers/lib/ide/templates/combined/gemini-workflow.toml b/tools/installer/ide/templates/combined/gemini-workflow.toml similarity index 100% rename from tools/cli/installers/lib/ide/templates/combined/gemini-workflow.toml rename to tools/installer/ide/templates/combined/gemini-workflow.toml diff --git a/tools/cli/installers/lib/ide/templates/combined/kiro-agent.md b/tools/installer/ide/templates/combined/kiro-agent.md similarity index 100% rename from tools/cli/installers/lib/ide/templates/combined/kiro-agent.md rename to tools/installer/ide/templates/combined/kiro-agent.md diff --git a/tools/cli/installers/lib/ide/templates/combined/kiro-task.md b/tools/installer/ide/templates/combined/kiro-task.md similarity index 100% rename from tools/cli/installers/lib/ide/templates/combined/kiro-task.md rename to tools/installer/ide/templates/combined/kiro-task.md diff --git a/tools/cli/installers/lib/ide/templates/combined/kiro-tool.md b/tools/installer/ide/templates/combined/kiro-tool.md similarity index 100% rename from tools/cli/installers/lib/ide/templates/combined/kiro-tool.md rename to tools/installer/ide/templates/combined/kiro-tool.md diff --git a/tools/cli/installers/lib/ide/templates/combined/kiro-workflow.md b/tools/installer/ide/templates/combined/kiro-workflow.md similarity index 100% rename from tools/cli/installers/lib/ide/templates/combined/kiro-workflow.md rename to tools/installer/ide/templates/combined/kiro-workflow.md diff --git a/tools/cli/installers/lib/ide/templates/combined/opencode-agent.md b/tools/installer/ide/templates/combined/opencode-agent.md similarity index 100% rename from tools/cli/installers/lib/ide/templates/combined/opencode-agent.md rename to tools/installer/ide/templates/combined/opencode-agent.md diff --git a/tools/cli/installers/lib/ide/templates/combined/opencode-task.md b/tools/installer/ide/templates/combined/opencode-task.md similarity index 100% rename from tools/cli/installers/lib/ide/templates/combined/opencode-task.md rename to tools/installer/ide/templates/combined/opencode-task.md diff --git a/tools/cli/installers/lib/ide/templates/combined/opencode-tool.md b/tools/installer/ide/templates/combined/opencode-tool.md similarity index 100% rename from tools/cli/installers/lib/ide/templates/combined/opencode-tool.md rename to tools/installer/ide/templates/combined/opencode-tool.md diff --git a/tools/cli/installers/lib/ide/templates/combined/opencode-workflow-yaml.md b/tools/installer/ide/templates/combined/opencode-workflow-yaml.md similarity index 100% rename from tools/cli/installers/lib/ide/templates/combined/opencode-workflow-yaml.md rename to tools/installer/ide/templates/combined/opencode-workflow-yaml.md diff --git a/tools/cli/installers/lib/ide/templates/combined/opencode-workflow.md b/tools/installer/ide/templates/combined/opencode-workflow.md similarity index 100% rename from tools/cli/installers/lib/ide/templates/combined/opencode-workflow.md rename to tools/installer/ide/templates/combined/opencode-workflow.md diff --git a/tools/cli/installers/lib/ide/templates/combined/rovodev.md b/tools/installer/ide/templates/combined/rovodev.md similarity index 100% rename from tools/cli/installers/lib/ide/templates/combined/rovodev.md rename to tools/installer/ide/templates/combined/rovodev.md diff --git a/tools/cli/installers/lib/ide/templates/combined/trae.md b/tools/installer/ide/templates/combined/trae.md similarity index 100% rename from tools/cli/installers/lib/ide/templates/combined/trae.md rename to tools/installer/ide/templates/combined/trae.md diff --git a/tools/cli/installers/lib/ide/templates/combined/windsurf-workflow.md b/tools/installer/ide/templates/combined/windsurf-workflow.md similarity index 100% rename from tools/cli/installers/lib/ide/templates/combined/windsurf-workflow.md rename to tools/installer/ide/templates/combined/windsurf-workflow.md diff --git a/tools/cli/installers/lib/ide/templates/split/.gitkeep b/tools/installer/ide/templates/split/.gitkeep similarity index 100% rename from tools/cli/installers/lib/ide/templates/split/.gitkeep rename to tools/installer/ide/templates/split/.gitkeep diff --git a/tools/cli/installers/install-messages.yaml b/tools/installer/install-messages.yaml similarity index 100% rename from tools/cli/installers/install-messages.yaml rename to tools/installer/install-messages.yaml diff --git a/tools/cli/installers/lib/message-loader.js b/tools/installer/message-loader.js similarity index 93% rename from tools/cli/installers/lib/message-loader.js rename to tools/installer/message-loader.js index 7198f0328..03ba7eca1 100644 --- a/tools/cli/installers/lib/message-loader.js +++ b/tools/installer/message-loader.js @@ -1,7 +1,7 @@ const fs = require('fs-extra'); const path = require('node:path'); const yaml = require('yaml'); -const prompts = require('../../lib/prompts'); +const prompts = require('./prompts'); /** * Load and display installer messages from messages.yaml @@ -18,7 +18,7 @@ class MessageLoader { return this.messages; } - const messagesPath = path.join(__dirname, '..', 'install-messages.yaml'); + const messagesPath = path.join(__dirname, 'install-messages.yaml'); try { const content = fs.readFileSync(messagesPath, 'utf8'); diff --git a/tools/installer/modules/custom-modules.js b/tools/installer/modules/custom-modules.js new file mode 100644 index 000000000..b41bf47b1 --- /dev/null +++ b/tools/installer/modules/custom-modules.js @@ -0,0 +1,197 @@ +const path = require('node:path'); +const fs = require('fs-extra'); +const yaml = require('yaml'); +const { CustomHandler } = require('../custom-handler'); +const { Manifest } = require('../core/manifest'); +const prompts = require('../prompts'); + +class CustomModules { + constructor() { + this.paths = new Map(); + } + + has(moduleCode) { + return this.paths.has(moduleCode); + } + + get(moduleCode) { + return this.paths.get(moduleCode); + } + + set(moduleId, sourcePath) { + this.paths.set(moduleId, sourcePath); + } + + /** + * Install a custom module from its source path. + * @param {string} moduleName - Module identifier + * @param {string} bmadDir - Target bmad directory + * @param {Function} fileTrackingCallback - Optional callback to track installed files + * @param {Object} options - Install options + * @param {Object} options.moduleConfig - Pre-collected module configuration + * @returns {Object} Install result + */ + async install(moduleName, bmadDir, fileTrackingCallback = null, options = {}) { + const sourcePath = this.paths.get(moduleName); + if (!sourcePath) { + throw new Error(`No source path for custom module '${moduleName}'`); + } + + if (!(await fs.pathExists(sourcePath))) { + throw new Error(`Source for custom module '${moduleName}' not found at: ${sourcePath}`); + } + + const targetPath = path.join(bmadDir, moduleName); + + // Read custom.yaml and merge into module config + let moduleConfig = options.moduleConfig ? { ...options.moduleConfig } : {}; + const customConfigPath = path.join(sourcePath, 'custom.yaml'); + if (await fs.pathExists(customConfigPath)) { + try { + const content = await fs.readFile(customConfigPath, 'utf8'); + const customConfig = yaml.parse(content); + if (customConfig) { + moduleConfig = { ...moduleConfig, ...customConfig }; + } + } catch (error) { + await prompts.log.warn(`Failed to read custom.yaml for ${moduleName}: ${error.message}`); + } + } + + // Remove existing installation + if (await fs.pathExists(targetPath)) { + await fs.remove(targetPath); + } + + // Copy files with filtering + await this._copyWithFiltering(sourcePath, targetPath, fileTrackingCallback); + + // Add to manifest + const manifest = new Manifest(); + const versionInfo = await manifest.getModuleVersionInfo(moduleName, bmadDir, sourcePath); + await manifest.addModule(bmadDir, moduleName, { + version: versionInfo.version, + source: versionInfo.source, + npmPackage: versionInfo.npmPackage, + repoUrl: versionInfo.repoUrl, + }); + + return { success: true, module: moduleName, path: targetPath, moduleConfig }; + } + + /** + * Copy module files, filtering out install-time-only artifacts. + * @param {string} sourcePath - Source module directory + * @param {string} targetPath - Target module directory + * @param {Function} fileTrackingCallback - Optional callback to track installed files + */ + async _copyWithFiltering(sourcePath, targetPath, fileTrackingCallback = null) { + const files = await this._getFileList(sourcePath); + + for (const file of files) { + if (file.startsWith('sub-modules/')) continue; + + const isInSidecar = path + .dirname(file) + .split('/') + .some((dir) => dir.toLowerCase().endsWith('-sidecar')); + if (isInSidecar) continue; + + if (file === 'module.yaml') continue; + if (file === 'config.yaml') continue; + + const sourceFile = path.join(sourcePath, file); + const targetFile = path.join(targetPath, file); + + // Skip web-only agents + if (file.startsWith('agents/') && file.endsWith('.md')) { + const content = await fs.readFile(sourceFile, 'utf8'); + if (/]*\slocalskip="true"[^>]*>/.test(content)) { + continue; + } + } + + await fs.ensureDir(path.dirname(targetFile)); + await fs.copy(sourceFile, targetFile, { overwrite: true }); + + if (fileTrackingCallback) { + fileTrackingCallback(targetFile); + } + } + } + + /** + * Recursively list all files in a directory. + * @param {string} dir - Directory to scan + * @param {string} baseDir - Base directory for relative paths + * @returns {string[]} Relative file paths + */ + async _getFileList(dir, baseDir = dir) { + const files = []; + const entries = await fs.readdir(dir, { withFileTypes: true }); + + for (const entry of entries) { + const fullPath = path.join(dir, entry.name); + if (entry.isDirectory()) { + files.push(...(await this._getFileList(fullPath, baseDir))); + } else { + files.push(path.relative(baseDir, fullPath)); + } + } + + return files; + } + + /** + * Discover custom module source paths from all available sources. + * @param {Object} config - Installation configuration + * @param {Object} paths - InstallPaths instance + * @returns {Map} Map of module ID to source path + */ + async discoverPaths(config, paths) { + this.paths = new Map(); + + if (config._quickUpdate) { + if (config._customModuleSources) { + for (const [moduleId, customInfo] of config._customModuleSources) { + this.paths.set(moduleId, customInfo.sourcePath); + } + } + return this.paths; + } + + // From UI: selectedFiles + if (config.customContent && config.customContent.selected && config.customContent.selectedFiles) { + const customHandler = new CustomHandler(); + for (const customFile of config.customContent.selectedFiles) { + const customInfo = await customHandler.getCustomInfo(customFile, paths.projectRoot); + if (customInfo && customInfo.id) { + this.paths.set(customInfo.id, customInfo.path); + } + } + } + + // From UI: sources + if (config.customContent && config.customContent.sources) { + for (const source of config.customContent.sources) { + this.paths.set(source.id, source.path); + } + } + + // From UI: cachedModules + if (config.customContent && config.customContent.cachedModules) { + const selectedCachedIds = config.customContent.selectedCachedModules || []; + const shouldIncludeAll = selectedCachedIds.length === 0 && config.customContent.selected; + + for (const cachedModule of config.customContent.cachedModules) { + if (cachedModule.id && cachedModule.cachePath && (shouldIncludeAll || selectedCachedIds.includes(cachedModule.id))) { + this.paths.set(cachedModule.id, cachedModule.cachePath); + } + } + } + + return this.paths; + } +} + +module.exports = { CustomModules }; diff --git a/tools/installer/modules/external-manager.js b/tools/installer/modules/external-manager.js new file mode 100644 index 000000000..467520163 --- /dev/null +++ b/tools/installer/modules/external-manager.js @@ -0,0 +1,323 @@ +const fs = require('fs-extra'); +const os = require('node:os'); +const path = require('node:path'); +const { execSync } = require('node:child_process'); +const yaml = require('yaml'); +const prompts = require('../prompts'); + +/** + * Manages external official modules defined in external-official-modules.yaml + * These are modules hosted in external repositories that can be installed + * + * @class ExternalModuleManager + */ +class ExternalModuleManager { + constructor() { + this.externalModulesConfigPath = path.join(__dirname, '../external-official-modules.yaml'); + this.cachedModules = null; + } + + /** + * Load and parse the external-official-modules.yaml file + * @returns {Object} Parsed YAML content with modules object + */ + async loadExternalModulesConfig() { + if (this.cachedModules) { + return this.cachedModules; + } + + try { + const content = await fs.readFile(this.externalModulesConfigPath, 'utf8'); + const config = yaml.parse(content); + this.cachedModules = config; + return config; + } catch (error) { + await prompts.log.warn(`Failed to load external modules config: ${error.message}`); + return { modules: {} }; + } + } + + /** + * Get list of available external modules + * @returns {Array} Array of module info objects + */ + async listAvailable() { + const config = await this.loadExternalModulesConfig(); + const modules = []; + + for (const [key, moduleConfig] of Object.entries(config.modules || {})) { + modules.push({ + key, + url: moduleConfig.url, + moduleDefinition: moduleConfig['module-definition'], + code: moduleConfig.code, + name: moduleConfig.name, + header: moduleConfig.header, + subheader: moduleConfig.subheader, + description: moduleConfig.description || '', + defaultSelected: moduleConfig.defaultSelected === true, + type: moduleConfig.type || 'community', // bmad-org or community + npmPackage: moduleConfig.npmPackage || null, // Include npm package name + isExternal: true, + }); + } + + return modules; + } + + /** + * Get module info by code + * @param {string} code - The module code (e.g., 'cis') + * @returns {Object|null} Module info or null if not found + */ + async getModuleByCode(code) { + const modules = await this.listAvailable(); + return modules.find((m) => m.code === code) || null; + } + + /** + * Get module info by key + * @param {string} key - The module key (e.g., 'bmad-creative-intelligence-suite') + * @returns {Object|null} Module info or null if not found + */ + async getModuleByKey(key) { + const config = await this.loadExternalModulesConfig(); + const moduleConfig = config.modules?.[key]; + + if (!moduleConfig) { + return null; + } + + return { + key, + url: moduleConfig.url, + moduleDefinition: moduleConfig['module-definition'], + code: moduleConfig.code, + name: moduleConfig.name, + header: moduleConfig.header, + subheader: moduleConfig.subheader, + description: moduleConfig.description || '', + defaultSelected: moduleConfig.defaultSelected === true, + type: moduleConfig.type || 'community', // bmad-org or community + npmPackage: moduleConfig.npmPackage || null, // Include npm package name + isExternal: true, + }; + } + + /** + * Check if a module code exists in external modules + * @param {string} code - The module code to check + * @returns {boolean} True if the module exists + */ + async hasModule(code) { + const module = await this.getModuleByCode(code); + return module !== null; + } + + /** + * Get the URL for a module by code + * @param {string} code - The module code + * @returns {string|null} The URL or null if not found + */ + async getModuleUrl(code) { + const module = await this.getModuleByCode(code); + return module ? module.url : null; + } + + /** + * Get the module definition path for a module by code + * @param {string} code - The module code + * @returns {string|null} The module definition path or null if not found + */ + async getModuleDefinition(code) { + const module = await this.getModuleByCode(code); + return module ? module.moduleDefinition : null; + } + + /** + * Get the cache directory for external modules + * @returns {string} Path to the external modules cache directory + */ + getExternalCacheDir() { + const cacheDir = path.join(os.homedir(), '.bmad', 'cache', 'external-modules'); + return cacheDir; + } + + /** + * Clone an external module repository to cache + * @param {string} moduleCode - Code of the external module + * @param {Object} options - Clone options + * @param {boolean} options.silent - Suppress spinner output + * @returns {string} Path to the cloned repository + */ + async cloneExternalModule(moduleCode, options = {}) { + const moduleInfo = await this.getModuleByCode(moduleCode); + + if (!moduleInfo) { + throw new Error(`External module '${moduleCode}' not found in external-official-modules.yaml`); + } + + const cacheDir = this.getExternalCacheDir(); + const moduleCacheDir = path.join(cacheDir, moduleCode); + const silent = options.silent || false; + + // Create cache directory if it doesn't exist + await fs.ensureDir(cacheDir); + + // Helper to create a spinner or a no-op when silent + const createSpinner = async () => { + if (silent) { + return { + start() {}, + stop() {}, + error() {}, + message() {}, + cancel() {}, + clear() {}, + get isSpinning() { + return false; + }, + get isCancelled() { + return false; + }, + }; + } + return await prompts.spinner(); + }; + + // Track if we need to install dependencies + let needsDependencyInstall = false; + let wasNewClone = false; + + // Check if already cloned + if (await fs.pathExists(moduleCacheDir)) { + // Try to update if it's a git repo + const fetchSpinner = await createSpinner(); + fetchSpinner.start(`Fetching ${moduleInfo.name}...`); + try { + const currentRef = execSync('git rev-parse HEAD', { cwd: moduleCacheDir, stdio: 'pipe' }).toString().trim(); + // Fetch and reset to remote - works better with shallow clones than pull + execSync('git fetch origin --depth 1', { + cwd: moduleCacheDir, + stdio: ['ignore', 'pipe', 'pipe'], + env: { ...process.env, GIT_TERMINAL_PROMPT: '0' }, + }); + execSync('git reset --hard origin/HEAD', { + cwd: moduleCacheDir, + stdio: ['ignore', 'pipe', 'pipe'], + env: { ...process.env, GIT_TERMINAL_PROMPT: '0' }, + }); + const newRef = execSync('git rev-parse HEAD', { cwd: moduleCacheDir, stdio: 'pipe' }).toString().trim(); + + fetchSpinner.stop(`Fetched ${moduleInfo.name}`); + // Force dependency install if we got new code + if (currentRef !== newRef) { + needsDependencyInstall = true; + } + } catch { + fetchSpinner.error(`Fetch failed, re-downloading ${moduleInfo.name}`); + // If update fails, remove and re-clone + await fs.remove(moduleCacheDir); + wasNewClone = true; + } + } else { + wasNewClone = true; + } + + // Clone if not exists or was removed + if (wasNewClone) { + const fetchSpinner = await createSpinner(); + fetchSpinner.start(`Fetching ${moduleInfo.name}...`); + try { + execSync(`git clone --depth 1 "${moduleInfo.url}" "${moduleCacheDir}"`, { + stdio: ['ignore', 'pipe', 'pipe'], + env: { ...process.env, GIT_TERMINAL_PROMPT: '0' }, + }); + fetchSpinner.stop(`Fetched ${moduleInfo.name}`); + } catch (error) { + fetchSpinner.error(`Failed to fetch ${moduleInfo.name}`); + throw new Error(`Failed to clone external module '${moduleCode}': ${error.message}`); + } + } + + // Install dependencies if package.json exists + const packageJsonPath = path.join(moduleCacheDir, 'package.json'); + const nodeModulesPath = path.join(moduleCacheDir, 'node_modules'); + if (await fs.pathExists(packageJsonPath)) { + // Install if node_modules doesn't exist, or if package.json is newer (dependencies changed) + const nodeModulesMissing = !(await fs.pathExists(nodeModulesPath)); + + // Force install if we updated or cloned new + if (needsDependencyInstall || wasNewClone || nodeModulesMissing) { + const installSpinner = await createSpinner(); + installSpinner.start(`Installing dependencies for ${moduleInfo.name}...`); + try { + execSync('npm install --omit=dev --no-audit --no-fund --no-progress --legacy-peer-deps', { + cwd: moduleCacheDir, + stdio: ['ignore', 'pipe', 'pipe'], + timeout: 120_000, // 2 minute timeout + }); + installSpinner.stop(`Installed dependencies for ${moduleInfo.name}`); + } catch (error) { + installSpinner.error(`Failed to install dependencies for ${moduleInfo.name}`); + if (!silent) await prompts.log.warn(` ${error.message}`); + } + } else { + // Check if package.json is newer than node_modules + let packageJsonNewer = false; + try { + const packageStats = await fs.stat(packageJsonPath); + const nodeModulesStats = await fs.stat(nodeModulesPath); + packageJsonNewer = packageStats.mtime > nodeModulesStats.mtime; + } catch { + // If stat fails, assume we need to install + packageJsonNewer = true; + } + + if (packageJsonNewer) { + const installSpinner = await createSpinner(); + installSpinner.start(`Installing dependencies for ${moduleInfo.name}...`); + try { + execSync('npm install --omit=dev --no-audit --no-fund --no-progress --legacy-peer-deps', { + cwd: moduleCacheDir, + stdio: ['ignore', 'pipe', 'pipe'], + timeout: 120_000, // 2 minute timeout + }); + installSpinner.stop(`Installed dependencies for ${moduleInfo.name}`); + } catch (error) { + installSpinner.error(`Failed to install dependencies for ${moduleInfo.name}`); + if (!silent) await prompts.log.warn(` ${error.message}`); + } + } + } + } + + return moduleCacheDir; + } + + /** + * Find the source path for an external module + * @param {string} moduleCode - Code of the external module + * @param {Object} options - Options passed to cloneExternalModule + * @returns {string|null} Path to the module source or null if not found + */ + async findExternalModuleSource(moduleCode, options = {}) { + const moduleInfo = await this.getModuleByCode(moduleCode); + + if (!moduleInfo) { + return null; + } + + // Clone the external module repo + const cloneDir = await this.cloneExternalModule(moduleCode, options); + + // The module-definition specifies the path to module.yaml relative to repo root + // We need to return the directory containing module.yaml + const moduleDefinitionPath = moduleInfo.moduleDefinition; // e.g., 'src/module.yaml' + const moduleDir = path.dirname(path.join(cloneDir, moduleDefinitionPath)); + + return moduleDir; + } +} + +module.exports = { ExternalModuleManager }; diff --git a/tools/cli/installers/lib/core/config-collector.js b/tools/installer/modules/official-modules.js similarity index 64% rename from tools/cli/installers/lib/core/config-collector.js rename to tools/installer/modules/official-modules.js index 665c7957a..5b67fc4dd 100644 --- a/tools/cli/installers/lib/core/config-collector.js +++ b/tools/installer/modules/official-modules.js @@ -1,30 +1,701 @@ const path = require('node:path'); const fs = require('fs-extra'); const yaml = require('yaml'); -const { getProjectRoot, getModulePath } = require('../../../lib/project-root'); -const { CLIUtils } = require('../../../lib/cli-utils'); -const prompts = require('../../../lib/prompts'); +const prompts = require('../prompts'); +const { getProjectRoot, getSourcePath, getModulePath } = require('../project-root'); +const { CLIUtils } = require('../cli-utils'); +const { ExternalModuleManager } = require('./external-manager'); -class ConfigCollector { - constructor() { +class OfficialModules { + constructor(options = {}) { + this.externalModuleManager = new ExternalModuleManager(); + // Config collection state (merged from ConfigCollector) this.collectedConfig = {}; - this.existingConfig = null; + this._existingConfig = null; this.currentProjectDir = null; - this._moduleManagerInstance = null; } /** - * Get or create a cached ModuleManager instance (lazy initialization) - * @returns {Object} ModuleManager instance + * Module configurations collected during install. */ - _getModuleManager() { - if (!this._moduleManagerInstance) { - const { ModuleManager } = require('../modules/manager'); - this._moduleManagerInstance = new ModuleManager(); - } - return this._moduleManagerInstance; + get moduleConfigs() { + return this.collectedConfig; } + /** + * Existing module configurations read from a previous installation. + */ + get existingConfig() { + return this._existingConfig; + } + + /** + * Build a configured OfficialModules instance from install config. + * @param {Object} config - Clean install config (from Config.build) + * @param {Object} paths - InstallPaths instance + * @returns {OfficialModules} + */ + static async build(config, paths) { + const instance = new OfficialModules(); + + // Pre-collected by UI or quickUpdate — store and load existing for path-change detection + if (config.moduleConfigs) { + instance.collectedConfig = config.moduleConfigs; + await instance.loadExistingConfig(paths.projectRoot); + return instance; + } + + // Headless collection (--yes flag from CLI without UI, tests) + if (config.hasCoreConfig()) { + instance.collectedConfig.core = config.coreConfig; + instance.allAnswers = {}; + for (const [key, value] of Object.entries(config.coreConfig)) { + instance.allAnswers[`core_${key}`] = value; + } + } + + const toCollect = config.hasCoreConfig() ? config.modules.filter((m) => m !== 'core') : [...config.modules]; + + await instance.collectAllConfigurations(toCollect, paths.projectRoot, { + skipPrompts: config.skipPrompts, + }); + + return instance; + } + + /** + * Copy a file to the target location + * @param {string} sourcePath - Source file path + * @param {string} targetPath - Target file path + * @param {boolean} overwrite - Whether to overwrite existing files (default: true) + */ + async copyFile(sourcePath, targetPath, overwrite = true) { + await fs.copy(sourcePath, targetPath, { overwrite }); + } + + /** + * Copy a directory recursively + * @param {string} sourceDir - Source directory path + * @param {string} targetDir - Target directory path + * @param {boolean} overwrite - Whether to overwrite existing files (default: true) + */ + async copyDirectory(sourceDir, targetDir, overwrite = true) { + await fs.ensureDir(targetDir); + const entries = await fs.readdir(sourceDir, { withFileTypes: true }); + + for (const entry of entries) { + const sourcePath = path.join(sourceDir, entry.name); + const targetPath = path.join(targetDir, entry.name); + + if (entry.isDirectory()) { + await this.copyDirectory(sourcePath, targetPath, overwrite); + } else { + await this.copyFile(sourcePath, targetPath, overwrite); + } + } + } + + /** + * List all available built-in modules (core and bmm). + * All other modules come from external-official-modules.yaml + * @returns {Object} Object with modules array and customModules array + */ + async listAvailable() { + const modules = []; + const customModules = []; + + // Add built-in core module (directly under src/core-skills) + const corePath = getSourcePath('core-skills'); + if (await fs.pathExists(corePath)) { + const coreInfo = await this.getModuleInfo(corePath, 'core', 'src/core-skills'); + if (coreInfo) { + modules.push(coreInfo); + } + } + + // Add built-in bmm module (directly under src/bmm-skills) + const bmmPath = getSourcePath('bmm-skills'); + if (await fs.pathExists(bmmPath)) { + const bmmInfo = await this.getModuleInfo(bmmPath, 'bmm', 'src/bmm-skills'); + if (bmmInfo) { + modules.push(bmmInfo); + } + } + + return { modules, customModules }; + } + + /** + * Get module information from a module path + * @param {string} modulePath - Path to the module directory + * @param {string} defaultName - Default name for the module + * @param {string} sourceDescription - Description of where the module was found + * @returns {Object|null} Module info or null if not a valid module + */ + async getModuleInfo(modulePath, defaultName, sourceDescription) { + // Check for module structure (module.yaml OR custom.yaml) + const moduleConfigPath = path.join(modulePath, 'module.yaml'); + const rootCustomConfigPath = path.join(modulePath, 'custom.yaml'); + let configPath = null; + + if (await fs.pathExists(moduleConfigPath)) { + configPath = moduleConfigPath; + } else if (await fs.pathExists(rootCustomConfigPath)) { + configPath = rootCustomConfigPath; + } + + // Skip if this doesn't look like a module + if (!configPath) { + return null; + } + + // Mark as custom if it's using custom.yaml OR if it's outside src/bmm or src/core + const isCustomSource = + sourceDescription !== 'src/bmm-skills' && sourceDescription !== 'src/core-skills' && sourceDescription !== 'src/modules'; + const moduleInfo = { + id: defaultName, + path: modulePath, + name: defaultName + .split('-') + .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) + .join(' '), + description: 'BMAD Module', + version: '5.0.0', + source: sourceDescription, + isCustom: configPath === rootCustomConfigPath || isCustomSource, + }; + + // Read module config for metadata + try { + const configContent = await fs.readFile(configPath, 'utf8'); + const config = yaml.parse(configContent); + + // Use the code property as the id if available + if (config.code) { + moduleInfo.id = config.code; + } + + moduleInfo.name = config.name || moduleInfo.name; + moduleInfo.description = config.description || moduleInfo.description; + moduleInfo.version = config.version || moduleInfo.version; + moduleInfo.dependencies = config.dependencies || []; + moduleInfo.defaultSelected = config.default_selected === undefined ? false : config.default_selected; + } catch (error) { + await prompts.log.warn(`Failed to read config for ${defaultName}: ${error.message}`); + } + + return moduleInfo; + } + + /** + * Find the source path for a module by searching all possible locations + * @param {string} moduleCode - Code of the module to find (from module.yaml) + * @returns {string|null} Path to the module source or null if not found + */ + async findModuleSource(moduleCode, options = {}) { + const projectRoot = getProjectRoot(); + + // Check for core module (directly under src/core-skills) + if (moduleCode === 'core') { + const corePath = getSourcePath('core-skills'); + if (await fs.pathExists(corePath)) { + return corePath; + } + } + + // Check for built-in bmm module (directly under src/bmm-skills) + if (moduleCode === 'bmm') { + const bmmPath = getSourcePath('bmm-skills'); + if (await fs.pathExists(bmmPath)) { + return bmmPath; + } + } + + // Check external official modules + const externalSource = await this.externalModuleManager.findExternalModuleSource(moduleCode, options); + if (externalSource) { + return externalSource; + } + + return null; + } + + /** + * Install a module + * @param {string} moduleName - Code of the module to install (from module.yaml) + * @param {string} bmadDir - Target bmad directory + * @param {Function} fileTrackingCallback - Optional callback to track installed files + * @param {Object} options - Additional installation options + * @param {Array} options.installedIDEs - Array of IDE codes that were installed + * @param {Object} options.moduleConfig - Module configuration from config collector + * @param {Object} options.logger - Logger instance for output + */ + async install(moduleName, bmadDir, fileTrackingCallback = null, options = {}) { + const sourcePath = await this.findModuleSource(moduleName, { silent: options.silent }); + const targetPath = path.join(bmadDir, moduleName); + + if (!sourcePath) { + throw new Error( + `Source for module '${moduleName}' is not available. It will be retained but cannot be updated without its source files.`, + ); + } + + if (await fs.pathExists(targetPath)) { + await fs.remove(targetPath); + } + + await this.copyModuleWithFiltering(sourcePath, targetPath, fileTrackingCallback, options.moduleConfig); + + if (!options.skipModuleInstaller) { + await this.createModuleDirectories(moduleName, bmadDir, options); + } + + const { Manifest } = require('../core/manifest'); + const manifestObj = new Manifest(); + const versionInfo = await manifestObj.getModuleVersionInfo(moduleName, bmadDir, sourcePath); + + await manifestObj.addModule(bmadDir, moduleName, { + version: versionInfo.version, + source: versionInfo.source, + npmPackage: versionInfo.npmPackage, + repoUrl: versionInfo.repoUrl, + }); + + return { success: true, module: moduleName, path: targetPath, versionInfo }; + } + + /** + * Update an existing module + * @param {string} moduleName - Name of the module to update + * @param {string} bmadDir - Target bmad directory + */ + async update(moduleName, bmadDir) { + const sourcePath = await this.findModuleSource(moduleName); + const targetPath = path.join(bmadDir, moduleName); + + if (!sourcePath) { + throw new Error(`Module '${moduleName}' not found in any source location`); + } + + if (!(await fs.pathExists(targetPath))) { + throw new Error(`Module '${moduleName}' is not installed`); + } + + await this.syncModule(sourcePath, targetPath); + + return { + success: true, + module: moduleName, + path: targetPath, + }; + } + + /** + * Remove a module + * @param {string} moduleName - Name of the module to remove + * @param {string} bmadDir - Target bmad directory + */ + async remove(moduleName, bmadDir) { + const targetPath = path.join(bmadDir, moduleName); + + if (!(await fs.pathExists(targetPath))) { + throw new Error(`Module '${moduleName}' is not installed`); + } + + await fs.remove(targetPath); + + return { + success: true, + module: moduleName, + }; + } + + /** + * Check if a module is installed + * @param {string} moduleName - Name of the module + * @param {string} bmadDir - Target bmad directory + * @returns {boolean} True if module is installed + */ + async isInstalled(moduleName, bmadDir) { + const targetPath = path.join(bmadDir, moduleName); + return await fs.pathExists(targetPath); + } + + /** + * Get installed module info + * @param {string} moduleName - Name of the module + * @param {string} bmadDir - Target bmad directory + * @returns {Object|null} Module info or null if not installed + */ + async getInstalledInfo(moduleName, bmadDir) { + const targetPath = path.join(bmadDir, moduleName); + + if (!(await fs.pathExists(targetPath))) { + return null; + } + + const configPath = path.join(targetPath, 'config.yaml'); + const moduleInfo = { + id: moduleName, + path: targetPath, + installed: true, + }; + + if (await fs.pathExists(configPath)) { + try { + const configContent = await fs.readFile(configPath, 'utf8'); + const config = yaml.parse(configContent); + Object.assign(moduleInfo, config); + } catch (error) { + await prompts.log.warn(`Failed to read installed module config: ${error.message}`); + } + } + + return moduleInfo; + } + + /** + * Copy module with filtering for localskip agents and conditional content + * @param {string} sourcePath - Source module path + * @param {string} targetPath - Target module path + * @param {Function} fileTrackingCallback - Optional callback to track installed files + * @param {Object} moduleConfig - Module configuration with conditional flags + */ + async copyModuleWithFiltering(sourcePath, targetPath, fileTrackingCallback = null, moduleConfig = {}) { + // Get all files in source + const sourceFiles = await this.getFileList(sourcePath); + + for (const file of sourceFiles) { + // Skip sub-modules directory - these are IDE-specific and handled separately + if (file.startsWith('sub-modules/')) { + continue; + } + + // Skip sidecar directories - these contain agent-specific assets not needed at install time + const isInSidecarDirectory = path + .dirname(file) + .split('/') + .some((dir) => dir.toLowerCase().endsWith('-sidecar')); + + if (isInSidecarDirectory) { + continue; + } + + // Skip module.yaml at root - it's only needed at install time + if (file === 'module.yaml') { + continue; + } + + // Skip module root config.yaml only - generated by config collector with actual values + // Workflow-level config.yaml (e.g. workflows/orchestrate-story/config.yaml) must be copied + // for custom modules that use workflow-specific configuration + if (file === 'config.yaml') { + continue; + } + + const sourceFile = path.join(sourcePath, file); + const targetFile = path.join(targetPath, file); + + // Check if this is an agent file + if (file.startsWith('agents/') && file.endsWith('.md')) { + // Read the file to check for localskip + const content = await fs.readFile(sourceFile, 'utf8'); + + // Check for localskip="true" in the agent tag + const agentMatch = content.match(/]*\slocalskip="true"[^>]*>/); + if (agentMatch) { + await prompts.log.message(` Skipping web-only agent: ${path.basename(file)}`); + continue; // Skip this agent + } + } + + // Copy the file with placeholder replacement + await this.copyFile(sourceFile, targetFile); + + // Track the file if callback provided + if (fileTrackingCallback) { + fileTrackingCallback(targetFile); + } + } + } + + /** + * Find all .md agent files recursively in a directory + * @param {string} dir - Directory to search + * @returns {Array} List of .md agent file paths + */ + async findAgentMdFiles(dir) { + const agentFiles = []; + + async function searchDirectory(searchDir) { + const entries = await fs.readdir(searchDir, { withFileTypes: true }); + + for (const entry of entries) { + const fullPath = path.join(searchDir, entry.name); + + if (entry.isFile() && entry.name.endsWith('.md')) { + agentFiles.push(fullPath); + } else if (entry.isDirectory()) { + await searchDirectory(fullPath); + } + } + } + + await searchDirectory(dir); + return agentFiles; + } + + /** + * Create directories declared in module.yaml's `directories` key + * This replaces the security-risky module installer pattern with declarative config + * During updates, if a directory path changed, moves the old directory to the new path + * @param {string} moduleName - Name of the module + * @param {string} bmadDir - Target bmad directory + * @param {Object} options - Installation options + * @param {Object} options.moduleConfig - Module configuration from config collector + * @param {Object} options.existingModuleConfig - Previous module config (for detecting path changes during updates) + * @param {Object} options.coreConfig - Core configuration + * @returns {Promise<{createdDirs: string[], movedDirs: string[], createdWdsFolders: string[]}>} Created directories info + */ + async createModuleDirectories(moduleName, bmadDir, options = {}) { + const moduleConfig = options.moduleConfig || {}; + const existingModuleConfig = options.existingModuleConfig || {}; + const projectRoot = path.dirname(bmadDir); + const emptyResult = { createdDirs: [], movedDirs: [], createdWdsFolders: [] }; + + // Special handling for core module - it's in src/core-skills not src/modules + let sourcePath; + if (moduleName === 'core') { + sourcePath = getSourcePath('core-skills'); + } else { + sourcePath = await this.findModuleSource(moduleName, { silent: true }); + if (!sourcePath) { + return emptyResult; // No source found, skip + } + } + + // Read module.yaml to find the `directories` key + const moduleYamlPath = path.join(sourcePath, 'module.yaml'); + if (!(await fs.pathExists(moduleYamlPath))) { + return emptyResult; // No module.yaml, skip + } + + let moduleYaml; + try { + const yamlContent = await fs.readFile(moduleYamlPath, 'utf8'); + moduleYaml = yaml.parse(yamlContent); + } catch (error) { + await prompts.log.warn(`Invalid module.yaml for ${moduleName}: ${error.message}`); + return emptyResult; + } + + if (!moduleYaml || !moduleYaml.directories) { + return emptyResult; // No directories declared, skip + } + + const directories = moduleYaml.directories; + const wdsFolders = moduleYaml.wds_folders || []; + const createdDirs = []; + const movedDirs = []; + const createdWdsFolders = []; + + for (const dirRef of directories) { + // Parse variable reference like "{design_artifacts}" + const varMatch = dirRef.match(/^\{([^}]+)\}$/); + if (!varMatch) { + // Not a variable reference, skip + continue; + } + + const configKey = varMatch[1]; + const dirValue = moduleConfig[configKey]; + if (!dirValue || typeof dirValue !== 'string') { + continue; // No value or not a string, skip + } + + // Strip {project-root}/ prefix if present + let dirPath = dirValue.replace(/^\{project-root\}\/?/, ''); + + // Handle remaining {project-root} anywhere in the path + dirPath = dirPath.replaceAll('{project-root}', ''); + + // Resolve to absolute path + const fullPath = path.join(projectRoot, dirPath); + + // Validate path is within project root (prevent directory traversal) + const normalizedPath = path.normalize(fullPath); + const normalizedRoot = path.normalize(projectRoot); + if (!normalizedPath.startsWith(normalizedRoot + path.sep) && normalizedPath !== normalizedRoot) { + const color = await prompts.getColor(); + await prompts.log.warn(color.yellow(`${configKey} path escapes project root, skipping: ${dirPath}`)); + continue; + } + + // Check if directory path changed from previous config (update/modify scenario) + const oldDirValue = existingModuleConfig[configKey]; + let oldFullPath = null; + let oldDirPath = null; + if (oldDirValue && typeof oldDirValue === 'string') { + // F3: Normalize both values before comparing to avoid false negatives + // from trailing slashes, separator differences, or prefix format variations + let normalizedOld = oldDirValue.replace(/^\{project-root\}\/?/, ''); + normalizedOld = path.normalize(normalizedOld.replaceAll('{project-root}', '')); + const normalizedNew = path.normalize(dirPath); + + if (normalizedOld !== normalizedNew) { + oldDirPath = normalizedOld; + oldFullPath = path.join(projectRoot, oldDirPath); + const normalizedOldAbsolute = path.normalize(oldFullPath); + if (!normalizedOldAbsolute.startsWith(normalizedRoot + path.sep) && normalizedOldAbsolute !== normalizedRoot) { + oldFullPath = null; // Old path escapes project root, ignore it + } + + // F13: Prevent parent/child move (e.g. docs/planning → docs/planning/v2) + if (oldFullPath) { + const normalizedNewAbsolute = path.normalize(fullPath); + if ( + normalizedOldAbsolute.startsWith(normalizedNewAbsolute + path.sep) || + normalizedNewAbsolute.startsWith(normalizedOldAbsolute + path.sep) + ) { + const color = await prompts.getColor(); + await prompts.log.warn( + color.yellow( + `${configKey}: cannot move between parent/child paths (${oldDirPath} / ${dirPath}), creating new directory instead`, + ), + ); + oldFullPath = null; + } + } + } + } + + const dirName = configKey.replaceAll('_', ' '); + + if (oldFullPath && (await fs.pathExists(oldFullPath)) && !(await fs.pathExists(fullPath))) { + // Path changed and old dir exists → move old to new location + // F1: Use fs.move() instead of fs.rename() for cross-device/volume support + // F2: Wrap in try/catch — fallback to creating new dir on failure + try { + await fs.ensureDir(path.dirname(fullPath)); + await fs.move(oldFullPath, fullPath); + movedDirs.push(`${dirName}: ${oldDirPath} → ${dirPath}`); + } catch (moveError) { + const color = await prompts.getColor(); + await prompts.log.warn( + color.yellow( + `Failed to move ${oldDirPath} → ${dirPath}: ${moveError.message}\n Creating new directory instead. Please move contents from the old directory manually.`, + ), + ); + await fs.ensureDir(fullPath); + createdDirs.push(`${dirName}: ${dirPath}`); + } + } else if (oldFullPath && (await fs.pathExists(oldFullPath)) && (await fs.pathExists(fullPath))) { + // F5: Both old and new directories exist — warn user about potential orphaned documents + const color = await prompts.getColor(); + await prompts.log.warn( + color.yellow( + `${dirName}: path changed but both directories exist:\n Old: ${oldDirPath}\n New: ${dirPath}\n Old directory may contain orphaned documents — please review and merge manually.`, + ), + ); + } else if (!(await fs.pathExists(fullPath))) { + // New directory doesn't exist yet → create it + createdDirs.push(`${dirName}: ${dirPath}`); + await fs.ensureDir(fullPath); + } + + // Create WDS subfolders if this is the design_artifacts directory + if (configKey === 'design_artifacts' && wdsFolders.length > 0) { + for (const subfolder of wdsFolders) { + const subPath = path.join(fullPath, subfolder); + if (!(await fs.pathExists(subPath))) { + await fs.ensureDir(subPath); + createdWdsFolders.push(subfolder); + } + } + } + } + + return { createdDirs, movedDirs, createdWdsFolders }; + } + + /** + * Private: Process module configuration + * @param {string} modulePath - Path to installed module + * @param {string} moduleName - Module name + */ + async processModuleConfig(modulePath, moduleName) { + const configPath = path.join(modulePath, 'config.yaml'); + + if (await fs.pathExists(configPath)) { + try { + let configContent = await fs.readFile(configPath, 'utf8'); + + // Replace path placeholders + configContent = configContent.replaceAll('{project-root}', `bmad/${moduleName}`); + configContent = configContent.replaceAll('{module}', moduleName); + + await fs.writeFile(configPath, configContent, 'utf8'); + } catch (error) { + await prompts.log.warn(`Failed to process module config: ${error.message}`); + } + } + } + + /** + * Private: Sync module files (preserving user modifications) + * @param {string} sourcePath - Source module path + * @param {string} targetPath - Target module path + */ + async syncModule(sourcePath, targetPath) { + // Get list of all source files + const sourceFiles = await this.getFileList(sourcePath); + + for (const file of sourceFiles) { + const sourceFile = path.join(sourcePath, file); + const targetFile = path.join(targetPath, file); + + // Check if target file exists and has been modified + if (await fs.pathExists(targetFile)) { + const sourceStats = await fs.stat(sourceFile); + const targetStats = await fs.stat(targetFile); + + // Skip if target is newer (user modified) + if (targetStats.mtime > sourceStats.mtime) { + continue; + } + } + + // Copy file with placeholder replacement + await this.copyFile(sourceFile, targetFile); + } + } + + /** + * Private: Get list of all files in a directory + * @param {string} dir - Directory path + * @param {string} baseDir - Base directory for relative paths + * @returns {Array} List of relative file paths + */ + async getFileList(dir, baseDir = dir) { + const files = []; + const entries = await fs.readdir(dir, { withFileTypes: true }); + + for (const entry of entries) { + const fullPath = path.join(dir, entry.name); + + if (entry.isDirectory()) { + const subFiles = await this.getFileList(fullPath, baseDir); + files.push(...subFiles); + } else { + files.push(path.relative(baseDir, fullPath)); + } + } + + return files; + } + + // ─── Config collection methods (merged from ConfigCollector) ─── + /** * Find the bmad installation directory in a project * V6+ installations can use ANY folder name but ALWAYS have _config/manifest.yaml @@ -95,7 +766,7 @@ class ConfigCollector { * @param {string} projectDir - Target project directory */ async loadExistingConfig(projectDir) { - this.existingConfig = {}; + this._existingConfig = {}; // Check if project directory exists first if (!(await fs.pathExists(projectDir))) { @@ -129,7 +800,7 @@ class ConfigCollector { const content = await fs.readFile(moduleConfigPath, 'utf8'); const moduleConfig = yaml.parse(content); if (moduleConfig) { - this.existingConfig[entry.name] = moduleConfig; + this._existingConfig[entry.name] = moduleConfig; foundAny = true; } } catch { @@ -153,7 +824,7 @@ class ConfigCollector { const results = []; for (const moduleName of modules) { - // Resolve module.yaml path - custom paths first, then standard location, then ModuleManager search + // Resolve module.yaml path - custom paths first, then standard location, then OfficialModules search let moduleConfigPath = null; const customPath = this.customModulePaths?.get(moduleName); if (customPath) { @@ -163,7 +834,7 @@ class ConfigCollector { if (await fs.pathExists(standardPath)) { moduleConfigPath = standardPath; } else { - const moduleSourcePath = await this._getModuleManager().findModuleSource(moduleName, { silent: true }); + const moduleSourcePath = await this.findModuleSource(moduleName, { silent: true }); if (moduleSourcePath) { moduleConfigPath = path.join(moduleSourcePath, 'module.yaml'); } @@ -349,7 +1020,7 @@ class ConfigCollector { this.currentProjectDir = projectDir; // Load existing config if not already loaded - if (!this.existingConfig) { + if (!this._existingConfig) { await this.loadExistingConfig(projectDir); } @@ -364,7 +1035,7 @@ class ConfigCollector { // If not found in src/modules, we need to find it by searching the project if (!(await fs.pathExists(moduleConfigPath))) { - const moduleSourcePath = await this._getModuleManager().findModuleSource(moduleName, { silent: true }); + const moduleSourcePath = await this.findModuleSource(moduleName, { silent: true }); if (moduleSourcePath) { moduleConfigPath = path.join(moduleSourcePath, 'module.yaml'); @@ -378,7 +1049,7 @@ class ConfigCollector { configPath = moduleConfigPath; } else { // Check if this is a custom module with custom.yaml - const moduleSourcePath = await this._getModuleManager().findModuleSource(moduleName, { silent: true }); + const moduleSourcePath = await this.findModuleSource(moduleName, { silent: true }); if (moduleSourcePath) { const rootCustomConfigPath = path.join(moduleSourcePath, 'custom.yaml'); @@ -391,11 +1062,11 @@ class ConfigCollector { } // No config schema for this module - use existing values - if (this.existingConfig && this.existingConfig[moduleName]) { + if (this._existingConfig && this._existingConfig[moduleName]) { if (!this.collectedConfig[moduleName]) { this.collectedConfig[moduleName] = {}; } - this.collectedConfig[moduleName] = { ...this.existingConfig[moduleName] }; + this.collectedConfig[moduleName] = { ...this._existingConfig[moduleName] }; } return false; } @@ -409,7 +1080,7 @@ class ConfigCollector { // Compare schema with existing config to find new/missing fields const configKeys = Object.keys(moduleConfig).filter((key) => key !== 'prompt'); - const existingKeys = this.existingConfig && this.existingConfig[moduleName] ? Object.keys(this.existingConfig[moduleName]) : []; + const existingKeys = this._existingConfig && this._existingConfig[moduleName] ? Object.keys(this._existingConfig[moduleName]) : []; // Check if this module has no configuration keys at all (like CIS) // Filter out metadata fields and only count actual config objects @@ -440,11 +1111,11 @@ class ConfigCollector { // If in silent mode and no new keys (neither interactive nor static), use existing config and skip prompts if (silentMode && newKeys.length === 0 && newStaticKeys.length === 0) { - if (this.existingConfig && this.existingConfig[moduleName]) { + if (this._existingConfig && this._existingConfig[moduleName]) { if (!this.collectedConfig[moduleName]) { this.collectedConfig[moduleName] = {}; } - this.collectedConfig[moduleName] = { ...this.existingConfig[moduleName] }; + this.collectedConfig[moduleName] = { ...this._existingConfig[moduleName] }; // Special handling for user_name: ensure it has a value if ( @@ -455,7 +1126,7 @@ class ConfigCollector { } // Also populate allAnswers for cross-referencing - for (const [key, value] of Object.entries(this.existingConfig[moduleName])) { + for (const [key, value] of Object.entries(this._existingConfig[moduleName])) { // Ensure user_name is properly set in allAnswers too let finalValue = value; if (moduleName === 'core' && key === 'user_name' && (!value || value === '[USER_NAME]')) { @@ -519,8 +1190,8 @@ class ConfigCollector { // Process all answers (both static and prompted) // First, copy existing config to preserve values that aren't being updated - if (this.existingConfig && this.existingConfig[moduleName]) { - this.collectedConfig[moduleName] = { ...this.existingConfig[moduleName] }; + if (this._existingConfig && this._existingConfig[moduleName]) { + this.collectedConfig[moduleName] = { ...this._existingConfig[moduleName] }; } else { this.collectedConfig[moduleName] = {}; } @@ -545,11 +1216,11 @@ class ConfigCollector { } // Copy over existing values for fields that weren't prompted - if (this.existingConfig && this.existingConfig[moduleName]) { + if (this._existingConfig && this._existingConfig[moduleName]) { if (!this.collectedConfig[moduleName]) { this.collectedConfig[moduleName] = {}; } - for (const [key, value] of Object.entries(this.existingConfig[moduleName])) { + for (const [key, value] of Object.entries(this._existingConfig[moduleName])) { if (!this.collectedConfig[moduleName][key]) { this.collectedConfig[moduleName][key] = value; this.allAnswers[`${moduleName}_${key}`] = value; @@ -652,7 +1323,7 @@ class ConfigCollector { async collectModuleConfig(moduleName, projectDir, skipLoadExisting = false, skipCompletion = false) { this.currentProjectDir = projectDir; // Load existing config if needed and not already loaded - if (!skipLoadExisting && !this.existingConfig) { + if (!skipLoadExisting && !this._existingConfig) { await this.loadExistingConfig(projectDir); } @@ -674,7 +1345,7 @@ class ConfigCollector { // If not found in src/modules or custom paths, search the project if (!(await fs.pathExists(moduleConfigPath))) { - const moduleSourcePath = await this._getModuleManager().findModuleSource(moduleName, { silent: true }); + const moduleSourcePath = await this.findModuleSource(moduleName, { silent: true }); if (moduleSourcePath) { moduleConfigPath = path.join(moduleSourcePath, 'module.yaml'); @@ -994,8 +1665,8 @@ class ConfigCollector { } // Prefer the current module's persisted value when re-prompting an existing install - if (!configValue && currentModule && this.existingConfig?.[currentModule]?.[configKey] !== undefined) { - configValue = this.existingConfig[currentModule][configKey]; + if (!configValue && currentModule && this._existingConfig?.[currentModule]?.[configKey] !== undefined) { + configValue = this._existingConfig[currentModule][configKey]; } // Check in already collected config @@ -1009,10 +1680,10 @@ class ConfigCollector { } // Fall back to other existing module config values - if (!configValue && this.existingConfig) { - for (const mod of Object.keys(this.existingConfig)) { - if (mod !== '_meta' && this.existingConfig[mod] && this.existingConfig[mod][configKey]) { - configValue = this.existingConfig[mod][configKey]; + if (!configValue && this._existingConfig) { + for (const mod of Object.keys(this._existingConfig)) { + if (mod !== '_meta' && this._existingConfig[mod] && this._existingConfig[mod][configKey]) { + configValue = this._existingConfig[mod][configKey]; break; } } @@ -1083,8 +1754,8 @@ class ConfigCollector { // Check for existing value let existingValue = null; - if (this.existingConfig && this.existingConfig[moduleName]) { - existingValue = this.existingConfig[moduleName][key]; + if (this._existingConfig && this._existingConfig[moduleName]) { + existingValue = this._existingConfig[moduleName][key]; existingValue = this.normalizeExistingValueForPrompt(existingValue, moduleName, item, moduleConfig); } @@ -1369,4 +2040,4 @@ class ConfigCollector { } } -module.exports = { ConfigCollector }; +module.exports = { OfficialModules }; diff --git a/tools/cli/lib/project-root.js b/tools/installer/project-root.js similarity index 100% rename from tools/cli/lib/project-root.js rename to tools/installer/project-root.js diff --git a/tools/cli/lib/prompts.js b/tools/installer/prompts.js similarity index 100% rename from tools/cli/lib/prompts.js rename to tools/installer/prompts.js diff --git a/tools/cli/lib/ui.js b/tools/installer/ui.js similarity index 81% rename from tools/cli/lib/ui.js rename to tools/installer/ui.js index 3f25dae03..03d38e4da 100644 --- a/tools/cli/lib/ui.js +++ b/tools/installer/ui.js @@ -2,8 +2,8 @@ const path = require('node:path'); const os = require('node:os'); const fs = require('fs-extra'); const { CLIUtils } = require('./cli-utils'); -const { CustomHandler } = require('../installers/lib/custom/handler'); -const { ExternalModuleManager } = require('../installers/lib/modules/external-manager'); +const { CustomHandler } = require('./custom-handler'); +const { ExternalModuleManager } = require('./modules/external-manager'); const prompts = require('./prompts'); // Separator class for visual grouping in select/multiselect prompts @@ -32,7 +32,7 @@ class UI { await CLIUtils.displayLogo(); // Display version-specific start message from install-messages.yaml - const { MessageLoader } = require('../installers/lib/message-loader'); + const { MessageLoader } = require('./message-loader'); const messageLoader = new MessageLoader(); await messageLoader.displayStartMessage(); @@ -51,125 +51,11 @@ class UI { confirmedDirectory = await this.getConfirmedDirectory(); } - // Preflight: Check for legacy BMAD v4 footprints immediately after getting directory - const { Detector } = require('../installers/lib/core/detector'); - const { Installer } = require('../installers/lib/core/installer'); - const detector = new Detector(); + const { Installer } = require('./core/installer'); const installer = new Installer(); - const legacyV4 = await detector.detectLegacyV4(confirmedDirectory); - if (legacyV4.hasLegacyV4) { - await installer.handleLegacyV4Migration(confirmedDirectory, legacyV4); - } + const { bmadDir } = await installer.findBmadDir(confirmedDirectory); - // Check for legacy folders and prompt for rename before showing any menus - let hasLegacyCfg = false; - let hasLegacyBmadFolder = false; - let bmadDir = null; - let legacyBmadPath = null; - - // First check for legacy .bmad folder (instead of _bmad) - // Only check if directory exists - if (await fs.pathExists(confirmedDirectory)) { - const entries = await fs.readdir(confirmedDirectory, { withFileTypes: true }); - for (const entry of entries) { - if (entry.isDirectory() && (entry.name === '.bmad' || entry.name === 'bmad')) { - hasLegacyBmadFolder = true; - legacyBmadPath = path.join(confirmedDirectory, entry.name); - bmadDir = legacyBmadPath; - - // Check if it has _cfg folder - const cfgPath = path.join(legacyBmadPath, '_cfg'); - if (await fs.pathExists(cfgPath)) { - hasLegacyCfg = true; - } - break; - } - } - } - - // If no .bmad or bmad found, check for current installations _bmad - if (!hasLegacyBmadFolder) { - const bmadResult = await installer.findBmadDir(confirmedDirectory); - bmadDir = bmadResult.bmadDir; - hasLegacyCfg = bmadResult.hasLegacyCfg; - } - - // Handle legacy .bmad or _cfg folder - these are very old (v4 or alpha) - // Show version warning instead of offering conversion - if (hasLegacyBmadFolder || hasLegacyCfg) { - await prompts.log.warn('LEGACY INSTALLATION DETECTED'); - await prompts.note( - 'Found a ".bmad"/"bmad" folder, or a legacy "_cfg" folder under the bmad folder -\n' + - 'this is from an old BMAD version that is out of date for automatic upgrade,\n' + - 'manual intervention required.\n\n' + - 'You have a legacy version installed (v4 or alpha).\n' + - 'Legacy installations may have compatibility issues.\n\n' + - 'For the best experience, we strongly recommend:\n' + - ' 1. Delete your current BMAD installation folder (.bmad or bmad)\n' + - ' 2. Run a fresh installation\n\n' + - 'If you do not want to start fresh, you can attempt to proceed beyond this\n' + - 'point IF you have ensured the bmad folder is named _bmad, and under it there\n' + - 'is a _config folder. If you have a folder under your bmad folder named _cfg,\n' + - 'you would need to rename it _config, and then restart the installer.\n\n' + - 'Benefits of a fresh install:\n' + - ' \u2022 Cleaner configuration without legacy artifacts\n' + - ' \u2022 All new features properly configured\n' + - ' \u2022 Fewer potential conflicts\n\n' + - 'If you have already produced output from an earlier alpha version, you can\n' + - 'still retain those artifacts. After installation, ensure you configured during\n' + - 'install the proper file locations for artifacts depending on the module you\n' + - 'are using, or move the files to the proper locations.', - 'Legacy Installation Detected', - ); - - const proceed = await prompts.select({ - message: 'How would you like to proceed?', - choices: [ - { - name: 'Cancel and do a fresh install (recommended)', - value: 'cancel', - }, - { - name: 'Proceed anyway (will attempt update, potentially may fail or have unstable behavior)', - value: 'proceed', - }, - ], - default: 'cancel', - }); - - if (proceed === 'cancel') { - await prompts.note('1. Delete the existing bmad folder in your project\n' + "2. Run 'bmad install' again", 'To do a fresh install'); - process.exit(0); - return; - } - - const s = await prompts.spinner(); - s.start('Updating folder structure...'); - try { - // Handle .bmad folder - if (hasLegacyBmadFolder) { - const newBmadPath = path.join(confirmedDirectory, '_bmad'); - await fs.move(legacyBmadPath, newBmadPath); - bmadDir = newBmadPath; - s.stop(`Renamed "${path.basename(legacyBmadPath)}" to "_bmad"`); - } - - // Handle _cfg folder (either from .bmad or standalone) - const cfgPath = path.join(bmadDir, '_cfg'); - if (await fs.pathExists(cfgPath)) { - s.start('Renaming configuration folder...'); - const newCfgPath = path.join(bmadDir, '_config'); - await fs.move(cfgPath, newCfgPath); - s.stop('Renamed "_cfg" to "_config"'); - } - } catch (error) { - s.stop('Failed to update folder structure'); - await prompts.log.error(`Error: ${error.message}`); - process.exit(1); - } - } - - // Check if there's an existing BMAD installation (after any folder renames) + // Check if there's an existing BMAD installation const hasExistingInstall = await fs.pathExists(bmadDir); let customContentConfig = { hasCustomContent: false }; @@ -184,18 +70,9 @@ class UI { if (hasExistingInstall) { // Get version information const { existingInstall, bmadDir } = await this.getExistingInstallation(confirmedDirectory); - const packageJsonPath = path.join(__dirname, '../../../package.json'); + const packageJsonPath = path.join(__dirname, '../../package.json'); const currentVersion = require(packageJsonPath).version; - const installedVersion = existingInstall.version || 'unknown'; - - // Check if version is pre beta - const shouldProceed = await this.showLegacyVersionWarning(installedVersion, currentVersion, path.basename(bmadDir), options); - - // If user chose to cancel, exit the installer - if (!shouldProceed) { - process.exit(0); - return; - } + const installedVersion = existingInstall.installed ? existingInstall.version || 'unknown' : 'unknown'; // Build menu choices dynamically const choices = []; @@ -402,7 +279,7 @@ class UI { customModuleResult = await this.handleCustomModulesInModifyFlow(confirmedDirectory, selectedModules); } else { // Preserve existing custom modules if user doesn't want to modify them - const { Installer } = require('../installers/lib/core/installer'); + const { Installer } = require('./core/installer'); const installer = new Installer(); const { bmadDir } = await installer.findBmadDir(confirmedDirectory); @@ -423,22 +300,24 @@ class UI { selectedModules.push(...customModuleResult.selectedCustomModules); } - // Filter out core - it's always installed via installCore flag - selectedModules = selectedModules.filter((m) => m !== 'core'); + // Ensure core is in the modules list + if (!selectedModules.includes('core')) { + selectedModules.unshift('core'); + } // Get tool selection const toolSelection = await this.promptToolSelection(confirmedDirectory, options); - const coreConfig = await this.collectCoreConfig(confirmedDirectory, options); + const moduleConfigs = await this.collectModuleConfigs(confirmedDirectory, selectedModules, options); return { actionType: 'update', directory: confirmedDirectory, - installCore: true, modules: selectedModules, ides: toolSelection.ides, skipIde: toolSelection.skipIde, - coreConfig: coreConfig, + coreConfig: moduleConfigs.core || {}, + moduleConfigs: moduleConfigs, customContent: customModuleResult.customContentConfig, skipPrompts: options.yes || false, }; @@ -543,18 +422,21 @@ class UI { selectedModules.push(...customContentConfig.selectedModuleIds); } - selectedModules = selectedModules.filter((m) => m !== 'core'); + // Ensure core is in the modules list + if (!selectedModules.includes('core')) { + selectedModules.unshift('core'); + } let toolSelection = await this.promptToolSelection(confirmedDirectory, options); - const coreConfig = await this.collectCoreConfig(confirmedDirectory, options); + const moduleConfigs = await this.collectModuleConfigs(confirmedDirectory, selectedModules, options); return { actionType: 'install', directory: confirmedDirectory, - installCore: true, modules: selectedModules, ides: toolSelection.ides, skipIde: toolSelection.skipIde, - coreConfig: coreConfig, + coreConfig: moduleConfigs.core || {}, + moduleConfigs: moduleConfigs, customContent: customContentConfig, skipPrompts: options.yes || false, }; @@ -570,18 +452,15 @@ class UI { * @returns {Object} Tool configuration */ async promptToolSelection(projectDir, options = {}) { - // Check for existing configured IDEs - use findBmadDir to detect custom folder names - const { Detector } = require('../installers/lib/core/detector'); - const { Installer } = require('../installers/lib/core/installer'); - const detector = new Detector(); + const { ExistingInstall } = require('./core/existing-install'); + const { Installer } = require('./core/installer'); const installer = new Installer(); - const bmadResult = await installer.findBmadDir(projectDir || process.cwd()); - const bmadDir = bmadResult.bmadDir; - const existingInstall = await detector.detect(bmadDir); - const configuredIdes = existingInstall.ides || []; + const { bmadDir } = await installer.findBmadDir(projectDir || process.cwd()); + const existingInstall = await ExistingInstall.detect(bmadDir); + const configuredIdes = existingInstall.ides; // Get IDE manager to fetch available IDEs dynamically - const { IdeManager } = require('../installers/lib/ide/manager'); + const { IdeManager } = require('./ide/manager'); const ideManager = new IdeManager(); await ideManager.ensureInitialized(); // IMPORTANT: Must initialize before getting IDEs @@ -811,29 +690,29 @@ class UI { * @returns {Object} Object with existingInstall, installedModuleIds, and bmadDir */ async getExistingInstallation(directory) { - const { Detector } = require('../installers/lib/core/detector'); - const { Installer } = require('../installers/lib/core/installer'); - const detector = new Detector(); + const { ExistingInstall } = require('./core/existing-install'); + const { Installer } = require('./core/installer'); const installer = new Installer(); - const bmadDirResult = await installer.findBmadDir(directory); - const bmadDir = bmadDirResult.bmadDir; - const existingInstall = await detector.detect(bmadDir); - const installedModuleIds = new Set(existingInstall.modules.map((mod) => mod.id)); + const { bmadDir } = await installer.findBmadDir(directory); + const existingInstall = await ExistingInstall.detect(bmadDir); + const installedModuleIds = new Set(existingInstall.moduleIds); return { existingInstall, installedModuleIds, bmadDir }; } /** - * Collect core configuration + * Collect all module configurations (core + selected modules). + * All interactive prompting happens here in the UI layer. * @param {string} directory - Installation directory + * @param {string[]} modules - Modules to configure (including 'core') * @param {Object} options - Command-line options - * @returns {Object} Core configuration + * @returns {Object} Collected module configurations keyed by module name */ - async collectCoreConfig(directory, options = {}) { - const { ConfigCollector } = require('../installers/lib/core/config-collector'); - const configCollector = new ConfigCollector(); + async collectModuleConfigs(directory, modules, options = {}) { + const { OfficialModules } = require('./modules/official-modules'); + const configCollector = new OfficialModules(); - // If options are provided, set them directly + // Seed core config from CLI options if provided if (options.userName || options.communicationLanguage || options.documentOutputLanguage || options.outputFolder) { const coreConfig = {}; if (options.userName) { @@ -855,8 +734,6 @@ class UI { // Load existing config to merge with provided options await configCollector.loadExistingConfig(directory); - - // Merge provided options with existing config (or defaults) const existingConfig = configCollector.collectedConfig.core || {}; configCollector.collectedConfig.core = { ...existingConfig, ...coreConfig }; @@ -872,7 +749,6 @@ class UI { await configCollector.loadExistingConfig(directory); const existingConfig = configCollector.collectedConfig.core || {}; - // If no existing config, use defaults if (Object.keys(existingConfig).length === 0) { let safeUsername; try { @@ -889,16 +765,14 @@ class UI { }; await prompts.log.info('Using default configuration (--yes flag)'); } - } else { - // Load existing configs first if they exist - await configCollector.loadExistingConfig(directory); - // Now collect with existing values as defaults (false = don't skip loading, true = skip completion message) - await configCollector.collectModuleConfig('core', directory, false, true); } - const coreConfig = configCollector.collectedConfig.core; - // Ensure we always have a core config object, even if empty - return coreConfig || {}; + // Collect all module configs — core is skipped if already seeded above + await configCollector.collectAllConfigurations(modules, directory, { + skipPrompts: options.yes || false, + }); + + return configCollector.collectedConfig; } /** @@ -935,9 +809,9 @@ class UI { } // Add official modules - const { ModuleManager } = require('../installers/lib/modules/manager'); - const moduleManager = new ModuleManager(); - const { modules: availableModules, customModules: customModulesFromCache } = await moduleManager.listAvailable(); + const { OfficialModules } = require('./modules/official-modules'); + const officialModules = new OfficialModules(); + const { modules: availableModules, customModules: customModulesFromCache } = await officialModules.listAvailable(); // First, add all items to appropriate sections const allCustomModules = []; @@ -992,9 +866,9 @@ class UI { * @returns {Array} Selected module codes (excluding core) */ async selectAllModules(installedModuleIds = new Set()) { - const { ModuleManager } = require('../installers/lib/modules/manager'); - const moduleManager = new ModuleManager(); - const { modules: localModules } = await moduleManager.listAvailable(); + const { OfficialModules } = require('./modules/official-modules'); + const officialModulesSource = new OfficialModules(); + const { modules: localModules } = await officialModulesSource.listAvailable(); // Get external modules const externalManager = new ExternalModuleManager(); @@ -1069,7 +943,7 @@ class UI { maxItems: allOptions.length, }); - const result = selected ? selected.filter((m) => m !== 'core') : []; + const result = selected ? [...selected] : []; // Display selected modules as bulleted list if (result.length > 0) { @@ -1089,9 +963,9 @@ class UI { * @returns {Array} Default module codes */ async getDefaultModules(installedModuleIds = new Set()) { - const { ModuleManager } = require('../installers/lib/modules/manager'); - const moduleManager = new ModuleManager(); - const { modules: localModules } = await moduleManager.listAvailable(); + const { OfficialModules } = require('./modules/official-modules'); + const officialModules = new OfficialModules(); + const { modules: localModules } = await officialModules.listAvailable(); const defaultModules = []; @@ -1149,7 +1023,7 @@ class UI { const files = await fs.readdir(directory); if (files.length > 0) { // Check for any bmad installation (any folder with _config/manifest.yaml) - const { Installer } = require('../installers/lib/core/installer'); + const { Installer } = require('./core/installer'); const installer = new Installer(); const bmadResult = await installer.findBmadDir(directory); const hasBmadInstall = @@ -1385,50 +1259,18 @@ class UI { return path.resolve(expanded); } - /** - * Load existing configurations to use as defaults - * @param {string} directory - Installation directory - * @returns {Object} Existing configurations - */ - async loadExistingConfigurations(directory) { - const configs = { - hasCustomContent: false, - coreConfig: {}, - ideConfig: { ides: [], skipIde: false }, - }; - - try { - // Load core config - configs.coreConfig = await this.collectCoreConfig(directory); - - // Load IDE configuration - const configuredIdes = await this.getConfiguredIdes(directory); - if (configuredIdes.length > 0) { - configs.ideConfig.ides = configuredIdes; - configs.ideConfig.skipIde = false; - } - - return configs; - } catch { - // If loading fails, return empty configs - await prompts.log.warn('Could not load existing configurations'); - return configs; - } - } - /** * Get configured IDEs from existing installation * @param {string} directory - Installation directory * @returns {Array} List of configured IDEs */ async getConfiguredIdes(directory) { - const { Detector } = require('../installers/lib/core/detector'); - const { Installer } = require('../installers/lib/core/installer'); - const detector = new Detector(); + const { ExistingInstall } = require('./core/existing-install'); + const { Installer } = require('./core/installer'); const installer = new Installer(); - const bmadResult = await installer.findBmadDir(directory); - const existingInstall = await detector.detect(bmadResult.bmadDir); - return existingInstall.ides || []; + const { bmadDir } = await installer.findBmadDir(directory); + const existingInstall = await ExistingInstall.detect(bmadDir); + return existingInstall.ides; } /** @@ -1573,7 +1415,7 @@ class UI { const { existingInstall } = await this.getExistingInstallation(directory); // Check if there are any custom modules in cache - const { Installer } = require('../installers/lib/core/installer'); + const { Installer } = require('./core/installer'); const installer = new Installer(); const { bmadDir } = await installer.findBmadDir(directory); @@ -1707,82 +1549,6 @@ class UI { return result; } - /** - * Check if installed version is a legacy version that needs fresh install - * @param {string} installedVersion - The installed version - * @returns {boolean} True if legacy (v4 or any alpha) - */ - isLegacyVersion(installedVersion) { - if (!installedVersion || installedVersion === 'unknown') { - return true; // Treat unknown as legacy for safety - } - // Check if version string contains -alpha or -Alpha (any v6 alpha) - return /-alpha\./i.test(installedVersion); - } - - /** - * Show warning for legacy version (v4 or alpha) and ask if user wants to proceed - * @param {string} installedVersion - The installed version - * @param {string} currentVersion - The current version - * @param {string} bmadFolderName - Name of the BMAD folder - * @returns {Promise} True if user wants to proceed, false if they cancel - */ - async showLegacyVersionWarning(installedVersion, currentVersion, bmadFolderName, options = {}) { - if (!this.isLegacyVersion(installedVersion)) { - return true; // Not legacy, proceed - } - - let warningContent; - if (installedVersion === 'unknown') { - warningContent = 'Unable to detect your installed BMAD version.\n' + 'This appears to be a legacy or unsupported installation.'; - } else { - warningContent = - `You are updating from ${installedVersion} to ${currentVersion}.\n` + 'You have a legacy version installed (v4 or alpha).'; - } - - warningContent += - '\n\nFor the best experience, we recommend:\n' + - ' 1. Delete your current BMAD installation folder\n' + - ` (the "${bmadFolderName}/" folder in your project)\n` + - ' 2. Run a fresh installation\n\n' + - 'Benefits of a fresh install:\n' + - ' \u2022 Cleaner configuration without legacy artifacts\n' + - ' \u2022 All new features properly configured\n' + - ' \u2022 Fewer potential conflicts'; - - await prompts.log.warn('VERSION WARNING'); - await prompts.note(warningContent, 'Version Warning'); - - if (options.yes) { - await prompts.log.warn('Non-interactive mode (--yes): auto-proceeding with legacy update'); - return true; - } - - const proceed = await prompts.select({ - message: 'How would you like to proceed?', - choices: [ - { - name: 'Proceed with update anyway (may have issues)', - value: 'proceed', - }, - { - name: 'Cancel (recommended - do a fresh install instead)', - value: 'cancel', - }, - ], - default: 'cancel', - }); - - if (proceed === 'cancel') { - await prompts.note( - `1. Delete the "${bmadFolderName}/" folder in your project\n` + "2. Run 'bmad install' again", - 'To do a fresh install', - ); - } - - return proceed === 'proceed'; - } - /** * Display module versions with update availability * @param {Array} modules - Array of module info objects with version info diff --git a/tools/cli/lib/yaml-format.js b/tools/installer/yaml-format.js similarity index 100% rename from tools/cli/lib/yaml-format.js rename to tools/installer/yaml-format.js diff --git a/tools/javascript-conventions.md b/tools/javascript-conventions.md new file mode 100644 index 000000000..99ea39520 --- /dev/null +++ b/tools/javascript-conventions.md @@ -0,0 +1,5 @@ +# JavaScript Conventions + +## Function ordering + +Define functions top-to-bottom in call order: callers above callees. If `install()` calls `_initPaths()`, then `install` appears first and `_initPaths` appears after it. diff --git a/tools/lib/xml-utils.js b/tools/lib/xml-utils.js deleted file mode 100644 index 482373151..000000000 --- a/tools/lib/xml-utils.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Escape XML special characters in a string - * @param {string} text - The text to escape - * @returns {string} The escaped text - */ -function escapeXml(text) { - if (!text) return ''; - return text.replaceAll('&', '&').replaceAll('<', '<').replaceAll('>', '>').replaceAll('"', '"').replaceAll("'", '''); -} - -module.exports = { - escapeXml, -}; From c91db0db4b9fa0097f4f490488ae046a692ab4f5 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 27 Mar 2026 09:46:18 -0500 Subject: [PATCH 05/26] fix: revert bmb module-definition path to src/module.yaml (#2146) bmad-builder reverted its skills/ directory back to src/ for installer compatibility (bmad-code-org/bmad-builder#40). Update the external modules manifest to match. --- tools/installer/external-official-modules.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/installer/external-official-modules.yaml b/tools/installer/external-official-modules.yaml index b62f3dc21..6a2fa259d 100644 --- a/tools/installer/external-official-modules.yaml +++ b/tools/installer/external-official-modules.yaml @@ -4,7 +4,7 @@ modules: bmad-builder: url: https://github.com/bmad-code-org/bmad-builder - module-definition: skills/module.yaml + module-definition: src/module.yaml code: bmb name: "BMad Builder" description: "Agent and Builder" From e0ea6a05008ecafdfb720bc74031344560f2408a Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 28 Mar 2026 00:33:10 -0500 Subject: [PATCH 06/26] fix: support skills/ folder as module source location (#2149) The installer now finds module.yaml in both skills/ and src/ directories, including one level deep in subfolders. Updates bmb module-definition to skills/module.yaml to match its actual structure. --- .../installer/external-official-modules.yaml | 2 +- tools/installer/modules/external-manager.js | 37 +++++++++++++++++-- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/tools/installer/external-official-modules.yaml b/tools/installer/external-official-modules.yaml index 6a2fa259d..b62f3dc21 100644 --- a/tools/installer/external-official-modules.yaml +++ b/tools/installer/external-official-modules.yaml @@ -4,7 +4,7 @@ modules: bmad-builder: url: https://github.com/bmad-code-org/bmad-builder - module-definition: src/module.yaml + module-definition: skills/module.yaml code: bmb name: "BMad Builder" description: "Agent and Builder" diff --git a/tools/installer/modules/external-manager.js b/tools/installer/modules/external-manager.js index 467520163..fceb94e22 100644 --- a/tools/installer/modules/external-manager.js +++ b/tools/installer/modules/external-manager.js @@ -313,10 +313,41 @@ class ExternalModuleManager { // The module-definition specifies the path to module.yaml relative to repo root // We need to return the directory containing module.yaml - const moduleDefinitionPath = moduleInfo.moduleDefinition; // e.g., 'src/module.yaml' - const moduleDir = path.dirname(path.join(cloneDir, moduleDefinitionPath)); + const moduleDefinitionPath = moduleInfo.moduleDefinition; // e.g., 'skills/module.yaml' + const configuredPath = path.join(cloneDir, moduleDefinitionPath); - return moduleDir; + if (await fs.pathExists(configuredPath)) { + return path.dirname(configuredPath); + } + + // Fallback: search skills/ and src/ (root level and one level deep for subfolders) + for (const dir of ['skills', 'src']) { + const rootCandidate = path.join(cloneDir, dir, 'module.yaml'); + if (await fs.pathExists(rootCandidate)) { + return path.dirname(rootCandidate); + } + const dirPath = path.join(cloneDir, dir); + if (await fs.pathExists(dirPath)) { + const entries = await fs.readdir(dirPath, { withFileTypes: true }); + for (const entry of entries) { + if (entry.isDirectory()) { + const subCandidate = path.join(dirPath, entry.name, 'module.yaml'); + if (await fs.pathExists(subCandidate)) { + return path.dirname(subCandidate); + } + } + } + } + } + + // Check repo root as last fallback + const rootCandidate = path.join(cloneDir, 'module.yaml'); + if (await fs.pathExists(rootCandidate)) { + return path.dirname(rootCandidate); + } + + // Nothing found: return configured path (preserves old behavior for error messaging) + return path.dirname(configuredPath); } } From fa909a89167d63ec46b806b4458f4e35db12dee8 Mon Sep 17 00:00:00 2001 From: Alex Verkhovsky Date: Fri, 27 Mar 2026 23:55:57 -0600 Subject: [PATCH 07/26] feat: add Junie platform support (#2142) * feat: add Junie platform support with .agents/skills target Co-authored-by: Junie * fix: disable ancestor_conflict_check for Junie platform Junie does not traverse ancestor directories looking for skills, so ancestor_conflict_check should be false. Co-authored-by: Junie --------- Co-authored-by: Junie --- tools/installer/ide/platform-codes.yaml | 7 +++++++ tools/platform-codes.yaml | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/tools/installer/ide/platform-codes.yaml b/tools/installer/ide/platform-codes.yaml index 3f3e068be..e7046d32f 100644 --- a/tools/installer/ide/platform-codes.yaml +++ b/tools/installer/ide/platform-codes.yaml @@ -102,6 +102,13 @@ platforms: - .iflow/commands target_dir: .iflow/skills + junie: + name: "Junie" + preferred: false + installer: + target_dir: .agents/skills + ancestor_conflict_check: false + kilo: name: "KiloCoder" preferred: false diff --git a/tools/platform-codes.yaml b/tools/platform-codes.yaml index f643d7aa6..7227af0ce 100644 --- a/tools/platform-codes.yaml +++ b/tools/platform-codes.yaml @@ -127,6 +127,12 @@ platforms: category: ide description: "AI-powered IDE with cascade flows" + junie: + name: "Junie" + preferred: false + category: cli + description: "AI coding agent by JetBrains" + ona: name: "Ona" preferred: false From abfc56bd2cb1d016161ee3f9839d0ab4b2dfca93 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 28 Mar 2026 17:16:41 -0500 Subject: [PATCH 08/26] feat: add bmad-prfaq skill as alternative analysis path (#2157) * feat: add bmad-prfaq skill as alternative to product brief Add Working Backwards PRFAQ challenge skill for stress-testing product concepts through Amazon's PRFAQ methodology. Includes press release drafting, customer FAQ, internal FAQ, and verdict stages with subagent support for artifact scanning and web research. - New bmad-prfaq skill with 5-stage interactive gauntlet and headless mode - Subagents for artifact analysis and web research (graceful degradation) - Research-grounded output directive for current market/competitive data - Always produces distillate for downstream PRD consumption - Fix manifest array syntax in both prfaq and product-brief manifests - Drop number prefixes from reference files - Update docs: getting-started, workflow-map, agents, skills reference - Add analysis-phase explainer doc with comparison table and decision guide - Update workflow-map-diagram.html with prfaq card - Add -H and -A args to CSV for both skills - Add unist-util-visit as devDependency (was imported but undeclared) * fix: harden bmad-prfaq for compaction resilience and context efficiency Add coaching persona re-anchors to all stage prompts so the behavioral directive survives context compaction. Add do-not-read guards at resume detection, headless mode, and input gathering to prevent parent agent context bloat. Add Stage 1 coaching notes capture. Adapt template and press release stage for non-commercial concept types. Cap subagent response token budgets. * fix: add config.user.yaml to file-ref validator allowlist Also update PRFAQ config path to use correct _config/bmm/ prefix. --- docs/explanation/analysis-phase.md | 70 ++++++++++++++ docs/reference/agents.md | 2 +- docs/reference/commands.md | 2 + docs/reference/workflow-map.md | 5 +- docs/tutorials/getting-started.md | 7 +- package.json | 1 + .../1-analysis/bmad-agent-analyst/SKILL.md | 1 + src/bmm-skills/1-analysis/bmad-prfaq/SKILL.md | 93 +++++++++++++++++++ .../bmad-prfaq/agents/artifact-analyzer.md | 60 ++++++++++++ .../bmad-prfaq/agents/web-researcher.md | 49 ++++++++++ .../bmad-prfaq/assets/prfaq-template.md | 62 +++++++++++++ .../1-analysis/bmad-prfaq/bmad-manifest.json | 16 ++++ .../bmad-prfaq/references/customer-faq.md | 55 +++++++++++ .../bmad-prfaq/references/internal-faq.md | 51 ++++++++++ .../bmad-prfaq/references/press-release.md | 60 ++++++++++++ .../bmad-prfaq/references/verdict.md | 79 ++++++++++++++++ .../bmad-product-brief/bmad-manifest.json | 2 +- src/bmm-skills/module-help.csv | 3 +- tools/validate-file-refs.js | 2 +- website/public/workflow-map-diagram.html | 13 ++- 20 files changed, 623 insertions(+), 10 deletions(-) create mode 100644 docs/explanation/analysis-phase.md create mode 100644 src/bmm-skills/1-analysis/bmad-prfaq/SKILL.md create mode 100644 src/bmm-skills/1-analysis/bmad-prfaq/agents/artifact-analyzer.md create mode 100644 src/bmm-skills/1-analysis/bmad-prfaq/agents/web-researcher.md create mode 100644 src/bmm-skills/1-analysis/bmad-prfaq/assets/prfaq-template.md create mode 100644 src/bmm-skills/1-analysis/bmad-prfaq/bmad-manifest.json create mode 100644 src/bmm-skills/1-analysis/bmad-prfaq/references/customer-faq.md create mode 100644 src/bmm-skills/1-analysis/bmad-prfaq/references/internal-faq.md create mode 100644 src/bmm-skills/1-analysis/bmad-prfaq/references/press-release.md create mode 100644 src/bmm-skills/1-analysis/bmad-prfaq/references/verdict.md diff --git a/docs/explanation/analysis-phase.md b/docs/explanation/analysis-phase.md new file mode 100644 index 000000000..f05d89120 --- /dev/null +++ b/docs/explanation/analysis-phase.md @@ -0,0 +1,70 @@ +--- +title: "Analysis Phase: From Idea to Foundation" +description: What brainstorming, research, product briefs, and PRFAQs are — and when to use each +sidebar: + order: 1 +--- + +The Analysis phase (Phase 1) helps you think clearly about your product before committing to building it. Every tool in this phase is optional, but skipping analysis entirely means your PRD is built on assumptions instead of insight. + +## Why Analysis Before Planning? + +A PRD answers "what should we build and why?" If you feed it vague thinking, you get a vague PRD — and every downstream document inherits that vagueness. Architecture built on a weak PRD makes wrong technical bets. Stories derived from weak architecture miss edge cases. The cost compounds. + +Analysis tools exist to make your PRD sharp. They attack the problem from different angles — creative exploration, market reality, customer clarity, feasibility — so that by the time you sit down with the PM agent, you know what you're building and for whom. + +## The Tools + +### Brainstorming + +**What it is.** A facilitated creative session using proven ideation techniques. The AI acts as coach, pulling ideas out of you through structured exercises — not generating ideas for you. + +**Why it's here.** Raw ideas need space to develop before they get locked into requirements. Brainstorming creates that space. It's especially valuable when you have a problem domain but no clear solution, or when you want to explore multiple directions before committing. + +**When to use it.** You have a vague sense of what you want to build but haven't crystallized the concept. Or you have a concept but want to pressure-test it against alternatives. + +See [Brainstorming](./brainstorming.md) for a deeper look at how sessions work. + +### Research (Market, Domain, Technical) + +**What it is.** Three focused research workflows that investigate different dimensions of your idea. Market research examines competitors, trends, and user sentiment. Domain research builds subject-matter expertise and terminology. Technical research evaluates feasibility, architecture options, and implementation approaches. + +**Why it's here.** Building on assumptions is the fastest way to build something nobody needs. Research grounds your concept in reality — what competitors already exist, what users actually struggle with, what's technically feasible, and what industry-specific constraints you'll face. + +**When to use it.** You're entering an unfamiliar domain, you suspect competitors exist but haven't mapped them, or your concept depends on technical capabilities you haven't validated. Run one, two, or all three — each stands alone. + +### Product Brief + +**What it is.** A guided discovery session that produces a 1-2 page executive summary of your product concept. The AI acts as a collaborative Business Analyst, helping you articulate the vision, target audience, value proposition, and scope. + +**Why it's here.** The product brief is the gentler path into planning. It captures your strategic vision in a structured format that feeds directly into PRD creation. It works best when you already have conviction about your concept — you know the customer, the problem, and roughly what you want to build. The brief organizes and sharpens that thinking. + +**When to use it.** Your concept is relatively clear and you want to document it efficiently before creating a PRD. You're confident in the direction and don't need your assumptions aggressively challenged. + +### PRFAQ (Working Backwards) + +**What it is.** Amazon's Working Backwards methodology adapted as an interactive challenge. You write the press release announcing your finished product before a single line of code exists, then answer the hardest questions customers and stakeholders would ask. The AI acts as a relentless but constructive product coach. + +**Why it's here.** The PRFAQ is the rigorous path into planning. It forces customer-first clarity by making you defend every claim. If you can't write a compelling press release, the product isn't ready. If customer FAQ answers reveal gaps, those are gaps you'd discover much later — and more expensively — during implementation. The gauntlet surfaces weak thinking early, when it's cheapest to fix. + +**When to use it.** You want your concept stress-tested before committing resources. You're unsure whether users will actually care. You want to validate that you can articulate a clear, defensible value proposition. Or you simply want the discipline of Working Backwards to sharpen your thinking. + +## Which Should I Use? + +| Situation | Recommended tool | +| --------- | ---------------- | +| "I have a vague idea, not sure where to start" | Brainstorming | +| "I need to understand the market before deciding" | Research | +| "I know what I want to build, just need to document it" | Product Brief | +| "I want to make sure this idea is actually worth building" | PRFAQ | +| "I want to explore, then validate, then document" | Brainstorming → Research → PRFAQ or Brief | + +Product Brief and PRFAQ both produce input for the PRD — choose one based on how much challenge you want. The brief is collaborative discovery. The PRFAQ is a gauntlet. Both get you to the same destination; the PRFAQ tests whether your concept deserves to get there. + +:::tip[Not Sure?] +Run `bmad-help` and describe your situation. It will recommend the right starting point based on what you've already done and what you're trying to accomplish. +::: + +## What Happens After Analysis? + +Analysis outputs feed directly into Phase 2 (Planning). The PRD workflow accepts product briefs, PRFAQ documents, research findings, and brainstorming reports as input — it synthesizes whatever you've produced into structured requirements. The more analysis you do, the sharper your PRD. diff --git a/docs/reference/agents.md b/docs/reference/agents.md index 764c52532..7463d1a12 100644 --- a/docs/reference/agents.md +++ b/docs/reference/agents.md @@ -17,7 +17,7 @@ This page lists the default BMM (Agile suite) agents that install with BMad Meth | Agent | Skill ID | Triggers | Primary workflows | | --------------------------- | -------------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------- | -| Analyst (Mary) | `bmad-analyst` | `BP`, `RS`, `CB`, `DP` | Brainstorm Project, Research, Create Brief, Document Project | +| Analyst (Mary) | `bmad-analyst` | `BP`, `RS`, `CB`, `WB`, `DP` | Brainstorm Project, Research, Create Brief, PRFAQ Challenge, Document Project | | Product Manager (John) | `bmad-pm` | `CP`, `VP`, `EP`, `CE`, `IR`, `CC` | Create/Validate/Edit PRD, Create Epics and Stories, Implementation Readiness, Correct Course | | Architect (Winston) | `bmad-architect` | `CA`, `IR` | Create Architecture, Implementation Readiness | | Scrum Master (Bob) | `bmad-sm` | `SP`, `CS`, `ER`, `CC` | Sprint Planning, Create Story, Epic Retrospective, Correct Course | diff --git a/docs/reference/commands.md b/docs/reference/commands.md index e070c864e..cba86d050 100644 --- a/docs/reference/commands.md +++ b/docs/reference/commands.md @@ -92,6 +92,8 @@ Workflow skills run a structured, multi-step process without loading an agent pe | Example skill | Purpose | | --- | --- | +| `bmad-product-brief` | Create a product brief — guided discovery when your concept is clear | +| `bmad-prfaq` | Working Backwards PRFAQ challenge to stress-test your product concept | | `bmad-create-prd` | Create a Product Requirements Document | | `bmad-create-architecture` | Design system architecture | | `bmad-create-epics-and-stories` | Create epics and stories | diff --git a/docs/reference/workflow-map.md b/docs/reference/workflow-map.md index 9f5e7e7ed..0c088fa8b 100644 --- a/docs/reference/workflow-map.md +++ b/docs/reference/workflow-map.md @@ -21,13 +21,14 @@ Final important note: Every workflow below can be run directly with your tool of ## Phase 1: Analysis (Optional) -Explore the problem space and validate ideas before committing to planning. +Explore the problem space and validate ideas before committing to planning. [**Learn what each tool does and when to use it**](../explanation/analysis-phase.md). | Workflow | Purpose | Produces | | ------------------------------- | -------------------------------------------------------------------------- | ------------------------- | | `bmad-brainstorming` | Brainstorm Project Ideas with guided facilitation of a brainstorming coach | `brainstorming-report.md` | | `bmad-domain-research`, `bmad-market-research`, `bmad-technical-research` | Validate market, technical, or domain assumptions | Research findings | -| `bmad-create-product-brief` | Capture strategic vision | `product-brief.md` | +| `bmad-product-brief` | Capture strategic vision — best when your concept is clear | `product-brief.md` | +| `bmad-prfaq` | Working Backwards — stress-test and forge your product concept | `prfaq-{project}.md` | ## Phase 2: Planning diff --git a/docs/tutorials/getting-started.md b/docs/tutorials/getting-started.md index d6d1f08dd..b85085811 100644 --- a/docs/tutorials/getting-started.md +++ b/docs/tutorials/getting-started.md @@ -68,7 +68,7 @@ BMad helps you build software through guided workflows with specialized AI agent | Phase | Name | What Happens | | ----- | -------------- | --------------------------------------------------- | -| 1 | Analysis | Brainstorming, research, product brief *(optional)* | +| 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 | @@ -133,10 +133,11 @@ 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: +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 -- **create-product-brief** (`bmad-create-product-brief`) — Recommended foundation document +- **product-brief** (`bmad-product-brief`) — Recommended foundation document when your concept is clear +- **prfaq** (`bmad-prfaq`) — Working Backwards challenge to stress-test and forge your product concept ### Phase 2: Planning (Required) diff --git a/package.json b/package.json index 38f4d913e..3d53ce2b0 100644 --- a/package.json +++ b/package.json @@ -97,6 +97,7 @@ "prettier": "^3.7.4", "prettier-plugin-packagejson": "^2.5.19", "sharp": "^0.33.5", + "unist-util-visit": "^5.1.0", "yaml-eslint-parser": "^1.2.3", "yaml-lint": "^1.7.0" }, diff --git a/src/bmm-skills/1-analysis/bmad-agent-analyst/SKILL.md b/src/bmm-skills/1-analysis/bmad-agent-analyst/SKILL.md index 1118aea64..399af2840 100644 --- a/src/bmm-skills/1-analysis/bmad-agent-analyst/SKILL.md +++ b/src/bmm-skills/1-analysis/bmad-agent-analyst/SKILL.md @@ -36,6 +36,7 @@ When you are in this persona and the user calls a skill, this persona must carry | DR | Industry domain deep dive, subject matter expertise and terminology | bmad-domain-research | | TR | Technical feasibility, architecture options and implementation approaches | bmad-technical-research | | CB | Create or update product briefs through guided or autonomous discovery | bmad-product-brief-preview | +| WB | Working Backwards PRFAQ challenge — forge and stress-test product concepts | bmad-prfaq | | DP | Analyze an existing project to produce documentation for human and LLM consumption | bmad-document-project | ## On Activation diff --git a/src/bmm-skills/1-analysis/bmad-prfaq/SKILL.md b/src/bmm-skills/1-analysis/bmad-prfaq/SKILL.md new file mode 100644 index 000000000..a272de411 --- /dev/null +++ b/src/bmm-skills/1-analysis/bmad-prfaq/SKILL.md @@ -0,0 +1,93 @@ +--- +name: bmad-prfaq +description: Working Backwards PRFAQ challenge to forge product concepts. Use when the user requests to 'create a PRFAQ', 'work backwards', or 'run the PRFAQ challenge'. +--- + +# Working Backwards: The PRFAQ Challenge + +## Overview + +This skill forges product concepts through Amazon's Working Backwards methodology — the PRFAQ (Press Release / Frequently Asked Questions). Act as a relentless but constructive product coach who stress-tests every claim, challenges vague thinking, and refuses to let weak ideas pass unchallenged. The user walks in with an idea. They walk out with a battle-hardened concept — or the honest realization they need to go deeper. Both are wins. + +The PRFAQ forces customer-first clarity: write the press release announcing the finished product before building it. If you can't write a compelling press release, the product isn't ready. The customer FAQ validates the value proposition from the outside in. The internal FAQ addresses feasibility, risks, and hard trade-offs. + +**This is hardcore mode.** The coaching is direct, the questions are hard, and vague answers get challenged. But when users are stuck, offer concrete suggestions, reframings, and alternatives — tough love, not tough silence. The goal is to strengthen the concept, not to gatekeep it. + +**Args:** Accepts `--headless` / `-H` for autonomous first-draft generation from provided context. + +**Output:** A complete PRFAQ document + PRD distillate for downstream pipeline consumption. + +**Research-grounded.** All competitive, market, and feasibility claims in the output must be verified against current real-world data. Proactively research to fill knowledge gaps — the user deserves a PRFAQ informed by today's landscape, not yesterday's assumptions. + +## On Activation + +Load available config from `{project-root}/_bmad/_config/bmm/config.yaml` and `{project-root}/_bmad/_config/bmm/config.user.yaml` (root level and `bmm` section). If config is missing, let the user know `bmad-builder-setup` can configure the module at any time. Use sensible defaults for anything not configured. + +Resolve: `{user_name}`, `{communication_language}`, `{document_output_language}`, `{planning_artifacts}`, `{project_name}`. + +**Resume detection:** Check if `{planning_artifacts}/prfaq-{project_name}.md` already exists. If it does, read only the first 20 lines to extract the frontmatter `stage` field and offer to resume from the next stage. Do not read the full document. If the user confirms, route directly to that stage's reference file. + +**Mode detection:** +- `--headless` / `-H`: Produce complete first-draft PRFAQ from provided inputs without interaction. Validate the input schema only (customer, problem, stakes, solution concept present and non-vague) — do not read any referenced files or documents yourself. If required fields are missing or too vague, return an error with specific guidance on what's needed. Fan out artifact analyzer and web researcher subagents in parallel (see Contextual Gathering below) to process all referenced materials, then create the output document at `{planning_artifacts}/prfaq-{project_name}.md` using `./assets/prfaq-template.md` and route to `./references/press-release.md`. +- Default: Full interactive coaching — the gauntlet. + +**Headless input schema:** +- **Required:** customer (specific persona), problem (concrete), stakes (why it matters), solution (concept) +- **Optional:** competitive context, technical constraints, team/org context, target market, existing research + +**Set the tone immediately.** This isn't the warm, treasure-hunt analyst greeting. Frame the challenge: + +*"This is the PRFAQ challenge — Working Backwards. I'm going to push hard on your thinking. We'll write the press release for your finished product before a single line of code exists. If your concept can survive this process, it's ready. If it can't — better to find out now. Let's go."* + +Follow with a brief grounding: *"A PRFAQ is Amazon's Working Backwards tool — you write the press release announcing your finished product, then answer the hardest questions customers and stakeholders would ask. It forces clarity before you commit resources."* + +Then proceed to Stage 1 below. + +## Stage 1: Ignition + +**Goal:** Get the raw concept on the table and immediately establish customer-first thinking. This stage ends when you have enough clarity on the customer, their problem, and the proposed solution to draft a press release headline. + +**Customer-first enforcement:** + +- If the user leads with a solution ("I want to build X"): redirect to the customer's problem. Don't let them skip the pain. +- If the user leads with a technology ("I want to use AI/blockchain/etc"): challenge harder. *"Technology is a 'how', not a 'why'. What human problem are you solving? Remove the buzzword — does anyone still care?"* +- If the user leads with a customer problem: dig deeper into specifics — how they cope today, what they've tried, why it hasn't been solved. + +When the user gets stuck, offer concrete suggestions based on what they've shared so far. Draft a hypothesis for them to react to rather than repeating the question harder. + +**Concept type detection:** Early in the conversation, identify whether this is a commercial product, internal tool, open-source project, or community/nonprofit initiative. Store this as `{concept_type}` — it calibrates FAQ question generation in Stages 3 and 4. Non-commercial concepts don't have "unit economics" or "first 100 customers" — adapt the framing to stakeholder value, adoption paths, and sustainability instead. + +**Essentials to capture before progressing:** +- Who is the customer/user? (specific persona, not "everyone") +- What is their problem? (concrete and felt, not abstract) +- Why does this matter to them? (stakes and consequences) +- What's the initial concept for a solution? (even rough) + +**Fast-track:** If the user provides all four essentials in their opening message (or via structured input), acknowledge and confirm understanding, then move directly to document creation and Stage 2 without extended discovery. + +**Graceful redirect:** If after 2-3 exchanges the user can't articulate a customer or problem, don't force it — suggest the idea may need more exploration first and recommend they invoke the `bmad-brainstorming` skill to develop it further. + +**Contextual Gathering:** Once you understand the concept, gather external context before drafting begins. + +1. **Ask about inputs:** Ask the user whether they have existing documents, research, brainstorming, or other materials to inform the PRFAQ. Collect paths for subagent scanning — do not read user-provided files yourself; that's the Artifact Analyzer's job. +2. **Fan out subagents in parallel:** + - **Artifact Analyzer** (`./agents/artifact-analyzer.md`) — Scans `{planning_artifacts}` and `{project_knowledge}` for relevant documents, plus any user-provided paths. Receives the product intent summary so it knows what's relevant. + - **Web Researcher** (`./agents/web-researcher.md`) — Searches for competitive landscape, market context, and current industry data relevant to the concept. Receives the product intent summary. +3. **Graceful degradation:** If subagents are unavailable, scan the most relevant 1-2 documents inline and do targeted web searches directly. Never block the workflow. +4. **Merge findings** with what the user shared. Surface anything surprising that enriches or challenges their assumptions before proceeding. + +**Create the output document** at `{planning_artifacts}/prfaq-{project_name}.md` using `./assets/prfaq-template.md`. Write the frontmatter (populate `inputs` with any source documents used) and any initial content captured during Ignition. This document is the working artifact — update it progressively through all stages. + +**Coaching Notes Capture:** Before moving on, append a `` block to the output document: concept type and rationale, initial assumptions challenged, why this direction over alternatives discussed, key subagent findings that shaped the concept framing, and any user context captured that doesn't fit the PRFAQ itself. + +**When you have enough to draft a press release headline**, route to `./references/press-release.md`. + +## Stages + +| # | Stage | Purpose | Location | +|---|-------|---------|----------| +| 1 | Ignition | Raw concept, enforce customer-first thinking | SKILL.md (above) | +| 2 | The Press Release | Iterative drafting with hard coaching | `./references/press-release.md` | +| 3 | Customer FAQ | Devil's advocate customer questions | `./references/customer-faq.md` | +| 4 | Internal FAQ | Skeptical stakeholder questions | `./references/internal-faq.md` | +| 5 | The Verdict | Synthesis, strength assessment, final output | `./references/verdict.md` | diff --git a/src/bmm-skills/1-analysis/bmad-prfaq/agents/artifact-analyzer.md b/src/bmm-skills/1-analysis/bmad-prfaq/agents/artifact-analyzer.md new file mode 100644 index 000000000..69c7ff863 --- /dev/null +++ b/src/bmm-skills/1-analysis/bmad-prfaq/agents/artifact-analyzer.md @@ -0,0 +1,60 @@ +# Artifact Analyzer + +You are a research analyst. Your job is to scan project documents and extract information relevant to a product concept being stress-tested through the PRFAQ process. + +## Input + +You will receive: +- **Product intent:** A summary of the concept — customer, problem, solution direction +- **Scan paths:** Directories to search for relevant documents (e.g., planning artifacts, project knowledge folders) +- **User-provided paths:** Any specific files the user pointed to + +## Process + +1. **Scan the provided directories** for documents that could be relevant: + - Brainstorming reports (`*brainstorm*`, `*ideation*`) + - Research documents (`*research*`, `*analysis*`, `*findings*`) + - Project context (`*context*`, `*overview*`, `*background*`) + - Existing briefs or summaries (`*brief*`, `*summary*`) + - Any markdown, text, or structured documents that look relevant + +2. **For sharded documents** (a folder with `index.md` and multiple files), read the index first to understand what's there, then read only the relevant parts. + +3. **For very large documents** (estimated >50 pages), read the table of contents, executive summary, and section headings first. Read only sections directly relevant to the stated product intent. Note which sections were skimmed vs read fully. + +4. **Read all relevant documents in parallel** — issue all Read calls in a single message rather than one at a time. Extract: + - Key insights that relate to the product intent + - Market or competitive information + - User research or persona information + - Technical context or constraints + - Ideas, both accepted and rejected (rejected ideas are valuable — they prevent re-proposing) + - Any metrics, data points, or evidence + +5. **Ignore documents that aren't relevant** to the stated product intent. Don't waste tokens on unrelated content. + +## Output + +Return ONLY the following JSON object. No preamble, no commentary. Keep total response under 1,500 tokens. Maximum 5 bullets per section — prioritize the most impactful findings. + +```json +{ + "documents_found": [ + {"path": "file path", "relevance": "one-line summary"} + ], + "key_insights": [ + "bullet — grouped by theme, each self-contained" + ], + "user_market_context": [ + "bullet — users, market, competition found in docs" + ], + "technical_context": [ + "bullet — platforms, constraints, integrations" + ], + "ideas_and_decisions": [ + {"idea": "description", "status": "accepted|rejected|open", "rationale": "brief why"} + ], + "raw_detail_worth_preserving": [ + "bullet — specific details, data points, quotes for the distillate" + ] +} +``` diff --git a/src/bmm-skills/1-analysis/bmad-prfaq/agents/web-researcher.md b/src/bmm-skills/1-analysis/bmad-prfaq/agents/web-researcher.md new file mode 100644 index 000000000..b09d738b3 --- /dev/null +++ b/src/bmm-skills/1-analysis/bmad-prfaq/agents/web-researcher.md @@ -0,0 +1,49 @@ +# Web Researcher + +You are a market research analyst. Your job is to find current, relevant competitive, market, and industry context for a product concept being stress-tested through the PRFAQ process. + +## Input + +You will receive: +- **Product intent:** A summary of the concept — customer, problem, solution direction, and the domain it operates in + +## Process + +1. **Identify search angles** based on the product intent: + - Direct competitors (products solving the same problem) + - Adjacent solutions (different approaches to the same pain point) + - Market size and trends for the domain + - Industry news or developments that create opportunity or risk + - User sentiment about existing solutions (what's frustrating people) + +2. **Execute 3-5 targeted web searches** — quality over quantity. Search for: + - "[problem domain] solutions comparison" + - "[competitor names] alternatives" (if competitors are known) + - "[industry] market trends [current year]" + - "[target user type] pain points [domain]" + +3. **Synthesize findings** — don't just list links. Extract the signal. + +## Output + +Return ONLY the following JSON object. No preamble, no commentary. Keep total response under 1,000 tokens. Maximum 5 bullets per section. + +```json +{ + "competitive_landscape": [ + {"name": "competitor", "approach": "one-line description", "gaps": "where they fall short"} + ], + "market_context": [ + "bullet — market size, growth trends, relevant data points" + ], + "user_sentiment": [ + "bullet — what users say about existing solutions" + ], + "timing_and_opportunity": [ + "bullet — why now, enabling shifts" + ], + "risks_and_considerations": [ + "bullet — market risks, competitive threats, regulatory concerns" + ] +} +``` diff --git a/src/bmm-skills/1-analysis/bmad-prfaq/assets/prfaq-template.md b/src/bmm-skills/1-analysis/bmad-prfaq/assets/prfaq-template.md new file mode 100644 index 000000000..0d7f5f2f0 --- /dev/null +++ b/src/bmm-skills/1-analysis/bmad-prfaq/assets/prfaq-template.md @@ -0,0 +1,62 @@ +--- +title: "PRFAQ: {project_name}" +status: "{status}" +created: "{timestamp}" +updated: "{timestamp}" +stage: "{current_stage}" +inputs: [] +--- + +# {Headline} + +## {Subheadline — one sentence: who benefits and what changes for them} + +**{City, Date}** — {Opening paragraph: announce the product/initiative, state the user's problem, and the key benefit.} + +{Problem paragraph: the user's pain today. Specific, concrete, felt. No mention of the solution yet.} + +{Solution paragraph: what changes for the user. Benefits, not features. Outcomes, not implementation.} + +> "{Leader/founder quote — the vision beyond the feature list.}" +> — {Name, Title/Role} + +### How It Works + +{The user experience, step by step. Written from THEIR perspective. How they discover it, start using it, and get value from it.} + +> "{User quote — what a real person would say after using this. Must sound human, not like marketing copy.}" +> — {Name, Role} + +### Getting Started + +{Clear, concrete path to first value. How to access, try, adopt, or contribute.} + +--- + +## Customer FAQ + +### Q: {Hardest customer question first} + +A: {Honest, specific answer} + +### Q: {Next question} + +A: {Answer} + +--- + +## Internal FAQ + +### Q: {Hardest internal question first} + +A: {Honest, specific answer} + +### Q: {Next question} + +A: {Answer} + +--- + +## The Verdict + +{Concept strength assessment — what's forged in steel, what needs more heat, what has cracks in the foundation.} diff --git a/src/bmm-skills/1-analysis/bmad-prfaq/bmad-manifest.json b/src/bmm-skills/1-analysis/bmad-prfaq/bmad-manifest.json new file mode 100644 index 000000000..9c3ad043c --- /dev/null +++ b/src/bmm-skills/1-analysis/bmad-prfaq/bmad-manifest.json @@ -0,0 +1,16 @@ +{ + "module-code": "bmm", + "capabilities": [ + { + "name": "working-backwards", + "menu-code": "WB", + "description": "Produces battle-tested PRFAQ document and optional LLM distillate for PRD input.", + "supports-headless": true, + "phase-name": "1-analysis", + "after": ["brainstorming", "perform-research"], + "before": ["create-prd"], + "is-required": false, + "output-location": "{planning_artifacts}" + } + ] +} diff --git a/src/bmm-skills/1-analysis/bmad-prfaq/references/customer-faq.md b/src/bmm-skills/1-analysis/bmad-prfaq/references/customer-faq.md new file mode 100644 index 000000000..c677bb25d --- /dev/null +++ b/src/bmm-skills/1-analysis/bmad-prfaq/references/customer-faq.md @@ -0,0 +1,55 @@ +**Language:** Use `{communication_language}` for all output. +**Output Language:** Use `{document_output_language}` for documents. +**Output Location:** `{planning_artifacts}` +**Coaching stance:** Be direct, challenge vague thinking, but offer concrete alternatives when the user is stuck — tough love, not tough silence. +**Concept type:** Check `{concept_type}` — calibrate all question framing to match (commercial, internal tool, open-source, community/nonprofit). + +# Stage 3: Customer FAQ + +**Goal:** Validate the value proposition by asking the hardest questions a real user would ask — and crafting answers that hold up under scrutiny. + +## The Devil's Advocate + +You are now the customer. Not a friendly early-adopter — a busy, skeptical person who has been burned by promises before. You've read the press release. Now you have questions. + +**Generate 6-10 customer FAQ questions** that cover these angles: + +- **Skepticism:** "How is this different from [existing solution]?" / "Why should I switch from what I use today?" +- **Trust:** "What happens to my data?" / "What if this shuts down?" / "Who's behind this?" +- **Practical concerns:** "How much does it cost?" / "How long does it take to get started?" / "Does it work with [thing I already use]?" +- **Edge cases:** "What if I need to [uncommon but real scenario]?" / "Does it work for [adjacent use case]?" +- **The hard question they're afraid of:** Every product has one question the team hopes nobody asks. Find it and ask it. + +**Don't generate softball questions.** "How do I sign up?" is not a FAQ — it's a CTA. Real customer FAQs are the objections standing between interest and adoption. + +**Calibrate to concept type.** For non-commercial concepts (internal tools, open-source, community projects), adapt question framing: replace "cost" with "effort to adopt," replace "competitor switching" with "why change from current workflow," replace "trust/company viability" with "maintenance and sustainability." + +## Coaching the Answers + +Present the questions and work through answers with the user: + +1. **Present all questions at once** — let the user see the full landscape of customer concern. +2. **Work through answers together.** The user drafts (or you draft and they react). For each answer: + - Is it honest? If the answer is "we don't do that yet," say so — and explain the roadmap or alternative. + - Is it specific? "We have enterprise-grade security" is not an answer. What certifications? What encryption? What SLA? + - Would a customer believe it? Marketing language in FAQ answers destroys credibility. +3. **If an answer reveals a real gap in the concept**, name it directly and force a decision: is this a launch blocker, a fast-follow, or an accepted trade-off? +4. **The user can add their own questions too.** Often they know the scary questions better than anyone. + +## Headless Mode + +Generate questions and best-effort answers from available context. Flag answers with low confidence so a human can review. + +## Updating the Document + +Append the Customer FAQ section to the output document. Update frontmatter: `status: "customer-faq"`, `stage: 3`, `updated` timestamp. + +## Coaching Notes Capture + +Before moving on, append a `` block to the output document: gaps revealed by customer questions, trade-off decisions made (launch blocker vs fast-follow vs accepted), competitive intelligence surfaced, and any scope or requirements signals. + +## Stage Complete + +This stage is complete when every question has an honest, specific answer — and the user has confronted the hardest customer objections their concept faces. No softballs survived. + +Route to `./internal-faq.md`. diff --git a/src/bmm-skills/1-analysis/bmad-prfaq/references/internal-faq.md b/src/bmm-skills/1-analysis/bmad-prfaq/references/internal-faq.md new file mode 100644 index 000000000..42942826d --- /dev/null +++ b/src/bmm-skills/1-analysis/bmad-prfaq/references/internal-faq.md @@ -0,0 +1,51 @@ +**Language:** Use `{communication_language}` for all output. +**Output Language:** Use `{document_output_language}` for documents. +**Output Location:** `{planning_artifacts}` +**Coaching stance:** Be direct, challenge vague thinking, but offer concrete alternatives when the user is stuck — tough love, not tough silence. +**Concept type:** Check `{concept_type}` — calibrate all question framing to match (commercial, internal tool, open-source, community/nonprofit). + +# Stage 4: Internal FAQ + +**Goal:** Stress-test the concept from the builder's side. The customer FAQ asked "should I use this?" The internal FAQ asks "can we actually pull this off — and should we?" + +## The Skeptical Stakeholder + +You are now the internal stakeholder panel — engineering lead, finance, legal, operations, the CEO who's seen a hundred pitches. The press release was inspiring. Now prove it's real. + +**Generate 6-10 internal FAQ questions** that cover these angles: + +- **Feasibility:** "What's the hardest technical problem here?" / "What do we not know how to build yet?" / "What are the key dependencies and risks?" +- **Business viability:** "What does the unit economics look like?" / "How do we acquire the first 100 customers?" / "What's the competitive moat — and how durable is it?" +- **Resource reality:** "What does the team need to look like?" / "What's the realistic timeline to a usable product?" / "What do we have to say no to in order to do this?" +- **Risk:** "What kills this?" / "What's the worst-case scenario if we ship and it doesn't work?" / "What regulatory or legal exposure exists?" +- **Strategic fit:** "Why us? Why now?" / "What does this cannibalize?" / "If this succeeds, what does the company look like in 3 years?" +- **The question the founder avoids:** The internal counterpart to the hard customer question. The thing that keeps them up at night but hasn't been said out loud. + +**Calibrate questions to context.** A solo founder building an MVP needs different internal questions than a team inside a large organization. Don't ask about "board alignment" for a weekend project. Don't ask about "weekend viability" for an enterprise product. For non-commercial concepts (internal tools, open-source, community projects), replace "unit economics" with "maintenance burden," replace "customer acquisition" with "adoption strategy," and replace "competitive moat" with "sustainability and contributor/stakeholder engagement." + +## Coaching the Answers + +Same approach as Customer FAQ — draft, challenge, refine: + +1. **Present all questions at once.** +2. **Work through answers.** Demand specificity. "We'll figure it out" is not an answer. Neither is "we'll hire for that." What's the actual plan? +3. **Honest unknowns are fine — unexamined unknowns are not.** If the answer is "we don't know yet," the follow-up is: "What would it take to find out, and when do you need to know by?" +4. **Watch for hand-waving on resources and timeline.** These are the most commonly over-optimistic answers. Push for concrete scoping. + +## Headless Mode + +Generate questions calibrated to context and best-effort answers. Flag high-risk areas and unknowns prominently. + +## Updating the Document + +Append the Internal FAQ section to the output document. Update frontmatter: `status: "internal-faq"`, `stage: 4`, `updated` timestamp. + +## Coaching Notes Capture + +Before moving on, append a `` block to the output document: feasibility risks identified, resource/timeline estimates discussed, unknowns flagged with "what would it take to find out" answers, strategic positioning decisions, and any technical constraints or dependencies surfaced. + +## Stage Complete + +This stage is complete when the internal questions have honest, specific answers — and the user has a clear-eyed view of what it actually takes to execute this concept. Optimism is fine. Delusion is not. + +Route to `./verdict.md`. diff --git a/src/bmm-skills/1-analysis/bmad-prfaq/references/press-release.md b/src/bmm-skills/1-analysis/bmad-prfaq/references/press-release.md new file mode 100644 index 000000000..0bd21ff17 --- /dev/null +++ b/src/bmm-skills/1-analysis/bmad-prfaq/references/press-release.md @@ -0,0 +1,60 @@ +**Language:** Use `{communication_language}` for all output. +**Output Language:** Use `{document_output_language}` for documents. +**Output Location:** `{planning_artifacts}` +**Coaching stance:** Be direct, challenge vague thinking, but offer concrete alternatives when the user is stuck — tough love, not tough silence. + +# Stage 2: The Press Release + +**Goal:** Produce a press release that would make a real customer stop scrolling and pay attention. Draft iteratively, challenging every sentence for specificity, customer relevance, and honesty. + +**Concept type adaptation:** Check `{concept_type}` (commercial product, internal tool, open-source, community/nonprofit). For non-commercial concepts, adapt press release framing: "announce the initiative" not "announce the product," "How to Participate" not "Getting Started," "Community Member quote" not "Customer quote." The structure stays — the language shifts to match the audience. + +## The Forge + +The press release is the heart of Working Backwards. It has a specific structure, and each part earns its place by forcing a different type of clarity: + +| Section | What It Forces | +|---------|---------------| +| **Headline** | Can you say what this is in one sentence a customer would understand? | +| **Subheadline** | Who benefits and what changes for them? | +| **Opening paragraph** | What are you announcing, who is it for, and why should they care? | +| **Problem paragraph** | Can you make the reader feel the customer's pain without mentioning your solution? | +| **Solution paragraph** | What changes for the customer? (Not: what did you build.) | +| **Leader quote** | What's the vision beyond the feature list? | +| **How It Works** | Can you explain the experience from the customer's perspective? | +| **Customer quote** | Would a real person say this? Does it sound human? | +| **Getting Started** | Is the path to value clear and concrete? | + +## Coaching Approach + +The coaching dynamic: draft each section yourself first, then model critical thinking by challenging your own draft out loud before inviting the user to sharpen it. Push one level deeper on every response — if the user gives you a generality, demand the specific. The cycle is: draft → self-challenge → invite → deepen. + +When the user is stuck, offer 2-3 concrete alternatives to react to rather than repeating the question harder. + +## Quality Bars + +These are the standards to hold the press release to. Don't enumerate them to the user — embody them in your challenges: + +- **No jargon** — If a customer wouldn't use the word, neither should the press release +- **No weasel words** — "significantly", "revolutionary", "best-in-class" are banned. Replace with specifics. +- **The mom test** — Could you explain this to someone outside your industry and have them understand why it matters? +- **The "so what?" test** — Every sentence should survive "so what?" If it can't, cut or sharpen it. +- **Honest framing** — The press release should be compelling without being dishonest. If you're overselling, the customer FAQ will expose it. + +## Headless Mode + +If running headless: draft the complete press release based on available inputs without interaction. Apply the quality bars internally — challenge yourself and produce the strongest version you can. Write directly to the output document. + +## Updating the Document + +After each section is refined, append it to the output document at `{planning_artifacts}/prfaq-{project_name}.md`. Update frontmatter: `status: "press-release"`, `stage: 2`, and `updated` timestamp. + +## Coaching Notes Capture + +Before moving on, append a brief `` block to the output document capturing key contextual observations from this stage: rejected headline framings, competitive positioning discussed, differentiators explored but not used, and any out-of-scope details the user mentioned (technical constraints, timeline, team context). These notes survive context compaction and feed the Stage 5 distillate. + +## Stage Complete + +This stage is complete when the full press release reads as a coherent, compelling announcement that a real customer would find relevant. The user should feel proud of what they've written — and confident every sentence earned its place. + +Route to `./customer-faq.md`. diff --git a/src/bmm-skills/1-analysis/bmad-prfaq/references/verdict.md b/src/bmm-skills/1-analysis/bmad-prfaq/references/verdict.md new file mode 100644 index 000000000..f77a95020 --- /dev/null +++ b/src/bmm-skills/1-analysis/bmad-prfaq/references/verdict.md @@ -0,0 +1,79 @@ +**Language:** Use `{communication_language}` for all output. +**Output Language:** Use `{document_output_language}` for documents. +**Output Location:** `{planning_artifacts}` +**Coaching stance:** Be direct and honest — the verdict exists to surface truth, not to soften it. But frame every finding constructively. + +# Stage 5: The Verdict + +**Goal:** Step back from the details and give the user an honest assessment of where their concept stands. Finalize the PRFAQ document and produce the downstream distillate. + +## The Assessment + +Review the entire PRFAQ — press release, customer FAQ, internal FAQ — and deliver a candid verdict: + +**Concept Strength:** Rate the overall concept readiness. Not a score — a narrative assessment. Where is the thinking sharp and where is it still soft? What survived the gauntlet and what barely held together? + +**Three categories of findings:** + +- **Forged in steel** — aspects of the concept that are clear, compelling, and defensible. The press release sections that would actually make a customer stop. The FAQ answers that are honest and convincing. +- **Needs more heat** — areas that are promising but underdeveloped. The user has a direction but hasn't gone deep enough. These need more work before they're ready for a PRD. +- **Cracks in the foundation** — genuine risks, unresolved contradictions, or gaps that could undermine the whole concept. Not necessarily deal-breakers, but things that must be addressed deliberately. + +**Present the verdict directly.** Don't soften it. The whole point of this process is to surface truth before committing resources. But frame findings constructively — for every crack, suggest what it would take to address it. + +## Finalize the Document + +1. **Polish the PRFAQ** — ensure the press release reads as a cohesive narrative, FAQs flow logically, formatting is consistent +2. **Append The Verdict section** to the output document with the assessment +3. Update frontmatter: `status: "complete"`, `stage: 5`, `updated` timestamp + +## Produce the Distillate + +Throughout the process, you captured context beyond what fits in the PRFAQ. Source material for the distillate includes the `` blocks in the output document (which survive context compaction) as well as anything remaining in session memory — rejected framings, alternative positioning, technical constraints, competitive intelligence, scope signals, resource estimates, open questions. + +**Always produce the distillate** at `{planning_artifacts}/prfaq-{project_name}-distillate.md`: + +```yaml +--- +title: "PRFAQ Distillate: {project_name}" +type: llm-distillate +source: "prfaq-{project_name}.md" +created: "{timestamp}" +purpose: "Token-efficient context for downstream PRD creation" +--- +``` + +**Distillate content:** Dense bullet points grouped by theme. Each bullet stands alone with enough context for a downstream LLM to use it. Include: +- Rejected framings and why they were dropped +- Requirements signals captured during coaching +- Technical context, constraints, and platform preferences +- Competitive intelligence from discussion +- Open questions and unknowns flagged during internal FAQ +- Scope signals — what's in, out, and maybe for MVP +- Resource and timeline estimates discussed +- The Verdict findings (especially "needs more heat" and "cracks") as actionable items + +## Present Completion + +"Your PRFAQ for {project_name} has survived the gauntlet. + +**PRFAQ:** `{planning_artifacts}/prfaq-{project_name}.md` +**Detail Pack:** `{planning_artifacts}/prfaq-{project_name}-distillate.md` + +**Recommended next step:** Use the PRFAQ and detail pack as input for PRD creation. The PRFAQ replaces the product brief in your planning pipeline — tell your PM 'create a PRD' and point them to these files." + +**Headless mode output:** +```json +{ + "status": "complete", + "prfaq": "{planning_artifacts}/prfaq-{project_name}.md", + "distillate": "{planning_artifacts}/prfaq-{project_name}-distillate.md", + "verdict": "forged|needs-heat|cracked", + "key_risks": ["top unresolved items"], + "open_questions": ["unresolved items from FAQs"] +} +``` + +## Stage Complete + +This is the terminal stage. If the user wants to revise, loop back to the relevant stage. Otherwise, the workflow is done. diff --git a/src/bmm-skills/1-analysis/bmad-product-brief/bmad-manifest.json b/src/bmm-skills/1-analysis/bmad-product-brief/bmad-manifest.json index 42ea35c0a..28e2f2b17 100644 --- a/src/bmm-skills/1-analysis/bmad-product-brief/bmad-manifest.json +++ b/src/bmm-skills/1-analysis/bmad-product-brief/bmad-manifest.json @@ -8,7 +8,7 @@ "description": "Produces executive product brief and optional LLM distillate for PRD input.", "supports-headless": true, "phase-name": "1-analysis", - "after": ["brainstorming, perform-research"], + "after": ["brainstorming", "perform-research"], "before": ["create-prd"], "is-required": true, "output-location": "{planning_artifacts}" diff --git a/src/bmm-skills/module-help.csv b/src/bmm-skills/module-help.csv index 8e34473c1..899dfd8e2 100644 --- a/src/bmm-skills/module-help.csv +++ b/src/bmm-skills/module-help.csv @@ -12,7 +12,8 @@ BMad Method,bmad-brainstorming,Brainstorm Project,BP,Expert guided facilitation BMad Method,bmad-market-research,Market Research,MR,"Market analysis competitive landscape customer needs and trends.",,1-analysis,,,false,"planning_artifacts|project-knowledge",research documents BMad Method,bmad-domain-research,Domain Research,DR,Industry domain deep dive subject matter expertise and terminology.,,1-analysis,,,false,"planning_artifacts|project_knowledge",research documents BMad Method,bmad-technical-research,Technical Research,TR,Technical feasibility architecture options and implementation approaches.,,1-analysis,,,false,"planning_artifacts|project_knowledge",research documents -BMad Method,bmad-product-brief,Create Brief,CB,A guided experience to nail down your product idea.,,1-analysis,,,false,planning_artifacts,product brief +BMad Method,bmad-product-brief,Create Brief,CB,An expert guided experience to nail down your product idea in a brief. a gentler approach than PRFAQ when you are already sure of your concept and nothing will sway you.,,-A,1-analysis,,,false,planning_artifacts,product brief +BMad Method,bmad-prfaq,PRFAQ Challenge,WB,Working Backwards guided experience to forge and stress-test your product concept to ensure you have a great product that users will love and need through the PRFAQ gauntlet to determine feasibility and alignment with user needs. alternative to product brief.,,-H,1-analysis,,,false,planning_artifacts,prfaq document BMad Method,bmad-create-prd,Create PRD,CP,Expert led facilitation to produce your Product Requirements Document.,,2-planning,,,true,planning_artifacts,prd BMad Method,bmad-validate-prd,Validate PRD,VP,,,[path],2-planning,bmad-create-prd,,false,planning_artifacts,prd validation report BMad Method,bmad-edit-prd,Edit PRD,EP,,,[path],2-planning,bmad-validate-prd,,false,planning_artifacts,updated prd diff --git a/tools/validate-file-refs.js b/tools/validate-file-refs.js index a3b91f2fb..5f412eb88 100644 --- a/tools/validate-file-refs.js +++ b/tools/validate-file-refs.js @@ -83,7 +83,7 @@ function escapeTableCell(str) { const INSTALL_ONLY_PATHS = ['_config/']; // Files that are generated at install time and don't exist in the source tree -const INSTALL_GENERATED_FILES = ['config.yaml']; +const INSTALL_GENERATED_FILES = ['config.yaml', 'config.user.yaml']; // Variables that indicate a path is not statically resolvable const UNRESOLVABLE_VARS = [ diff --git a/website/public/workflow-map-diagram.html b/website/public/workflow-map-diagram.html index 2c6aedc86..1702d227e 100644 --- a/website/public/workflow-map-diagram.html +++ b/website/public/workflow-map-diagram.html @@ -169,13 +169,24 @@
- create-product-brief + product-brief + or ↓
M
Mary
product-brief.md →
+
+
+ prfaq + or ↑ +
+
+
M
Mary
+ prfaq.md → +
+
From aae6ddb8c973b2057dee44eb4f7f600e220a040a Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 28 Mar 2026 18:45:55 -0500 Subject: [PATCH 09/26] fix: remove ancestor_conflict_check from all platforms (#2158) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ancestor directory walk was based on the false premise that IDEs like Claude Code inherit skills from parent directories — they do not. The check blocked legitimate installations when unrelated BMAD skills existed anywhere up the directory tree. --- test/test-installation-components.js | 120 +----------------------- tools/installer/ide/platform-codes.yaml | 4 - 2 files changed, 3 insertions(+), 121 deletions(-) diff --git a/test/test-installation-components.js b/test/test-installation-components.js index 38da1eba4..43c40d839 100644 --- a/test/test-installation-components.js +++ b/test/test-installation-components.js @@ -337,8 +337,6 @@ async function runTests() { assert(opencodeInstaller?.target_dir === '.opencode/skills', 'OpenCode target_dir uses native skills path'); - assert(opencodeInstaller?.ancestor_conflict_check === true, 'OpenCode installer enables ancestor conflict checks'); - assert( Array.isArray(opencodeInstaller?.legacy_targets) && ['.opencode/agents', '.opencode/commands', '.opencode/agent', '.opencode/command'].every((legacyTarget) => @@ -401,8 +399,6 @@ async function runTests() { assert(claudeInstaller?.target_dir === '.claude/skills', 'Claude Code target_dir uses native skills path'); - assert(claudeInstaller?.ancestor_conflict_check === true, 'Claude Code installer enables ancestor conflict checks'); - assert( Array.isArray(claudeInstaller?.legacy_targets) && claudeInstaller.legacy_targets.includes('.claude/commands'), 'Claude Code installer cleans legacy command output', @@ -441,44 +437,7 @@ async function runTests() { console.log(''); - // ============================================================ - // Test 10: Claude Code Ancestor Conflict - // ============================================================ - console.log(`${colors.yellow}Test Suite 10: Claude Code Ancestor Conflict${colors.reset}\n`); - - try { - const tempRoot10 = await fs.mkdtemp(path.join(os.tmpdir(), 'bmad-claude-code-ancestor-test-')); - const parentProjectDir10 = path.join(tempRoot10, 'parent'); - const childProjectDir10 = path.join(parentProjectDir10, 'child'); - const installedBmadDir10 = await createTestBmadFixture(); - - await fs.ensureDir(path.join(parentProjectDir10, '.git')); - await fs.ensureDir(path.join(parentProjectDir10, '.claude', 'skills', 'bmad-existing')); - await fs.ensureDir(childProjectDir10); - await fs.writeFile(path.join(parentProjectDir10, '.claude', 'skills', 'bmad-existing', 'SKILL.md'), 'legacy\n'); - - const ideManager10 = new IdeManager(); - await ideManager10.ensureInitialized(); - const result10 = await ideManager10.setup('claude-code', childProjectDir10, installedBmadDir10, { - silent: true, - selectedModules: ['bmm'], - }); - const expectedConflictDir10 = await fs.realpath(path.join(parentProjectDir10, '.claude', 'skills')); - - assert(result10.success === false, 'Claude Code setup refuses install when ancestor skills already exist'); - assert(result10.handlerResult?.reason === 'ancestor-conflict', 'Claude Code ancestor rejection reports ancestor-conflict reason'); - assert( - result10.handlerResult?.conflictDir === expectedConflictDir10, - 'Claude Code ancestor rejection points at ancestor .claude/skills dir', - ); - - await fs.remove(tempRoot10); - await fs.remove(path.dirname(installedBmadDir10)); - } catch (error) { - assert(false, 'Claude Code ancestor conflict protection test succeeds', error.message); - } - - console.log(''); + // Test 10: Removed — ancestor conflict check no longer applies (no IDE inherits skills from parent dirs) // ============================================================ // Test 11: Codex Native Skills Install @@ -492,8 +451,6 @@ async function runTests() { assert(codexInstaller?.target_dir === '.agents/skills', 'Codex target_dir uses native skills path'); - assert(codexInstaller?.ancestor_conflict_check === true, 'Codex installer enables ancestor conflict checks'); - assert( Array.isArray(codexInstaller?.legacy_targets) && codexInstaller.legacy_targets.includes('.codex/prompts'), 'Codex installer cleans legacy prompt output', @@ -532,41 +489,7 @@ async function runTests() { console.log(''); - // ============================================================ - // Test 12: Codex Ancestor Conflict - // ============================================================ - console.log(`${colors.yellow}Test Suite 12: Codex Ancestor Conflict${colors.reset}\n`); - - try { - const tempRoot12 = await fs.mkdtemp(path.join(os.tmpdir(), 'bmad-codex-ancestor-test-')); - const parentProjectDir12 = path.join(tempRoot12, 'parent'); - const childProjectDir12 = path.join(parentProjectDir12, 'child'); - const installedBmadDir12 = await createTestBmadFixture(); - - await fs.ensureDir(path.join(parentProjectDir12, '.git')); - await fs.ensureDir(path.join(parentProjectDir12, '.agents', 'skills', 'bmad-existing')); - await fs.ensureDir(childProjectDir12); - await fs.writeFile(path.join(parentProjectDir12, '.agents', 'skills', 'bmad-existing', 'SKILL.md'), 'legacy\n'); - - const ideManager12 = new IdeManager(); - await ideManager12.ensureInitialized(); - const result12 = await ideManager12.setup('codex', childProjectDir12, installedBmadDir12, { - silent: true, - selectedModules: ['bmm'], - }); - const expectedConflictDir12 = await fs.realpath(path.join(parentProjectDir12, '.agents', 'skills')); - - assert(result12.success === false, 'Codex setup refuses install when ancestor skills already exist'); - assert(result12.handlerResult?.reason === 'ancestor-conflict', 'Codex ancestor rejection reports ancestor-conflict reason'); - assert(result12.handlerResult?.conflictDir === expectedConflictDir12, 'Codex ancestor rejection points at ancestor .agents/skills dir'); - - await fs.remove(tempRoot12); - await fs.remove(path.dirname(installedBmadDir12)); - } catch (error) { - assert(false, 'Codex ancestor conflict protection test succeeds', error.message); - } - - console.log(''); + // Test 12: Removed — ancestor conflict check no longer applies (no IDE inherits skills from parent dirs) // ============================================================ // Test 13: Cursor Native Skills Install @@ -683,44 +606,7 @@ async function runTests() { console.log(''); - // ============================================================ - // Test 15: OpenCode Ancestor Conflict - // ============================================================ - console.log(`${colors.yellow}Test Suite 15: OpenCode Ancestor Conflict${colors.reset}\n`); - - try { - const tempRoot = await fs.mkdtemp(path.join(os.tmpdir(), 'bmad-opencode-ancestor-test-')); - const parentProjectDir = path.join(tempRoot, 'parent'); - const childProjectDir = path.join(parentProjectDir, 'child'); - const installedBmadDir = await createTestBmadFixture(); - - await fs.ensureDir(path.join(parentProjectDir, '.git')); - await fs.ensureDir(path.join(parentProjectDir, '.opencode', 'skills', 'bmad-existing')); - await fs.ensureDir(childProjectDir); - await fs.writeFile(path.join(parentProjectDir, '.opencode', 'skills', 'bmad-existing', 'SKILL.md'), 'legacy\n'); - - const ideManager = new IdeManager(); - await ideManager.ensureInitialized(); - const result = await ideManager.setup('opencode', childProjectDir, installedBmadDir, { - silent: true, - selectedModules: ['bmm'], - }); - const expectedConflictDir = await fs.realpath(path.join(parentProjectDir, '.opencode', 'skills')); - - assert(result.success === false, 'OpenCode setup refuses install when ancestor skills already exist'); - assert(result.handlerResult?.reason === 'ancestor-conflict', 'OpenCode ancestor rejection reports ancestor-conflict reason'); - assert( - result.handlerResult?.conflictDir === expectedConflictDir, - 'OpenCode ancestor rejection points at ancestor .opencode/skills dir', - ); - - await fs.remove(tempRoot); - await fs.remove(path.dirname(installedBmadDir)); - } catch (error) { - assert(false, 'OpenCode ancestor conflict protection test succeeds', error.message); - } - - console.log(''); + // Test 15: Removed — ancestor conflict check no longer applies (no IDE inherits skills from parent dirs) // Test 16: Removed — old YAML→XML QA agent compilation no longer applies (agents now use SKILL.md format) diff --git a/tools/installer/ide/platform-codes.yaml b/tools/installer/ide/platform-codes.yaml index e7046d32f..859a39a98 100644 --- a/tools/installer/ide/platform-codes.yaml +++ b/tools/installer/ide/platform-codes.yaml @@ -33,7 +33,6 @@ platforms: legacy_targets: - .claude/commands target_dir: .claude/skills - ancestor_conflict_check: true cline: name: "Cline" @@ -51,7 +50,6 @@ platforms: - .codex/prompts - ~/.codex/prompts target_dir: .agents/skills - ancestor_conflict_check: true codebuddy: name: "CodeBuddy" @@ -107,7 +105,6 @@ platforms: preferred: false installer: target_dir: .agents/skills - ancestor_conflict_check: false kilo: name: "KiloCoder" @@ -142,7 +139,6 @@ platforms: - .opencode/agent - .opencode/command target_dir: .opencode/skills - ancestor_conflict_check: true pi: name: "Pi" From 04513e5953d5666b24090dc9d651c3be14a8776c Mon Sep 17 00:00:00 2001 From: Alex Verkhovsky Date: Sat, 28 Mar 2026 19:24:29 -0600 Subject: [PATCH 10/26] feat(installer): restore KiloCoder support and installer (#2151) Kilo Code now supports Agent Skills. Remove the suspended flag, restore it in the IDE picker, and replace the suspended test suite with a full native-skills installation test. - Remove suspended message from platform-codes.yaml - Rewrite test suite 22: config, IDE picker, install, skill output, legacy cleanup, and reinstall assertions - Update migration checklist to reflect active status Co-authored-by: Junie Co-authored-by: Brian --- test/test-installation-components.js | 51 +++++++++++-------- .../docs/native-skills-migration-checklist.md | 13 ++--- tools/installer/ide/platform-codes.yaml | 1 - 3 files changed, 36 insertions(+), 29 deletions(-) diff --git a/test/test-installation-components.js b/test/test-installation-components.js index 43c40d839..4e5fa7282 100644 --- a/test/test-installation-components.js +++ b/test/test-installation-components.js @@ -926,27 +926,34 @@ async function runTests() { console.log(''); // ============================================================ - // Suite 22: KiloCoder Suspended + // Suite 22: KiloCoder Native Skills // ============================================================ - console.log(`${colors.yellow}Test Suite 22: KiloCoder Suspended${colors.reset}\n`); + console.log(`${colors.yellow}Test Suite 22: KiloCoder Native Skills${colors.reset}\n`); try { clearCache(); const platformCodes22 = await loadPlatformCodes(); const kiloConfig22 = platformCodes22.platforms.kilo; - assert(typeof kiloConfig22?.suspended === 'string', 'KiloCoder has a suspended message in platform config'); + assert(!kiloConfig22?.suspended, 'KiloCoder is not suspended'); - assert(kiloConfig22?.installer?.target_dir === '.kilocode/skills', 'KiloCoder retains target_dir config for future use'); + assert(kiloConfig22?.installer?.target_dir === '.kilocode/skills', 'KiloCoder target_dir uses native skills path'); + + assert( + Array.isArray(kiloConfig22?.installer?.legacy_targets) && kiloConfig22.installer.legacy_targets.includes('.kilocode/workflows'), + 'KiloCoder installer cleans legacy workflows output', + ); const ideManager22 = new IdeManager(); await ideManager22.ensureInitialized(); - // Should not appear in available IDEs + // Should appear in available IDEs const availableIdes22 = ideManager22.getAvailableIdes(); - assert(!availableIdes22.some((ide) => ide.value === 'kilo'), 'KiloCoder is hidden from IDE selection'); + assert( + availableIdes22.some((ide) => ide.value === 'kilo'), + 'KiloCoder appears in IDE selection', + ); - // Setup should be blocked but legacy files should be cleaned up const tempProjectDir22 = await fs.mkdtemp(path.join(os.tmpdir(), 'bmad-kilo-test-')); const installedBmadDir22 = await createTestBmadFixture(); @@ -960,25 +967,29 @@ async function runTests() { selectedModules: ['bmm'], }); - assert(result22.success === false, 'KiloCoder setup is blocked when suspended'); - assert(result22.error === 'suspended', 'KiloCoder setup returns suspended error'); + assert(result22.success === true, 'KiloCoder setup succeeds against temp project'); - // Should not write new skill files - assert( - !(await fs.pathExists(path.join(tempProjectDir22, '.kilocode', 'skills'))), - 'KiloCoder does not create skills directory when suspended', - ); + const skillFile22 = path.join(tempProjectDir22, '.kilocode', 'skills', 'bmad-master', 'SKILL.md'); + assert(await fs.pathExists(skillFile22), 'KiloCoder install writes SKILL.md directory output'); - // Legacy files should be cleaned up - assert( - !(await fs.pathExists(path.join(tempProjectDir22, '.kilocode', 'workflows'))), - 'KiloCoder legacy workflows are cleaned up even when suspended', - ); + const skillContent22 = await fs.readFile(skillFile22, 'utf8'); + const nameMatch22 = skillContent22.match(/^name:\s*(.+)$/m); + assert(nameMatch22 && nameMatch22[1].trim() === 'bmad-master', 'KiloCoder skill name frontmatter matches directory name exactly'); + + assert(!(await fs.pathExists(path.join(tempProjectDir22, '.kilocode', 'workflows'))), 'KiloCoder setup removes legacy workflows dir'); + + const result22b = await ideManager22.setup('kilo', tempProjectDir22, installedBmadDir22, { + silent: true, + selectedModules: ['bmm'], + }); + + assert(result22b.success === true, 'KiloCoder reinstall/upgrade succeeds over existing skills'); + assert(await fs.pathExists(skillFile22), 'KiloCoder reinstall preserves SKILL.md output'); await fs.remove(tempProjectDir22); await fs.remove(path.dirname(installedBmadDir22)); } catch (error) { - assert(false, 'KiloCoder suspended test succeeds', error.message); + assert(false, 'KiloCoder native skills test succeeds', error.message); } console.log(''); diff --git a/tools/docs/native-skills-migration-checklist.md b/tools/docs/native-skills-migration-checklist.md index 2f0f31344..80c6a9296 100644 --- a/tools/docs/native-skills-migration-checklist.md +++ b/tools/docs/native-skills-migration-checklist.md @@ -205,17 +205,14 @@ Support assumption: full Agent Skills support. BMAD currently uses a custom inst - [x] Implement/extend automated tests — 11 assertions in test suite 17 including marker cleanup - [x] Commit -## KiloCoder — SUSPENDED - -**Status: Kilo Code does not support the Agent Skills standard.** The original migration assumed skills support because Kilo forked from Roo Code, but manual IDE verification confirmed Kilo has not merged that feature. BMAD support is paused until Kilo implements skills. +## KiloCoder **Install:** VS Code extension `kilocode.kilo-code` — search "Kilo Code" in Extensions or `code --install-extension kilocode.kilo-code` -- [x] ~~Confirm KiloCoder native skills path~~ — **FALSE**: assumed from Roo Code fork, not verified. Manual testing showed no skills support in the IDE -- [x] Config and installer code retained in platform-codes.yaml with `suspended` flag — hidden from IDE picker, setup blocked with explanation -- [x] Installer fails early (before writing `_bmad/`) if Kilo is the only selected IDE, protecting existing installations -- [x] Legacy cleanup still runs for `.kilocode/workflows` and `.kilocodemodes` when users switch to a different IDE -- [x] Automated tests — 7 assertions in suite 22 (suspended config, hidden from picker, setup blocked, no files written, legacy cleanup) +- [x] Confirm KiloCoder native skills path — `.kilocode/skills` +- [x] Legacy cleanup for `.kilocode/workflows` and `.kilocodemodes` +- [x] Automated tests — suite 22 (config, IDE picker, install, skill output, legacy cleanup, reinstall) +- [x] Commit ## Gemini CLI diff --git a/tools/installer/ide/platform-codes.yaml b/tools/installer/ide/platform-codes.yaml index 859a39a98..4b08046f1 100644 --- a/tools/installer/ide/platform-codes.yaml +++ b/tools/installer/ide/platform-codes.yaml @@ -109,7 +109,6 @@ platforms: kilo: name: "KiloCoder" preferred: false - suspended: "Kilo Code does not yet support the Agent Skills standard. Support is paused until they implement it. See https://github.com/kilocode/kilo-code/issues for updates." installer: legacy_targets: - .kilocode/workflows From 7dd49a452f921d05c9ae960f1bc97f2c2aede2c8 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 28 Mar 2026 20:35:11 -0500 Subject: [PATCH 11/26] refactor: remove bmad-init skill, standardize config loading (#2159) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: remove bmad-init skill and standardize config loading across all skills Remove the bmad-init core skill entirely — all agents and workflow skills now load config directly from their module's config.yaml instead of delegating to bmad-init as an intermediary. This eliminates the Python script dependency and simplifies the activation path for every skill. Changes across all skill types: - Agents (9 skills): Replace "Load config via bmad-init skill" block with direct config loading from `{project-root}/_bmad/bmm/config.yaml`, resolving user_name, communication_language, document_output_language, planning_artifacts, and project_knowledge - Workflow skills (12 skills): Standardize INITIALIZATION/Configuration Loading sections to a consistent Activation format matching the agent pattern - bmad-prfaq: Align activation to standard config pattern, convert scripted dialogue to outcome-focused instructions (no direct quotes) - bmad-product-brief: Remove External Skills section referencing bmad-init - bmad-party-mode: Standardize initialization to Activation format - bmad-advanced-elicitation: Inline agent_party path instead of config var - bmad-distillator: Remove unused argument-hint frontmatter - Delete legacy create-prd/ directory (superseded by bmad-create-prd) - Delete bmad-init skill entirely: SKILL.md, bmad_init.py, core-module.yaml, and test suite * fix: remove remaining bmad-init references from marketplace.json and distillate examples Clean up missed references: remove bmad-init from marketplace.json skills list, replace bmad-init examples in distillate-format-reference.md with bmad-help/bmad-setup to keep examples valid without referencing a removed skill. * fix: update broken file references in bmad-edit-prd after create-prd deletion Point prdPurpose refs from deleted create-prd/data/ to bmad-create-prd/data/ and validationWorkflow ref from create-prd/steps-v/ to bmad-validate-prd/steps-v/. --- .claude-plugin/marketplace.json | 1 - .../1-analysis/bmad-agent-analyst/SKILL.md | 10 +- .../bmad-agent-tech-writer/SKILL.md | 10 +- .../bmad-document-project/workflow.md | 16 +- src/bmm-skills/1-analysis/bmad-prfaq/SKILL.md | 21 +- .../1-analysis/bmad-product-brief/SKILL.md | 7 +- .../research/bmad-domain-research/workflow.md | 12 +- .../research/bmad-market-research/workflow.md | 12 +- .../bmad-technical-research/workflow.md | 12 +- .../2-plan-workflows/bmad-agent-pm/SKILL.md | 10 +- .../bmad-agent-ux-designer/SKILL.md | 10 +- .../bmad-create-prd/workflow.md | 17 +- .../bmad-create-ux-design/workflow.md | 15 +- .../steps-e/step-e-01-discovery.md | 2 +- .../steps-e/step-e-01b-legacy-conversion.md | 2 +- .../bmad-edit-prd/steps-e/step-e-02-review.md | 2 +- .../bmad-edit-prd/steps-e/step-e-03-edit.md | 2 +- .../steps-e/step-e-04-complete.md | 2 +- .../bmad-edit-prd/workflow.md | 17 +- .../bmad-validate-prd/workflow.md | 17 +- .../create-prd/data/domain-complexity.csv | 15 - .../create-prd/data/prd-purpose.md | 197 ------ .../create-prd/data/project-types.csv | 11 - .../create-prd/steps-v/step-v-01-discovery.md | 224 ------- .../steps-v/step-v-02-format-detection.md | 191 ------ .../steps-v/step-v-02b-parity-check.md | 209 ------ .../steps-v/step-v-03-density-validation.md | 174 ----- .../step-v-04-brief-coverage-validation.md | 214 ------ .../step-v-05-measurability-validation.md | 228 ------- .../step-v-06-traceability-validation.md | 217 ------ ...-v-07-implementation-leakage-validation.md | 205 ------ .../step-v-08-domain-compliance-validation.md | 243 ------- .../step-v-09-project-type-validation.md | 263 -------- .../steps-v/step-v-10-smart-validation.md | 209 ------ .../step-v-11-holistic-quality-validation.md | 264 -------- .../step-v-12-completeness-validation.md | 242 ------- .../steps-v/step-v-13-report-complete.md | 232 ------- .../create-prd/workflow-validate-prd.md | 65 -- .../bmad-agent-architect/SKILL.md | 10 +- .../workflow.md | 18 +- .../bmad-create-architecture/workflow.md | 22 +- .../bmad-create-epics-and-stories/workflow.md | 20 +- .../bmad-generate-project-context/workflow.md | 20 +- .../4-implementation/bmad-agent-dev/SKILL.md | 10 +- .../4-implementation/bmad-agent-qa/SKILL.md | 10 +- .../bmad-agent-quick-flow-solo-dev/SKILL.md | 10 +- .../4-implementation/bmad-agent-sm/SKILL.md | 10 +- .../bmad-advanced-elicitation/SKILL.md | 3 +- src/core-skills/bmad-distillator/SKILL.md | 1 - .../resources/distillate-format-reference.md | 18 +- src/core-skills/bmad-init/SKILL.md | 100 --- .../bmad-init/resources/core-module.yaml | 25 - .../bmad-init/scripts/bmad_init.py | 624 ------------------ .../bmad-init/scripts/tests/test_bmad_init.py | 393 ----------- src/core-skills/bmad-party-mode/workflow.md | 17 +- 55 files changed, 179 insertions(+), 4732 deletions(-) delete mode 100644 src/bmm-skills/2-plan-workflows/create-prd/data/domain-complexity.csv delete mode 100644 src/bmm-skills/2-plan-workflows/create-prd/data/prd-purpose.md delete mode 100644 src/bmm-skills/2-plan-workflows/create-prd/data/project-types.csv delete mode 100644 src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-01-discovery.md delete mode 100644 src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-02-format-detection.md delete mode 100644 src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-02b-parity-check.md delete mode 100644 src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-03-density-validation.md delete mode 100644 src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-04-brief-coverage-validation.md delete mode 100644 src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-05-measurability-validation.md delete mode 100644 src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-06-traceability-validation.md delete mode 100644 src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-07-implementation-leakage-validation.md delete mode 100644 src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-08-domain-compliance-validation.md delete mode 100644 src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-09-project-type-validation.md delete mode 100644 src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-10-smart-validation.md delete mode 100644 src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-11-holistic-quality-validation.md delete mode 100644 src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-12-completeness-validation.md delete mode 100644 src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-13-report-complete.md delete mode 100644 src/bmm-skills/2-plan-workflows/create-prd/workflow-validate-prd.md delete mode 100644 src/core-skills/bmad-init/SKILL.md delete mode 100644 src/core-skills/bmad-init/resources/core-module.yaml delete mode 100644 src/core-skills/bmad-init/scripts/bmad_init.py delete mode 100644 src/core-skills/bmad-init/scripts/tests/test_bmad_init.py diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 6f4f0e0c0..42444ca99 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -19,7 +19,6 @@ }, "skills": [ "./src/core-skills/bmad-help", - "./src/core-skills/bmad-init", "./src/core-skills/bmad-brainstorming", "./src/core-skills/bmad-distillator", "./src/core-skills/bmad-party-mode", diff --git a/src/bmm-skills/1-analysis/bmad-agent-analyst/SKILL.md b/src/bmm-skills/1-analysis/bmad-agent-analyst/SKILL.md index 399af2840..d85063694 100644 --- a/src/bmm-skills/1-analysis/bmad-agent-analyst/SKILL.md +++ b/src/bmm-skills/1-analysis/bmad-agent-analyst/SKILL.md @@ -41,10 +41,12 @@ When you are in this persona and the user calls a skill, this persona must carry ## On Activation -1. **Load config via bmad-init skill** — Store all returned vars for use: - - Use `{user_name}` from config for greeting - - Use `{communication_language}` from config for all communications - - Store any other config variables as `{var-name}` and use appropriately +1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: + - Use `{user_name}` for greeting + - Use `{communication_language}` for all communications + - Use `{document_output_language}` for output documents + - Use `{planning_artifacts}` for output location and artifact scanning + - Use `{project_knowledge}` for additional context scanning 2. **Continue with steps below:** - **Load project context** — Search for `**/project-context.md`. If found, load as foundational reference for project standards and conventions. If not found, continue without it. diff --git a/src/bmm-skills/1-analysis/bmad-agent-tech-writer/SKILL.md b/src/bmm-skills/1-analysis/bmad-agent-tech-writer/SKILL.md index 032ea56f2..bb645095a 100644 --- a/src/bmm-skills/1-analysis/bmad-agent-tech-writer/SKILL.md +++ b/src/bmm-skills/1-analysis/bmad-agent-tech-writer/SKILL.md @@ -39,10 +39,12 @@ When you are in this persona and the user calls a skill, this persona must carry ## On Activation -1. **Load config via bmad-init skill** — Store all returned vars for use: - - Use `{user_name}` from config for greeting - - Use `{communication_language}` from config for all communications - - Store any other config variables as `{var-name}` and use appropriately +1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: + - Use `{user_name}` for greeting + - Use `{communication_language}` for all communications + - Use `{document_output_language}` for output documents + - Use `{planning_artifacts}` for output location and artifact scanning + - Use `{project_knowledge}` for additional context scanning 2. **Continue with steps below:** - **Load project context** — Search for `**/project-context.md`. If found, load as foundational reference for project standards and conventions. If not found, continue without it. diff --git a/src/bmm-skills/1-analysis/bmad-document-project/workflow.md b/src/bmm-skills/1-analysis/bmad-document-project/workflow.md index 344873050..a21e54ba7 100644 --- a/src/bmm-skills/1-analysis/bmad-document-project/workflow.md +++ b/src/bmm-skills/1-analysis/bmad-document-project/workflow.md @@ -9,16 +9,14 @@ ## INITIALIZATION -### Configuration Loading +1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:: + - Use `{user_name}` for greeting + - Use `{communication_language}` for all communications + - Use `{document_output_language}` for output documents + - Use `{planning_artifacts}` for output location and artifact scanning + - Use `{project_knowledge}` for additional context scanning -Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: - -- `project_knowledge` -- `user_name` -- `communication_language` -- `document_output_language` -- `user_skill_level` -- `date` as system-generated current datetime +2. **Greet user** as `{user_name}`, speaking in `{communication_language}`. --- diff --git a/src/bmm-skills/1-analysis/bmad-prfaq/SKILL.md b/src/bmm-skills/1-analysis/bmad-prfaq/SKILL.md index a272de411..36e9b3ba4 100644 --- a/src/bmm-skills/1-analysis/bmad-prfaq/SKILL.md +++ b/src/bmm-skills/1-analysis/bmad-prfaq/SKILL.md @@ -21,13 +21,18 @@ The PRFAQ forces customer-first clarity: write the press release announcing the ## On Activation -Load available config from `{project-root}/_bmad/_config/bmm/config.yaml` and `{project-root}/_bmad/_config/bmm/config.user.yaml` (root level and `bmm` section). If config is missing, let the user know `bmad-builder-setup` can configure the module at any time. Use sensible defaults for anything not configured. +1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:: + - Use `{user_name}` for greeting + - Use `{communication_language}` for all communications + - Use `{document_output_language}` for output documents + - Use `{planning_artifacts}` for output location and artifact scanning + - Use `{project_knowledge}` for additional context scanning -Resolve: `{user_name}`, `{communication_language}`, `{document_output_language}`, `{planning_artifacts}`, `{project_name}`. +2. **Greet user** as `{user_name}`, speaking in `{communication_language}`. Be warm but efficient — dream builder energy. -**Resume detection:** Check if `{planning_artifacts}/prfaq-{project_name}.md` already exists. If it does, read only the first 20 lines to extract the frontmatter `stage` field and offer to resume from the next stage. Do not read the full document. If the user confirms, route directly to that stage's reference file. +3. **Resume detection:** Check if `{planning_artifacts}/prfaq-{project_name}.md` already exists. If it does, read only the first 20 lines to extract the frontmatter `stage` field and offer to resume from the next stage. Do not read the full document. If the user confirms, route directly to that stage's reference file. -**Mode detection:** +4. **Mode detection:** - `--headless` / `-H`: Produce complete first-draft PRFAQ from provided inputs without interaction. Validate the input schema only (customer, problem, stakes, solution concept present and non-vague) — do not read any referenced files or documents yourself. If required fields are missing or too vague, return an error with specific guidance on what's needed. Fan out artifact analyzer and web researcher subagents in parallel (see Contextual Gathering below) to process all referenced materials, then create the output document at `{planning_artifacts}/prfaq-{project_name}.md` using `./assets/prfaq-template.md` and route to `./references/press-release.md`. - Default: Full interactive coaching — the gauntlet. @@ -35,11 +40,9 @@ Resolve: `{user_name}`, `{communication_language}`, `{document_output_language}` - **Required:** customer (specific persona), problem (concrete), stakes (why it matters), solution (concept) - **Optional:** competitive context, technical constraints, team/org context, target market, existing research -**Set the tone immediately.** This isn't the warm, treasure-hunt analyst greeting. Frame the challenge: +**Set the tone immediately.** This isn't a warm, exploratory greeting. Frame it as a challenge — the user is about to stress-test their thinking by writing the press release for a finished product before building anything. Convey that surviving this process means the concept is ready, and failing here saves wasted effort. Be direct and energizing. -*"This is the PRFAQ challenge — Working Backwards. I'm going to push hard on your thinking. We'll write the press release for your finished product before a single line of code exists. If your concept can survive this process, it's ready. If it can't — better to find out now. Let's go."* - -Follow with a brief grounding: *"A PRFAQ is Amazon's Working Backwards tool — you write the press release announcing your finished product, then answer the hardest questions customers and stakeholders would ask. It forces clarity before you commit resources."* +Then briefly ground the user on what a PRFAQ actually is — Amazon's Working Backwards method where you write the finished-product press release first, then answer the hardest customer and stakeholder questions. The point is forcing clarity before committing resources. Then proceed to Stage 1 below. @@ -50,7 +53,7 @@ Then proceed to Stage 1 below. **Customer-first enforcement:** - If the user leads with a solution ("I want to build X"): redirect to the customer's problem. Don't let them skip the pain. -- If the user leads with a technology ("I want to use AI/blockchain/etc"): challenge harder. *"Technology is a 'how', not a 'why'. What human problem are you solving? Remove the buzzword — does anyone still care?"* +- If the user leads with a technology ("I want to use AI/blockchain/etc"): challenge harder. Technology is a "how", not a "why" — push them to articulate the human problem. Strip away the buzzword and ask whether anyone still cares. - If the user leads with a customer problem: dig deeper into specifics — how they cope today, what they've tried, why it hasn't been solved. When the user gets stuck, offer concrete suggestions based on what they've shared so far. Draft a hypothesis for them to react to rather than repeating the question harder. 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 da612e54f..06ba558c9 100644 --- a/src/bmm-skills/1-analysis/bmad-product-brief/SKILL.md +++ b/src/bmm-skills/1-analysis/bmad-product-brief/SKILL.md @@ -37,7 +37,7 @@ Check activation context immediately: - Use `{planning_artifacts}` for output location and artifact scanning - Use `{project_knowledge}` for additional context scanning -2. **Greet user** as `{user_name}`, speaking in `{communication_language}`. Be warm but efficient — dream builder energy. +2. **Greet user** as `{user_name}`, speaking in `{communication_language}`. 3. **Stage 1: Understand Intent** (handled here in SKILL.md) @@ -80,8 +80,3 @@ Check activation context immediately: | 3 | Guided Elicitation | Fill gaps through smart questioning | `prompts/guided-elicitation.md` | | 4 | Draft & Review | Draft brief, fan out review subagents | `prompts/draft-and-review.md` | | 5 | Finalize | Polish, output, offer distillate | `prompts/finalize.md` | - -## External Skills - -This workflow uses: -- `bmad-init` — Configuration loading (module: bmm) diff --git a/src/bmm-skills/1-analysis/research/bmad-domain-research/workflow.md b/src/bmm-skills/1-analysis/research/bmad-domain-research/workflow.md index 09976cb9a..fca2613f2 100644 --- a/src/bmm-skills/1-analysis/research/bmad-domain-research/workflow.md +++ b/src/bmm-skills/1-analysis/research/bmad-domain-research/workflow.md @@ -8,12 +8,14 @@ **⛔ Web search required.** If unavailable, abort and tell the user. -## CONFIGURATION +## Activation -Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: -- `project_name`, `output_folder`, `planning_artifacts`, `user_name` -- `communication_language`, `document_output_language`, `user_skill_level` -- `date` as a system-generated value +1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:: + - Use `{user_name}` for greeting + - Use `{communication_language}` for all communications + - Use `{document_output_language}` for output documents + - Use `{planning_artifacts}` for output location and artifact scanning + - Use `{project_knowledge}` for additional context scanning ## QUICK TOPIC DISCOVERY diff --git a/src/bmm-skills/1-analysis/research/bmad-market-research/workflow.md b/src/bmm-skills/1-analysis/research/bmad-market-research/workflow.md index 23822ca3b..77cb0cf08 100644 --- a/src/bmm-skills/1-analysis/research/bmad-market-research/workflow.md +++ b/src/bmm-skills/1-analysis/research/bmad-market-research/workflow.md @@ -8,12 +8,14 @@ **⛔ Web search required.** If unavailable, abort and tell the user. -## CONFIGURATION +## Activation -Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: -- `project_name`, `output_folder`, `planning_artifacts`, `user_name` -- `communication_language`, `document_output_language`, `user_skill_level` -- `date` as a system-generated value +1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:: + - Use `{user_name}` for greeting + - Use `{communication_language}` for all communications + - Use `{document_output_language}` for output documents + - Use `{planning_artifacts}` for output location and artifact scanning + - Use `{project_knowledge}` for additional context scanning ## QUICK TOPIC DISCOVERY diff --git a/src/bmm-skills/1-analysis/research/bmad-technical-research/workflow.md b/src/bmm-skills/1-analysis/research/bmad-technical-research/workflow.md index bf7020f56..f85b1479d 100644 --- a/src/bmm-skills/1-analysis/research/bmad-technical-research/workflow.md +++ b/src/bmm-skills/1-analysis/research/bmad-technical-research/workflow.md @@ -9,12 +9,14 @@ **⛔ Web search required.** If unavailable, abort and tell the user. -## CONFIGURATION +## Activation -Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: -- `project_name`, `output_folder`, `planning_artifacts`, `user_name` -- `communication_language`, `document_output_language`, `user_skill_level` -- `date` as a system-generated value +1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:: + - Use `{user_name}` for greeting + - Use `{communication_language}` for all communications + - Use `{document_output_language}` for output documents + - Use `{planning_artifacts}` for output location and artifact scanning + - Use `{project_knowledge}` for additional context scanning ## QUICK TOPIC DISCOVERY diff --git a/src/bmm-skills/2-plan-workflows/bmad-agent-pm/SKILL.md b/src/bmm-skills/2-plan-workflows/bmad-agent-pm/SKILL.md index eb57ce029..89f94e24c 100644 --- a/src/bmm-skills/2-plan-workflows/bmad-agent-pm/SKILL.md +++ b/src/bmm-skills/2-plan-workflows/bmad-agent-pm/SKILL.md @@ -41,10 +41,12 @@ When you are in this persona and the user calls a skill, this persona must carry ## On Activation -1. **Load config via bmad-init skill** — Store all returned vars for use: - - Use `{user_name}` from config for greeting - - Use `{communication_language}` from config for all communications - - Store any other config variables as `{var-name}` and use appropriately +1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: + - Use `{user_name}` for greeting + - Use `{communication_language}` for all communications + - Use `{document_output_language}` for output documents + - Use `{planning_artifacts}` for output location and artifact scanning + - Use `{project_knowledge}` for additional context scanning 2. **Continue with steps below:** - **Load project context** — Search for `**/project-context.md`. If found, load as foundational reference for project standards and conventions. If not found, continue without it. diff --git a/src/bmm-skills/2-plan-workflows/bmad-agent-ux-designer/SKILL.md b/src/bmm-skills/2-plan-workflows/bmad-agent-ux-designer/SKILL.md index 2ef4b8c08..c6d7296a5 100644 --- a/src/bmm-skills/2-plan-workflows/bmad-agent-ux-designer/SKILL.md +++ b/src/bmm-skills/2-plan-workflows/bmad-agent-ux-designer/SKILL.md @@ -37,10 +37,12 @@ When you are in this persona and the user calls a skill, this persona must carry ## On Activation -1. **Load config via bmad-init skill** — Store all returned vars for use: - - Use `{user_name}` from config for greeting - - Use `{communication_language}` from config for all communications - - Store any other config variables as `{var-name}` and use appropriately +1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: + - Use `{user_name}` for greeting + - Use `{communication_language}` for all communications + - Use `{document_output_language}` for output documents + - Use `{planning_artifacts}` for output location and artifact scanning + - Use `{project_knowledge}` for additional context scanning 2. **Continue with steps below:** - **Load project context** — Search for `**/project-context.md`. If found, load as foundational reference for project standards and conventions. If not found, continue without it. diff --git a/src/bmm-skills/2-plan-workflows/bmad-create-prd/workflow.md b/src/bmm-skills/2-plan-workflows/bmad-create-prd/workflow.md index 39f78e9d5..70fbe7a85 100644 --- a/src/bmm-skills/2-plan-workflows/bmad-create-prd/workflow.md +++ b/src/bmm-skills/2-plan-workflows/bmad-create-prd/workflow.md @@ -42,20 +42,19 @@ This uses **step-file architecture** for disciplined execution: - ⏸️ **ALWAYS** halt at menus and wait for user input - 📋 **NEVER** create mental todo lists from future steps -## INITIALIZATION SEQUENCE +## Activation -### 1. Configuration Loading - -Load and read full config from {main_config} and resolve: - -- `project_name`, `output_folder`, `planning_artifacts`, `user_name` -- `communication_language`, `document_output_language`, `user_skill_level` -- `date` as system-generated current datetime +1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:: + - Use `{user_name}` for greeting + - Use `{communication_language}` for all communications + - Use `{document_output_language}` for output documents + - Use `{planning_artifacts}` for output location and artifact scanning + - Use `{project_knowledge}` for additional context scanning ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the configured `{communication_language}`. ✅ YOU MUST ALWAYS WRITE all artifact and document content in `{document_output_language}`. -### 2. Route to Create Workflow +2. Route to Create Workflow "**Create Mode: Creating a new PRD from scratch.**" diff --git a/src/bmm-skills/2-plan-workflows/bmad-create-ux-design/workflow.md b/src/bmm-skills/2-plan-workflows/bmad-create-ux-design/workflow.md index 04be36641..8ca55f1e9 100644 --- a/src/bmm-skills/2-plan-workflows/bmad-create-ux-design/workflow.md +++ b/src/bmm-skills/2-plan-workflows/bmad-create-ux-design/workflow.md @@ -15,15 +15,14 @@ This uses **micro-file architecture** for disciplined execution: --- -## INITIALIZATION +## Activation -### Configuration Loading - -Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: - -- `project_name`, `output_folder`, `planning_artifacts`, `user_name` -- `communication_language`, `document_output_language`, `user_skill_level` -- `date` as system-generated current datetime +1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:: + - Use `{user_name}` for greeting + - Use `{communication_language}` for all communications + - Use `{document_output_language}` for output documents + - Use `{planning_artifacts}` for output location and artifact scanning + - Use `{project_knowledge}` for additional context scanning ### Paths diff --git a/src/bmm-skills/2-plan-workflows/bmad-edit-prd/steps-e/step-e-01-discovery.md b/src/bmm-skills/2-plan-workflows/bmad-edit-prd/steps-e/step-e-01-discovery.md index 85b29ad01..ed9381338 100644 --- a/src/bmm-skills/2-plan-workflows/bmad-edit-prd/steps-e/step-e-01-discovery.md +++ b/src/bmm-skills/2-plan-workflows/bmad-edit-prd/steps-e/step-e-01-discovery.md @@ -1,6 +1,6 @@ --- # File references (ONLY variables used in this step) -prdPurpose: '{project-root}/_bmad/bmm-skills/2-plan-workflows/create-prd/data/prd-purpose.md' +prdPurpose: '{project-root}/_bmad/bmm-skills/2-plan-workflows/bmad-create-prd/data/prd-purpose.md' --- # Step E-1: Discovery & Understanding diff --git a/src/bmm-skills/2-plan-workflows/bmad-edit-prd/steps-e/step-e-01b-legacy-conversion.md b/src/bmm-skills/2-plan-workflows/bmad-edit-prd/steps-e/step-e-01b-legacy-conversion.md index a4f463f50..55948f378 100644 --- a/src/bmm-skills/2-plan-workflows/bmad-edit-prd/steps-e/step-e-01b-legacy-conversion.md +++ b/src/bmm-skills/2-plan-workflows/bmad-edit-prd/steps-e/step-e-01b-legacy-conversion.md @@ -1,7 +1,7 @@ --- # File references (ONLY variables used in this step) prdFile: '{prd_file_path}' -prdPurpose: '{project-root}/_bmad/bmm-skills/2-plan-workflows/create-prd/data/prd-purpose.md' +prdPurpose: '{project-root}/_bmad/bmm-skills/2-plan-workflows/bmad-create-prd/data/prd-purpose.md' --- # Step E-1B: Legacy PRD Conversion Assessment diff --git a/src/bmm-skills/2-plan-workflows/bmad-edit-prd/steps-e/step-e-02-review.md b/src/bmm-skills/2-plan-workflows/bmad-edit-prd/steps-e/step-e-02-review.md index 8440edd4d..22706b4c7 100644 --- a/src/bmm-skills/2-plan-workflows/bmad-edit-prd/steps-e/step-e-02-review.md +++ b/src/bmm-skills/2-plan-workflows/bmad-edit-prd/steps-e/step-e-02-review.md @@ -2,7 +2,7 @@ # File references (ONLY variables used in this step) prdFile: '{prd_file_path}' validationReport: '{validation_report_path}' # If provided -prdPurpose: '{project-root}/_bmad/bmm-skills/2-plan-workflows/create-prd/data/prd-purpose.md' +prdPurpose: '{project-root}/_bmad/bmm-skills/2-plan-workflows/bmad-create-prd/data/prd-purpose.md' --- # Step E-2: Deep Review & Analysis diff --git a/src/bmm-skills/2-plan-workflows/bmad-edit-prd/steps-e/step-e-03-edit.md b/src/bmm-skills/2-plan-workflows/bmad-edit-prd/steps-e/step-e-03-edit.md index e0391fba7..1f7e595a0 100644 --- a/src/bmm-skills/2-plan-workflows/bmad-edit-prd/steps-e/step-e-03-edit.md +++ b/src/bmm-skills/2-plan-workflows/bmad-edit-prd/steps-e/step-e-03-edit.md @@ -1,7 +1,7 @@ --- # File references (ONLY variables used in this step) prdFile: '{prd_file_path}' -prdPurpose: '{project-root}/_bmad/bmm-skills/2-plan-workflows/create-prd/data/prd-purpose.md' +prdPurpose: '{project-root}/_bmad/bmm-skills/2-plan-workflows/bmad-create-prd/data/prd-purpose.md' --- # Step E-3: Edit & Update diff --git a/src/bmm-skills/2-plan-workflows/bmad-edit-prd/steps-e/step-e-04-complete.md b/src/bmm-skills/2-plan-workflows/bmad-edit-prd/steps-e/step-e-04-complete.md index 25af09ade..4ab9d05ea 100644 --- a/src/bmm-skills/2-plan-workflows/bmad-edit-prd/steps-e/step-e-04-complete.md +++ b/src/bmm-skills/2-plan-workflows/bmad-edit-prd/steps-e/step-e-04-complete.md @@ -1,7 +1,7 @@ --- # File references (ONLY variables used in this step) prdFile: '{prd_file_path}' -validationWorkflow: '{project-root}/_bmad/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-01-discovery.md' +validationWorkflow: '{project-root}/_bmad/bmm-skills/2-plan-workflows/bmad-validate-prd/steps-v/step-v-01-discovery.md' --- # Step E-4: Complete & Validate diff --git a/src/bmm-skills/2-plan-workflows/bmad-edit-prd/workflow.md b/src/bmm-skills/2-plan-workflows/bmad-edit-prd/workflow.md index 2439a6c96..23bd97c6f 100644 --- a/src/bmm-skills/2-plan-workflows/bmad-edit-prd/workflow.md +++ b/src/bmm-skills/2-plan-workflows/bmad-edit-prd/workflow.md @@ -41,20 +41,19 @@ This uses **step-file architecture** for disciplined execution: - ⏸️ **ALWAYS** halt at menus and wait for user input - 📋 **NEVER** create mental todo lists from future steps -## INITIALIZATION SEQUENCE +## Activation -### 1. Configuration Loading - -Load and read full config from {main_config} and resolve: - -- `project_name`, `output_folder`, `planning_artifacts`, `user_name` -- `communication_language`, `document_output_language`, `user_skill_level` -- `date` as system-generated current datetime +1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:: + - Use `{user_name}` for greeting + - Use `{communication_language}` for all communications + - Use `{document_output_language}` for output documents + - Use `{planning_artifacts}` for output location and artifact scanning + - Use `{project_knowledge}` for additional context scanning ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the configured `{communication_language}`. ✅ YOU MUST ALWAYS WRITE all artifact and document content in `{document_output_language}`. -### 2. Route to Edit Workflow +2. Route to Edit Workflow "**Edit Mode: Improving an existing PRD.**" diff --git a/src/bmm-skills/2-plan-workflows/bmad-validate-prd/workflow.md b/src/bmm-skills/2-plan-workflows/bmad-validate-prd/workflow.md index 3de6ff24f..4fe8fcea9 100644 --- a/src/bmm-skills/2-plan-workflows/bmad-validate-prd/workflow.md +++ b/src/bmm-skills/2-plan-workflows/bmad-validate-prd/workflow.md @@ -42,20 +42,19 @@ This uses **step-file architecture** for disciplined execution: - ⏸️ **ALWAYS** halt at menus and wait for user input - 📋 **NEVER** create mental todo lists from future steps -## INITIALIZATION SEQUENCE +## Activation -### 1. Configuration Loading - -Load and read full config from {main_config} and resolve: - -- `project_name`, `output_folder`, `planning_artifacts`, `user_name` -- `communication_language`, `document_output_language`, `user_skill_level` -- `date` as system-generated current datetime +1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:: + - Use `{user_name}` for greeting + - Use `{communication_language}` for all communications + - Use `{document_output_language}` for output documents + - Use `{planning_artifacts}` for output location and artifact scanning + - Use `{project_knowledge}` for additional context scanning ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the configured `{communication_language}`. ✅ YOU MUST ALWAYS WRITE all artifact and document content in `{document_output_language}`. -### 2. Route to Validate Workflow +2. Route to Validate Workflow "**Validate Mode: Validating an existing PRD against BMAD standards.**" diff --git a/src/bmm-skills/2-plan-workflows/create-prd/data/domain-complexity.csv b/src/bmm-skills/2-plan-workflows/create-prd/data/domain-complexity.csv deleted file mode 100644 index 60a7b503f..000000000 --- a/src/bmm-skills/2-plan-workflows/create-prd/data/domain-complexity.csv +++ /dev/null @@ -1,15 +0,0 @@ -domain,signals,complexity,key_concerns,required_knowledge,suggested_workflow,web_searches,special_sections -healthcare,"medical,diagnostic,clinical,FDA,patient,treatment,HIPAA,therapy,pharma,drug",high,"FDA approval;Clinical validation;HIPAA compliance;Patient safety;Medical device classification;Liability","Regulatory pathways;Clinical trial design;Medical standards;Data privacy;Integration requirements","domain-research","FDA software medical device guidance {date};HIPAA compliance software requirements;Medical software standards {date};Clinical validation software","clinical_requirements;regulatory_pathway;validation_methodology;safety_measures" -fintech,"payment,banking,trading,investment,crypto,wallet,transaction,KYC,AML,funds,fintech",high,"Regional compliance;Security standards;Audit requirements;Fraud prevention;Data protection","KYC/AML requirements;PCI DSS;Open banking;Regional laws (US/EU/APAC);Crypto regulations","domain-research","fintech regulations {date};payment processing compliance {date};open banking API standards;cryptocurrency regulations {date}","compliance_matrix;security_architecture;audit_requirements;fraud_prevention" -govtech,"government,federal,civic,public sector,citizen,municipal,voting",high,"Procurement rules;Security clearance;Accessibility (508);FedRAMP;Privacy;Transparency","Government procurement;Security frameworks;Accessibility standards;Privacy laws;Open data requirements","domain-research","government software procurement {date};FedRAMP compliance requirements;section 508 accessibility;government security standards","procurement_compliance;security_clearance;accessibility_standards;transparency_requirements" -edtech,"education,learning,student,teacher,curriculum,assessment,K-12,university,LMS",medium,"Student privacy (COPPA/FERPA);Accessibility;Content moderation;Age verification;Curriculum standards","Educational privacy laws;Learning standards;Accessibility requirements;Content guidelines;Assessment validity","domain-research","educational software privacy {date};COPPA FERPA compliance;WCAG education requirements;learning management standards","privacy_compliance;content_guidelines;accessibility_features;curriculum_alignment" -aerospace,"aircraft,spacecraft,aviation,drone,satellite,propulsion,flight,radar,navigation",high,"Safety certification;DO-178C compliance;Performance validation;Simulation accuracy;Export controls","Aviation standards;Safety analysis;Simulation validation;ITAR/export controls;Performance requirements","domain-research + technical-model","DO-178C software certification;aerospace simulation standards {date};ITAR export controls software;aviation safety requirements","safety_certification;simulation_validation;performance_requirements;export_compliance" -automotive,"vehicle,car,autonomous,ADAS,automotive,driving,EV,charging",high,"Safety standards;ISO 26262;V2X communication;Real-time requirements;Certification","Automotive standards;Functional safety;V2X protocols;Real-time systems;Testing requirements","domain-research","ISO 26262 automotive software;automotive safety standards {date};V2X communication protocols;EV charging standards","safety_standards;functional_safety;communication_protocols;certification_requirements" -scientific,"research,algorithm,simulation,modeling,computational,analysis,data science,ML,AI",medium,"Reproducibility;Validation methodology;Peer review;Performance;Accuracy;Computational resources","Scientific method;Statistical validity;Computational requirements;Domain expertise;Publication standards","technical-model","scientific computing best practices {date};research reproducibility standards;computational modeling validation;peer review software","validation_methodology;accuracy_metrics;reproducibility_plan;computational_requirements" -legaltech,"legal,law,contract,compliance,litigation,patent,attorney,court",high,"Legal ethics;Bar regulations;Data retention;Attorney-client privilege;Court system integration","Legal practice rules;Ethics requirements;Court filing systems;Document standards;Confidentiality","domain-research","legal technology ethics {date};law practice management software requirements;court filing system standards;attorney client privilege technology","ethics_compliance;data_retention;confidentiality_measures;court_integration" -insuretech,"insurance,claims,underwriting,actuarial,policy,risk,premium",high,"Insurance regulations;Actuarial standards;Data privacy;Fraud detection;State compliance","Insurance regulations by state;Actuarial methods;Risk modeling;Claims processing;Regulatory reporting","domain-research","insurance software regulations {date};actuarial standards software;insurance fraud detection;state insurance compliance","regulatory_requirements;risk_modeling;fraud_detection;reporting_compliance" -energy,"energy,utility,grid,solar,wind,power,electricity,oil,gas",high,"Grid compliance;NERC standards;Environmental regulations;Safety requirements;Real-time operations","Energy regulations;Grid standards;Environmental compliance;Safety protocols;SCADA systems","domain-research","energy sector software compliance {date};NERC CIP standards;smart grid requirements;renewable energy software standards","grid_compliance;safety_protocols;environmental_compliance;operational_requirements" -process_control,"industrial automation,process control,PLC,SCADA,DCS,HMI,operational technology,OT,control system,cyberphysical,MES,historian,instrumentation,I&C,P&ID",high,"Functional safety;OT cybersecurity;Real-time control requirements;Legacy system integration;Process safety and hazard analysis;Environmental compliance and permitting;Engineering authority and PE requirements","Functional safety standards;OT security frameworks;Industrial protocols;Process control architecture;Plant reliability and maintainability","domain-research + technical-model","IEC 62443 OT cybersecurity requirements {date};functional safety software requirements {date};industrial process control architecture;ISA-95 manufacturing integration","functional_safety;ot_security;process_requirements;engineering_authority" -building_automation,"building automation,BAS,BMS,HVAC,smart building,lighting control,fire alarm,fire protection,fire suppression,life safety,elevator,access control,DDC,energy management,sequence of operations,commissioning",high,"Life safety codes;Building energy standards;Multi-trade coordination and interoperability;Commissioning and ongoing operational performance;Indoor environmental quality and occupant comfort;Engineering authority and PE requirements","Building automation protocols;HVAC and mechanical controls;Fire alarm, fire protection, and life safety design;Commissioning process and sequence of operations;Building codes and energy standards","domain-research","smart building software architecture {date};BACnet integration best practices;building automation cybersecurity {date};ASHRAE building standards","life_safety;energy_compliance;commissioning_requirements;engineering_authority" -gaming,"game,player,gameplay,level,character,multiplayer,quest",redirect,"REDIRECT TO GAME WORKFLOWS","Game design","game-brief","NA","NA" -general,"",low,"Standard requirements;Basic security;User experience;Performance","General software practices","continue","software development best practices {date}","standard_requirements" \ No newline at end of file diff --git a/src/bmm-skills/2-plan-workflows/create-prd/data/prd-purpose.md b/src/bmm-skills/2-plan-workflows/create-prd/data/prd-purpose.md deleted file mode 100644 index 755230be7..000000000 --- a/src/bmm-skills/2-plan-workflows/create-prd/data/prd-purpose.md +++ /dev/null @@ -1,197 +0,0 @@ -# BMAD PRD Purpose - -**The PRD is the top of the required funnel that feeds all subsequent product development work in rhw BMad Method.** - ---- - -## What is a BMAD PRD? - -A dual-audience document serving: -1. **Human Product Managers and builders** - Vision, strategy, stakeholder communication -2. **LLM Downstream Consumption** - UX Design → Architecture → Epics → Development AI Agents - -Each successive document becomes more AI-tailored and granular. - ---- - -## Core Philosophy: Information Density - -**High Signal-to-Noise Ratio** - -Every sentence must carry information weight. LLMs consume precise, dense content efficiently. - -**Anti-Patterns (Eliminate These):** -- ❌ "The system will allow users to..." → ✅ "Users can..." -- ❌ "It is important to note that..." → ✅ State the fact directly -- ❌ "In order to..." → ✅ "To..." -- ❌ Conversational filler and padding → ✅ Direct, concise statements - -**Goal:** Maximum information per word. Zero fluff. - ---- - -## The Traceability Chain - -**PRD starts the chain:** -``` -Vision → Success Criteria → User Journeys → Functional Requirements → (future: User Stories) -``` - -**In the PRD, establish:** -- Vision → Success Criteria alignment -- Success Criteria → User Journey coverage -- User Journey → Functional Requirement mapping -- All requirements traceable to user needs - -**Why:** Each downstream artifact (UX, Architecture, Epics, Stories) must trace back to documented user needs and business objectives. This chain ensures we build the right thing. - ---- - -## What Makes Great Functional Requirements? - -### FRs are Capabilities, Not Implementation - -**Good FR:** "Users can reset their password via email link" -**Bad FR:** "System sends JWT via email and validates with database" (implementation leakage) - -**Good FR:** "Dashboard loads in under 2 seconds for 95th percentile" -**Bad FR:** "Fast loading time" (subjective, unmeasurable) - -### SMART Quality Criteria - -**Specific:** Clear, precisely defined capability -**Measurable:** Quantifiable with test criteria -**Attainable:** Realistic within constraints -**Relevant:** Aligns with business objectives -**Traceable:** Links to source (executive summary or user journey) - -### FR Anti-Patterns - -**Subjective Adjectives:** -- ❌ "easy to use", "intuitive", "user-friendly", "fast", "responsive" -- ✅ Use metrics: "completes task in under 3 clicks", "loads in under 2 seconds" - -**Implementation Leakage:** -- ❌ Technology names, specific libraries, implementation details -- ✅ Focus on capability and measurable outcomes - -**Vague Quantifiers:** -- ❌ "multiple users", "several options", "various formats" -- ✅ "up to 100 concurrent users", "3-5 options", "PDF, DOCX, TXT formats" - -**Missing Test Criteria:** -- ❌ "The system shall provide notifications" -- ✅ "The system shall send email notifications within 30 seconds of trigger event" - ---- - -## What Makes Great Non-Functional Requirements? - -### NFRs Must Be Measurable - -**Template:** -``` -"The system shall [metric] [condition] [measurement method]" -``` - -**Examples:** -- ✅ "The system shall respond to API requests in under 200ms for 95th percentile as measured by APM monitoring" -- ✅ "The system shall maintain 99.9% uptime during business hours as measured by cloud provider SLA" -- ✅ "The system shall support 10,000 concurrent users as measured by load testing" - -### NFR Anti-Patterns - -**Unmeasurable Claims:** -- ❌ "The system shall be scalable" → ✅ "The system shall handle 10x load growth through horizontal scaling" -- ❌ "High availability required" → ✅ "99.9% uptime as measured by cloud provider SLA" - -**Missing Context:** -- ❌ "Response time under 1 second" → ✅ "API response time under 1 second for 95th percentile under normal load" - ---- - -## Domain-Specific Requirements - -**Auto-Detect and Enforce Based on Project Context** - -Certain industries have mandatory requirements that must be present: - -- **Healthcare:** HIPAA Privacy & Security Rules, PHI encryption, audit logging, MFA -- **Fintech:** PCI-DSS Level 1, AML/KYC compliance, SOX controls, financial audit trails -- **GovTech:** NIST framework, Section 508 accessibility (WCAG 2.1 AA), FedRAMP, data residency -- **E-Commerce:** PCI-DSS for payments, inventory accuracy, tax calculation by jurisdiction - -**Why:** Missing these requirements in the PRD means they'll be missed in architecture and implementation, creating expensive rework. During PRD creation there is a step to cover this - during validation we want to make sure it was covered. For this purpose steps will utilize a domain-complexity.csv and project-types.csv. - ---- - -## Document Structure (Markdown, Human-Readable) - -### Required Sections -1. **Executive Summary** - Vision, differentiator, target users -2. **Success Criteria** - Measurable outcomes (SMART) -3. **Product Scope** - MVP, Growth, Vision phases -4. **User Journeys** - Comprehensive coverage -5. **Domain Requirements** - Industry-specific compliance (if applicable) -6. **Innovation Analysis** - Competitive differentiation (if applicable) -7. **Project-Type Requirements** - Platform-specific needs -8. **Functional Requirements** - Capability contract (FRs) -9. **Non-Functional Requirements** - Quality attributes (NFRs) - -### Formatting for Dual Consumption - -**For Humans:** -- Clear, professional language -- Logical flow from vision to requirements -- Easy for stakeholders to review and approve - -**For LLMs:** -- ## Level 2 headers for all main sections (enables extraction) -- Consistent structure and patterns -- Precise, testable language -- High information density - ---- - -## Downstream Impact - -**How the PRD Feeds Next Artifacts:** - -**UX Design:** -- User journeys → interaction flows -- FRs → design requirements -- Success criteria → UX metrics - -**Architecture:** -- FRs → system capabilities -- NFRs → architecture decisions -- Domain requirements → compliance architecture -- Project-type requirements → platform choices - -**Epics & Stories (created after architecture):** -- FRs → user stories (1 FR could map to 1-3 stories potentially) -- Acceptance criteria → story acceptance tests -- Priority → sprint sequencing -- Traceability → stories map back to vision - -**Development AI Agents:** -- Precise requirements → implementation clarity -- Test criteria → automated test generation -- Domain requirements → compliance enforcement -- Measurable NFRs → performance targets - ---- - -## Summary: What Makes a Great BMAD PRD? - -✅ **High Information Density** - Every sentence carries weight, zero fluff -✅ **Measurable Requirements** - All FRs and NFRs are testable with specific criteria -✅ **Clear Traceability** - Each requirement links to user need and business objective -✅ **Domain Awareness** - Industry-specific requirements auto-detected and included -✅ **Zero Anti-Patterns** - No subjective adjectives, implementation leakage, or vague quantifiers -✅ **Dual Audience Optimized** - Human-readable AND LLM-consumable -✅ **Markdown Format** - Professional, clean, accessible to all stakeholders - ---- - -**Remember:** The PRD is the foundation. Quality here ripples through every subsequent phase. A dense, precise, well-traced PRD makes UX design, architecture, epic breakdown, and AI development dramatically more effective. diff --git a/src/bmm-skills/2-plan-workflows/create-prd/data/project-types.csv b/src/bmm-skills/2-plan-workflows/create-prd/data/project-types.csv deleted file mode 100644 index 6f71c513a..000000000 --- a/src/bmm-skills/2-plan-workflows/create-prd/data/project-types.csv +++ /dev/null @@ -1,11 +0,0 @@ -project_type,detection_signals,key_questions,required_sections,skip_sections,web_search_triggers,innovation_signals -api_backend,"API,REST,GraphQL,backend,service,endpoints","Endpoints needed?;Authentication method?;Data formats?;Rate limits?;Versioning?;SDK needed?","endpoint_specs;auth_model;data_schemas;error_codes;rate_limits;api_docs","ux_ui;visual_design;user_journeys","framework best practices;OpenAPI standards","API composition;New protocol" -mobile_app,"iOS,Android,app,mobile,iPhone,iPad","Native or cross-platform?;Offline needed?;Push notifications?;Device features?;Store compliance?","platform_reqs;device_permissions;offline_mode;push_strategy;store_compliance","desktop_features;cli_commands","app store guidelines;platform requirements","Gesture innovation;AR/VR features" -saas_b2b,"SaaS,B2B,platform,dashboard,teams,enterprise","Multi-tenant?;Permission model?;Subscription tiers?;Integrations?;Compliance?","tenant_model;rbac_matrix;subscription_tiers;integration_list;compliance_reqs","cli_interface;mobile_first","compliance requirements;integration guides","Workflow automation;AI agents" -developer_tool,"SDK,library,package,npm,pip,framework","Language support?;Package managers?;IDE integration?;Documentation?;Examples?","language_matrix;installation_methods;api_surface;code_examples;migration_guide","visual_design;store_compliance","package manager best practices;API design patterns","New paradigm;DSL creation" -cli_tool,"CLI,command,terminal,bash,script","Interactive or scriptable?;Output formats?;Config method?;Shell completion?","command_structure;output_formats;config_schema;scripting_support","visual_design;ux_principles;touch_interactions","CLI design patterns;shell integration","Natural language CLI;AI commands" -web_app,"website,webapp,browser,SPA,PWA","SPA or MPA?;Browser support?;SEO needed?;Real-time?;Accessibility?","browser_matrix;responsive_design;performance_targets;seo_strategy;accessibility_level","native_features;cli_commands","web standards;WCAG guidelines","New interaction;WebAssembly use" -game,"game,player,gameplay,level,character","REDIRECT TO USE THE BMad Method Game Module Agent and Workflows - HALT","game-brief;GDD","most_sections","game design patterns","Novel mechanics;Genre mixing" -desktop_app,"desktop,Windows,Mac,Linux,native","Cross-platform?;Auto-update?;System integration?;Offline?","platform_support;system_integration;update_strategy;offline_capabilities","web_seo;mobile_features","desktop guidelines;platform requirements","Desktop AI;System automation" -iot_embedded,"IoT,embedded,device,sensor,hardware","Hardware specs?;Connectivity?;Power constraints?;Security?;OTA updates?","hardware_reqs;connectivity_protocol;power_profile;security_model;update_mechanism","visual_ui;browser_support","IoT standards;protocol specs","Edge AI;New sensors" -blockchain_web3,"blockchain,crypto,DeFi,NFT,smart contract","Chain selection?;Wallet integration?;Gas optimization?;Security audit?","chain_specs;wallet_support;smart_contracts;security_audit;gas_optimization","traditional_auth;centralized_db","blockchain standards;security patterns","Novel tokenomics;DAO structure" \ No newline at end of file diff --git a/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-01-discovery.md b/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-01-discovery.md deleted file mode 100644 index 561ae8901..000000000 --- a/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-01-discovery.md +++ /dev/null @@ -1,224 +0,0 @@ ---- -name: 'step-v-01-discovery' -description: 'Document Discovery & Confirmation - Handle fresh context validation, confirm PRD path, discover input documents' - -# File references (ONLY variables used in this step) -nextStepFile: './step-v-02-format-detection.md' -prdPurpose: '../data/prd-purpose.md' ---- - -# Step 1: Document Discovery & Confirmation - -## STEP GOAL: - -Handle fresh context validation by confirming PRD path, discovering and loading input documents from frontmatter, and initializing the validation report. - -## MANDATORY EXECUTION RULES (READ FIRST): - -### Universal Rules: - -- 🛑 NEVER generate content without user input -- 📖 CRITICAL: Read the complete step file before taking any action -- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read -- 📋 YOU ARE A FACILITATOR, not a content generator -- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` - -### Role Reinforcement: - -- ✅ You are a Validation Architect and Quality Assurance Specialist -- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role -- ✅ We engage in collaborative dialogue, not command-response -- ✅ You bring systematic validation expertise and analytical rigor -- ✅ User brings domain knowledge and specific PRD context - -### Step-Specific Rules: - -- 🎯 Focus ONLY on discovering PRD and input documents, not validating yet -- 🚫 FORBIDDEN to perform any validation checks in this step -- 💬 Approach: Systematic discovery with clear reporting to user -- 🚪 This is the setup step - get everything ready for validation - -## EXECUTION PROTOCOLS: - -- 🎯 Discover and confirm PRD to validate -- 💾 Load PRD and all input documents from frontmatter -- 📖 Initialize validation report next to PRD -- 🚫 FORBIDDEN to load next step until user confirms setup - -## CONTEXT BOUNDARIES: - -- Available context: PRD path (user-specified or discovered), workflow configuration -- Focus: Document discovery and setup only -- Limits: Don't perform validation, don't skip discovery -- Dependencies: Configuration loaded from PRD workflow.md initialization - -## MANDATORY SEQUENCE - -**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change. - -### 1. Load PRD Purpose and Standards - -Load and read the complete file at: -`{prdPurpose}` - -This file contains the BMAD PRD philosophy, standards, and validation criteria that will guide all validation checks. Internalize this understanding - it defines what makes a great BMAD PRD. - -### 2. Discover PRD to Validate - -**If PRD path provided as invocation parameter:** -- Use provided path - -**If no PRD path provided, auto-discover:** -- Search `{planning_artifacts}` for files matching `*prd*.md` -- Also check for sharded PRDs: `{planning_artifacts}/*prd*/*.md` - -**If exactly ONE PRD found:** -- Use it automatically -- Inform user: "Found PRD: {discovered_path} — using it for validation." - -**If MULTIPLE PRDs found:** -- List all discovered PRDs with numbered options -- "I found multiple PRDs. Which one would you like to validate?" -- Wait for user selection - -**If NO PRDs found:** -- "I couldn't find any PRD files in {planning_artifacts}. Please provide the path to the PRD file you want to validate." -- Wait for user to provide PRD path. - -### 3. Validate PRD Exists and Load - -Once PRD path is provided: - -- Check if PRD file exists at specified path -- If not found: "I cannot find a PRD at that path. Please check the path and try again." -- If found: Load the complete PRD file including frontmatter - -### 4. Extract Frontmatter and Input Documents - -From the loaded PRD frontmatter, extract: - -- `inputDocuments: []` array (if present) -- Any other relevant metadata (classification, date, etc.) - -**If no inputDocuments array exists:** -Note this and proceed with PRD-only validation - -### 5. Load Input Documents - -For each document listed in `inputDocuments`: - -- Attempt to load the document -- Track successfully loaded documents -- Note any documents that fail to load - -**Build list of loaded input documents:** -- Product Brief (if present) -- Research documents (if present) -- Other reference materials (if present) - -### 6. Ask About Additional Reference Documents - -"**I've loaded the following documents from your PRD frontmatter:** - -{list loaded documents with file names} - -**Are there any additional reference documents you'd like me to include in this validation?** - -These could include: -- Additional research or context documents -- Project documentation not tracked in frontmatter -- Standards or compliance documents -- Competitive analysis or benchmarks - -Please provide paths to any additional documents, or type 'none' to proceed." - -**Load any additional documents provided by user.** - -### 7. Initialize Validation Report - -Create validation report at: `{validationReportPath}` - -**Initialize with frontmatter:** -```yaml ---- -validationTarget: '{prd_path}' -validationDate: '{current_date}' -inputDocuments: [list of all loaded documents] -validationStepsCompleted: [] -validationStatus: IN_PROGRESS ---- -``` - -**Initial content:** -```markdown -# PRD Validation Report - -**PRD Being Validated:** {prd_path} -**Validation Date:** {current_date} - -## Input Documents - -{list all documents loaded for validation} - -## Validation Findings - -[Findings will be appended as validation progresses] -``` - -### 8. Present Discovery Summary - -"**Setup Complete!** - -**PRD to Validate:** {prd_path} - -**Input Documents Loaded:** -- PRD: {prd_name} ✓ -- Product Brief: {count} {if count > 0}✓{else}(none found){/if} -- Research: {count} {if count > 0}✓{else}(none found){/if} -- Additional References: {count} {if count > 0}✓{else}(none){/if} - -**Validation Report:** {validationReportPath} - -**Ready to begin validation.**" - -### 9. Present MENU OPTIONS - -Display: **Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue to Format Detection - -#### EXECUTION RULES: - -- ALWAYS halt and wait for user input after presenting menu -- ONLY proceed to next step when user selects 'C' -- User can ask questions or add more documents - always respond and redisplay menu - -#### Menu Handling Logic: - -- IF A: Invoke the `bmad-advanced-elicitation` skill, and when finished redisplay the menu -- IF P: Invoke the `bmad-party-mode` skill, and when finished redisplay the menu -- IF C: Read fully and follow: {nextStepFile} to begin format detection -- IF user provides additional document: Load it, update report, redisplay summary -- IF Any other: help user, then redisplay menu - ---- - -## 🚨 SYSTEM SUCCESS/FAILURE METRICS - -### ✅ SUCCESS: - -- PRD path discovered and confirmed -- PRD file exists and loads successfully -- All input documents from frontmatter loaded -- Additional reference documents (if any) loaded -- Validation report initialized next to PRD -- User clearly informed of setup status -- Menu presented and user input handled correctly - -### ❌ SYSTEM FAILURE: - -- Proceeding with non-existent PRD file -- Not loading input documents from frontmatter -- Creating validation report in wrong location -- Proceeding without user confirming setup -- Not handling missing input documents gracefully - -**Master Rule:** Complete discovery and setup BEFORE validation. This step ensures everything is in place for systematic validation checks. diff --git a/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-02-format-detection.md b/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-02-format-detection.md deleted file mode 100644 index a354b5aff..000000000 --- a/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-02-format-detection.md +++ /dev/null @@ -1,191 +0,0 @@ ---- -name: 'step-v-02-format-detection' -description: 'Format Detection & Structure Analysis - Classify PRD format and route appropriately' - -# File references (ONLY variables used in this step) -nextStepFile: './step-v-03-density-validation.md' -altStepFile: './step-v-02b-parity-check.md' -prdFile: '{prd_file_path}' -validationReportPath: '{validation_report_path}' ---- - -# Step 2: Format Detection & Structure Analysis - -## STEP GOAL: - -Detect if PRD follows BMAD format and route appropriately - classify as BMAD Standard / BMAD Variant / Non-Standard, with optional parity check for non-standard formats. - -## MANDATORY EXECUTION RULES (READ FIRST): - -### Universal Rules: - -- 🛑 NEVER generate content without user input -- 📖 CRITICAL: Read the complete step file before taking any action -- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read -- 📋 YOU ARE A FACILITATOR, not a content generator -- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` - -### Role Reinforcement: - -- ✅ You are a Validation Architect and Quality Assurance Specialist -- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role -- ✅ We engage in collaborative dialogue, not command-response -- ✅ You bring systematic validation expertise and pattern recognition -- ✅ User brings domain knowledge and PRD context - -### Step-Specific Rules: - -- 🎯 Focus ONLY on detecting format and classifying structure -- 🚫 FORBIDDEN to perform other validation checks in this step -- 💬 Approach: Analytical and systematic, clear reporting of findings -- 🚪 This is a branch step - may route to parity check for non-standard PRDs - -## EXECUTION PROTOCOLS: - -- 🎯 Analyze PRD structure systematically -- 💾 Append format findings to validation report -- 📖 Route appropriately based on format classification -- 🚫 FORBIDDEN to skip format detection or proceed without classification - -## CONTEXT BOUNDARIES: - -- Available context: PRD file loaded in step 1, validation report initialized -- Focus: Format detection and classification only -- Limits: Don't perform other validation, don't skip classification -- Dependencies: Step 1 completed - PRD loaded and report initialized - -## MANDATORY SEQUENCE - -**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change. - -### 1. Extract PRD Structure - -Load the complete PRD file and extract: - -**All Level 2 (##) headers:** -- Scan through entire PRD document -- Extract all ## section headers -- List them in order - -**PRD frontmatter:** -- Extract classification.domain if present -- Extract classification.projectType if present -- Note any other relevant metadata - -### 2. Check for BMAD PRD Core Sections - -Check if the PRD contains the following BMAD PRD core sections: - -1. **Executive Summary** (or variations: ## Executive Summary, ## Overview, ## Introduction) -2. **Success Criteria** (or: ## Success Criteria, ## Goals, ## Objectives) -3. **Product Scope** (or: ## Product Scope, ## Scope, ## In Scope, ## Out of Scope) -4. **User Journeys** (or: ## User Journeys, ## User Stories, ## User Flows) -5. **Functional Requirements** (or: ## Functional Requirements, ## Features, ## Capabilities) -6. **Non-Functional Requirements** (or: ## Non-Functional Requirements, ## NFRs, ## Quality Attributes) - -**Count matches:** -- How many of these 6 core sections are present? -- Which specific sections are present? -- Which are missing? - -### 3. Classify PRD Format - -Based on core section count, classify: - -**BMAD Standard:** -- 5-6 core sections present -- Follows BMAD PRD structure closely - -**BMAD Variant:** -- 3-4 core sections present -- Generally follows BMAD patterns but may have structural differences -- Missing some sections but recognizable as BMAD-style - -**Non-Standard:** -- Fewer than 3 core sections present -- Does not follow BMAD PRD structure -- May be completely custom format, legacy format, or from another framework - -### 4. Report Format Findings to Validation Report - -Append to validation report: - -```markdown -## Format Detection - -**PRD Structure:** -[List all ## Level 2 headers found] - -**BMAD Core Sections Present:** -- Executive Summary: [Present/Missing] -- Success Criteria: [Present/Missing] -- Product Scope: [Present/Missing] -- User Journeys: [Present/Missing] -- Functional Requirements: [Present/Missing] -- Non-Functional Requirements: [Present/Missing] - -**Format Classification:** [BMAD Standard / BMAD Variant / Non-Standard] -**Core Sections Present:** [count]/6 -``` - -### 5. Route Based on Format Classification - -**IF format is BMAD Standard or BMAD Variant:** - -Display: "**Format Detected:** {classification} - -Proceeding to systematic validation checks..." - -Without delay, read fully and follow: {nextStepFile} (step-v-03-density-validation.md) - -**IF format is Non-Standard (< 3 core sections):** - -Display: "**Format Detected:** Non-Standard PRD - -This PRD does not follow BMAD standard structure (only {count}/6 core sections present). - -You have options:" - -Present MENU OPTIONS below for user selection - -### 6. Present MENU OPTIONS (Non-Standard PRDs Only) - -**[A] Parity Check** - Analyze gaps and estimate effort to reach BMAD PRD parity -**[B] Validate As-Is** - Proceed with validation using current structure -**[C] Exit** - Exit validation and review format findings - -#### EXECUTION RULES: - -- ALWAYS halt and wait for user input -- Only proceed based on user selection - -#### Menu Handling Logic: - -- IF A (Parity Check): Read fully and follow: {altStepFile} (step-v-02b-parity-check.md) -- IF B (Validate As-Is): Display "Proceeding with validation..." then read fully and follow: {nextStepFile} -- IF C (Exit): Display format findings summary and exit validation -- IF Any other: help user respond, then redisplay menu - ---- - -## 🚨 SYSTEM SUCCESS/FAILURE METRICS - -### ✅ SUCCESS: - -- All ## Level 2 headers extracted successfully -- BMAD core sections checked systematically -- Format classified correctly based on section count -- Findings reported to validation report -- BMAD Standard/Variant PRDs proceed directly to next validation step -- Non-Standard PRDs pause and present options to user -- User can choose parity check, validate as-is, or exit - -### ❌ SYSTEM FAILURE: - -- Not extracting all headers before classification -- Incorrect format classification -- Not reporting findings to validation report -- Not pausing for non-standard PRDs -- Proceeding without user decision for non-standard formats - -**Master Rule:** Format detection determines validation path. Non-standard PRDs require user choice before proceeding. diff --git a/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-02b-parity-check.md b/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-02b-parity-check.md deleted file mode 100644 index 604265a9a..000000000 --- a/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-02b-parity-check.md +++ /dev/null @@ -1,209 +0,0 @@ ---- -name: 'step-v-02b-parity-check' -description: 'Document Parity Check - Analyze non-standard PRD and identify gaps to achieve BMAD PRD parity' - -# File references (ONLY variables used in this step) -nextStepFile: './step-v-03-density-validation.md' -prdFile: '{prd_file_path}' -validationReportPath: '{validation_report_path}' ---- - -# Step 2B: Document Parity Check - -## STEP GOAL: - -Analyze non-standard PRD and identify gaps to achieve BMAD PRD parity, presenting user with options for how to proceed. - -## MANDATORY EXECUTION RULES (READ FIRST): - -### Universal Rules: - -- 🛑 NEVER generate content without user input -- 📖 CRITICAL: Read the complete step file before taking any action -- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read -- 📋 YOU ARE A FACILITATOR, not a content generator -- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` - -### Role Reinforcement: - -- ✅ You are a Validation Architect and Quality Assurance Specialist -- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role -- ✅ We engage in collaborative dialogue, not command-response -- ✅ You bring BMAD PRD standards expertise and gap analysis -- ✅ User brings domain knowledge and PRD context - -### Step-Specific Rules: - -- 🎯 Focus ONLY on analyzing gaps and estimating parity effort -- 🚫 FORBIDDEN to perform other validation checks in this step -- 💬 Approach: Systematic gap analysis with clear recommendations -- 🚪 This is an optional branch step - user chooses next action - -## EXECUTION PROTOCOLS: - -- 🎯 Analyze each BMAD PRD section for gaps -- 💾 Append parity analysis to validation report -- 📖 Present options and await user decision -- 🚫 FORBIDDEN to proceed without user selection - -## CONTEXT BOUNDARIES: - -- Available context: Non-standard PRD from step 2, validation report in progress -- Focus: Parity analysis only - what's missing, what's needed -- Limits: Don't perform validation checks, don't auto-proceed -- Dependencies: Step 2 classified PRD as non-standard and user chose parity check - -## MANDATORY SEQUENCE - -**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change. - -### 1. Analyze Each BMAD PRD Section - -For each of the 6 BMAD PRD core sections, analyze: - -**Executive Summary:** -- Does PRD have vision/overview? -- Is problem statement clear? -- Are target users identified? -- Gap: [What's missing or incomplete] - -**Success Criteria:** -- Are measurable goals defined? -- Is success clearly defined? -- Gap: [What's missing or incomplete] - -**Product Scope:** -- Is scope clearly defined? -- Are in-scope items listed? -- Are out-of-scope items listed? -- Gap: [What's missing or incomplete] - -**User Journeys:** -- Are user types/personas identified? -- Are user flows documented? -- Gap: [What's missing or incomplete] - -**Functional Requirements:** -- Are features/capabilities listed? -- Are requirements structured? -- Gap: [What's missing or incomplete] - -**Non-Functional Requirements:** -- Are quality attributes defined? -- Are performance/security/etc. requirements documented? -- Gap: [What's missing or incomplete] - -### 2. Estimate Effort to Reach Parity - -For each missing or incomplete section, estimate: - -**Effort Level:** -- Minimal - Section exists but needs minor enhancements -- Moderate - Section missing but content exists elsewhere in PRD -- Significant - Section missing, requires new content creation - -**Total Parity Effort:** -- Based on individual section estimates -- Classify overall: Quick / Moderate / Substantial effort - -### 3. Report Parity Analysis to Validation Report - -Append to validation report: - -```markdown -## Parity Analysis (Non-Standard PRD) - -### Section-by-Section Gap Analysis - -**Executive Summary:** -- Status: [Present/Missing/Incomplete] -- Gap: [specific gap description] -- Effort to Complete: [Minimal/Moderate/Significant] - -**Success Criteria:** -- Status: [Present/Missing/Incomplete] -- Gap: [specific gap description] -- Effort to Complete: [Minimal/Moderate/Significant] - -**Product Scope:** -- Status: [Present/Missing/Incomplete] -- Gap: [specific gap description] -- Effort to Complete: [Minimal/Moderate/Significant] - -**User Journeys:** -- Status: [Present/Missing/Incomplete] -- Gap: [specific gap description] -- Effort to Complete: [Minimal/Moderate/Significant] - -**Functional Requirements:** -- Status: [Present/Missing/Incomplete] -- Gap: [specific gap description] -- Effort to Complete: [Minimal/Moderate/Significant] - -**Non-Functional Requirements:** -- Status: [Present/Missing/Incomplete] -- Gap: [specific gap description] -- Effort to Complete: [Minimal/Moderate/Significant] - -### Overall Parity Assessment - -**Overall Effort to Reach BMAD Standard:** [Quick/Moderate/Substantial] -**Recommendation:** [Brief recommendation based on analysis] -``` - -### 4. Present Parity Analysis and Options - -Display: - -"**Parity Analysis Complete** - -Your PRD is missing {count} of 6 core BMAD PRD sections. The overall effort to reach BMAD standard is: **{effort level}** - -**Quick Summary:** -[2-3 sentence summary of key gaps] - -**Recommendation:** -{recommendation from analysis} - -**How would you like to proceed?**" - -### 5. Present MENU OPTIONS - -**[C] Continue Validation** - Proceed with validation using current structure -**[E] Exit & Review** - Exit validation and review parity report -**[S] Save & Exit** - Save parity report and exit - -#### EXECUTION RULES: - -- ALWAYS halt and wait for user input -- Only proceed based on user selection - -#### Menu Handling Logic: - -- IF C (Continue): Display "Proceeding with validation..." then read fully and follow: {nextStepFile} -- IF E (Exit): Display parity summary and exit validation -- IF S (Save): Confirm saved, display summary, exit -- IF Any other: help user respond, then redisplay menu - ---- - -## 🚨 SYSTEM SUCCESS/FAILURE METRICS - -### ✅ SUCCESS: - -- All 6 BMAD PRD sections analyzed for gaps -- Effort estimates provided for each gap -- Overall parity effort assessed correctly -- Parity analysis reported to validation report -- Clear summary presented to user -- User can choose to continue validation, exit, or save report - -### ❌ SYSTEM FAILURE: - -- Not analyzing all 6 sections systematically -- Missing effort estimates -- Not reporting parity analysis to validation report -- Auto-proceeding without user decision -- Unclear recommendations - -**Master Rule:** Parity check informs user of gaps and effort, but user decides whether to proceed with validation or address gaps first. diff --git a/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-03-density-validation.md b/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-03-density-validation.md deleted file mode 100644 index d00478c10..000000000 --- a/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-03-density-validation.md +++ /dev/null @@ -1,174 +0,0 @@ ---- -name: 'step-v-03-density-validation' -description: 'Information Density Check - Scan for anti-patterns that violate information density principles' - -# File references (ONLY variables used in this step) -nextStepFile: './step-v-04-brief-coverage-validation.md' -prdFile: '{prd_file_path}' -validationReportPath: '{validation_report_path}' ---- - -# Step 3: Information Density Validation - -## STEP GOAL: - -Validate PRD meets BMAD information density standards by scanning for conversational filler, wordy phrases, and redundant expressions that violate conciseness principles. - -## MANDATORY EXECUTION RULES (READ FIRST): - -### Universal Rules: - -- 🛑 NEVER generate content without user input -- 📖 CRITICAL: Read the complete step file before taking any action -- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read -- 📋 YOU ARE A FACILITATOR, not a content generator -- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` - -### Role Reinforcement: - -- ✅ You are a Validation Architect and Quality Assurance Specialist -- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role -- ✅ We engage in systematic validation, not collaborative dialogue -- ✅ You bring analytical rigor and attention to detail -- ✅ This step runs autonomously - no user input needed - -### Step-Specific Rules: - -- 🎯 Focus ONLY on information density anti-patterns -- 🚫 FORBIDDEN to validate other aspects in this step -- 💬 Approach: Systematic scanning and categorization -- 🚪 This is a validation sequence step - auto-proceeds when complete - -## EXECUTION PROTOCOLS: - -- 🎯 Scan PRD for density anti-patterns systematically -- 💾 Append density findings to validation report -- 📖 Display "Proceeding to next check..." and load next step -- 🚫 FORBIDDEN to pause or request user input - -## CONTEXT BOUNDARIES: - -- Available context: PRD file, validation report with format findings -- Focus: Information density validation only -- Limits: Don't validate other aspects, don't pause for user input -- Dependencies: Step 2 completed - format classification done - -## MANDATORY SEQUENCE - -**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change. - -### 1. Attempt Sub-Process Validation - -**Try to use Task tool to spawn a subprocess:** - -"Perform information density validation on this PRD: - -1. Load the PRD file -2. Scan for the following anti-patterns: - - Conversational filler phrases (examples: 'The system will allow users to...', 'It is important to note that...', 'In order to') - - Wordy phrases (examples: 'Due to the fact that', 'In the event of', 'For the purpose of') - - Redundant phrases (examples: 'Future plans', 'Absolutely essential', 'Past history') -3. Count violations by category with line numbers -4. Classify severity: Critical (>10 violations), Warning (5-10), Pass (<5) - -Return structured findings with counts and examples." - -### 2. Graceful Degradation (if Task tool unavailable) - -If Task tool unavailable, perform analysis directly: - -**Scan for conversational filler patterns:** -- "The system will allow users to..." -- "It is important to note that..." -- "In order to" -- "For the purpose of" -- "With regard to" -- Count occurrences and note line numbers - -**Scan for wordy phrases:** -- "Due to the fact that" (use "because") -- "In the event of" (use "if") -- "At this point in time" (use "now") -- "In a manner that" (use "how") -- Count occurrences and note line numbers - -**Scan for redundant phrases:** -- "Future plans" (just "plans") -- "Past history" (just "history") -- "Absolutely essential" (just "essential") -- "Completely finish" (just "finish") -- Count occurrences and note line numbers - -### 3. Classify Severity - -**Calculate total violations:** -- Conversational filler count -- Wordy phrases count -- Redundant phrases count -- Total = sum of all categories - -**Determine severity:** -- **Critical:** Total > 10 violations -- **Warning:** Total 5-10 violations -- **Pass:** Total < 5 violations - -### 4. Report Density Findings to Validation Report - -Append to validation report: - -```markdown -## Information Density Validation - -**Anti-Pattern Violations:** - -**Conversational Filler:** {count} occurrences -[If count > 0, list examples with line numbers] - -**Wordy Phrases:** {count} occurrences -[If count > 0, list examples with line numbers] - -**Redundant Phrases:** {count} occurrences -[If count > 0, list examples with line numbers] - -**Total Violations:** {total} - -**Severity Assessment:** [Critical/Warning/Pass] - -**Recommendation:** -[If Critical] "PRD requires significant revision to improve information density. Every sentence should carry weight without filler." -[If Warning] "PRD would benefit from reducing wordiness and eliminating filler phrases." -[If Pass] "PRD demonstrates good information density with minimal violations." -``` - -### 5. Display Progress and Auto-Proceed - -Display: "**Information Density Validation Complete** - -Severity: {Critical/Warning/Pass} - -**Proceeding to next validation check...**" - -Without delay, read fully and follow: {nextStepFile} (step-v-04-brief-coverage-validation.md) - ---- - -## 🚨 SYSTEM SUCCESS/FAILURE METRICS - -### ✅ SUCCESS: - -- PRD scanned for all three anti-pattern categories -- Violations counted with line numbers -- Severity classified correctly -- Findings reported to validation report -- Auto-proceeds to next validation step -- Subprocess attempted with graceful degradation - -### ❌ SYSTEM FAILURE: - -- Not scanning all anti-pattern categories -- Missing severity classification -- Not reporting findings to validation report -- Pausing for user input (should auto-proceed) -- Not attempting subprocess architecture - -**Master Rule:** Information density validation runs autonomously. Scan, classify, report, auto-proceed. No user interaction needed. diff --git a/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-04-brief-coverage-validation.md b/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-04-brief-coverage-validation.md deleted file mode 100644 index 60ad8684f..000000000 --- a/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-04-brief-coverage-validation.md +++ /dev/null @@ -1,214 +0,0 @@ ---- -name: 'step-v-04-brief-coverage-validation' -description: 'Product Brief Coverage Check - Validate PRD covers all content from Product Brief (if used as input)' - -# File references (ONLY variables used in this step) -nextStepFile: './step-v-05-measurability-validation.md' -prdFile: '{prd_file_path}' -productBrief: '{product_brief_path}' -validationReportPath: '{validation_report_path}' ---- - -# Step 4: Product Brief Coverage Validation - -## STEP GOAL: - -Validate that PRD covers all content from Product Brief (if brief was used as input), mapping brief content to PRD sections and identifying gaps. - -## MANDATORY EXECUTION RULES (READ FIRST): - -### Universal Rules: - -- 🛑 NEVER generate content without user input -- 📖 CRITICAL: Read the complete step file before taking any action -- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read -- 📋 YOU ARE A FACILITATOR, not a content generator -- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` - -### Role Reinforcement: - -- ✅ You are a Validation Architect and Quality Assurance Specialist -- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role -- ✅ We engage in systematic validation, not collaborative dialogue -- ✅ You bring analytical rigor and traceability expertise -- ✅ This step runs autonomously - no user input needed - -### Step-Specific Rules: - -- 🎯 Focus ONLY on Product Brief coverage (conditional on brief existence) -- 🚫 FORBIDDEN to validate other aspects in this step -- 💬 Approach: Systematic mapping and gap analysis -- 🚪 This is a validation sequence step - auto-proceeds when complete - -## EXECUTION PROTOCOLS: - -- 🎯 Check if Product Brief exists in input documents -- 💬 If no brief: Skip this check and report "N/A - No Product Brief" -- 🎯 If brief exists: Map brief content to PRD sections -- 💾 Append coverage findings to validation report -- 📖 Display "Proceeding to next check..." and load next step -- 🚫 FORBIDDEN to pause or request user input - -## CONTEXT BOUNDARIES: - -- Available context: PRD file, input documents from step 1, validation report -- Focus: Product Brief coverage only (conditional) -- Limits: Don't validate other aspects, conditional execution -- Dependencies: Step 1 completed - input documents loaded - -## MANDATORY SEQUENCE - -**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change. - -### 1. Check for Product Brief - -Check if Product Brief was loaded in step 1's inputDocuments: - -**IF no Product Brief found:** -Append to validation report: -```markdown -## Product Brief Coverage - -**Status:** N/A - No Product Brief was provided as input -``` - -Display: "**Product Brief Coverage: Skipped** (No Product Brief provided) - -**Proceeding to next validation check...**" - -Without delay, read fully and follow: {nextStepFile} - -**IF Product Brief exists:** Continue to step 2 below - -### 2. Attempt Sub-Process Validation - -**Try to use Task tool to spawn a subprocess:** - -"Perform Product Brief coverage validation: - -1. Load the Product Brief -2. Extract key content: - - Vision statement - - Target users/personas - - Problem statement - - Key features - - Goals/objectives - - Differentiators - - Constraints -3. For each item, search PRD for corresponding coverage -4. Classify coverage: Fully Covered / Partially Covered / Not Found / Intentionally Excluded -5. Note any gaps with severity: Critical / Moderate / Informational - -Return structured coverage map with classifications." - -### 3. Graceful Degradation (if Task tool unavailable) - -If Task tool unavailable, perform analysis directly: - -**Extract from Product Brief:** -- Vision: What is this product? -- Users: Who is it for? -- Problem: What problem does it solve? -- Features: What are the key capabilities? -- Goals: What are the success criteria? -- Differentiators: What makes it unique? - -**For each item, search PRD:** -- Scan Executive Summary for vision -- Check User Journeys or user personas -- Look for problem statement -- Review Functional Requirements for features -- Check Success Criteria section -- Search for differentiators - -**Classify coverage:** -- **Fully Covered:** Content present and complete -- **Partially Covered:** Content present but incomplete -- **Not Found:** Content missing from PRD -- **Intentionally Excluded:** Content explicitly out of scope - -### 4. Assess Coverage and Severity - -**For each gap (Partially Covered or Not Found):** -- Is this Critical? (Core vision, primary users, main features) -- Is this Moderate? (Secondary features, some goals) -- Is this Informational? (Nice-to-have features, minor details) - -**Note:** Some exclusions may be intentional (valid scoping decisions) - -### 5. Report Coverage Findings to Validation Report - -Append to validation report: - -```markdown -## Product Brief Coverage - -**Product Brief:** {brief_file_name} - -### Coverage Map - -**Vision Statement:** [Fully/Partially/Not Found/Intentionally Excluded] -[If gap: Note severity and specific missing content] - -**Target Users:** [Fully/Partially/Not Found/Intentionally Excluded] -[If gap: Note severity and specific missing content] - -**Problem Statement:** [Fully/Partially/Not Found/Intentionally Excluded] -[If gap: Note severity and specific missing content] - -**Key Features:** [Fully/Partially/Not Found/Intentionally Excluded] -[If gap: List specific features with severity] - -**Goals/Objectives:** [Fully/Partially/Not Found/Intentionally Excluded] -[If gap: Note severity and specific missing content] - -**Differentiators:** [Fully/Partially/Not Found/Intentionally Excluded] -[If gap: Note severity and specific missing content] - -### Coverage Summary - -**Overall Coverage:** [percentage or qualitative assessment] -**Critical Gaps:** [count] [list if any] -**Moderate Gaps:** [count] [list if any] -**Informational Gaps:** [count] [list if any] - -**Recommendation:** -[If critical gaps exist] "PRD should be revised to cover critical Product Brief content." -[If moderate gaps] "Consider addressing moderate gaps for complete coverage." -[If minimal gaps] "PRD provides good coverage of Product Brief content." -``` - -### 6. Display Progress and Auto-Proceed - -Display: "**Product Brief Coverage Validation Complete** - -Overall Coverage: {assessment} - -**Proceeding to next validation check...**" - -Without delay, read fully and follow: {nextStepFile} (step-v-05-measurability-validation.md) - ---- - -## 🚨 SYSTEM SUCCESS/FAILURE METRICS - -### ✅ SUCCESS: - -- Checked for Product Brief existence correctly -- If no brief: Reported "N/A" and skipped gracefully -- If brief exists: Mapped all key brief content to PRD sections -- Coverage classified appropriately (Fully/Partially/Not Found/Intentionally Excluded) -- Severity assessed for gaps (Critical/Moderate/Informational) -- Findings reported to validation report -- Auto-proceeds to next validation step -- Subprocess attempted with graceful degradation - -### ❌ SYSTEM FAILURE: - -- Not checking for brief existence before attempting validation -- If brief exists: not mapping all key content areas -- Missing coverage classifications -- Not reporting findings to validation report -- Not auto-proceeding - -**Master Rule:** Product Brief coverage is conditional - skip if no brief, validate thoroughly if brief exists. Always auto-proceed. diff --git a/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-05-measurability-validation.md b/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-05-measurability-validation.md deleted file mode 100644 index a97187184..000000000 --- a/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-05-measurability-validation.md +++ /dev/null @@ -1,228 +0,0 @@ ---- -name: 'step-v-05-measurability-validation' -description: 'Measurability Validation - Validate that all requirements (FRs and NFRs) are measurable and testable' - -# File references (ONLY variables used in this step) -nextStepFile: './step-v-06-traceability-validation.md' -prdFile: '{prd_file_path}' -validationReportPath: '{validation_report_path}' ---- - -# Step 5: Measurability Validation - -## STEP GOAL: - -Validate that all Functional Requirements (FRs) and Non-Functional Requirements (NFRs) are measurable, testable, and follow proper format without implementation details. - -## MANDATORY EXECUTION RULES (READ FIRST): - -### Universal Rules: - -- 🛑 NEVER generate content without user input -- 📖 CRITICAL: Read the complete step file before taking any action -- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read -- 📋 YOU ARE A FACILITATOR, not a content generator -- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` - -### Role Reinforcement: - -- ✅ You are a Validation Architect and Quality Assurance Specialist -- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role -- ✅ We engage in systematic validation, not collaborative dialogue -- ✅ You bring analytical rigor and requirements engineering expertise -- ✅ This step runs autonomously - no user input needed - -### Step-Specific Rules: - -- 🎯 Focus ONLY on FR and NFR measurability -- 🚫 FORBIDDEN to validate other aspects in this step -- 💬 Approach: Systematic requirement-by-requirement analysis -- 🚪 This is a validation sequence step - auto-proceeds when complete - -## EXECUTION PROTOCOLS: - -- 🎯 Extract all FRs and NFRs from PRD -- 💾 Validate each for measurability and format -- 📖 Append findings to validation report -- 📖 Display "Proceeding to next check..." and load next step -- 🚫 FORBIDDEN to pause or request user input - -## CONTEXT BOUNDARIES: - -- Available context: PRD file, validation report -- Focus: FR and NFR measurability only -- Limits: Don't validate other aspects, don't pause for user input -- Dependencies: Steps 2-4 completed - initial validation checks done - -## MANDATORY SEQUENCE - -**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change. - -### 1. Attempt Sub-Process Validation - -**Try to use Task tool to spawn a subprocess:** - -"Perform measurability validation on this PRD: - -**Functional Requirements (FRs):** -1. Extract all FRs from Functional Requirements section -2. Check each FR for: - - '[Actor] can [capability]' format compliance - - No subjective adjectives (easy, fast, simple, intuitive, etc.) - - No vague quantifiers (multiple, several, some, many, etc.) - - No implementation details (technology names, library names, data structures unless capability-relevant) -3. Document violations with line numbers - -**Non-Functional Requirements (NFRs):** -1. Extract all NFRs from Non-Functional Requirements section -2. Check each NFR for: - - Specific metrics with measurement methods - - Template compliance (criterion, metric, measurement method, context) - - Context included (why this matters, who it affects) -3. Document violations with line numbers - -Return structured findings with violation counts and examples." - -### 2. Graceful Degradation (if Task tool unavailable) - -If Task tool unavailable, perform analysis directly: - -**Functional Requirements Analysis:** - -Extract all FRs and check each for: - -**Format compliance:** -- Does it follow "[Actor] can [capability]" pattern? -- Is actor clearly defined? -- Is capability actionable and testable? - -**No subjective adjectives:** -- Scan for: easy, fast, simple, intuitive, user-friendly, responsive, quick, efficient (without metrics) -- Note line numbers - -**No vague quantifiers:** -- Scan for: multiple, several, some, many, few, various, number of -- Note line numbers - -**No implementation details:** -- Scan for: React, Vue, Angular, PostgreSQL, MongoDB, AWS, Docker, Kubernetes, Redux, etc. -- Unless capability-relevant (e.g., "API consumers can access...") -- Note line numbers - -**Non-Functional Requirements Analysis:** - -Extract all NFRs and check each for: - -**Specific metrics:** -- Is there a measurable criterion? (e.g., "response time < 200ms", not "fast response") -- Can this be measured or tested? - -**Template compliance:** -- Criterion defined? -- Metric specified? -- Measurement method included? -- Context provided? - -### 3. Tally Violations - -**FR Violations:** -- Format violations: count -- Subjective adjectives: count -- Vague quantifiers: count -- Implementation leakage: count -- Total FR violations: sum - -**NFR Violations:** -- Missing metrics: count -- Incomplete template: count -- Missing context: count -- Total NFR violations: sum - -**Total violations:** FR violations + NFR violations - -### 4. Report Measurability Findings to Validation Report - -Append to validation report: - -```markdown -## Measurability Validation - -### Functional Requirements - -**Total FRs Analyzed:** {count} - -**Format Violations:** {count} -[If violations exist, list examples with line numbers] - -**Subjective Adjectives Found:** {count} -[If found, list examples with line numbers] - -**Vague Quantifiers Found:** {count} -[If found, list examples with line numbers] - -**Implementation Leakage:** {count} -[If found, list examples with line numbers] - -**FR Violations Total:** {total} - -### Non-Functional Requirements - -**Total NFRs Analyzed:** {count} - -**Missing Metrics:** {count} -[If missing, list examples with line numbers] - -**Incomplete Template:** {count} -[If incomplete, list examples with line numbers] - -**Missing Context:** {count} -[If missing, list examples with line numbers] - -**NFR Violations Total:** {total} - -### Overall Assessment - -**Total Requirements:** {FRs + NFRs} -**Total Violations:** {FR violations + NFR violations} - -**Severity:** [Critical if >10 violations, Warning if 5-10, Pass if <5] - -**Recommendation:** -[If Critical] "Many requirements are not measurable or testable. Requirements must be revised to be testable for downstream work." -[If Warning] "Some requirements need refinement for measurability. Focus on violating requirements above." -[If Pass] "Requirements demonstrate good measurability with minimal issues." -``` - -### 5. Display Progress and Auto-Proceed - -Display: "**Measurability Validation Complete** - -Total Violations: {count} ({severity}) - -**Proceeding to next validation check...**" - -Without delay, read fully and follow: {nextStepFile} (step-v-06-traceability-validation.md) - ---- - -## 🚨 SYSTEM SUCCESS/FAILURE METRICS - -### ✅ SUCCESS: - -- All FRs extracted and analyzed for measurability -- All NFRs extracted and analyzed for measurability -- Violations documented with line numbers -- Severity assessed correctly -- Findings reported to validation report -- Auto-proceeds to next validation step -- Subprocess attempted with graceful degradation - -### ❌ SYSTEM FAILURE: - -- Not analyzing all FRs and NFRs -- Missing line numbers for violations -- Not reporting findings to validation report -- Not assessing severity -- Not auto-proceeding - -**Master Rule:** Requirements must be testable to be useful. Validate every requirement for measurability, document violations, auto-proceed. diff --git a/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-06-traceability-validation.md b/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-06-traceability-validation.md deleted file mode 100644 index 84bf9cce9..000000000 --- a/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-06-traceability-validation.md +++ /dev/null @@ -1,217 +0,0 @@ ---- -name: 'step-v-06-traceability-validation' -description: 'Traceability Validation - Validate the traceability chain from vision → success → journeys → FRs is intact' - -# File references (ONLY variables used in this step) -nextStepFile: './step-v-07-implementation-leakage-validation.md' -prdFile: '{prd_file_path}' -validationReportPath: '{validation_report_path}' ---- - -# Step 6: Traceability Validation - -## STEP GOAL: - -Validate the traceability chain from Executive Summary → Success Criteria → User Journeys → Functional Requirements is intact, ensuring every requirement traces back to a user need or business objective. - -## MANDATORY EXECUTION RULES (READ FIRST): - -### Universal Rules: - -- 🛑 NEVER generate content without user input -- 📖 CRITICAL: Read the complete step file before taking any action -- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read -- 📋 YOU ARE A FACILITATOR, not a content generator -- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` - -### Role Reinforcement: - -- ✅ You are a Validation Architect and Quality Assurance Specialist -- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role -- ✅ We engage in systematic validation, not collaborative dialogue -- ✅ You bring analytical rigor and traceability matrix expertise -- ✅ This step runs autonomously - no user input needed - -### Step-Specific Rules: - -- 🎯 Focus ONLY on traceability chain validation -- 🚫 FORBIDDEN to validate other aspects in this step -- 💬 Approach: Systematic chain validation and orphan detection -- 🚪 This is a validation sequence step - auto-proceeds when complete - -## EXECUTION PROTOCOLS: - -- 🎯 Build and validate traceability matrix -- 💾 Identify broken chains and orphan requirements -- 📖 Append findings to validation report -- 📖 Display "Proceeding to next check..." and load next step -- 🚫 FORBIDDEN to pause or request user input - -## CONTEXT BOUNDARIES: - -- Available context: PRD file, validation report -- Focus: Traceability chain validation only -- Limits: Don't validate other aspects, don't pause for user input -- Dependencies: Steps 2-5 completed - initial validations done - -## MANDATORY SEQUENCE - -**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change. - -### 1. Attempt Sub-Process Validation - -**Try to use Task tool to spawn a subprocess:** - -"Perform traceability validation on this PRD: - -1. Extract content from Executive Summary (vision, goals) -2. Extract Success Criteria -3. Extract User Journeys (user types, flows, outcomes) -4. Extract Functional Requirements (FRs) -5. Extract Product Scope (in-scope items) - -**Validate chains:** -- Executive Summary → Success Criteria: Does vision align with defined success? -- Success Criteria → User Journeys: Are success criteria supported by user journeys? -- User Journeys → Functional Requirements: Does each FR trace back to a user journey? -- Scope → FRs: Do MVP scope FRs align with in-scope items? - -**Identify orphans:** -- FRs not traceable to any user journey or business objective -- Success criteria not supported by user journeys -- User journeys without supporting FRs - -Build traceability matrix and identify broken chains and orphan FRs. - -Return structured findings with chain status and orphan list." - -### 2. Graceful Degradation (if Task tool unavailable) - -If Task tool unavailable, perform analysis directly: - -**Step 1: Extract key elements** -- Executive Summary: Note vision, goals, objectives -- Success Criteria: List all criteria -- User Journeys: List user types and their flows -- Functional Requirements: List all FRs -- Product Scope: List in-scope items - -**Step 2: Validate Executive Summary → Success Criteria** -- Does Executive Summary mention the success dimensions? -- Are Success Criteria aligned with vision? -- Note any misalignment - -**Step 3: Validate Success Criteria → User Journeys** -- For each success criterion, is there a user journey that achieves it? -- Note success criteria without supporting journeys - -**Step 4: Validate User Journeys → FRs** -- For each user journey/flow, are there FRs that enable it? -- List FRs with no clear user journey origin -- Note orphan FRs (requirements without traceable source) - -**Step 5: Validate Scope → FR Alignment** -- Does MVP scope align with essential FRs? -- Are in-scope items supported by FRs? -- Note misalignments - -**Step 6: Build traceability matrix** -- Map each FR to its source (journey or business objective) -- Note orphan FRs -- Identify broken chains - -### 3. Tally Traceability Issues - -**Broken chains:** -- Executive Summary → Success Criteria gaps: count -- Success Criteria → User Journeys gaps: count -- User Journeys → FRs gaps: count -- Scope → FR misalignments: count - -**Orphan elements:** -- Orphan FRs (no traceable source): count -- Unsupported success criteria: count -- User journeys without FRs: count - -**Total issues:** Sum of all broken chains and orphans - -### 4. Report Traceability Findings to Validation Report - -Append to validation report: - -```markdown -## Traceability Validation - -### Chain Validation - -**Executive Summary → Success Criteria:** [Intact/Gaps Identified] -{If gaps: List specific misalignments} - -**Success Criteria → User Journeys:** [Intact/Gaps Identified] -{If gaps: List unsupported success criteria} - -**User Journeys → Functional Requirements:** [Intact/Gaps Identified] -{If gaps: List journeys without supporting FRs} - -**Scope → FR Alignment:** [Intact/Misaligned] -{If misaligned: List specific issues} - -### Orphan Elements - -**Orphan Functional Requirements:** {count} -{List orphan FRs with numbers} - -**Unsupported Success Criteria:** {count} -{List unsupported criteria} - -**User Journeys Without FRs:** {count} -{List journeys without FRs} - -### Traceability Matrix - -{Summary table showing traceability coverage} - -**Total Traceability Issues:** {total} - -**Severity:** [Critical if orphan FRs exist, Warning if gaps, Pass if intact] - -**Recommendation:** -[If Critical] "Orphan requirements exist - every FR must trace back to a user need or business objective." -[If Warning] "Traceability gaps identified - strengthen chains to ensure all requirements are justified." -[If Pass] "Traceability chain is intact - all requirements trace to user needs or business objectives." -``` - -### 5. Display Progress and Auto-Proceed - -Display: "**Traceability Validation Complete** - -Total Issues: {count} ({severity}) - -**Proceeding to next validation check...**" - -Without delay, read fully and follow: {nextStepFile} (step-v-07-implementation-leakage-validation.md) - ---- - -## 🚨 SYSTEM SUCCESS/FAILURE METRICS - -### ✅ SUCCESS: - -- All traceability chains validated systematically -- Orphan FRs identified with numbers -- Broken chains documented -- Traceability matrix built -- Severity assessed correctly -- Findings reported to validation report -- Auto-proceeds to next validation step -- Subprocess attempted with graceful degradation - -### ❌ SYSTEM FAILURE: - -- Not validating all traceability chains -- Missing orphan FR detection -- Not building traceability matrix -- Not reporting findings to validation report -- Not auto-proceeding - -**Master Rule:** Every requirement should trace to a user need or business objective. Orphan FRs indicate broken traceability that must be fixed. diff --git a/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-07-implementation-leakage-validation.md b/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-07-implementation-leakage-validation.md deleted file mode 100644 index 923f99691..000000000 --- a/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-07-implementation-leakage-validation.md +++ /dev/null @@ -1,205 +0,0 @@ ---- -name: 'step-v-07-implementation-leakage-validation' -description: 'Implementation Leakage Check - Ensure FRs and NFRs don\'t include implementation details' - -# File references (ONLY variables used in this step) -nextStepFile: './step-v-08-domain-compliance-validation.md' -prdFile: '{prd_file_path}' -validationReportPath: '{validation_report_path}' ---- - -# Step 7: Implementation Leakage Validation - -## STEP GOAL: - -Ensure Functional Requirements and Non-Functional Requirements don't include implementation details - they should specify WHAT, not HOW. - -## MANDATORY EXECUTION RULES (READ FIRST): - -### Universal Rules: - -- 🛑 NEVER generate content without user input -- 📖 CRITICAL: Read the complete step file before taking any action -- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read -- 📋 YOU ARE A FACILITATOR, not a content generator -- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` - -### Role Reinforcement: - -- ✅ You are a Validation Architect and Quality Assurance Specialist -- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role -- ✅ We engage in systematic validation, not collaborative dialogue -- ✅ You bring analytical rigor and separation of concerns expertise -- ✅ This step runs autonomously - no user input needed - -### Step-Specific Rules: - -- 🎯 Focus ONLY on implementation leakage detection -- 🚫 FORBIDDEN to validate other aspects in this step -- 💬 Approach: Systematic scanning for technology and implementation terms -- 🚪 This is a validation sequence step - auto-proceeds when complete - -## EXECUTION PROTOCOLS: - -- 🎯 Scan FRs and NFRs for implementation terms -- 💾 Distinguish capability-relevant vs leakage -- 📖 Append findings to validation report -- 📖 Display "Proceeding to next check..." and load next step -- 🚫 FORBIDDEN to pause or request user input - -## CONTEXT BOUNDARIES: - -- Available context: PRD file, validation report -- Focus: Implementation leakage detection only -- Limits: Don't validate other aspects, don't pause for user input -- Dependencies: Steps 2-6 completed - initial validations done - -## MANDATORY SEQUENCE - -**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change. - -### 1. Attempt Sub-Process Validation - -**Try to use Task tool to spawn a subprocess:** - -"Perform implementation leakage validation on this PRD: - -**Scan for:** -1. Technology names (React, Vue, Angular, PostgreSQL, MongoDB, AWS, GCP, Azure, Docker, Kubernetes, etc.) -2. Library names (Redux, axios, lodash, Express, Django, Rails, Spring, etc.) -3. Data structures (JSON, XML, CSV) unless relevant to capability -4. Architecture patterns (MVC, microservices, serverless) unless business requirement -5. Protocol names (HTTP, REST, GraphQL, WebSockets) - check if capability-relevant - -**For each term found:** -- Is this capability-relevant? (e.g., 'API consumers can access...' - API is capability) -- Or is this implementation detail? (e.g., 'React component for...' - implementation) - -Document violations with line numbers and explanation. - -Return structured findings with leakage counts and examples." - -### 2. Graceful Degradation (if Task tool unavailable) - -If Task tool unavailable, perform analysis directly: - -**Implementation leakage terms to scan for:** - -**Frontend Frameworks:** -React, Vue, Angular, Svelte, Solid, Next.js, Nuxt, etc. - -**Backend Frameworks:** -Express, Django, Rails, Spring, Laravel, FastAPI, etc. - -**Databases:** -PostgreSQL, MySQL, MongoDB, Redis, DynamoDB, Cassandra, etc. - -**Cloud Platforms:** -AWS, GCP, Azure, Cloudflare, Vercel, Netlify, etc. - -**Infrastructure:** -Docker, Kubernetes, Terraform, Ansible, etc. - -**Libraries:** -Redux, Zustand, axios, fetch, lodash, jQuery, etc. - -**Data Formats:** -JSON, XML, YAML, CSV (unless capability-relevant) - -**For each term found in FRs/NFRs:** -- Determine if it's capability-relevant or implementation leakage -- Example: "API consumers can access data via REST endpoints" - API/REST is capability -- Example: "React components fetch data using Redux" - implementation leakage - -**Count violations and note line numbers** - -### 3. Tally Implementation Leakage - -**By category:** -- Frontend framework leakage: count -- Backend framework leakage: count -- Database leakage: count -- Cloud platform leakage: count -- Infrastructure leakage: count -- Library leakage: count -- Other implementation details: count - -**Total implementation leakage violations:** sum - -### 4. Report Implementation Leakage Findings to Validation Report - -Append to validation report: - -```markdown -## Implementation Leakage Validation - -### Leakage by Category - -**Frontend Frameworks:** {count} violations -{If violations, list examples with line numbers} - -**Backend Frameworks:** {count} violations -{If violations, list examples with line numbers} - -**Databases:** {count} violations -{If violations, list examples with line numbers} - -**Cloud Platforms:** {count} violations -{If violations, list examples with line numbers} - -**Infrastructure:** {count} violations -{If violations, list examples with line numbers} - -**Libraries:** {count} violations -{If violations, list examples with line numbers} - -**Other Implementation Details:** {count} violations -{If violations, list examples with line numbers} - -### Summary - -**Total Implementation Leakage Violations:** {total} - -**Severity:** [Critical if >5 violations, Warning if 2-5, Pass if <2] - -**Recommendation:** -[If Critical] "Extensive implementation leakage found. Requirements specify HOW instead of WHAT. Remove all implementation details - these belong in architecture, not PRD." -[If Warning] "Some implementation leakage detected. Review violations and remove implementation details from requirements." -[If Pass] "No significant implementation leakage found. Requirements properly specify WHAT without HOW." - -**Note:** API consumers, GraphQL (when required), and other capability-relevant terms are acceptable when they describe WHAT the system must do, not HOW to build it. -``` - -### 5. Display Progress and Auto-Proceed - -Display: "**Implementation Leakage Validation Complete** - -Total Violations: {count} ({severity}) - -**Proceeding to next validation check...**" - -Without delay, read fully and follow: {nextStepFile} (step-v-08-domain-compliance-validation.md) - ---- - -## 🚨 SYSTEM SUCCESS/FAILURE METRICS - -### ✅ SUCCESS: - -- Scanned FRs and NFRs for all implementation term categories -- Distinguished capability-relevant from implementation leakage -- Violations documented with line numbers and explanations -- Severity assessed correctly -- Findings reported to validation report -- Auto-proceeds to next validation step -- Subprocess attempted with graceful degradation - -### ❌ SYSTEM FAILURE: - -- Not scanning all implementation term categories -- Not distinguishing capability-relevant from leakage -- Missing line numbers for violations -- Not reporting findings to validation report -- Not auto-proceeding - -**Master Rule:** Requirements specify WHAT, not HOW. Implementation details belong in architecture documents, not PRDs. diff --git a/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-08-domain-compliance-validation.md b/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-08-domain-compliance-validation.md deleted file mode 100644 index 562697eda..000000000 --- a/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-08-domain-compliance-validation.md +++ /dev/null @@ -1,243 +0,0 @@ ---- -name: 'step-v-08-domain-compliance-validation' -description: 'Domain Compliance Validation - Validate domain-specific requirements are present for high-complexity domains' - -# File references (ONLY variables used in this step) -nextStepFile: './step-v-09-project-type-validation.md' -prdFile: '{prd_file_path}' -prdFrontmatter: '{prd_frontmatter}' -validationReportPath: '{validation_report_path}' -domainComplexityData: '../data/domain-complexity.csv' ---- - -# Step 8: Domain Compliance Validation - -## STEP GOAL: - -Validate domain-specific requirements are present for high-complexity domains (Healthcare, Fintech, GovTech, etc.), ensuring regulatory and compliance requirements are properly documented. - -## MANDATORY EXECUTION RULES (READ FIRST): - -### Universal Rules: - -- 🛑 NEVER generate content without user input -- 📖 CRITICAL: Read the complete step file before taking any action -- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read -- 📋 YOU ARE A FACILITATOR, not a content generator -- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` - -### Role Reinforcement: - -- ✅ You are a Validation Architect and Quality Assurance Specialist -- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role -- ✅ We engage in systematic validation, not collaborative dialogue -- ✅ You bring domain expertise and compliance knowledge -- ✅ This step runs autonomously - no user input needed - -### Step-Specific Rules: - -- 🎯 Focus ONLY on domain-specific compliance requirements -- 🚫 FORBIDDEN to validate other aspects in this step -- 💬 Approach: Conditional validation based on domain classification -- 🚪 This is a validation sequence step - auto-proceeds when complete - -## EXECUTION PROTOCOLS: - -- 🎯 Check classification.domain from PRD frontmatter -- 💬 If low complexity (general): Skip detailed checks -- 🎯 If high complexity: Validate required special sections -- 💾 Append compliance findings to validation report -- 📖 Display "Proceeding to next check..." and load next step -- 🚫 FORBIDDEN to pause or request user input - -## CONTEXT BOUNDARIES: - -- Available context: PRD file with frontmatter classification, validation report -- Focus: Domain compliance only (conditional on domain complexity) -- Limits: Don't validate other aspects, conditional execution -- Dependencies: Steps 2-7 completed - format and requirements validation done - -## MANDATORY SEQUENCE - -**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change. - -### 1. Load Domain Complexity Data - -Load and read the complete file at: -`{domainComplexityData}` (../data/domain-complexity.csv) - -This CSV contains: -- Domain classifications and complexity levels (high/medium/low) -- Required special sections for each domain -- Key concerns and requirements for regulated industries - -Internalize this data - it drives which domains require special compliance sections. - -### 2. Extract Domain Classification - -From PRD frontmatter, extract: -- `classification.domain` - what domain is this PRD for? - -**If no domain classification found:** -Treat as "general" (low complexity) and proceed to step 4 - -### 2. Determine Domain Complexity - -**Low complexity domains (skip detailed checks):** -- General -- Consumer apps (standard e-commerce, social, productivity) -- Content websites -- Business tools (standard) - -**High complexity domains (require special sections):** -- Healthcare / Healthtech -- Fintech / Financial services -- GovTech / Public sector -- EdTech (educational records, accredited courses) -- Legal tech -- Other regulated domains - -### 3. For High-Complexity Domains: Validate Required Special Sections - -**Attempt subprocess validation:** - -"Perform domain compliance validation for {domain}: - -Based on {domain} requirements, check PRD for: - -**Healthcare:** -- Clinical Requirements section -- Regulatory Pathway (FDA, HIPAA, etc.) -- Safety Measures -- HIPAA Compliance (data privacy, security) -- Patient safety considerations - -**Fintech:** -- Compliance Matrix (SOC2, PCI-DSS, GDPR, etc.) -- Security Architecture -- Audit Requirements -- Fraud Prevention measures -- Financial transaction handling - -**GovTech:** -- Accessibility Standards (WCAG 2.1 AA, Section 508) -- Procurement Compliance -- Security Clearance requirements -- Data residency requirements - -**Other regulated domains:** -- Check for domain-specific regulatory sections -- Compliance requirements -- Special considerations - -For each required section: -- Is it present in PRD? -- Is it adequately documented? -- Note any gaps - -Return compliance matrix with presence/adequacy assessment." - -**Graceful degradation (if no Task tool):** -- Manually check for required sections based on domain -- List present sections and missing sections -- Assess adequacy of documentation - -### 5. For Low-Complexity Domains: Skip Detailed Checks - -Append to validation report: -```markdown -## Domain Compliance Validation - -**Domain:** {domain} -**Complexity:** Low (general/standard) -**Assessment:** N/A - No special domain compliance requirements - -**Note:** This PRD is for a standard domain without regulatory compliance requirements. -``` - -Display: "**Domain Compliance Validation Skipped** - -Domain: {domain} (low complexity) - -**Proceeding to next validation check...**" - -Without delay, read fully and follow: {nextStepFile} - -### 6. Report Compliance Findings (High-Complexity Domains) - -Append to validation report: - -```markdown -## Domain Compliance Validation - -**Domain:** {domain} -**Complexity:** High (regulated) - -### Required Special Sections - -**{Section 1 Name}:** [Present/Missing/Adequate] -{If missing or inadequate: Note specific gaps} - -**{Section 2 Name}:** [Present/Missing/Adequate] -{If missing or inadequate: Note specific gaps} - -[Continue for all required sections] - -### Compliance Matrix - -| Requirement | Status | Notes | -|-------------|--------|-------| -| {Requirement 1} | [Met/Partial/Missing] | {Notes} | -| {Requirement 2} | [Met/Partial/Missing] | {Notes} | -[... continue for all requirements] - -### Summary - -**Required Sections Present:** {count}/{total} -**Compliance Gaps:** {count} - -**Severity:** [Critical if missing regulatory sections, Warning if incomplete, Pass if complete] - -**Recommendation:** -[If Critical] "PRD is missing required domain-specific compliance sections. These are essential for {domain} products." -[If Warning] "Some domain compliance sections are incomplete. Strengthen documentation for full compliance." -[If Pass] "All required domain compliance sections are present and adequately documented." -``` - -### 7. Display Progress and Auto-Proceed - -Display: "**Domain Compliance Validation Complete** - -Domain: {domain} ({complexity}) -Compliance Status: {status} - -**Proceeding to next validation check...**" - -Without delay, read fully and follow: {nextStepFile} (step-v-09-project-type-validation.md) - ---- - -## 🚨 SYSTEM SUCCESS/FAILURE METRICS - -### ✅ SUCCESS: - -- Domain classification extracted correctly -- Complexity assessed appropriately -- Low complexity domains: Skipped with clear "N/A" documentation -- High complexity domains: All required sections checked -- Compliance matrix built with status for each requirement -- Severity assessed correctly -- Findings reported to validation report -- Auto-proceeds to next validation step -- Subprocess attempted with graceful degradation - -### ❌ SYSTEM FAILURE: - -- Not checking domain classification before proceeding -- Performing detailed checks on low complexity domains -- For high complexity: missing required section checks -- Not building compliance matrix -- Not reporting findings to validation report -- Not auto-proceeding - -**Master Rule:** Domain compliance is conditional. High-complexity domains require special sections - low complexity domains skip these checks. diff --git a/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-09-project-type-validation.md b/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-09-project-type-validation.md deleted file mode 100644 index aea41d924..000000000 --- a/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-09-project-type-validation.md +++ /dev/null @@ -1,263 +0,0 @@ ---- -name: 'step-v-09-project-type-validation' -description: 'Project-Type Compliance Validation - Validate project-type specific requirements are properly documented' - -# File references (ONLY variables used in this step) -nextStepFile: './step-v-10-smart-validation.md' -prdFile: '{prd_file_path}' -prdFrontmatter: '{prd_frontmatter}' -validationReportPath: '{validation_report_path}' -projectTypesData: '../data/project-types.csv' ---- - -# Step 9: Project-Type Compliance Validation - -## STEP GOAL: - -Validate project-type specific requirements are properly documented - different project types (api_backend, web_app, mobile_app, etc.) have different required and excluded sections. - -## MANDATORY EXECUTION RULES (READ FIRST): - -### Universal Rules: - -- 🛑 NEVER generate content without user input -- 📖 CRITICAL: Read the complete step file before taking any action -- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read -- 📋 YOU ARE A FACILITATOR, not a content generator -- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` - -### Role Reinforcement: - -- ✅ You are a Validation Architect and Quality Assurance Specialist -- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role -- ✅ We engage in systematic validation, not collaborative dialogue -- ✅ You bring project type expertise and architectural knowledge -- ✅ This step runs autonomously - no user input needed - -### Step-Specific Rules: - -- 🎯 Focus ONLY on project-type compliance -- 🚫 FORBIDDEN to validate other aspects in this step -- 💬 Approach: Validate required sections present, excluded sections absent -- 🚪 This is a validation sequence step - auto-proceeds when complete - -## EXECUTION PROTOCOLS: - -- 🎯 Check classification.projectType from PRD frontmatter -- 🎯 Validate required sections for that project type are present -- 🎯 Validate excluded sections for that project type are absent -- 💾 Append compliance findings to validation report -- 📖 Display "Proceeding to next check..." and load next step -- 🚫 FORBIDDEN to pause or request user input - -## CONTEXT BOUNDARIES: - -- Available context: PRD file with frontmatter classification, validation report -- Focus: Project-type compliance only -- Limits: Don't validate other aspects, don't pause for user input -- Dependencies: Steps 2-8 completed - domain and requirements validation done - -## MANDATORY SEQUENCE - -**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change. - -### 1. Load Project Types Data - -Load and read the complete file at: -`{projectTypesData}` (../data/project-types.csv) - -This CSV contains: -- Detection signals for each project type -- Required sections for each project type -- Skip/excluded sections for each project type -- Innovation signals - -Internalize this data - it drives what sections must be present or absent for each project type. - -### 2. Extract Project Type Classification - -From PRD frontmatter, extract: -- `classification.projectType` - what type of project is this? - -**Common project types:** -- api_backend -- web_app -- mobile_app -- desktop_app -- data_pipeline -- ml_system -- library_sdk -- infrastructure -- other - -**If no projectType classification found:** -Assume "web_app" (most common) and note in findings - -### 3. Determine Required and Excluded Sections from CSV Data - -**From loaded project-types.csv data, for this project type:** - -**Required sections:** (from required_sections column) -These MUST be present in the PRD - -**Skip sections:** (from skip_sections column) -These MUST NOT be present in the PRD - -**Example mappings from CSV:** -- api_backend: Required=[endpoint_specs, auth_model, data_schemas], Skip=[ux_ui, visual_design] -- mobile_app: Required=[platform_reqs, device_permissions, offline_mode], Skip=[desktop_features, cli_commands] -- cli_tool: Required=[command_structure, output_formats, config_schema], Skip=[visual_design, ux_principles, touch_interactions] -- etc. - -### 4. Validate Against CSV-Based Requirements - -**Based on project type, determine:** - -**api_backend:** -- Required: Endpoint Specs, Auth Model, Data Schemas, API Versioning -- Excluded: UX/UI sections, mobile-specific sections - -**web_app:** -- Required: User Journeys, UX/UI Requirements, Responsive Design -- Excluded: None typically - -**mobile_app:** -- Required: Mobile UX, Platform specifics (iOS/Android), Offline mode -- Excluded: Desktop-specific sections - -**desktop_app:** -- Required: Desktop UX, Platform specifics (Windows/Mac/Linux) -- Excluded: Mobile-specific sections - -**data_pipeline:** -- Required: Data Sources, Data Transformation, Data Sinks, Error Handling -- Excluded: UX/UI sections - -**ml_system:** -- Required: Model Requirements, Training Data, Inference Requirements, Model Performance -- Excluded: UX/UI sections (unless ML UI) - -**library_sdk:** -- Required: API Surface, Usage Examples, Integration Guide -- Excluded: UX/UI sections, deployment sections - -**infrastructure:** -- Required: Infrastructure Components, Deployment, Monitoring, Scaling -- Excluded: Feature requirements (this is infrastructure, not product) - -### 4. Attempt Sub-Process Validation - -"Perform project-type compliance validation for {projectType}: - -**Check that required sections are present:** -{List required sections for this project type} -For each: Is it present in PRD? Is it adequately documented? - -**Check that excluded sections are absent:** -{List excluded sections for this project type} -For each: Is it absent from PRD? (Should not be present) - -Build compliance table showing: -- Required sections: [Present/Missing/Incomplete] -- Excluded sections: [Absent/Present] (Present = violation) - -Return compliance table with findings." - -**Graceful degradation (if no Task tool):** -- Manually check PRD for required sections -- Manually check PRD for excluded sections -- Build compliance table - -### 5. Build Compliance Table - -**Required sections check:** -- For each required section: Present / Missing / Incomplete -- Count: Required sections present vs total required - -**Excluded sections check:** -- For each excluded section: Absent / Present (violation) -- Count: Excluded sections present (violations) - -**Total compliance score:** -- Required: {present}/{total} -- Excluded violations: {count} - -### 6. Report Project-Type Compliance Findings to Validation Report - -Append to validation report: - -```markdown -## Project-Type Compliance Validation - -**Project Type:** {projectType} - -### Required Sections - -**{Section 1}:** [Present/Missing/Incomplete] -{If missing or incomplete: Note specific gaps} - -**{Section 2}:** [Present/Missing/Incomplete] -{If missing or incomplete: Note specific gaps} - -[Continue for all required sections] - -### Excluded Sections (Should Not Be Present) - -**{Section 1}:** [Absent/Present] ✓ -{If present: This section should not be present for {projectType}} - -**{Section 2}:** [Absent/Present] ✓ -{If present: This section should not be present for {projectType}} - -[Continue for all excluded sections] - -### Compliance Summary - -**Required Sections:** {present}/{total} present -**Excluded Sections Present:** {violations} (should be 0) -**Compliance Score:** {percentage}% - -**Severity:** [Critical if required sections missing, Warning if incomplete, Pass if complete] - -**Recommendation:** -[If Critical] "PRD is missing required sections for {projectType}. Add missing sections to properly specify this type of project." -[If Warning] "Some required sections for {projectType} are incomplete. Strengthen documentation." -[If Pass] "All required sections for {projectType} are present. No excluded sections found." -``` - -### 7. Display Progress and Auto-Proceed - -Display: "**Project-Type Compliance Validation Complete** - -Project Type: {projectType} -Compliance: {score}% - -**Proceeding to next validation check...**" - -Without delay, read fully and follow: {nextStepFile} (step-v-10-smart-validation.md) - ---- - -## 🚨 SYSTEM SUCCESS/FAILURE METRICS - -### ✅ SUCCESS: - -- Project type extracted correctly (or default assumed) -- Required sections validated for presence and completeness -- Excluded sections validated for absence -- Compliance table built with status for all sections -- Severity assessed correctly -- Findings reported to validation report -- Auto-proceeds to next validation step -- Subprocess attempted with graceful degradation - -### ❌ SYSTEM FAILURE: - -- Not checking project type before proceeding -- Missing required section checks -- Missing excluded section checks -- Not building compliance table -- Not reporting findings to validation report -- Not auto-proceeding - -**Master Rule:** Different project types have different requirements. API PRDs don't need UX sections - validate accordingly. diff --git a/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-10-smart-validation.md b/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-10-smart-validation.md deleted file mode 100644 index 0c44b00da..000000000 --- a/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-10-smart-validation.md +++ /dev/null @@ -1,209 +0,0 @@ ---- -name: 'step-v-10-smart-validation' -description: 'SMART Requirements Validation - Validate Functional Requirements meet SMART quality criteria' - -# File references (ONLY variables used in this step) -nextStepFile: './step-v-11-holistic-quality-validation.md' -prdFile: '{prd_file_path}' -validationReportPath: '{validation_report_path}' ---- - -# Step 10: SMART Requirements Validation - -## STEP GOAL: - -Validate Functional Requirements meet SMART quality criteria (Specific, Measurable, Attainable, Relevant, Traceable), ensuring high-quality requirements. - -## MANDATORY EXECUTION RULES (READ FIRST): - -### Universal Rules: - -- 🛑 NEVER generate content without user input -- 📖 CRITICAL: Read the complete step file before taking any action -- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read -- 📋 YOU ARE A FACILITATOR, not a content generator -- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` -- ✅ YOU MUST ALWAYS WRITE all artifact and document content in `{document_output_language}` - -### Role Reinforcement: - -- ✅ You are a Validation Architect and Quality Assurance Specialist -- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role -- ✅ We engage in systematic validation, not collaborative dialogue -- ✅ You bring requirements engineering expertise and quality assessment -- ✅ This step runs autonomously - no user input needed - -### Step-Specific Rules: - -- 🎯 Focus ONLY on FR quality assessment using SMART framework -- 🚫 FORBIDDEN to validate other aspects in this step -- 💬 Approach: Score each FR on SMART criteria (1-5 scale) -- 🚪 This is a validation sequence step - auto-proceeds when complete - -## EXECUTION PROTOCOLS: - -- 🎯 Extract all FRs from PRD -- 🎯 Score each FR on SMART criteria (Specific, Measurable, Attainable, Relevant, Traceable) -- 💾 Flag FRs with score < 3 in any category -- 📖 Append scoring table and suggestions to validation report -- 📖 Display "Proceeding to next check..." and load next step -- 🚫 FORBIDDEN to pause or request user input - -## CONTEXT BOUNDARIES: - -- Available context: PRD file, validation report -- Focus: FR quality assessment only using SMART framework -- Limits: Don't validate NFRs or other aspects, don't pause for user input -- Dependencies: Steps 2-9 completed - comprehensive validation checks done - -## MANDATORY SEQUENCE - -**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change. - -### 1. Extract All Functional Requirements - -From the PRD's Functional Requirements section, extract: -- All FRs with their FR numbers (FR-001, FR-002, etc.) -- Count total FRs - -### 2. Attempt Sub-Process Validation - -**Try to use Task tool to spawn a subprocess:** - -"Perform SMART requirements validation on these Functional Requirements: - -{List all FRs} - -**For each FR, score on SMART criteria (1-5 scale):** - -**Specific (1-5):** -- 5: Clear, unambiguous, well-defined -- 3: Somewhat clear but could be more specific -- 1: Vague, ambiguous, unclear - -**Measurable (1-5):** -- 5: Quantifiable metrics, testable -- 3: Partially measurable -- 1: Not measurable, subjective - -**Attainable (1-5):** -- 5: Realistic, achievable with constraints -- 3: Probably achievable but uncertain -- 1: Unrealistic, technically infeasible - -**Relevant (1-5):** -- 5: Clearly aligned with user needs and business objectives -- 3: Somewhat relevant but connection unclear -- 1: Not relevant, doesn't align with goals - -**Traceable (1-5):** -- 5: Clearly traces to user journey or business objective -- 3: Partially traceable -- 1: Orphan requirement, no clear source - -**For each FR with score < 3 in any category:** -- Provide specific improvement suggestions - -Return scoring table with all FR scores and improvement suggestions for low-scoring FRs." - -**Graceful degradation (if no Task tool):** -- Manually score each FR on SMART criteria -- Note FRs with low scores -- Provide improvement suggestions - -### 3. Build Scoring Table - -For each FR: -- FR number -- Specific score (1-5) -- Measurable score (1-5) -- Attainable score (1-5) -- Relevant score (1-5) -- Traceable score (1-5) -- Average score -- Flag if any category < 3 - -**Calculate overall FR quality:** -- Percentage of FRs with all scores ≥ 3 -- Percentage of FRs with all scores ≥ 4 -- Average score across all FRs and categories - -### 4. Report SMART Findings to Validation Report - -Append to validation report: - -```markdown -## SMART Requirements Validation - -**Total Functional Requirements:** {count} - -### Scoring Summary - -**All scores ≥ 3:** {percentage}% ({count}/{total}) -**All scores ≥ 4:** {percentage}% ({count}/{total}) -**Overall Average Score:** {average}/5.0 - -### Scoring Table - -| FR # | Specific | Measurable | Attainable | Relevant | Traceable | Average | Flag | -|------|----------|------------|------------|----------|-----------|--------|------| -| FR-001 | {s1} | {m1} | {a1} | {r1} | {t1} | {avg1} | {X if any <3} | -| FR-002 | {s2} | {m2} | {a2} | {r2} | {t2} | {avg2} | {X if any <3} | -[Continue for all FRs] - -**Legend:** 1=Poor, 3=Acceptable, 5=Excellent -**Flag:** X = Score < 3 in one or more categories - -### Improvement Suggestions - -**Low-Scoring FRs:** - -**FR-{number}:** {specific suggestion for improvement} -[For each FR with score < 3 in any category] - -### Overall Assessment - -**Severity:** [Critical if >30% flagged FRs, Warning if 10-30%, Pass if <10%] - -**Recommendation:** -[If Critical] "Many FRs have quality issues. Revise flagged FRs using SMART framework to improve clarity and testability." -[If Warning] "Some FRs would benefit from SMART refinement. Focus on flagged requirements above." -[If Pass] "Functional Requirements demonstrate good SMART quality overall." -``` - -### 5. Display Progress and Auto-Proceed - -Display: "**SMART Requirements Validation Complete** - -FR Quality: {percentage}% with acceptable scores ({severity}) - -**Proceeding to next validation check...**" - -Without delay, read fully and follow: {nextStepFile} (step-v-11-holistic-quality-validation.md) - ---- - -## 🚨 SYSTEM SUCCESS/FAILURE METRICS - -### ✅ SUCCESS: - -- All FRs extracted from PRD -- Each FR scored on all 5 SMART criteria (1-5 scale) -- FRs with scores < 3 flagged for improvement -- Improvement suggestions provided for low-scoring FRs -- Scoring table built with all FR scores -- Overall quality assessment calculated -- Findings reported to validation report -- Auto-proceeds to next validation step -- Subprocess attempted with graceful degradation - -### ❌ SYSTEM FAILURE: - -- Not scoring all FRs on all SMART criteria -- Missing improvement suggestions for low-scoring FRs -- Not building scoring table -- Not calculating overall quality metrics -- Not reporting findings to validation report -- Not auto-proceeding - -**Master Rule:** FRs should be high-quality, not just present. SMART framework provides objective quality measure. diff --git a/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-11-holistic-quality-validation.md b/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-11-holistic-quality-validation.md deleted file mode 100644 index f34dee65a..000000000 --- a/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-11-holistic-quality-validation.md +++ /dev/null @@ -1,264 +0,0 @@ ---- -name: 'step-v-11-holistic-quality-validation' -description: 'Holistic Quality Assessment - Assess PRD as cohesive, compelling document - is it a good PRD?' - -# File references (ONLY variables used in this step) -nextStepFile: './step-v-12-completeness-validation.md' -prdFile: '{prd_file_path}' -validationReportPath: '{validation_report_path}' ---- - -# Step 11: Holistic Quality Assessment - -## STEP GOAL: - -Assess the PRD as a cohesive, compelling document - evaluating document flow, dual audience effectiveness (humans and LLMs), BMAD PRD principles compliance, and overall quality rating. - -## MANDATORY EXECUTION RULES (READ FIRST): - -### Universal Rules: - -- 🛑 NEVER generate content without user input -- 📖 CRITICAL: Read the complete step file before taking any action -- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read -- 📋 YOU ARE A FACILITATOR, not a content generator -- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` -- ✅ YOU MUST ALWAYS WRITE all artifact and document content in `{document_output_language}` - -### Role Reinforcement: - -- ✅ You are a Validation Architect and Quality Assurance Specialist -- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role -- ✅ We engage in systematic validation, not collaborative dialogue -- ✅ You bring analytical rigor and document quality expertise -- ✅ This step runs autonomously - no user input needed -- ✅ Uses Advanced Elicitation for multi-perspective evaluation - -### Step-Specific Rules: - -- 🎯 Focus ONLY on holistic document quality assessment -- 🚫 FORBIDDEN to validate individual components (done in previous steps) -- 💬 Approach: Multi-perspective evaluation using Advanced Elicitation -- 🚪 This is a validation sequence step - auto-proceeds when complete - -## EXECUTION PROTOCOLS: - -- 🎯 Use Advanced Elicitation for multi-perspective assessment -- 🎯 Evaluate document flow, dual audience, BMAD principles -- 💾 Append comprehensive assessment to validation report -- 📖 Display "Proceeding to next check..." and load next step -- 🚫 FORBIDDEN to pause or request user input - -## CONTEXT BOUNDARIES: - -- Available context: Complete PRD file, validation report with findings from steps 1-10 -- Focus: Holistic quality - the WHOLE document -- Limits: Don't re-validate individual components, don't pause for user input -- Dependencies: Steps 1-10 completed - all systematic checks done - -## MANDATORY SEQUENCE - -**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change. - -### 1. Attempt Sub-Process with Advanced Elicitation - -**Try to use Task tool to spawn a subprocess using Advanced Elicitation:** - -"Perform holistic quality assessment on this PRD using multi-perspective evaluation: - -**Advanced Elicitation workflow:** -Invoke the `bmad-advanced-elicitation` skill - -**Evaluate the PRD from these perspectives:** - -**1. Document Flow & Coherence:** -- Read entire PRD -- Evaluate narrative flow - does it tell a cohesive story? -- Check transitions between sections -- Assess consistency - is it coherent throughout? -- Evaluate readability - is it clear and well-organized? - -**2. Dual Audience Effectiveness:** - -**For Humans:** -- Executive-friendly: Can executives understand vision and goals quickly? -- Developer clarity: Do developers have clear requirements to build from? -- Designer clarity: Do designers understand user needs and flows? -- Stakeholder decision-making: Can stakeholders make informed decisions? - -**For LLMs:** -- Machine-readable structure: Is the PRD structured for LLM consumption? -- UX readiness: Can an LLM generate UX designs from this? -- Architecture readiness: Can an LLM generate architecture from this? -- Epic/Story readiness: Can an LLM break down into epics and stories? - -**3. BMAD PRD Principles Compliance:** -- Information density: Every sentence carries weight? -- Measurability: Requirements testable? -- Traceability: Requirements trace to sources? -- Domain awareness: Domain-specific considerations included? -- Zero anti-patterns: No filler or wordiness? -- Dual audience: Works for both humans and LLMs? -- Markdown format: Proper structure and formatting? - -**4. Overall Quality Rating:** -Rate the PRD on 5-point scale: -- Excellent (5/5): Exemplary, ready for production use -- Good (4/5): Strong with minor improvements needed -- Adequate (3/5): Acceptable but needs refinement -- Needs Work (2/5): Significant gaps or issues -- Problematic (1/5): Major flaws, needs substantial revision - -**5. Top 3 Improvements:** -Identify the 3 most impactful improvements to make this a great PRD - -Return comprehensive assessment with all perspectives, rating, and top 3 improvements." - -**Graceful degradation (if no Task tool or Advanced Elicitation unavailable):** -- Perform holistic assessment directly in current context -- Read complete PRD -- Evaluate document flow, coherence, transitions -- Assess dual audience effectiveness -- Check BMAD principles compliance -- Assign overall quality rating -- Identify top 3 improvements - -### 2. Synthesize Assessment - -**Compile findings from multi-perspective evaluation:** - -**Document Flow & Coherence:** -- Overall assessment: [Excellent/Good/Adequate/Needs Work/Problematic] -- Key strengths: [list] -- Key weaknesses: [list] - -**Dual Audience Effectiveness:** -- For Humans: [assessment] -- For LLMs: [assessment] -- Overall dual audience score: [1-5] - -**BMAD Principles Compliance:** -- Principles met: [count]/7 -- Principles with issues: [list] - -**Overall Quality Rating:** [1-5 with label] - -**Top 3 Improvements:** -1. [Improvement 1] -2. [Improvement 2] -3. [Improvement 3] - -### 3. Report Holistic Quality Findings to Validation Report - -Append to validation report: - -```markdown -## Holistic Quality Assessment - -### Document Flow & Coherence - -**Assessment:** [Excellent/Good/Adequate/Needs Work/Problematic] - -**Strengths:** -{List key strengths} - -**Areas for Improvement:** -{List key weaknesses} - -### Dual Audience Effectiveness - -**For Humans:** -- Executive-friendly: [assessment] -- Developer clarity: [assessment] -- Designer clarity: [assessment] -- Stakeholder decision-making: [assessment] - -**For LLMs:** -- Machine-readable structure: [assessment] -- UX readiness: [assessment] -- Architecture readiness: [assessment] -- Epic/Story readiness: [assessment] - -**Dual Audience Score:** {score}/5 - -### BMAD PRD Principles Compliance - -| Principle | Status | Notes | -|-----------|--------|-------| -| Information Density | [Met/Partial/Not Met] | {notes} | -| Measurability | [Met/Partial/Not Met] | {notes} | -| Traceability | [Met/Partial/Not Met] | {notes} | -| Domain Awareness | [Met/Partial/Not Met] | {notes} | -| Zero Anti-Patterns | [Met/Partial/Not Met] | {notes} | -| Dual Audience | [Met/Partial/Not Met] | {notes} | -| Markdown Format | [Met/Partial/Not Met] | {notes} | - -**Principles Met:** {count}/7 - -### Overall Quality Rating - -**Rating:** {rating}/5 - {label} - -**Scale:** -- 5/5 - Excellent: Exemplary, ready for production use -- 4/5 - Good: Strong with minor improvements needed -- 3/5 - Adequate: Acceptable but needs refinement -- 2/5 - Needs Work: Significant gaps or issues -- 1/5 - Problematic: Major flaws, needs substantial revision - -### Top 3 Improvements - -1. **{Improvement 1}** - {Brief explanation of why and how} - -2. **{Improvement 2}** - {Brief explanation of why and how} - -3. **{Improvement 3}** - {Brief explanation of why and how} - -### Summary - -**This PRD is:** {one-sentence overall assessment} - -**To make it great:** Focus on the top 3 improvements above. -``` - -### 4. Display Progress and Auto-Proceed - -Display: "**Holistic Quality Assessment Complete** - -Overall Rating: {rating}/5 - {label} - -**Proceeding to final validation checks...**" - -Without delay, read fully and follow: {nextStepFile} (step-v-12-completeness-validation.md) - ---- - -## 🚨 SYSTEM SUCCESS/FAILURE METRICS - -### ✅ SUCCESS: - -- Advanced Elicitation used for multi-perspective evaluation (or graceful degradation) -- Document flow & coherence assessed -- Dual audience effectiveness evaluated (humans and LLMs) -- BMAD PRD principles compliance checked -- Overall quality rating assigned (1-5 scale) -- Top 3 improvements identified -- Comprehensive assessment reported to validation report -- Auto-proceeds to next validation step -- Subprocess attempted with graceful degradation - -### ❌ SYSTEM FAILURE: - -- Not using Advanced Elicitation for multi-perspective evaluation -- Missing document flow assessment -- Missing dual audience evaluation -- Not checking all BMAD principles -- Not assigning overall quality rating -- Missing top 3 improvements -- Not reporting comprehensive assessment to validation report -- Not auto-proceeding - -**Master Rule:** This evaluates the WHOLE document, not just components. Answers "Is this a good PRD?" and "What would make it great?" diff --git a/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-12-completeness-validation.md b/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-12-completeness-validation.md deleted file mode 100644 index 00c477981..000000000 --- a/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-12-completeness-validation.md +++ /dev/null @@ -1,242 +0,0 @@ ---- -name: 'step-v-12-completeness-validation' -description: 'Completeness Check - Final comprehensive completeness check before report generation' - -# File references (ONLY variables used in this step) -nextStepFile: './step-v-13-report-complete.md' -prdFile: '{prd_file_path}' -prdFrontmatter: '{prd_frontmatter}' -validationReportPath: '{validation_report_path}' ---- - -# Step 12: Completeness Validation - -## STEP GOAL: - -Final comprehensive completeness check - validate no template variables remain, each section has required content, section-specific completeness, and frontmatter is properly populated. - -## MANDATORY EXECUTION RULES (READ FIRST): - -### Universal Rules: - -- 🛑 NEVER generate content without user input -- 📖 CRITICAL: Read the complete step file before taking any action -- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read -- 📋 YOU ARE A FACILITATOR, not a content generator -- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` - -### Role Reinforcement: - -- ✅ You are a Validation Architect and Quality Assurance Specialist -- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role -- ✅ We engage in systematic validation, not collaborative dialogue -- ✅ You bring attention to detail and completeness verification -- ✅ This step runs autonomously - no user input needed - -### Step-Specific Rules: - -- 🎯 Focus ONLY on completeness verification -- 🚫 FORBIDDEN to validate quality (done in step 11) or other aspects -- 💬 Approach: Systematic checklist-style verification -- 🚪 This is a validation sequence step - auto-proceeds when complete - -## EXECUTION PROTOCOLS: - -- 🎯 Check template completeness (no variables remaining) -- 🎯 Validate content completeness (each section has required content) -- 🎯 Validate section-specific completeness -- 🎯 Validate frontmatter completeness -- 💾 Append completeness matrix to validation report -- 📖 Display "Proceeding to final step..." and load next step -- 🚫 FORBIDDEN to pause or request user input - -## CONTEXT BOUNDARIES: - -- Available context: Complete PRD file, frontmatter, validation report -- Focus: Completeness verification only (final gate) -- Limits: Don't assess quality, don't pause for user input -- Dependencies: Steps 1-11 completed - all validation checks done - -## MANDATORY SEQUENCE - -**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change. - -### 1. Attempt Sub-Process Validation - -**Try to use Task tool to spawn a subprocess:** - -"Perform completeness validation on this PRD - final gate check: - -**1. Template Completeness:** -- Scan PRD for any remaining template variables -- Look for: {variable}, {{variable}}, {placeholder}, [placeholder], etc. -- List any found with line numbers - -**2. Content Completeness:** -- Executive Summary: Has vision statement? ({key content}) -- Success Criteria: All criteria measurable? ({metrics present}) -- Product Scope: In-scope and out-of-scope defined? ({both present}) -- User Journeys: User types identified? ({users listed}) -- Functional Requirements: FRs listed with proper format? ({FRs present}) -- Non-Functional Requirements: NFRs with metrics? ({NFRs present}) - -For each section: Is required content present? (Yes/No/Partial) - -**3. Section-Specific Completeness:** -- Success Criteria: Each has specific measurement method? -- User Journeys: Cover all user types? -- Functional Requirements: Cover MVP scope? -- Non-Functional Requirements: Each has specific criteria? - -**4. Frontmatter Completeness:** -- stepsCompleted: Populated? -- classification: Present (domain, projectType)? -- inputDocuments: Tracked? -- date: Present? - -Return completeness matrix with status for each check." - -**Graceful degradation (if no Task tool):** -- Manually scan for template variables -- Manually check each section for required content -- Manually verify frontmatter fields -- Build completeness matrix - -### 2. Build Completeness Matrix - -**Template Completeness:** -- Template variables found: count -- List if any found - -**Content Completeness by Section:** -- Executive Summary: Complete / Incomplete / Missing -- Success Criteria: Complete / Incomplete / Missing -- Product Scope: Complete / Incomplete / Missing -- User Journeys: Complete / Incomplete / Missing -- Functional Requirements: Complete / Incomplete / Missing -- Non-Functional Requirements: Complete / Incomplete / Missing -- Other sections: [List completeness] - -**Section-Specific Completeness:** -- Success criteria measurable: All / Some / None -- Journeys cover all users: Yes / Partial / No -- FRs cover MVP scope: Yes / Partial / No -- NFRs have specific criteria: All / Some / None - -**Frontmatter Completeness:** -- stepsCompleted: Present / Missing -- classification: Present / Missing -- inputDocuments: Present / Missing -- date: Present / Missing - -**Overall completeness:** -- Sections complete: X/Y -- Critical gaps: [list if any] - -### 3. Report Completeness Findings to Validation Report - -Append to validation report: - -```markdown -## Completeness Validation - -### Template Completeness - -**Template Variables Found:** {count} -{If count > 0, list variables with line numbers} -{If count = 0, note: No template variables remaining ✓} - -### Content Completeness by Section - -**Executive Summary:** [Complete/Incomplete/Missing] -{If incomplete or missing, note specific gaps} - -**Success Criteria:** [Complete/Incomplete/Missing] -{If incomplete or missing, note specific gaps} - -**Product Scope:** [Complete/Incomplete/Missing] -{If incomplete or missing, note specific gaps} - -**User Journeys:** [Complete/Incomplete/Missing] -{If incomplete or missing, note specific gaps} - -**Functional Requirements:** [Complete/Incomplete/Missing] -{If incomplete or missing, note specific gaps} - -**Non-Functional Requirements:** [Complete/Incomplete/Missing] -{If incomplete or missing, note specific gaps} - -### Section-Specific Completeness - -**Success Criteria Measurability:** [All/Some/None] measurable -{If Some or None, note which criteria lack metrics} - -**User Journeys Coverage:** [Yes/Partial/No] - covers all user types -{If Partial or No, note missing user types} - -**FRs Cover MVP Scope:** [Yes/Partial/No] -{If Partial or No, note scope gaps} - -**NFRs Have Specific Criteria:** [All/Some/None] -{If Some or None, note which NFRs lack specificity} - -### Frontmatter Completeness - -**stepsCompleted:** [Present/Missing] -**classification:** [Present/Missing] -**inputDocuments:** [Present/Missing] -**date:** [Present/Missing] - -**Frontmatter Completeness:** {complete_fields}/4 - -### Completeness Summary - -**Overall Completeness:** {percentage}% ({complete_sections}/{total_sections}) - -**Critical Gaps:** [count] [list if any] -**Minor Gaps:** [count] [list if any] - -**Severity:** [Critical if template variables exist or critical sections missing, Warning if minor gaps, Pass if complete] - -**Recommendation:** -[If Critical] "PRD has completeness gaps that must be addressed before use. Fix template variables and complete missing sections." -[If Warning] "PRD has minor completeness gaps. Address minor gaps for complete documentation." -[If Pass] "PRD is complete with all required sections and content present." -``` - -### 4. Display Progress and Auto-Proceed - -Display: "**Completeness Validation Complete** - -Overall Completeness: {percentage}% ({severity}) - -**Proceeding to final step...**" - -Without delay, read fully and follow: {nextStepFile} (step-v-13-report-complete.md) - ---- - -## 🚨 SYSTEM SUCCESS/FAILURE METRICS - -### ✅ SUCCESS: - -- Scanned for template variables systematically -- Validated each section for required content -- Validated section-specific completeness (measurability, coverage, scope) -- Validated frontmatter completeness -- Completeness matrix built with all checks -- Severity assessed correctly -- Findings reported to validation report -- Auto-proceeds to final step -- Subprocess attempted with graceful degradation - -### ❌ SYSTEM FAILURE: - -- Not scanning for template variables -- Missing section-specific completeness checks -- Not validating frontmatter -- Not building completeness matrix -- Not reporting findings to validation report -- Not auto-proceeding - -**Master Rule:** Final gate to ensure document is complete before presenting findings. Template variables or critical gaps must be fixed. diff --git a/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-13-report-complete.md b/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-13-report-complete.md deleted file mode 100644 index b08a35db8..000000000 --- a/src/bmm-skills/2-plan-workflows/create-prd/steps-v/step-v-13-report-complete.md +++ /dev/null @@ -1,232 +0,0 @@ ---- -name: 'step-v-13-report-complete' -description: 'Validation Report Complete - Finalize report, summarize findings, present to user, offer next steps' - -# File references (ONLY variables used in this step) -validationReportPath: '{validation_report_path}' -prdFile: '{prd_file_path}' ---- - -# Step 13: Validation Report Complete - -## STEP GOAL: - -Finalize validation report, summarize all findings from steps 1-12, present summary to user conversationally, and offer actionable next steps. - -## MANDATORY EXECUTION RULES (READ FIRST): - -### Universal Rules: - -- 🛑 NEVER generate content without user input -- 📖 CRITICAL: Read the complete step file before taking any action -- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read -- 📋 YOU ARE A FACILITATOR, not a content generator -- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` -- ✅ YOU MUST ALWAYS WRITE all artifact and document content in `{document_output_language}` - -### Role Reinforcement: - -- ✅ You are a Validation Architect and Quality Assurance Specialist -- ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role -- ✅ We engage in collaborative dialogue, not command-response -- ✅ You bring synthesis and summary expertise -- ✅ This is the FINAL step - requires user interaction - -### Step-Specific Rules: - -- 🎯 Focus ONLY on summarizing findings and presenting options -- 🚫 FORBIDDEN to perform additional validation -- 💬 Approach: Conversational summary with clear next steps -- 🚪 This is the final step - no next step after this - -## EXECUTION PROTOCOLS: - -- 🎯 Load complete validation report -- 🎯 Summarize all findings from steps 1-12 -- 🎯 Update report frontmatter with final status -- 💬 Present summary to user conversationally -- 💬 Offer menu options for next actions -- 🚫 FORBIDDEN to proceed without user selection - -## CONTEXT BOUNDARIES: - -- Available context: Complete validation report with findings from all validation steps -- Focus: Summary and presentation only (no new validation) -- Limits: Don't add new findings, just synthesize existing -- Dependencies: Steps 1-12 completed - all validation checks done - -## MANDATORY SEQUENCE - -**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change. - -### 1. Load Complete Validation Report - -Read the entire validation report from {validationReportPath} - -Extract all findings from: -- Format Detection (Step 2) -- Parity Analysis (Step 2B, if applicable) -- Information Density (Step 3) -- Product Brief Coverage (Step 4) -- Measurability (Step 5) -- Traceability (Step 6) -- Implementation Leakage (Step 7) -- Domain Compliance (Step 8) -- Project-Type Compliance (Step 9) -- SMART Requirements (Step 10) -- Holistic Quality (Step 11) -- Completeness (Step 12) - -### 2. Update Report Frontmatter with Final Status - -Update validation report frontmatter: - -```yaml ---- -validationTarget: '{prd_path}' -validationDate: '{current_date}' -inputDocuments: [list of documents] -validationStepsCompleted: ['step-v-01-discovery', 'step-v-02-format-detection', 'step-v-03-density-validation', 'step-v-04-brief-coverage-validation', 'step-v-05-measurability-validation', 'step-v-06-traceability-validation', 'step-v-07-implementation-leakage-validation', 'step-v-08-domain-compliance-validation', 'step-v-09-project-type-validation', 'step-v-10-smart-validation', 'step-v-11-holistic-quality-validation', 'step-v-12-completeness-validation'] -validationStatus: COMPLETE -holisticQualityRating: '{rating from step 11}' -overallStatus: '{Pass/Warning/Critical based on all findings}' ---- -``` - -### 3. Create Summary of Findings - -**Overall Status:** -- Determine from all validation findings -- **Pass:** All critical checks pass, minor warnings acceptable -- **Warning:** Some issues found but PRD is usable -- **Critical:** Major issues that prevent PRD from being fit for purpose - -**Quick Results Table:** -- Format: [classification] -- Information Density: [severity] -- Measurability: [severity] -- Traceability: [severity] -- Implementation Leakage: [severity] -- Domain Compliance: [status] -- Project-Type Compliance: [compliance score] -- SMART Quality: [percentage] -- Holistic Quality: [rating/5] -- Completeness: [percentage] - -**Critical Issues:** List from all validation steps -**Warnings:** List from all validation steps -**Strengths:** List positives from all validation steps - -**Holistic Quality Rating:** From step 11 -**Top 3 Improvements:** From step 11 - -**Recommendation:** Based on overall status - -### 4. Present Summary to User Conversationally - -Display: - -"**✓ PRD Validation Complete** - -**Overall Status:** {Pass/Warning/Critical} - -**Quick Results:** -{Present quick results table with key findings} - -**Critical Issues:** {count or "None"} -{If any, list briefly} - -**Warnings:** {count or "None"} -{If any, list briefly} - -**Strengths:** -{List key strengths} - -**Holistic Quality:** {rating}/5 - {label} - -**Top 3 Improvements:** -1. {Improvement 1} -2. {Improvement 2} -3. {Improvement 3} - -**Recommendation:** -{Based on overall status: -- Pass: "PRD is in good shape. Address minor improvements to make it great." -- Warning: "PRD is usable but has issues that should be addressed. Review warnings and improve where needed." -- Critical: "PRD has significant issues that should be fixed before use. Focus on critical issues above."} - -**What would you like to do next?**" - -### 5. Present MENU OPTIONS - -Display: - -**[R] Review Detailed Findings** - Walk through validation report section by section -**[E] Use Edit Workflow** - Use validation report with Edit workflow for systematic improvements -**[F] Fix Simpler Items** - Immediate fixes for simple issues (anti-patterns, leakage, missing headers) -**[X] Exit** - Exit and Suggest Next Steps. - -#### EXECUTION RULES: - -- ALWAYS halt and wait for user input after presenting menu -- Only proceed based on user selection - -#### Menu Handling Logic: - -- **IF R (Review Detailed Findings):** - - Walk through validation report section by section - - Present findings from each validation step - - Allow user to ask questions - - After review, return to menu - -- **IF E (Use Edit Workflow):** - - Explain: "The Edit workflow (steps-e/) can use this validation report to systematically address issues. Edit mode will guide you through discovering what to edit, reviewing the PRD, and applying targeted improvements." - - Offer: "Would you like to launch Edit mode now? It will help you fix validation findings systematically." - - If yes: Read fully and follow: `./steps-e/step-e-01-discovery.md` - - If no: Return to menu - -- **IF F (Fix Simpler Items):** - - Offer immediate fixes for: - - Template variables (fill in with appropriate content) - - Conversational filler (remove wordy phrases) - - Implementation leakage (remove technology names from FRs/NFRs) - - Missing section headers (add ## headers) - - Ask: "Which simple fixes would you like me to make?" - - If user specifies fixes, make them and update validation report - - Return to menu - -- **IF X (Exit):** - - Display: "**Validation Report Saved:** {validationReportPath}" - - Display: "**Summary:** {overall status} - {recommendation}" - - PRD Validation complete. Invoke the `bmad-help` skill. - -- **IF Any other:** Help user, then redisplay menu - ---- - -## 🚨 SYSTEM SUCCESS/FAILURE METRICS - -### ✅ SUCCESS: - -- Complete validation report loaded successfully -- All findings from steps 1-12 summarized -- Report frontmatter updated with final status -- Overall status determined correctly (Pass/Warning/Critical) -- Quick results table presented -- Critical issues, warnings, and strengths listed -- Holistic quality rating included -- Top 3 improvements presented -- Clear recommendation provided -- Menu options presented with clear explanations -- User can review findings, get help, or exit - -### ❌ SYSTEM FAILURE: - -- Not loading complete validation report -- Missing summary of findings -- Not updating report frontmatter -- Not determining overall status -- Missing menu options -- Unclear next steps - -**Master Rule:** User needs clear summary and actionable next steps. Edit workflow is best for complex issues; immediate fixes available for simpler ones. diff --git a/src/bmm-skills/2-plan-workflows/create-prd/workflow-validate-prd.md b/src/bmm-skills/2-plan-workflows/create-prd/workflow-validate-prd.md deleted file mode 100644 index 86ccc7d05..000000000 --- a/src/bmm-skills/2-plan-workflows/create-prd/workflow-validate-prd.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -name: validate-prd -description: 'Validate a PRD against standards. Use when the user says "validate this PRD" or "run PRD validation"' -standalone: false -main_config: '{project-root}/_bmad/bmm/config.yaml' -validateWorkflow: './steps-v/step-v-01-discovery.md' ---- - -# PRD Validate Workflow - -**Goal:** Validate existing PRDs against BMAD standards through comprehensive review. - -**Your Role:** Validation Architect and Quality Assurance Specialist. - -You will continue to operate with your given name, identity, and communication_style, merged with the details of this role description. - -## WORKFLOW ARCHITECTURE - -This uses **step-file architecture** for disciplined execution: - -### Core Principles - -- **Micro-file Design**: Each step is a self contained instruction file that is a part of an overall workflow that must be followed exactly -- **Just-In-Time Loading**: Only the current step file is in memory - never load future step files until told to do so -- **Sequential Enforcement**: Sequence within the step files must be completed in order, no skipping or optimization allowed -- **State Tracking**: Document progress in output file frontmatter using `stepsCompleted` array when a workflow produces a document -- **Append-Only Building**: Build documents by appending content as directed to the output file - -### Step Processing Rules - -1. **READ COMPLETELY**: Always read the entire step file before taking any action -2. **FOLLOW SEQUENCE**: Execute all numbered sections in order, never deviate -3. **WAIT FOR INPUT**: If a menu is presented, halt and wait for user selection -4. **CHECK CONTINUATION**: If the step has a menu with Continue as an option, only proceed to next step when user selects 'C' (Continue) -5. **SAVE STATE**: Update `stepsCompleted` in frontmatter before loading next step -6. **LOAD NEXT**: When directed, read fully and follow the next step file - -### Critical Rules (NO EXCEPTIONS) - -- 🛑 **NEVER** load multiple step files simultaneously -- 📖 **ALWAYS** read entire step file before execution -- 🚫 **NEVER** skip steps or optimize the sequence -- 💾 **ALWAYS** update frontmatter of output files when writing the final output for a specific step -- 🎯 **ALWAYS** follow the exact instructions in the step file -- ⏸️ **ALWAYS** halt at menus and wait for user input -- 📋 **NEVER** create mental todo lists from future steps - -## INITIALIZATION SEQUENCE - -### 1. Configuration Loading - -Load and read full config from {main_config} and resolve: - -- `project_name`, `output_folder`, `planning_artifacts`, `user_name` -- `communication_language`, `document_output_language`, `user_skill_level` -- `date` as system-generated current datetime - -✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the configured `{communication_language}`. -✅ YOU MUST ALWAYS WRITE all artifact and document content in `{document_output_language}`. - -### 2. Route to Validate Workflow - -"**Validate Mode: Validating an existing PRD against BMAD standards.**" - -Then read fully and follow: `{validateWorkflow}` (steps-v/step-v-01-discovery.md) diff --git a/src/bmm-skills/3-solutioning/bmad-agent-architect/SKILL.md b/src/bmm-skills/3-solutioning/bmad-agent-architect/SKILL.md index 4fa83f7e9..2c68275b6 100644 --- a/src/bmm-skills/3-solutioning/bmad-agent-architect/SKILL.md +++ b/src/bmm-skills/3-solutioning/bmad-agent-architect/SKILL.md @@ -36,10 +36,12 @@ When you are in this persona and the user calls a skill, this persona must carry ## On Activation -1. **Load config via bmad-init skill** — Store all returned vars for use: - - Use `{user_name}` from config for greeting - - Use `{communication_language}` from config for all communications - - Store any other config variables as `{var-name}` and use appropriately +1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: + - Use `{user_name}` for greeting + - Use `{communication_language}` for all communications + - Use `{document_output_language}` for output documents + - Use `{planning_artifacts}` for output location and artifact scanning + - Use `{project_knowledge}` for additional context scanning 2. **Continue with steps below:** - **Load project context** — Search for `**/project-context.md`. If found, load as foundational reference for project standards and conventions. If not found, continue without it. diff --git a/src/bmm-skills/3-solutioning/bmad-check-implementation-readiness/workflow.md b/src/bmm-skills/3-solutioning/bmad-check-implementation-readiness/workflow.md index 5f3343d67..c9ea087cd 100644 --- a/src/bmm-skills/3-solutioning/bmad-check-implementation-readiness/workflow.md +++ b/src/bmm-skills/3-solutioning/bmad-check-implementation-readiness/workflow.md @@ -33,17 +33,15 @@ - ⏸️ **ALWAYS** halt at menus and wait for user input - 📋 **NEVER** create mental todo lists from future steps ---- +## Activation -## INITIALIZATION SEQUENCE +1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:: + - Use `{user_name}` for greeting + - Use `{communication_language}` for all communications + - Use `{document_output_language}` for output documents + - Use `{planning_artifacts}` for output location and artifact scanning + - Use `{project_knowledge}` for additional context scanning -### 1. Module Configuration Loading - -Load and read full config from {project-root}/_bmad/bmm/config.yaml and resolve: - -- `project_name`, `output_folder`, `planning_artifacts`, `user_name`, `communication_language`, `document_output_language` -- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` - -### 2. First Step EXECUTION +2. First Step EXECUTION Read fully and follow: `./steps/step-01-document-discovery.md` to begin the workflow. diff --git a/src/bmm-skills/3-solutioning/bmad-create-architecture/workflow.md b/src/bmm-skills/3-solutioning/bmad-create-architecture/workflow.md index d0a295ea3..3dd945bd5 100644 --- a/src/bmm-skills/3-solutioning/bmad-create-architecture/workflow.md +++ b/src/bmm-skills/3-solutioning/bmad-create-architecture/workflow.md @@ -16,22 +16,16 @@ This uses **micro-file architecture** for disciplined execution: - Append-only document building through conversation - You NEVER proceed to a step file if the current step file indicates the user must approve and indicate continuation. ---- +## Activation -## INITIALIZATION +1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:: + - Use `{user_name}` for greeting + - Use `{communication_language}` for all communications + - Use `{document_output_language}` for output documents + - Use `{planning_artifacts}` for output location and artifact scanning + - Use `{project_knowledge}` for additional context scanning -### Configuration Loading - -Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: - -- `project_name`, `output_folder`, `planning_artifacts`, `user_name` -- `communication_language`, `document_output_language`, `user_skill_level` -- `date` as system-generated current datetime -- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` - ---- - -## EXECUTION +2. EXECUTION Read fully and follow: `./steps/step-01-init.md` to begin the workflow. diff --git a/src/bmm-skills/3-solutioning/bmad-create-epics-and-stories/workflow.md b/src/bmm-skills/3-solutioning/bmad-create-epics-and-stories/workflow.md index 5845105d7..2213e267d 100644 --- a/src/bmm-skills/3-solutioning/bmad-create-epics-and-stories/workflow.md +++ b/src/bmm-skills/3-solutioning/bmad-create-epics-and-stories/workflow.md @@ -37,17 +37,15 @@ This uses **step-file architecture** for disciplined execution: - ⏸️ **ALWAYS** halt at menus and wait for user input - 📋 **NEVER** create mental todo lists from future steps ---- +## Activation -## INITIALIZATION SEQUENCE - -### 1. Configuration Loading - -Load and read full config from {project-root}/_bmad/bmm/config.yaml and resolve: - -- `project_name`, `output_folder`, `planning_artifacts`, `user_name`, `communication_language`, `document_output_language` -- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` - -### 2. First Step EXECUTION +1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:: + - Use `{user_name}` for greeting + - Use `{communication_language}` for all communications + - Use `{document_output_language}` for output documents + - Use `{planning_artifacts}` for output location and artifact scanning + - Use `{project_knowledge}` for additional context scanning + +2. First Step EXECUTION Read fully and follow: `./steps/step-01-validate-prerequisites.md` to begin the workflow. diff --git a/src/bmm-skills/3-solutioning/bmad-generate-project-context/workflow.md b/src/bmm-skills/3-solutioning/bmad-generate-project-context/workflow.md index 7343c2914..590eeb544 100644 --- a/src/bmm-skills/3-solutioning/bmad-generate-project-context/workflow.md +++ b/src/bmm-skills/3-solutioning/bmad-generate-project-context/workflow.md @@ -18,25 +18,21 @@ This uses **micro-file architecture** for disciplined execution: --- -## INITIALIZATION +## Activation -### Configuration Loading +1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:: + - Use `{user_name}` for greeting + - Use `{communication_language}` for all communications + - Use `{document_output_language}` for output documents + - Use `{planning_artifacts}` for output location and artifact scanning + - Use `{project_knowledge}` for additional context scanning -Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: - -- `project_name`, `output_folder`, `user_name` -- `communication_language`, `document_output_language`, `user_skill_level` -- `date` as system-generated current datetime - ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` - ✅ YOU MUST ALWAYS WRITE all artifact and document content in `{document_output_language}` -### Paths - - `output_file` = `{output_folder}/project-context.md` ---- - -## EXECUTION + EXECUTION Load and execute `./steps/step-01-discover.md` to begin the workflow. diff --git a/src/bmm-skills/4-implementation/bmad-agent-dev/SKILL.md b/src/bmm-skills/4-implementation/bmad-agent-dev/SKILL.md index c783c01d3..894eac59b 100644 --- a/src/bmm-skills/4-implementation/bmad-agent-dev/SKILL.md +++ b/src/bmm-skills/4-implementation/bmad-agent-dev/SKILL.md @@ -46,10 +46,12 @@ When you are in this persona and the user calls a skill, this persona must carry ## On Activation -1. **Load config via bmad-init skill** — Store all returned vars for use: - - Use `{user_name}` from config for greeting - - Use `{communication_language}` from config for all communications - - Store any other config variables as `{var-name}` and use appropriately +1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: + - Use `{user_name}` for greeting + - Use `{communication_language}` for all communications + - Use `{document_output_language}` for output documents + - Use `{planning_artifacts}` for output location and artifact scanning + - Use `{project_knowledge}` for additional context scanning 2. **Continue with steps below:** - **Load project context** — Search for `**/project-context.md`. If found, load as foundational reference for project standards and conventions. If not found, continue without it. diff --git a/src/bmm-skills/4-implementation/bmad-agent-qa/SKILL.md b/src/bmm-skills/4-implementation/bmad-agent-qa/SKILL.md index 0fe28a3de..1a666fe50 100644 --- a/src/bmm-skills/4-implementation/bmad-agent-qa/SKILL.md +++ b/src/bmm-skills/4-implementation/bmad-agent-qa/SKILL.md @@ -43,10 +43,12 @@ When you are in this persona and the user calls a skill, this persona must carry ## On Activation -1. **Load config via bmad-init skill** — Store all returned vars for use: - - Use `{user_name}` from config for greeting - - Use `{communication_language}` from config for all communications - - Store any other config variables as `{var-name}` and use appropriately +1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: + - Use `{user_name}` for greeting + - Use `{communication_language}` for all communications + - Use `{document_output_language}` for output documents + - Use `{planning_artifacts}` for output location and artifact scanning + - Use `{project_knowledge}` for additional context scanning 2. **Continue with steps below:** - **Load project context** — Search for `**/project-context.md`. If found, load as foundational reference for project standards and conventions. If not found, continue without it. diff --git a/src/bmm-skills/4-implementation/bmad-agent-quick-flow-solo-dev/SKILL.md b/src/bmm-skills/4-implementation/bmad-agent-quick-flow-solo-dev/SKILL.md index ea32757ac..848e7ec07 100644 --- a/src/bmm-skills/4-implementation/bmad-agent-quick-flow-solo-dev/SKILL.md +++ b/src/bmm-skills/4-implementation/bmad-agent-quick-flow-solo-dev/SKILL.md @@ -35,10 +35,12 @@ When you are in this persona and the user calls a skill, this persona must carry ## On Activation -1. **Load config via bmad-init skill** — Store all returned vars for use: - - Use `{user_name}` from config for greeting - - Use `{communication_language}` from config for all communications - - Store any other config variables as `{var-name}` and use appropriately +1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: + - Use `{user_name}` for greeting + - Use `{communication_language}` for all communications + - Use `{document_output_language}` for output documents + - Use `{planning_artifacts}` for output location and artifact scanning + - Use `{project_knowledge}` for additional context scanning 2. **Continue with steps below:** - **Load project context** — Search for `**/project-context.md`. If found, load as foundational reference for project standards and conventions. If not found, continue without it. diff --git a/src/bmm-skills/4-implementation/bmad-agent-sm/SKILL.md b/src/bmm-skills/4-implementation/bmad-agent-sm/SKILL.md index 80798caca..a32941f99 100644 --- a/src/bmm-skills/4-implementation/bmad-agent-sm/SKILL.md +++ b/src/bmm-skills/4-implementation/bmad-agent-sm/SKILL.md @@ -37,10 +37,12 @@ When you are in this persona and the user calls a skill, this persona must carry ## On Activation -1. **Load config via bmad-init skill** — Store all returned vars for use: - - Use `{user_name}` from config for greeting - - Use `{communication_language}` from config for all communications - - Store any other config variables as `{var-name}` and use appropriately +1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: + - Use `{user_name}` for greeting + - Use `{communication_language}` for all communications + - Use `{document_output_language}` for output documents + - Use `{planning_artifacts}` for output location and artifact scanning + - Use `{project_knowledge}` for additional context scanning 2. **Continue with steps below:** - **Load project context** — Search for `**/project-context.md`. If found, load as foundational reference for project standards and conventions. If not found, continue without it. diff --git a/src/core-skills/bmad-advanced-elicitation/SKILL.md b/src/core-skills/bmad-advanced-elicitation/SKILL.md index e7b60683e..98459cb7c 100644 --- a/src/core-skills/bmad-advanced-elicitation/SKILL.md +++ b/src/core-skills/bmad-advanced-elicitation/SKILL.md @@ -1,7 +1,6 @@ --- name: bmad-advanced-elicitation description: 'Push the LLM to reconsider, refine, and improve its recent output. Use when user asks for deeper critique or mentions a known deeper critique method, e.g. socratic, first principles, pre-mortem, red team.' -agent_party: '{project-root}/_bmad/_config/agent-manifest.csv' --- # Advanced Elicitation @@ -36,7 +35,7 @@ When invoked from another prompt or process: ### Step 1: Method Registry Loading -**Action:** Load and read `./methods.csv` and `{agent_party}` +**Action:** Load and read `./methods.csv` and '{project-root}/_bmad/_config/agent-manifest.csv' #### CSV Structure diff --git a/src/core-skills/bmad-distillator/SKILL.md b/src/core-skills/bmad-distillator/SKILL.md index 05ef36c16..57c44d0c9 100644 --- a/src/core-skills/bmad-distillator/SKILL.md +++ b/src/core-skills/bmad-distillator/SKILL.md @@ -1,7 +1,6 @@ --- name: bmad-distillator description: Lossless LLM-optimized compression of source documents. Use when the user requests to 'distill documents' or 'create a distillate'. -argument-hint: "[to create provide input paths] [--validate distillate-path to confirm distillate is lossless and optimized]" --- # Distillator: A Document Distillation Engine diff --git a/src/core-skills/bmad-distillator/resources/distillate-format-reference.md b/src/core-skills/bmad-distillator/resources/distillate-format-reference.md index 3c21d3598..d01cd49f1 100644 --- a/src/core-skills/bmad-distillator/resources/distillate-format-reference.md +++ b/src/core-skills/bmad-distillator/resources/distillate-format-reference.md @@ -81,18 +81,18 @@ When the same fact appears in both a brief and discovery notes: **Brief says:** ``` -bmad-init must always be included as a base skill in every bundle +bmad-help must always be included as a base skill in every bundle ``` **Discovery notes say:** ``` -bmad-init must always be included as a base skill in every bundle/install -(solves bootstrapping problem) +bmad-help must always be included as a base skill in every bundle/install +(solves discoverability problem) ``` **Distillate keeps the more contextual version:** ``` -- bmad-init: always included as base skill in every bundle (solves bootstrapping) +- bmad-help: always included as base skill in every bundle (solves discoverability) ``` ### Decision/Rationale Compression @@ -128,7 +128,7 @@ parts: 1 ## Core Concept - BMAD Next-Gen Installer: replaces monolithic Node.js CLI with skill-based plugin architecture for distributing BMAD methodology across 40+ AI platforms -- Three layers: self-describing plugins (bmad-manifest.json), cross-platform install via Vercel skills CLI (MIT), runtime registration via bmad-init skill +- Three layers: self-describing plugins (bmad-manifest.json), cross-platform install via Vercel skills CLI (MIT), runtime registration via bmad-setup skill - Transforms BMAD from dev-only methodology into open platform for any domain (creative, therapeutic, educational, personal) ## Problem @@ -141,7 +141,7 @@ parts: 1 - Plugins: skill bundles with Anthropic plugin standard as base format + bmad-manifest.json extending for BMAD-specific metadata (installer options, capabilities, help integration, phase ordering, dependencies) - Existing manifest example: `{"module-code":"bmm","replaces-skill":"bmad-create-product-brief","capabilities":[{"name":"create-brief","menu-code":"CB","supports-headless":true,"phase-name":"1-analysis","after":["brainstorming"],"before":["create-prd"],"is-required":true}]}` - Vercel skills CLI handles platform translation; integration pattern (wrap/fork/call) is PRD decision -- bmad-init: global skill scanning installed bmad-manifest.json files, registering capabilities, configuring project settings; always included as base skill in every bundle (solves bootstrapping) +- bmad-setup: global skill scanning installed bmad-manifest.json files, registering capabilities, configuring project settings; always included as base skill in every bundle (solves bootstrapping) - bmad-update: plugin update path without full reinstall; technical approach (diff/replace/preserve customizations) is PRD decision - Distribution tiers: (1) NPX installer wrapping skills CLI for technical users, (2) zip bundle + platform-specific README for non-technical users, (3) future marketplace - Non-technical path has honest friction: "copy to right folder" requires knowing where; per-platform README instructions; improves over time as low-code space matures @@ -161,13 +161,13 @@ parts: 1 - Zero (or near-zero) custom platform directory code; delegated to skills CLI ecosystem - Installation verified on top platforms by volume; skills CLI handles long tail - Non-technical install path validated with non-developer users -- bmad-init discovers/registers all plugins from manifests; clear errors for malformed manifests +- bmad-setup discovers/registers all plugins from manifests; clear errors for malformed manifests - At least one external module author successfully publishes plugin using manifest system - bmad-update works without full reinstall - Existing CLI users have documented migration path ## Scope -- In: manifest spec, bmad-init, bmad-update, Vercel CLI integration, NPX installer, zip bundles, migration path +- In: manifest spec, bmad-setup, bmad-update, Vercel CLI integration, NPX installer, zip bundles, migration path - Out: BMAD Builder, marketplace web platform, skill conversion (prerequisite, separate), one-click install for all platforms, monetization, quality certification process (gated-submission principle is architectural requirement; process defined separately) - Deferred: CI/CD integration, telemetry for module authors, air-gapped enterprise install, zip bundle integrity verification (checksums/signing), deeper non-technical platform integrations @@ -214,7 +214,7 @@ parts: 1 ## Opportunities - Module authors as acquisition channel: each published plugin distributes BMAD to creator's audience -- CI/CD integration: bmad-init as pipeline one-liner increases stickiness +- CI/CD integration: bmad-setup as pipeline one-liner increases stickiness - Educational institutions: structured methodology + non-technical install → university AI curriculum - Skill composability: mixing BMAD modules with third-party skills for custom methodology stacks diff --git a/src/core-skills/bmad-init/SKILL.md b/src/core-skills/bmad-init/SKILL.md deleted file mode 100644 index aea00fb16..000000000 --- a/src/core-skills/bmad-init/SKILL.md +++ /dev/null @@ -1,100 +0,0 @@ ---- -name: bmad-init -description: "Initialize BMad project configuration and load config variables. Use when any skill needs module-specific configuration values, or when setting up a new BMad project." -argument-hint: "[--module=module_code] [--vars=var1:default1,var2] [--skill-path=/path/to/calling/skill]" ---- - -## Overview - -This skill is the configuration entry point for all BMad skills. It has two modes: - -- **Fast path**: Config exists for the requested module — returns vars as JSON. Done. -- **Init path**: Config is missing — walks the user through configuration, writes config files, then returns vars. - -Every BMad skill should call this on activation to get its config vars. The caller never needs to know whether init happened — they just get their config back. - -The script `bmad_init.py` is located in this skill's `scripts/` directory. Locate and run it using python for all commands below. - -## On Activation — Fast Path - -Run the `bmad_init.py` script with the `load` subcommand. Pass `--project-root` set to the project root directory. - -- If a module code was provided by the calling skill, include `--module {module_code}` -- To load all vars, include `--all` -- To request specific variables with defaults, use `--vars var1:default1,var2` -- If no module was specified, omit `--module` to get core vars only - -**If the script returns JSON vars** — store them as `{var-name}` and return to the calling skill. Done. - -**If the script returns an error or `init_required`** — proceed to the Init Path below. - -## Init Path — First-Time Setup - -When the fast path fails (config missing for a module), run this init flow. - -### Step 1: Check what needs setup - -Run `bmad_init.py` with the `check` subcommand, passing `--module {module_code}`, `--skill-path {calling_skill_path}`, and `--project-root`. - -The response tells you what's needed: - -- `"status": "ready"` — Config is fine. Re-run load. -- `"status": "no_project"` — Can't find project root. Ask user to confirm the project path. -- `"status": "core_missing"` — Core config doesn't exist. Must ask core questions first. -- `"status": "module_missing"` — Core exists but module config doesn't. Ask module questions. - -The response includes: -- `core_module` — Core module.yaml questions (when core setup needed) -- `target_module` — Target module.yaml questions (when module setup needed, discovered from `--skill-path` or `_bmad/{module}/`) -- `core_vars` — Existing core config values (when core exists but module doesn't) - -### Step 2: Ask core questions (if `core_missing`) - -The check response includes `core_module` with header, subheader, and variable definitions. - -1. Show the `header` and `subheader` to the user -2. For each variable, present the `prompt` and `default` -3. For variables with `single-select`, show the options as a numbered list -4. For variables with multi-line `prompt` (array), show all lines -5. Let the user accept defaults or provide values - -### Step 3: Ask module questions (if module was requested) - -The check response includes `target_module` with the module's questions. Variables may reference core answers in their defaults (e.g., `{output_folder}`). - -1. Resolve defaults by running `bmad_init.py` with the `resolve-defaults` subcommand, passing `--module {module_code}`, `--core-answers '{core_answers_json}'`, and `--project-root` -2. Show the module's `header` and `subheader` -3. For each variable, present the prompt with resolved default -4. For `single-select` variables, show options as a numbered list - -### Step 4: Write config - -Collect all answers and run `bmad_init.py` with the `write` subcommand, passing `--answers '{all_answers_json}'` and `--project-root`. - -The `--answers` JSON format: - -```json -{ - "core": { - "user_name": "BMad", - "communication_language": "English", - "document_output_language": "English", - "output_folder": "_bmad-output" - }, - "bmb": { - "bmad_builder_output_folder": "_bmad-output/skills", - "bmad_builder_reports": "_bmad-output/reports" - } -} -``` - -Note: Pass the **raw user answers** (before result template expansion). The script applies result templates and `{project-root}` expansion when writing. - -The script: -- Creates `_bmad/core/config.yaml` with core values (if core answers provided) -- Creates `_bmad/{module}/config.yaml` with core values + module values (result-expanded) -- Creates any directories listed in the module.yaml `directories` array - -### Step 5: Return vars - -After writing, re-run `bmad_init.py` with the `load` subcommand (same as the fast path) to return resolved vars. Store returned vars as `{var-name}` and return them to the calling skill. diff --git a/src/core-skills/bmad-init/resources/core-module.yaml b/src/core-skills/bmad-init/resources/core-module.yaml deleted file mode 100644 index 48e7a58f7..000000000 --- a/src/core-skills/bmad-init/resources/core-module.yaml +++ /dev/null @@ -1,25 +0,0 @@ -code: core -name: "BMad Core Module" - -header: "BMad Core Configuration" -subheader: "Configure the core settings for your BMad installation.\nThese settings will be used across all installed bmad skills, workflows, and agents." - -user_name: - prompt: "What should agents call you? (Use your name or a team name)" - default: "BMad" - result: "{value}" - -communication_language: - prompt: "What language should agents use when chatting with you?" - default: "English" - result: "{value}" - -document_output_language: - prompt: "Preferred document output language?" - default: "English" - result: "{value}" - -output_folder: - prompt: "Where should output files be saved?" - default: "_bmad-output" - result: "{project-root}/{value}" diff --git a/src/core-skills/bmad-init/scripts/bmad_init.py b/src/core-skills/bmad-init/scripts/bmad_init.py deleted file mode 100644 index 7a561bd2b..000000000 --- a/src/core-skills/bmad-init/scripts/bmad_init.py +++ /dev/null @@ -1,624 +0,0 @@ -# /// script -# requires-python = ">=3.10" -# dependencies = ["pyyaml"] -# /// - -#!/usr/bin/env python3 -""" -BMad Init — Project configuration bootstrap and config loader. - -Config files (flat YAML per module): - - _bmad/core/config.yaml (core settings — user_name, language, output_folder, etc.) - - _bmad/{module}/config.yaml (module settings + core values merged in) - -Usage: - # Fast path — load all vars for a module (includes core vars) - python bmad_init.py load --module bmb --all --project-root /path - - # Load specific vars with optional defaults - python bmad_init.py load --module bmb --vars var1:default1,var2 --project-root /path - - # Load core only - python bmad_init.py load --all --project-root /path - - # Check if init is needed - python bmad_init.py check --project-root /path - python bmad_init.py check --module bmb --skill-path /path/to/skill --project-root /path - - # Resolve module defaults given core answers - python bmad_init.py resolve-defaults --module bmb --core-answers '{"output_folder":"..."}' --project-root /path - - # Write config from answered questions - python bmad_init.py write --answers '{"core": {...}, "bmb": {...}}' --project-root /path -""" - -import argparse -import json -import os -import sys -from pathlib import Path - -import yaml - - -# ============================================================================= -# Project Root Detection -# ============================================================================= - -def find_project_root(llm_provided=None): - """ - Find project root by looking for _bmad folder. - - Args: - llm_provided: Path explicitly provided via --project-root. - - Returns: - Path to project root, or None if not found. - """ - if llm_provided: - candidate = Path(llm_provided) - if (candidate / '_bmad').exists(): - return candidate - # First run — _bmad won't exist yet but LLM path is still valid - if candidate.is_dir(): - return candidate - - for start_dir in [Path.cwd(), Path(__file__).resolve().parent]: - current_dir = start_dir - while current_dir != current_dir.parent: - if (current_dir / '_bmad').exists(): - return current_dir - current_dir = current_dir.parent - - return None - - -# ============================================================================= -# Module YAML Loading -# ============================================================================= - -def load_module_yaml(path): - """ - Load and parse a module.yaml file, separating metadata from variable definitions. - - Returns: - Dict with 'meta' (code, name, etc.) and 'variables' (var definitions) - and 'directories' (list of dir templates), or None on failure. - """ - try: - with open(path, 'r', encoding='utf-8') as f: - raw = yaml.safe_load(f) - except Exception: - return None - - if not raw or not isinstance(raw, dict): - return None - - meta_keys = {'code', 'name', 'description', 'default_selected', 'header', 'subheader'} - meta = {} - variables = {} - directories = [] - - for key, value in raw.items(): - if key == 'directories': - directories = value if isinstance(value, list) else [] - elif key in meta_keys: - meta[key] = value - elif isinstance(value, dict) and 'prompt' in value: - variables[key] = value - # Skip comment-only entries (## var_name lines become None values) - - return {'meta': meta, 'variables': variables, 'directories': directories} - - -def find_core_module_yaml(): - """Find the core module.yaml bundled with this skill.""" - return Path(__file__).resolve().parent.parent / 'resources' / 'core-module.yaml' - - -def find_target_module_yaml(module_code, project_root, skill_path=None): - """ - Find module.yaml for a given module code. - - Search order: - 1. skill_path/assets/module.yaml (calling skill's assets) - 2. skill_path/module.yaml (calling skill's root) - 3. _bmad/{module_code}/module.yaml (installed module location) - """ - search_paths = [] - - if skill_path: - sp = Path(skill_path) - search_paths.append(sp / 'assets' / 'module.yaml') - search_paths.append(sp / 'module.yaml') - - if project_root and module_code: - search_paths.append(Path(project_root) / '_bmad' / module_code / 'module.yaml') - - for path in search_paths: - if path.exists(): - return path - - return None - - -# ============================================================================= -# Config Loading (Flat per-module files) -# ============================================================================= - -def load_config_file(path): - """Load a flat YAML config file. Returns dict or None.""" - try: - with open(path, 'r', encoding='utf-8') as f: - data = yaml.safe_load(f) - return data if isinstance(data, dict) else None - except Exception: - return None - - -def load_module_config(module_code, project_root): - """Load config for a specific module from _bmad/{module}/config.yaml.""" - config_path = Path(project_root) / '_bmad' / module_code / 'config.yaml' - return load_config_file(config_path) - - -def resolve_project_root_placeholder(value, project_root): - """Replace {project-root} placeholder with actual path.""" - if not value or not isinstance(value, str): - return value - if '{project-root}' not in value: - return value - - # Strip the {project-root} token to inspect what remains, so we can - # correctly handle absolute paths stored as "{project-root}//absolute/path" - # (produced by the "{project-root}/{value}" template applied to an absolute value). - suffix = value.replace('{project-root}', '', 1) - - # Strip the one path separator that follows the token (if any) - if suffix.startswith('/') or suffix.startswith('\\'): - remainder = suffix[1:] - else: - remainder = suffix - - if os.path.isabs(remainder): - # The original value was an absolute path stored with a {project-root}/ prefix. - # Return the absolute path directly — no joining needed. - return remainder - - # Relative path: join with project root and normalize to resolve any .. segments. - return os.path.normpath(os.path.join(str(project_root), remainder)) - - -def parse_var_specs(vars_string): - """ - Parse variable specs: var_name:default_value,var_name2:default_value2 - No default = returns null if missing. - """ - if not vars_string: - return [] - specs = [] - for spec in vars_string.split(','): - spec = spec.strip() - if not spec: - continue - if ':' in spec: - parts = spec.split(':', 1) - specs.append({'name': parts[0].strip(), 'default': parts[1].strip()}) - else: - specs.append({'name': spec, 'default': None}) - return specs - - -# ============================================================================= -# Template Expansion -# ============================================================================= - -def expand_template(value, context): - """ - Expand {placeholder} references in a string using context dict. - - Supports: {project-root}, {value}, {output_folder}, {directory_name}, etc. - """ - if not value or not isinstance(value, str): - return value - result = value - for key, val in context.items(): - placeholder = '{' + key + '}' - if placeholder in result and val is not None: - result = result.replace(placeholder, str(val)) - return result - - -def apply_result_template(var_def, raw_value, context): - """ - Apply a variable's result template to transform the raw user answer. - - E.g., result: "{project-root}/{value}" with value="_bmad-output" - becomes "/Users/foo/project/_bmad-output" - """ - result_template = var_def.get('result') - if not result_template: - return raw_value - - # If the user supplied an absolute path and the template would prefix it with - # "{project-root}/", skip the template entirely to avoid producing a broken path - # like "/my/project//absolute/path". - if isinstance(raw_value, str) and os.path.isabs(raw_value): - return raw_value - - ctx = dict(context) - ctx['value'] = raw_value - result = expand_template(result_template, ctx) - - # Normalize the resulting path to resolve any ".." segments (e.g. when the user - # entered a relative path such as "../../outside-dir"). - if isinstance(result, str) and '{' not in result and os.path.isabs(result): - result = os.path.normpath(result) - - return result - - -# ============================================================================= -# Load Command (Fast Path) -# ============================================================================= - -def cmd_load(args): - """Load config vars — the fast path.""" - project_root = find_project_root(llm_provided=args.project_root) - if not project_root: - print(json.dumps({'error': 'Project root not found (_bmad folder not detected)'}), - file=sys.stderr) - sys.exit(1) - - module_code = args.module or 'core' - - # Load the module's config (which includes core vars) - config = load_module_config(module_code, project_root) - if config is None: - print(json.dumps({ - 'init_required': True, - 'missing_module': module_code, - }), file=sys.stderr) - sys.exit(1) - - # Resolve {project-root} in all values - for key in config: - config[key] = resolve_project_root_placeholder(config[key], project_root) - - if args.all: - print(json.dumps(config, indent=2)) - else: - var_specs = parse_var_specs(args.vars) - if not var_specs: - print(json.dumps({'error': 'Either --vars or --all must be specified'}), - file=sys.stderr) - sys.exit(1) - result = {} - for spec in var_specs: - val = config.get(spec['name']) - if val is not None and val != '': - result[spec['name']] = val - elif spec['default'] is not None: - result[spec['name']] = spec['default'] - else: - result[spec['name']] = None - print(json.dumps(result, indent=2)) - - -# ============================================================================= -# Check Command -# ============================================================================= - -def cmd_check(args): - """Check if config exists and return status with module.yaml questions if needed.""" - project_root = find_project_root(llm_provided=args.project_root) - if not project_root: - print(json.dumps({ - 'status': 'no_project', - 'message': 'No project root found. Provide --project-root to bootstrap.', - }, indent=2)) - return - - project_root = Path(project_root) - module_code = args.module - - # Check core config - core_config = load_module_config('core', project_root) - core_exists = core_config is not None - - # If no module requested, just check core - if not module_code or module_code == 'core': - if core_exists: - print(json.dumps({'status': 'ready', 'project_root': str(project_root)}, indent=2)) - else: - core_yaml_path = find_core_module_yaml() - core_module = load_module_yaml(core_yaml_path) if core_yaml_path.exists() else None - print(json.dumps({ - 'status': 'core_missing', - 'project_root': str(project_root), - 'core_module': core_module, - }, indent=2)) - return - - # Module requested — check if its config exists - module_config = load_module_config(module_code, project_root) - if module_config is not None: - print(json.dumps({'status': 'ready', 'project_root': str(project_root)}, indent=2)) - return - - # Module config missing — find its module.yaml for questions - target_yaml_path = find_target_module_yaml( - module_code, project_root, skill_path=args.skill_path - ) - target_module = load_module_yaml(target_yaml_path) if target_yaml_path else None - - result = { - 'project_root': str(project_root), - } - - if not core_exists: - result['status'] = 'core_missing' - core_yaml_path = find_core_module_yaml() - result['core_module'] = load_module_yaml(core_yaml_path) if core_yaml_path.exists() else None - else: - result['status'] = 'module_missing' - result['core_vars'] = core_config - - result['target_module'] = target_module - if target_yaml_path: - result['target_module_yaml_path'] = str(target_yaml_path) - - print(json.dumps(result, indent=2)) - - -# ============================================================================= -# Resolve Defaults Command -# ============================================================================= - -def cmd_resolve_defaults(args): - """Given core answers, resolve a module's variable defaults.""" - project_root = find_project_root(llm_provided=args.project_root) - if not project_root: - print(json.dumps({'error': 'Project root not found'}), file=sys.stderr) - sys.exit(1) - - try: - core_answers = json.loads(args.core_answers) - except json.JSONDecodeError as e: - print(json.dumps({'error': f'Invalid JSON in --core-answers: {e}'}), - file=sys.stderr) - sys.exit(1) - - # Build context for template expansion - context = { - 'project-root': str(project_root), - 'directory_name': Path(project_root).name, - } - context.update(core_answers) - - # Find and load the module's module.yaml - module_code = args.module - target_yaml_path = find_target_module_yaml( - module_code, project_root, skill_path=args.skill_path - ) - if not target_yaml_path: - print(json.dumps({'error': f'No module.yaml found for module: {module_code}'}), - file=sys.stderr) - sys.exit(1) - - module_def = load_module_yaml(target_yaml_path) - if not module_def: - print(json.dumps({'error': f'Failed to parse module.yaml at: {target_yaml_path}'}), - file=sys.stderr) - sys.exit(1) - - # Resolve defaults in each variable - resolved_vars = {} - for var_name, var_def in module_def['variables'].items(): - default = var_def.get('default', '') - resolved_default = expand_template(str(default), context) - resolved_vars[var_name] = dict(var_def) - resolved_vars[var_name]['default'] = resolved_default - - result = { - 'module_code': module_code, - 'meta': module_def['meta'], - 'variables': resolved_vars, - 'directories': module_def['directories'], - } - print(json.dumps(result, indent=2)) - - -# ============================================================================= -# Write Command -# ============================================================================= - -def cmd_write(args): - """Write config files from answered questions.""" - project_root = find_project_root(llm_provided=args.project_root) - if not project_root: - if args.project_root: - project_root = Path(args.project_root) - else: - print(json.dumps({'error': 'Project root not found and --project-root not provided'}), - file=sys.stderr) - sys.exit(1) - - project_root = Path(project_root) - - try: - answers = json.loads(args.answers) - except json.JSONDecodeError as e: - print(json.dumps({'error': f'Invalid JSON in --answers: {e}'}), - file=sys.stderr) - sys.exit(1) - - context = { - 'project-root': str(project_root), - 'directory_name': project_root.name, - } - - # Load module.yaml definitions to get result templates - core_yaml_path = find_core_module_yaml() - core_def = load_module_yaml(core_yaml_path) if core_yaml_path.exists() else None - - files_written = [] - dirs_created = [] - - # Process core answers first (needed for module config expansion) - core_answers_raw = answers.get('core', {}) - core_config = {} - - if core_answers_raw and core_def: - for var_name, raw_value in core_answers_raw.items(): - var_def = core_def['variables'].get(var_name, {}) - expanded = apply_result_template(var_def, raw_value, context) - core_config[var_name] = expanded - - # Write core config - core_dir = project_root / '_bmad' / 'core' - core_dir.mkdir(parents=True, exist_ok=True) - core_config_path = core_dir / 'config.yaml' - - # Merge with existing if present - existing = load_config_file(core_config_path) or {} - existing.update(core_config) - - _write_config_file(core_config_path, existing, 'CORE') - files_written.append(str(core_config_path)) - elif core_answers_raw: - # No core_def available — write raw values - core_config = dict(core_answers_raw) - core_dir = project_root / '_bmad' / 'core' - core_dir.mkdir(parents=True, exist_ok=True) - core_config_path = core_dir / 'config.yaml' - existing = load_config_file(core_config_path) or {} - existing.update(core_config) - _write_config_file(core_config_path, existing, 'CORE') - files_written.append(str(core_config_path)) - - # Update context with resolved core values for module expansion - context.update(core_config) - - # Process module answers - for module_code, module_answers_raw in answers.items(): - if module_code == 'core': - continue - - # Find module.yaml for result templates - target_yaml_path = find_target_module_yaml( - module_code, project_root, skill_path=args.skill_path - ) - module_def = load_module_yaml(target_yaml_path) if target_yaml_path else None - - # Build module config: start with core values, then add module values - # Re-read core config to get the latest (may have been updated above) - latest_core = load_module_config('core', project_root) or core_config - module_config = dict(latest_core) - - for var_name, raw_value in module_answers_raw.items(): - if module_def: - var_def = module_def['variables'].get(var_name, {}) - expanded = apply_result_template(var_def, raw_value, context) - else: - expanded = raw_value - module_config[var_name] = expanded - context[var_name] = expanded # Available for subsequent template expansion - - # Write module config - module_dir = project_root / '_bmad' / module_code - module_dir.mkdir(parents=True, exist_ok=True) - module_config_path = module_dir / 'config.yaml' - - existing = load_config_file(module_config_path) or {} - existing.update(module_config) - - module_name = module_def['meta'].get('name', module_code.upper()) if module_def else module_code.upper() - _write_config_file(module_config_path, existing, module_name) - files_written.append(str(module_config_path)) - - # Create directories declared in module.yaml - if module_def and module_def.get('directories'): - for dir_template in module_def['directories']: - dir_path = expand_template(dir_template, context) - if dir_path: - Path(dir_path).mkdir(parents=True, exist_ok=True) - dirs_created.append(dir_path) - - result = { - 'status': 'written', - 'files_written': files_written, - 'dirs_created': dirs_created, - } - print(json.dumps(result, indent=2)) - - -def _write_config_file(path, data, module_label): - """Write a config YAML file with a header comment.""" - from datetime import datetime, timezone - with open(path, 'w', encoding='utf-8') as f: - f.write(f'# {module_label} Module Configuration\n') - f.write(f'# Generated by bmad-init\n') - f.write(f'# Date: {datetime.now(timezone.utc).isoformat()}\n\n') - yaml.safe_dump(data, f, default_flow_style=False, allow_unicode=True, sort_keys=False) - - -# ============================================================================= -# CLI Entry Point -# ============================================================================= - -def main(): - parser = argparse.ArgumentParser( - description='BMad Init — Project configuration bootstrap and config loader.' - ) - subparsers = parser.add_subparsers(dest='command') - - # --- load --- - load_parser = subparsers.add_parser('load', help='Load config vars (fast path)') - load_parser.add_argument('--module', help='Module code (omit for core only)') - load_parser.add_argument('--vars', help='Comma-separated vars with optional defaults') - load_parser.add_argument('--all', action='store_true', help='Return all config vars') - load_parser.add_argument('--project-root', help='Project root path') - - # --- check --- - check_parser = subparsers.add_parser('check', help='Check if init is needed') - check_parser.add_argument('--module', help='Module code to check (optional)') - check_parser.add_argument('--skill-path', help='Path to the calling skill folder') - check_parser.add_argument('--project-root', help='Project root path') - - # --- resolve-defaults --- - resolve_parser = subparsers.add_parser('resolve-defaults', - help='Resolve module defaults given core answers') - resolve_parser.add_argument('--module', required=True, help='Module code') - resolve_parser.add_argument('--core-answers', required=True, help='JSON string of core answers') - resolve_parser.add_argument('--skill-path', help='Path to calling skill folder') - resolve_parser.add_argument('--project-root', help='Project root path') - - # --- write --- - write_parser = subparsers.add_parser('write', help='Write config files') - write_parser.add_argument('--answers', required=True, help='JSON string of all answers') - write_parser.add_argument('--skill-path', help='Path to calling skill (for module.yaml lookup)') - write_parser.add_argument('--project-root', help='Project root path') - - args = parser.parse_args() - if args.command is None: - parser.print_help() - sys.exit(1) - - commands = { - 'load': cmd_load, - 'check': cmd_check, - 'resolve-defaults': cmd_resolve_defaults, - 'write': cmd_write, - } - - handler = commands.get(args.command) - if handler: - handler(args) - else: - parser.print_help() - sys.exit(1) - - -if __name__ == '__main__': - main() diff --git a/src/core-skills/bmad-init/scripts/tests/test_bmad_init.py b/src/core-skills/bmad-init/scripts/tests/test_bmad_init.py deleted file mode 100644 index 45d1abc66..000000000 --- a/src/core-skills/bmad-init/scripts/tests/test_bmad_init.py +++ /dev/null @@ -1,393 +0,0 @@ -# /// script -# requires-python = ">=3.10" -# dependencies = ["pyyaml"] -# /// - -#!/usr/bin/env python3 -"""Unit tests for bmad_init.py""" - -import json -import os -import shutil -import sys -import tempfile -import unittest -from pathlib import Path - -sys.path.insert(0, str(Path(__file__).parent.parent)) - -from bmad_init import ( - find_project_root, - parse_var_specs, - resolve_project_root_placeholder, - expand_template, - apply_result_template, - load_module_yaml, - find_core_module_yaml, - find_target_module_yaml, - load_config_file, - load_module_config, -) - - -class TestFindProjectRoot(unittest.TestCase): - - def test_finds_bmad_folder(self): - temp_dir = tempfile.mkdtemp() - try: - (Path(temp_dir) / '_bmad').mkdir() - original_cwd = os.getcwd() - try: - os.chdir(temp_dir) - result = find_project_root() - self.assertEqual(result.resolve(), Path(temp_dir).resolve()) - finally: - os.chdir(original_cwd) - finally: - shutil.rmtree(temp_dir) - - def test_llm_provided_with_bmad(self): - temp_dir = tempfile.mkdtemp() - try: - (Path(temp_dir) / '_bmad').mkdir() - result = find_project_root(llm_provided=temp_dir) - self.assertEqual(result.resolve(), Path(temp_dir).resolve()) - finally: - shutil.rmtree(temp_dir) - - def test_llm_provided_without_bmad_still_returns_dir(self): - """First-run case: LLM provides path but _bmad doesn't exist yet.""" - temp_dir = tempfile.mkdtemp() - try: - result = find_project_root(llm_provided=temp_dir) - self.assertEqual(result.resolve(), Path(temp_dir).resolve()) - finally: - shutil.rmtree(temp_dir) - - -class TestParseVarSpecs(unittest.TestCase): - - def test_vars_with_defaults(self): - specs = parse_var_specs('var1:value1,var2:value2') - self.assertEqual(len(specs), 2) - self.assertEqual(specs[0]['name'], 'var1') - self.assertEqual(specs[0]['default'], 'value1') - - def test_vars_without_defaults(self): - specs = parse_var_specs('var1,var2') - self.assertEqual(len(specs), 2) - self.assertIsNone(specs[0]['default']) - - def test_mixed_vars(self): - specs = parse_var_specs('required_var,var2:default2') - self.assertIsNone(specs[0]['default']) - self.assertEqual(specs[1]['default'], 'default2') - - def test_colon_in_default(self): - specs = parse_var_specs('path:{project-root}/some/path') - self.assertEqual(specs[0]['default'], '{project-root}/some/path') - - def test_empty_string(self): - self.assertEqual(parse_var_specs(''), []) - - def test_none(self): - self.assertEqual(parse_var_specs(None), []) - - -class TestResolveProjectRootPlaceholder(unittest.TestCase): - - def test_resolve_placeholder(self): - result = resolve_project_root_placeholder('{project-root}/output', Path('/test')) - self.assertEqual(result, '/test/output') - - def test_no_placeholder(self): - result = resolve_project_root_placeholder('/absolute/path', Path('/test')) - self.assertEqual(result, '/absolute/path') - - def test_none(self): - self.assertIsNone(resolve_project_root_placeholder(None, Path('/test'))) - - def test_non_string(self): - self.assertEqual(resolve_project_root_placeholder(42, Path('/test')), 42) - - def test_absolute_path_stored_with_prefix(self): - """Absolute output_folder entered by user is stored as '{project-root}//abs/path' - by the '{project-root}/{value}' template. It must resolve to '/abs/path', not - '/project//abs/path'.""" - result = resolve_project_root_placeholder( - '{project-root}//Users/me/outside', Path('/Users/me/myproject') - ) - self.assertEqual(result, '/Users/me/outside') - - def test_relative_path_with_traversal_is_normalized(self): - """A relative path like '../../sibling' produces '{project-root}/../../sibling' - after the template. It must resolve to the normalized absolute path, not the - un-normalized string '/project/../../sibling'.""" - result = resolve_project_root_placeholder( - '{project-root}/../../sibling', Path('/Users/me/myproject') - ) - self.assertEqual(result, '/Users/sibling') - - def test_relative_path_one_level_up(self): - result = resolve_project_root_placeholder( - '{project-root}/../outside-outputs', Path('/project/root') - ) - self.assertEqual(result, '/project/outside-outputs') - - def test_standard_relative_path_unchanged(self): - """Normal in-project relative paths continue to work correctly.""" - result = resolve_project_root_placeholder( - '{project-root}/_bmad-output', Path('/project/root') - ) - self.assertEqual(result, '/project/root/_bmad-output') - - -class TestExpandTemplate(unittest.TestCase): - - def test_basic_expansion(self): - result = expand_template('{project-root}/output', {'project-root': '/test'}) - self.assertEqual(result, '/test/output') - - def test_multiple_placeholders(self): - result = expand_template( - '{output_folder}/planning', - {'output_folder': '_bmad-output', 'project-root': '/test'} - ) - self.assertEqual(result, '_bmad-output/planning') - - def test_none_value(self): - self.assertIsNone(expand_template(None, {})) - - def test_non_string(self): - self.assertEqual(expand_template(42, {}), 42) - - -class TestApplyResultTemplate(unittest.TestCase): - - def test_with_result_template(self): - var_def = {'result': '{project-root}/{value}'} - result = apply_result_template(var_def, '_bmad-output', {'project-root': '/test'}) - self.assertEqual(result, '/test/_bmad-output') - - def test_without_result_template(self): - result = apply_result_template({}, 'raw_value', {}) - self.assertEqual(result, 'raw_value') - - def test_value_only_template(self): - var_def = {'result': '{value}'} - result = apply_result_template(var_def, 'English', {}) - self.assertEqual(result, 'English') - - def test_absolute_value_skips_project_root_template(self): - """When the user enters an absolute path, the '{project-root}/{value}' template - must not be applied — doing so would produce '/project//absolute/path'.""" - var_def = {'result': '{project-root}/{value}'} - result = apply_result_template( - var_def, '/Users/me/shared-outputs', {'project-root': '/Users/me/myproject'} - ) - self.assertEqual(result, '/Users/me/shared-outputs') - - def test_relative_traversal_value_is_normalized(self): - """A relative path like '../../outside' combined with the project-root template - must produce a clean normalized absolute path, not '/project/../../outside'.""" - var_def = {'result': '{project-root}/{value}'} - result = apply_result_template( - var_def, '../../outside-dir', {'project-root': '/Users/me/myproject'} - ) - self.assertEqual(result, '/Users/outside-dir') - - def test_relative_one_level_up_is_normalized(self): - var_def = {'result': '{project-root}/{value}'} - result = apply_result_template( - var_def, '../sibling-outputs', {'project-root': '/project/root'} - ) - self.assertEqual(result, '/project/sibling-outputs') - - def test_normal_relative_value_unchanged(self): - """Standard in-project relative paths still produce the expected joined path.""" - var_def = {'result': '{project-root}/{value}'} - result = apply_result_template( - var_def, '_bmad-output', {'project-root': '/project/root'} - ) - self.assertEqual(result, '/project/root/_bmad-output') - - -class TestLoadModuleYaml(unittest.TestCase): - - def setUp(self): - self.temp_dir = tempfile.mkdtemp() - - def tearDown(self): - shutil.rmtree(self.temp_dir) - - def test_loads_core_module_yaml(self): - path = Path(self.temp_dir) / 'module.yaml' - path.write_text( - 'code: core\n' - 'name: "BMad Core Module"\n' - 'header: "Core Config"\n' - 'user_name:\n' - ' prompt: "What should agents call you?"\n' - ' default: "BMad"\n' - ' result: "{value}"\n' - ) - result = load_module_yaml(path) - self.assertIsNotNone(result) - self.assertEqual(result['meta']['code'], 'core') - self.assertEqual(result['meta']['name'], 'BMad Core Module') - self.assertIn('user_name', result['variables']) - self.assertEqual(result['variables']['user_name']['prompt'], 'What should agents call you?') - - def test_loads_module_with_directories(self): - path = Path(self.temp_dir) / 'module.yaml' - path.write_text( - 'code: bmm\n' - 'name: "BMad Method"\n' - 'project_name:\n' - ' prompt: "Project name?"\n' - ' default: "{directory_name}"\n' - ' result: "{value}"\n' - 'directories:\n' - ' - "{planning_artifacts}"\n' - ) - result = load_module_yaml(path) - self.assertEqual(result['directories'], ['{planning_artifacts}']) - - def test_returns_none_for_missing(self): - result = load_module_yaml(Path(self.temp_dir) / 'nonexistent.yaml') - self.assertIsNone(result) - - def test_returns_none_for_empty(self): - path = Path(self.temp_dir) / 'empty.yaml' - path.write_text('') - result = load_module_yaml(path) - self.assertIsNone(result) - - -class TestFindCoreModuleYaml(unittest.TestCase): - - def test_returns_path_to_resources(self): - path = find_core_module_yaml() - self.assertTrue(str(path).endswith('resources/core-module.yaml')) - - -class TestFindTargetModuleYaml(unittest.TestCase): - - def setUp(self): - self.temp_dir = tempfile.mkdtemp() - self.project_root = Path(self.temp_dir) - - def tearDown(self): - shutil.rmtree(self.temp_dir) - - def test_finds_in_skill_assets(self): - skill_path = self.project_root / 'skills' / 'test-skill' - assets = skill_path / 'assets' - assets.mkdir(parents=True) - (assets / 'module.yaml').write_text('code: test\n') - - result = find_target_module_yaml('test', self.project_root, str(skill_path)) - self.assertIsNotNone(result) - self.assertTrue(str(result).endswith('assets/module.yaml')) - - def test_finds_in_skill_root(self): - skill_path = self.project_root / 'skills' / 'test-skill' - skill_path.mkdir(parents=True) - (skill_path / 'module.yaml').write_text('code: test\n') - - result = find_target_module_yaml('test', self.project_root, str(skill_path)) - self.assertIsNotNone(result) - - def test_finds_in_bmad_module_dir(self): - module_dir = self.project_root / '_bmad' / 'mymod' - module_dir.mkdir(parents=True) - (module_dir / 'module.yaml').write_text('code: mymod\n') - - result = find_target_module_yaml('mymod', self.project_root) - self.assertIsNotNone(result) - - def test_returns_none_when_not_found(self): - result = find_target_module_yaml('missing', self.project_root) - self.assertIsNone(result) - - def test_skill_path_takes_priority(self): - """Skill assets module.yaml takes priority over _bmad/{module}/.""" - skill_path = self.project_root / 'skills' / 'test-skill' - assets = skill_path / 'assets' - assets.mkdir(parents=True) - (assets / 'module.yaml').write_text('code: test\nname: from-skill\n') - - module_dir = self.project_root / '_bmad' / 'test' - module_dir.mkdir(parents=True) - (module_dir / 'module.yaml').write_text('code: test\nname: from-bmad\n') - - result = find_target_module_yaml('test', self.project_root, str(skill_path)) - self.assertTrue('assets' in str(result)) - - -class TestLoadConfigFile(unittest.TestCase): - - def setUp(self): - self.temp_dir = tempfile.mkdtemp() - - def tearDown(self): - shutil.rmtree(self.temp_dir) - - def test_loads_flat_yaml(self): - path = Path(self.temp_dir) / 'config.yaml' - path.write_text('user_name: Test\ncommunication_language: English\n') - result = load_config_file(path) - self.assertEqual(result['user_name'], 'Test') - - def test_returns_none_for_missing(self): - result = load_config_file(Path(self.temp_dir) / 'missing.yaml') - self.assertIsNone(result) - - -class TestLoadModuleConfig(unittest.TestCase): - - def setUp(self): - self.temp_dir = tempfile.mkdtemp() - self.project_root = Path(self.temp_dir) - bmad_core = self.project_root / '_bmad' / 'core' - bmad_core.mkdir(parents=True) - (bmad_core / 'config.yaml').write_text( - 'user_name: TestUser\n' - 'communication_language: English\n' - 'document_output_language: English\n' - 'output_folder: "{project-root}/_bmad-output"\n' - ) - bmad_bmb = self.project_root / '_bmad' / 'bmb' - bmad_bmb.mkdir(parents=True) - (bmad_bmb / 'config.yaml').write_text( - 'user_name: TestUser\n' - 'communication_language: English\n' - 'document_output_language: English\n' - 'output_folder: "{project-root}/_bmad-output"\n' - 'bmad_builder_output_folder: "{project-root}/_bmad-output/skills"\n' - 'bmad_builder_reports: "{project-root}/_bmad-output/reports"\n' - ) - - def tearDown(self): - shutil.rmtree(self.temp_dir) - - def test_load_core(self): - result = load_module_config('core', self.project_root) - self.assertIsNotNone(result) - self.assertEqual(result['user_name'], 'TestUser') - - def test_load_module_includes_core_vars(self): - result = load_module_config('bmb', self.project_root) - self.assertIsNotNone(result) - # Module-specific var - self.assertIn('bmad_builder_output_folder', result) - # Core vars also present - self.assertEqual(result['user_name'], 'TestUser') - - def test_missing_module(self): - result = load_module_config('nonexistent', self.project_root) - self.assertIsNone(result) - - -if __name__ == '__main__': - unittest.main() diff --git a/src/core-skills/bmad-party-mode/workflow.md b/src/core-skills/bmad-party-mode/workflow.md index e8e13b2a1..e64588cb7 100644 --- a/src/core-skills/bmad-party-mode/workflow.md +++ b/src/core-skills/bmad-party-mode/workflow.md @@ -1,6 +1,3 @@ ---- ---- - # Party Mode Workflow **Goal:** Orchestrates group discussions between all installed BMAD agents, enabling natural multi-agent conversations @@ -21,16 +18,12 @@ This uses **micro-file architecture** with **sequential conversation orchestrati --- -## INITIALIZATION +## ACTIVATION -### Configuration Loading - -Load config from `{project-root}/_bmad/core/config.yaml` and resolve: - -- `project_name`, `output_folder`, `user_name` -- `communication_language`, `document_output_language`, `user_skill_level` -- `date` as a system-generated value -- Agent manifest path: `{project-root}/_bmad/_config/agent-manifest.csv` +1. Load config from `{project-root}/_bmad/core/config.yaml` and resolve: + - Use `{user_name}` for greeting + - Use `{communication_language}` for all communications + - Use `{document_output_language}` for output documents ### Paths From ce9c66490ae9b104788010414d94485c614e87dd Mon Sep 17 00:00:00 2001 From: PinkyD Date: Sat, 28 Mar 2026 23:22:34 -0700 Subject: [PATCH 12/26] refactor(party-mode): consolidate into single SKILL.md with real subagents (#2160) Replace the multi-file workflow architecture (workflow.md + 3 step files) with a self-contained SKILL.md that spawns each agent as an independent subagent via the Agent tool. This produces genuinely diverse perspectives instead of one LLM roleplaying multiple characters. Adds --model and --solo flags for flexibility. --- src/core-skills/bmad-party-mode/SKILL.md | 121 +++++++++++- .../steps/step-01-agent-loading.md | 138 ------------- .../steps/step-02-discussion-orchestration.md | 187 ------------------ .../steps/step-03-graceful-exit.md | 167 ---------------- src/core-skills/bmad-party-mode/workflow.md | 183 ----------------- 5 files changed, 119 insertions(+), 677 deletions(-) delete mode 100644 src/core-skills/bmad-party-mode/steps/step-01-agent-loading.md delete mode 100644 src/core-skills/bmad-party-mode/steps/step-02-discussion-orchestration.md delete mode 100644 src/core-skills/bmad-party-mode/steps/step-03-graceful-exit.md delete mode 100644 src/core-skills/bmad-party-mode/workflow.md diff --git a/src/core-skills/bmad-party-mode/SKILL.md b/src/core-skills/bmad-party-mode/SKILL.md index 8fb3d9af8..4633d66c8 100644 --- a/src/core-skills/bmad-party-mode/SKILL.md +++ b/src/core-skills/bmad-party-mode/SKILL.md @@ -1,6 +1,123 @@ --- name: bmad-party-mode -description: 'Orchestrates group discussions between all installed BMAD agents, enabling natural multi-agent conversations. Use when user requests party mode.' +description: 'Orchestrates group discussions between installed BMAD agents, enabling natural multi-agent conversations where each agent is a real subagent with independent thinking. Use when user requests party mode, wants multiple agent perspectives, group discussion, roundtable, or multi-agent conversation about their project.' --- -Follow the instructions in ./workflow.md. +# Party Mode + +Facilitate roundtable discussions where BMAD agents participate as **real subagents** — each spawned independently via the Agent tool so they think for themselves. You are the orchestrator: you pick voices, build context, spawn agents, and present their responses. You never generate agent responses yourself. + +## Why This Matters + +The whole point of party mode is that each agent produces a genuinely independent perspective. When one LLM roleplays multiple characters, the "opinions" tend to converge and feel performative. By spawning each agent as its own subagent process, you get real diversity of thought — agents that actually disagree, catch things the others miss, and bring their authentic expertise to bear. + +## Arguments + +Party mode accepts optional arguments when invoked: + +- `--model ` — Force all subagents to use a specific model (e.g. `--model haiku`, `--model opus`). When omitted, choose the model that fits the round: use a faster model (like `haiku`) for brief or reactive responses, and the default model for deep or complex topics. Match model weight to the depth of thinking the round requires. +- `--solo` — Run without subagents. Instead of spawning independent agents, roleplay all selected agents yourself in a single response. This is useful when subagents aren't available, when speed matters more than independence, or when the user just prefers it. Announce solo mode on activation so the user knows responses come from one LLM. + +## On Activation + +1. **Parse arguments** — check for `--model` and `--solo` flags from the user's invocation. + +2. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: + - Use `{user_name}` for greeting + - Use `{communication_language}` for all communications + +3. **Read the agent manifest** at `{project-root}/_bmad/_config/agent-manifest.csv`. Build an internal roster of available agents with their displayName, title, icon, role, identity, communicationStyle, and principles. + +4. **Load project context** — search for `**/project-context.md`. If found, hold it as background context that gets passed to agents when relevant. + +5. **Welcome the user** — briefly introduce party mode (mention if solo mode is active). Show the full agent roster (icon + name + one-line role) so the user knows who's available. Ask what they'd like to discuss. + +## The Core Loop + +For each user message: + +### 1. Pick the Right Voices + +Choose 2-4 agents whose expertise is most relevant to what the user is asking. Use your judgment — you know each agent's role and identity from the manifest. Some guidelines: + +- **Simple question**: 2 agents with the most relevant expertise +- **Complex or cross-cutting topic**: 3-4 agents from different domains +- **User names specific agents**: Always include those, plus 1-2 complementary voices +- **User asks an agent to respond to another**: Spawn just that agent with the other's response as context +- **Rotate over time** — avoid the same 2 agents dominating every round + +### 2. Build Context and Spawn + +For each selected agent, spawn a subagent using the Agent tool. Each subagent gets: + +**The agent prompt** (built from the manifest data): +``` +You are {displayName} ({title}), a BMAD agent in a collaborative roundtable discussion. + +## Your Persona +- Icon: {icon} +- Communication Style: {communicationStyle} +- Principles: {principles} +- Identity: {identity} + +## Discussion Context +{summary of the conversation so far — keep under 400 words} + +{project context if relevant} + +## What Other Agents Said This Round +{if this is a cross-talk or reaction request, include the responses being reacted to — otherwise omit this section} + +## The User's Message +{the user's actual message} + +## Guidelines +- Respond authentically as {displayName}. Your perspective should reflect your genuine expertise. +- Start your response with: {icon} **{displayName}:** +- Speak in {communication_language}. +- Scale your response to the substance — don't pad. If you have a brief point, make it briefly. +- Disagree with other agents when your expertise tells you to. Don't hedge or be polite about it. +- If you have nothing substantive to add, say so in one sentence rather than manufacturing an opinion. +- You may ask the user direct questions if something needs clarification. +- Do NOT use tools. Just respond with your perspective. +``` + +**Spawn all agents in parallel** — put all Agent tool calls in a single response so they run concurrently. If `--model` was specified, use that model for all subagents. Otherwise, pick the model that matches the round — faster/cheaper models for brief takes, the default for substantive analysis. + +**Solo mode** — if `--solo` is active, skip spawning. Instead, generate all agent responses yourself in a single message, staying faithful to each agent's persona. Keep responses clearly separated with each agent's icon and name header. + +### 3. Present Responses + +Collect all agent responses and present them to the user as-is. Don't summarize, edit, or reorder them. If an agent's response is particularly brief or says they have nothing to add, that's fine — include it anyway so the user sees the full picture. + +After presenting, you can optionally add a brief orchestrator note if it would help — like flagging a clear disagreement worth exploring, or noting an agent whose perspective might be relevant but wasn't included this round. + +### 4. Handle Follow-ups + +The user drives what happens next. Common patterns: + +| User says... | You do... | +|---|---| +| Continues the general discussion | Pick fresh agents, repeat the loop | +| "Winston, what do you think about what Sally said?" | Spawn just Winston with Sally's response as context | +| "Bring in Quinn on this" | Spawn Quinn with a summary of the discussion so far | +| "I agree with John, let's go deeper on that" | Spawn John + 1-2 others to expand on John's point | +| "What would Mary and Bob think about Winston's approach?" | Spawn Mary and Bob with Winston's response as context | +| Asks a question directed at everyone | Back to step 1 with all agents | + +The key insight: you can spawn any combination at any time. One agent, two agents reacting to a third, the whole roster — whatever serves the conversation. Each spawn is cheap and independent. + +## Keeping Context Manageable + +As the conversation grows, you'll need to summarize prior rounds rather than passing the full transcript to each subagent. Aim to keep the "Discussion Context" section under 400 words — a tight summary of what's been discussed, what positions agents have taken, and what the user seems to be driving toward. Update this summary every 2-3 rounds or when the topic shifts significantly. + +## When Things Go Sideways + +- **Agents are all saying the same thing**: Bring in a contrarian voice, or ask a specific agent to play devil's advocate by framing the prompt that way. +- **Discussion is going in circles**: Summarize the impasse and ask the user what angle they want to explore next. +- **User seems disengaged**: Ask directly — continue, change topic, or wrap up? +- **Agent gives a weak response**: Don't retry. Present it and let the user decide if they want more from that agent. + +## Exit + +When the user says they're done (any natural phrasing — "thanks", "that's all", "end party mode", etc.), give a brief wrap-up of the key takeaways from the discussion and return to normal mode. Don't force exit triggers — just read the room. diff --git a/src/core-skills/bmad-party-mode/steps/step-01-agent-loading.md b/src/core-skills/bmad-party-mode/steps/step-01-agent-loading.md deleted file mode 100644 index 001ad9d45..000000000 --- a/src/core-skills/bmad-party-mode/steps/step-01-agent-loading.md +++ /dev/null @@ -1,138 +0,0 @@ -# Step 1: Agent Loading and Party Mode Initialization - -## MANDATORY EXECUTION RULES (READ FIRST): - -- ✅ YOU ARE A PARTY MODE FACILITATOR, not just a workflow executor -- 🎯 CREATE ENGAGING ATMOSPHERE for multi-agent collaboration -- 📋 LOAD COMPLETE AGENT ROSTER from manifest with merged personalities -- 🔍 PARSE AGENT DATA for conversation orchestration -- 💬 INTRODUCE DIVERSE AGENT SAMPLE to kick off discussion -- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` - -## EXECUTION PROTOCOLS: - -- 🎯 Show agent loading process before presenting party activation -- ⚠️ Present [C] continue option after agent roster is loaded -- 💾 ONLY save when user chooses C (Continue) -- 📖 Update frontmatter `stepsCompleted: [1]` before loading next step -- 🚫 FORBIDDEN to start conversation until C is selected - -## CONTEXT BOUNDARIES: - -- Agent manifest CSV is available at `{project-root}/_bmad/_config/agent-manifest.csv` -- User configuration from config.yaml is loaded and resolved -- Party mode is standalone interactive workflow -- All agent data is available for conversation orchestration - -## YOUR TASK: - -Load the complete agent roster from manifest and initialize party mode with engaging introduction. - -## AGENT LOADING SEQUENCE: - -### 1. Load Agent Manifest - -Begin agent loading process: - -"Now initializing **Party Mode** with our complete BMAD agent roster! Let me load up all our talented agents and get them ready for an amazing collaborative discussion. - -**Agent Manifest Loading:**" - -Load and parse the agent manifest CSV from `{project-root}/_bmad/_config/agent-manifest.csv` - -### 2. Extract Agent Data - -Parse CSV to extract complete agent information for each entry: - -**Agent Data Points:** - -- **name** (agent identifier for system calls) -- **displayName** (agent's persona name for conversations) -- **title** (formal position and role description) -- **icon** (visual identifier emoji) -- **role** (capabilities and expertise summary) -- **identity** (background and specialization details) -- **communicationStyle** (how they communicate and express themselves) -- **principles** (decision-making philosophy and values) -- **module** (source module organization) -- **path** (file location reference) - -### 3. Build Agent Roster - -Create complete agent roster with merged personalities: - -**Roster Building Process:** - -- Combine manifest data with agent file configurations -- Merge personality traits, capabilities, and communication styles -- Validate agent availability and configuration completeness -- Organize agents by expertise domains for intelligent selection - -### 4. Party Mode Activation - -Generate enthusiastic party mode introduction: - -"🎉 PARTY MODE ACTIVATED! 🎉 - -Welcome {{user_name}}! I'm excited to facilitate an incredible multi-agent discussion with our complete BMAD team. All our specialized agents are online and ready to collaborate, bringing their unique expertise and perspectives to whatever you'd like to explore. - -**Our Collaborating Agents Include:** - -[Display 3-4 diverse agents to showcase variety]: - -- [Icon Emoji] **[Agent Name]** ([Title]): [Brief role description] -- [Icon Emoji] **[Agent Name]** ([Title]): [Brief role description] -- [Icon Emoji] **[Agent Name]** ([Title]): [Brief role description] - -**[Total Count] agents** are ready to contribute their expertise! - -**What would you like to discuss with the team today?**" - -### 5. Present Continue Option - -After agent loading and introduction: - -"**Agent roster loaded successfully!** All our BMAD experts are excited to collaborate with you. - -**Ready to start the discussion?** -[C] Continue - Begin multi-agent conversation - -### 6. Handle Continue Selection - -#### If 'C' (Continue): - -- Update frontmatter: `stepsCompleted: [1]` -- Set `agents_loaded: true` and `party_active: true` -- Load: `./step-02-discussion-orchestration.md` - -## SUCCESS METRICS: - -✅ Agent manifest successfully loaded and parsed -✅ Complete agent roster built with merged personalities -✅ Engaging party mode introduction created -✅ Diverse agent sample showcased for user -✅ [C] continue option presented and handled correctly -✅ Frontmatter updated with agent loading status -✅ Proper routing to discussion orchestration step - -## FAILURE MODES: - -❌ Failed to load or parse agent manifest CSV -❌ Incomplete agent data extraction or roster building -❌ Generic or unengaging party mode introduction -❌ Not showcasing diverse agent capabilities -❌ Not presenting [C] continue option after loading -❌ Starting conversation without user selection - -## AGENT LOADING PROTOCOLS: - -- Validate CSV format and required columns -- Handle missing or incomplete agent entries gracefully -- Cross-reference manifest with actual agent files -- Prepare agent selection logic for intelligent conversation routing - -## NEXT STEP: - -After user selects 'C', load `./step-02-discussion-orchestration.md` to begin the interactive multi-agent conversation with intelligent agent selection and natural conversation flow. - -Remember: Create an engaging, party-like atmosphere while maintaining professional expertise and intelligent conversation orchestration! diff --git a/src/core-skills/bmad-party-mode/steps/step-02-discussion-orchestration.md b/src/core-skills/bmad-party-mode/steps/step-02-discussion-orchestration.md deleted file mode 100644 index 361c1937f..000000000 --- a/src/core-skills/bmad-party-mode/steps/step-02-discussion-orchestration.md +++ /dev/null @@ -1,187 +0,0 @@ -# Step 2: Discussion Orchestration and Multi-Agent Conversation - -## MANDATORY EXECUTION RULES (READ FIRST): - -- ✅ YOU ARE A CONVERSATION ORCHESTRATOR, not just a response generator -- 🎯 SELECT RELEVANT AGENTS based on topic analysis and expertise matching -- 📋 MAINTAIN CHARACTER CONSISTENCY using merged agent personalities -- 🔍 ENABLE NATURAL CROSS-TALK between agents for dynamic conversation -- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` - -## EXECUTION PROTOCOLS: - -- 🎯 Analyze user input for intelligent agent selection before responding -- ⚠️ Present [E] exit option after each agent response round -- 💾 Continue conversation until user selects E (Exit) -- 📖 Maintain conversation state and context throughout session -- 🚫 FORBIDDEN to exit until E is selected or exit trigger detected - -## CONTEXT BOUNDARIES: - -- Complete agent roster with merged personalities is available -- User topic and conversation history guide agent selection -- Exit triggers: `*exit`, `goodbye`, `end party`, `quit` - -## YOUR TASK: - -Orchestrate dynamic multi-agent conversations with intelligent agent selection, natural cross-talk, and authentic character portrayal. - -## DISCUSSION ORCHESTRATION SEQUENCE: - -### 1. User Input Analysis - -For each user message or topic: - -**Input Analysis Process:** -"Analyzing your message for the perfect agent collaboration..." - -**Analysis Criteria:** - -- Domain expertise requirements (technical, business, creative, etc.) -- Complexity level and depth needed -- Conversation context and previous agent contributions -- User's specific agent mentions or requests - -### 2. Intelligent Agent Selection - -Select 2-3 most relevant agents based on analysis: - -**Selection Logic:** - -- **Primary Agent**: Best expertise match for core topic -- **Secondary Agent**: Complementary perspective or alternative approach -- **Tertiary Agent**: Cross-domain insight or devil's advocate (if beneficial) - -**Priority Rules:** - -- If user names specific agent → Prioritize that agent + 1-2 complementary agents -- Rotate agent participation over time to ensure inclusive discussion -- Balance expertise domains for comprehensive perspectives - -### 3. In-Character Response Generation - -Generate authentic responses for each selected agent: - -**Character Consistency:** - -- Apply agent's exact communication style from merged data -- Reflect their principles and values in reasoning -- Draw from their identity and role for authentic expertise -- Maintain their unique voice and personality traits - -**Response Structure:** -[For each selected agent]: - -"[Icon Emoji] **[Agent Name]**: [Authentic in-character response] - -[Bash: .claude/hooks/bmad-speak.sh \"[Agent Name]\" \"[Their response]\"]" - -### 4. Natural Cross-Talk Integration - -Enable dynamic agent-to-agent interactions: - -**Cross-Talk Patterns:** - -- Agents can reference each other by name: "As [Another Agent] mentioned..." -- Building on previous points: "[Another Agent] makes a great point about..." -- Respectful disagreements: "I see it differently than [Another Agent]..." -- Follow-up questions between agents: "How would you handle [specific aspect]?" - -**Conversation Flow:** - -- Allow natural conversational progression -- Enable agents to ask each other questions -- Maintain professional yet engaging discourse -- Include personality-driven humor and quirks when appropriate - -### 5. Question Handling Protocol - -Manage different types of questions appropriately: - -**Direct Questions to User:** -When an agent asks the user a specific question: - -- End that response round immediately after the question -- Clearly highlight: **[Agent Name] asks: [Their question]** -- Display: _[Awaiting user response...]_ -- WAIT for user input before continuing - -**Rhetorical Questions:** -Agents can ask thinking-aloud questions without pausing conversation flow. - -**Inter-Agent Questions:** -Allow natural back-and-forth within the same response round for dynamic interaction. - -### 6. Response Round Completion - -After generating all agent responses for the round, let the user know he can speak naturally with the agents, an then show this menu opion" - -`[E] Exit Party Mode - End the collaborative session` - -### 7. Exit Condition Checking - -Check for exit conditions before continuing: - -**Automatic Triggers:** - -- User message contains: `*exit`, `goodbye`, `end party`, `quit` -- Immediate agent farewells and workflow termination - -**Natural Conclusion:** - -- Conversation seems naturally concluding -- Confirm if the user wants to exit party mode and go back to where they were or continue chatting. Do it in a conversational way with an agent in the party. - -### 8. Handle Exit Selection - -#### If 'E' (Exit Party Mode): - -- Read fully and follow: `./step-03-graceful-exit.md` - -## SUCCESS METRICS: - -✅ Intelligent agent selection based on topic analysis -✅ Authentic in-character responses maintained consistently -✅ Natural cross-talk and agent interactions enabled -✅ Question handling protocol followed correctly -✅ [E] exit option presented after each response round -✅ Conversation context and state maintained throughout -✅ Graceful conversation flow without abrupt interruptions - -## FAILURE MODES: - -❌ Generic responses without character consistency -❌ Poor agent selection not matching topic expertise -❌ Ignoring user questions or exit triggers -❌ Not enabling natural agent cross-talk and interactions -❌ Continuing conversation without user input when questions asked - -## CONVERSATION ORCHESTRATION PROTOCOLS: - -- Maintain conversation memory and context across rounds -- Rotate agent participation for inclusive discussions -- Handle topic drift while maintaining productivity -- Balance fun and professional collaboration -- Enable learning and knowledge sharing between agents - -## MODERATION GUIDELINES: - -**Quality Control:** - -- If discussion becomes circular, have bmad-master summarize and redirect -- Ensure all agents stay true to their merged personalities -- Handle disagreements constructively and professionally -- Maintain respectful and inclusive conversation environment - -**Flow Management:** - -- Guide conversation toward productive outcomes -- Encourage diverse perspectives and creative thinking -- Balance depth with breadth of discussion -- Adapt conversation pace to user engagement level - -## NEXT STEP: - -When user selects 'E' or exit conditions are met, load `./step-03-graceful-exit.md` to provide satisfying agent farewells and conclude the party mode session. - -Remember: Orchestrate engaging, intelligent conversations while maintaining authentic agent personalities and natural interaction patterns! diff --git a/src/core-skills/bmad-party-mode/steps/step-03-graceful-exit.md b/src/core-skills/bmad-party-mode/steps/step-03-graceful-exit.md deleted file mode 100644 index d3dbb7192..000000000 --- a/src/core-skills/bmad-party-mode/steps/step-03-graceful-exit.md +++ /dev/null @@ -1,167 +0,0 @@ -# Step 3: Graceful Exit and Party Mode Conclusion - -## MANDATORY EXECUTION RULES (READ FIRST): - -- ✅ YOU ARE A PARTY MODE COORDINATOR concluding an engaging session -- 🎯 PROVIDE SATISFYING AGENT FAREWELLS in authentic character voices -- 📋 EXPRESS GRATITUDE to user for collaborative participation -- 🔍 ACKNOWLEDGE SESSION HIGHLIGHTS and key insights gained -- 💬 MAINTAIN POSITIVE ATMOSPHERE until the very end -- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}` - -## EXECUTION PROTOCOLS: - -- 🎯 Generate characteristic agent goodbyes that reflect their personalities -- ⚠️ Complete workflow exit after farewell sequence -- 💾 Update frontmatter with final workflow completion -- 📖 Clean up any active party mode state or temporary data -- 🚫 FORBIDDEN abrupt exits without proper agent farewells - -## CONTEXT BOUNDARIES: - -- Party mode session is concluding naturally or via user request -- Complete agent roster and conversation history are available -- User has participated in collaborative multi-agent discussion -- Final workflow completion and state cleanup required - -## YOUR TASK: - -Provide satisfying agent farewells and conclude the party mode session with gratitude and positive closure. - -## GRACEFUL EXIT SEQUENCE: - -### 1. Acknowledge Session Conclusion - -Begin exit process with warm acknowledgment: - -"What an incredible collaborative session! Thank you {{user_name}} for engaging with our BMAD agent team in this dynamic discussion. Your questions and insights brought out the best in our agents and led to some truly valuable perspectives. - -**Before we wrap up, let a few of our agents say goodbye...**" - -### 2. Generate Agent Farewells - -Select 2-3 agents who were most engaged or representative of the discussion: - -**Farewell Selection Criteria:** - -- Agents who made significant contributions to the discussion -- Agents with distinct personalities that provide memorable goodbyes -- Mix of expertise domains to showcase collaborative diversity -- Agents who can reference session highlights meaningfully - -**Agent Farewell Format:** - -For each selected agent: - -"[Icon Emoji] **[Agent Name]**: [Characteristic farewell reflecting their personality, communication style, and role. May reference session highlights, express gratitude, or offer final insights related to their expertise domain.] - -[Bash: .claude/hooks/bmad-speak.sh \"[Agent Name]\" \"[Their farewell message]\"]" - -**Example Farewells:** - -- **Architect/Winston**: "It's been a pleasure architecting solutions with you today! Remember to build on solid foundations and always consider scalability. Until next time! 🏗️" -- **Innovator/Creative Agent**: "What an inspiring creative journey! Don't let those innovative ideas fade - nurture them and watch them grow. Keep thinking outside the box! 🎨" -- **Strategist/Business Agent**: "Excellent strategic collaboration today! The insights we've developed will serve you well. Keep analyzing, keep optimizing, and keep winning! 📈" - -### 3. Session Highlight Summary - -Briefly acknowledge key discussion outcomes: - -**Session Recognition:** -"**Session Highlights:** Today we explored [main topic] through [number] different perspectives, generating valuable insights on [key outcomes]. The collaboration between our [relevant expertise domains] agents created a comprehensive understanding that wouldn't have been possible with any single viewpoint." - -### 4. Final Party Mode Conclusion - -End with enthusiastic and appreciative closure: - -"🎊 **Party Mode Session Complete!** 🎊 - -Thank you for bringing our BMAD agents together in this unique collaborative experience. The diverse perspectives, expert insights, and dynamic interactions we've shared demonstrate the power of multi-agent thinking. - -**Our agents learned from each other and from you** - that's what makes these collaborative sessions so valuable! - -**Ready for your next challenge**? Whether you need more focused discussions with specific agents or want to bring the whole team together again, we're always here to help you tackle complex problems through collaborative intelligence. - -**Until next time - keep collaborating, keep innovating, and keep enjoying the power of multi-agent teamwork!** 🚀" - -### 5. Complete Workflow Exit - -Final workflow completion steps: - -**Frontmatter Update:** - -```yaml ---- -stepsCompleted: [1, 2, 3] -user_name: '{{user_name}}' -date: '{{date}}' -agents_loaded: true -party_active: false -workflow_completed: true ---- -``` - -**State Cleanup:** - -- Clear any active conversation state -- Reset agent selection cache -- Mark party mode workflow as completed - -### 6. Exit Workflow - -Execute final workflow termination: - -"[PARTY MODE WORKFLOW COMPLETE] - -Thank you for using BMAD Party Mode for collaborative multi-agent discussions!" - -## SUCCESS METRICS: - -✅ Satisfying agent farewells generated in authentic character voices -✅ Session highlights and contributions acknowledged meaningfully -✅ Positive and appreciative closure atmosphere maintained -✅ Frontmatter properly updated with workflow completion -✅ All workflow state cleaned up appropriately -✅ User left with positive impression of collaborative experience - -## FAILURE MODES: - -❌ Generic or impersonal agent farewells without character consistency -❌ Missing acknowledgment of session contributions or insights -❌ Abrupt exit without proper closure or appreciation -❌ Not updating workflow completion status in frontmatter -❌ Leaving party mode state active after conclusion -❌ Negative or dismissive tone during exit process - -## EXIT PROTOCOLS: - -- Ensure all agents have opportunity to say goodbye appropriately -- Maintain the positive, collaborative atmosphere established during session -- Reference specific discussion highlights when possible for personalization -- Express genuine appreciation for user's participation and engagement -- Leave user with encouragement for future collaborative sessions - -## RETURN PROTOCOL: - -If this workflow was invoked from within a parent workflow: - -1. Identify the parent workflow step or instructions file that invoked you -2. Re-read that file now to restore context -3. Resume from where the parent workflow directed you to invoke this sub-workflow -4. Present any menus or options the parent workflow requires after sub-workflow completion - -Do not continue conversationally - explicitly return to parent workflow control flow. - -## WORKFLOW COMPLETION: - -After farewell sequence and final closure: - -- All party mode workflow steps completed successfully -- Agent roster and conversation state properly finalized -- User expressed gratitude and positive session conclusion -- Multi-agent collaboration demonstrated value and effectiveness -- Workflow ready for next party mode session activation - -Congratulations on facilitating a successful multi-agent collaborative discussion through BMAD Party Mode! 🎉 - -The user has experienced the power of bringing diverse expert perspectives together to tackle complex topics through intelligent conversation orchestration and authentic agent interactions. diff --git a/src/core-skills/bmad-party-mode/workflow.md b/src/core-skills/bmad-party-mode/workflow.md deleted file mode 100644 index e64588cb7..000000000 --- a/src/core-skills/bmad-party-mode/workflow.md +++ /dev/null @@ -1,183 +0,0 @@ -# Party Mode Workflow - -**Goal:** Orchestrates group discussions between all installed BMAD agents, enabling natural multi-agent conversations - -**Your Role:** You are a party mode facilitator and multi-agent conversation orchestrator. You bring together diverse BMAD agents for collaborative discussions, managing the flow of conversation while maintaining each agent's unique personality and expertise - while still utilizing the configured {communication_language}. - ---- - -## WORKFLOW ARCHITECTURE - -This uses **micro-file architecture** with **sequential conversation orchestration**: - -- Step 01 loads agent manifest and initializes party mode -- Step 02 orchestrates the ongoing multi-agent discussion -- Step 03 handles graceful party mode exit -- Conversation state tracked in frontmatter -- Agent personalities maintained through merged manifest data - ---- - -## ACTIVATION - -1. Load config from `{project-root}/_bmad/core/config.yaml` and resolve: - - Use `{user_name}` for greeting - - Use `{communication_language}` for all communications - - Use `{document_output_language}` for output documents - -### Paths - -- `agent_manifest_path` = `{project-root}/_bmad/_config/agent-manifest.csv` -- `standalone_mode` = `true` (party mode is an interactive workflow) - ---- - -## AGENT MANIFEST PROCESSING - -### Agent Data Extraction - -Parse CSV manifest to extract agent entries with complete information: - -- **name** (agent identifier) -- **displayName** (agent's persona name) -- **title** (formal position) -- **icon** (visual identifier emoji) -- **role** (capabilities summary) -- **identity** (background/expertise) -- **communicationStyle** (how they communicate) -- **principles** (decision-making philosophy) -- **module** (source module) -- **path** (file location) - -### Agent Roster Building - -Build complete agent roster with merged personalities for conversation orchestration. - ---- - -## EXECUTION - -Execute party mode activation and conversation orchestration: - -### Party Mode Activation - -**Your Role:** You are a party mode facilitator creating an engaging multi-agent conversation environment. - -**Welcome Activation:** - -"🎉 PARTY MODE ACTIVATED! 🎉 - -Welcome {{user_name}}! All BMAD agents are here and ready for a dynamic group discussion. I've brought together our complete team of experts, each bringing their unique perspectives and capabilities. - -**Let me introduce our collaborating agents:** - -[Load agent roster and display 2-3 most diverse agents as examples] - -**What would you like to discuss with the team today?**" - -### Agent Selection Intelligence - -For each user message or topic: - -**Relevance Analysis:** - -- Analyze the user's message/question for domain and expertise requirements -- Identify which agents would naturally contribute based on their role, capabilities, and principles -- Consider conversation context and previous agent contributions -- Select 2-3 most relevant agents for balanced perspective - -**Priority Handling:** - -- If user addresses specific agent by name, prioritize that agent + 1-2 complementary agents -- Rotate agent selection to ensure diverse participation over time -- Enable natural cross-talk and agent-to-agent interactions - -### Conversation Orchestration - -Load step: `./steps/step-02-discussion-orchestration.md` - ---- - -## WORKFLOW STATES - -### Frontmatter Tracking - -```yaml ---- -stepsCompleted: [1] -user_name: '{{user_name}}' -date: '{{date}}' -agents_loaded: true -party_active: true -exit_triggers: ['*exit', 'goodbye', 'end party', 'quit'] ---- -``` - ---- - -## ROLE-PLAYING GUIDELINES - -### Character Consistency - -- Maintain strict in-character responses based on merged personality data -- Use each agent's documented communication style consistently -- Reference agent memories and context when relevant -- Allow natural disagreements and different perspectives -- Include personality-driven quirks and occasional humor - -### Conversation Flow - -- Enable agents to reference each other naturally by name or role -- Maintain professional discourse while being engaging -- Respect each agent's expertise boundaries -- Allow cross-talk and building on previous points - ---- - -## QUESTION HANDLING PROTOCOL - -### Direct Questions to User - -When an agent asks the user a specific question: - -- End that response round immediately after the question -- Clearly highlight the questioning agent and their question -- Wait for user response before any agent continues - -### Inter-Agent Questions - -Agents can question each other and respond naturally within the same round for dynamic conversation. - ---- - -## EXIT CONDITIONS - -### Automatic Triggers - -Exit party mode when user message contains any exit triggers: - -- `*exit`, `goodbye`, `end party`, `quit` - -### Graceful Conclusion - -If conversation naturally concludes: - -- Ask user if they'd like to continue or end party mode -- Exit gracefully when user indicates completion - ---- - -## MODERATION NOTES - -**Quality Control:** - -- If discussion becomes circular, have bmad-master summarize and redirect -- Balance fun and productivity based on conversation tone -- Ensure all agents stay true to their merged personalities -- Exit gracefully when user indicates completion - -**Conversation Management:** - -- Rotate agent participation to ensure inclusive discussion -- Handle topic drift while maintaining productive conversation -- Facilitate cross-agent collaboration and knowledge sharing From 4b1026b2524a55d78bfe2d8743a7209274baa157 Mon Sep 17 00:00:00 2001 From: PinkyD Date: Sun, 29 Mar 2026 09:25:56 -0700 Subject: [PATCH 13/26] fix(party-mode): clarify solo mode and improve response presentation (#2164) * clear up contradiction and config mispath * fix(party-mode): clarify solo mode behavior and improve response presentation rules Co-Authored-By: Claude Sonnet 4.6 --------- Co-authored-by: Claude Sonnet 4.6 --- src/core-skills/bmad-party-mode/SKILL.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/core-skills/bmad-party-mode/SKILL.md b/src/core-skills/bmad-party-mode/SKILL.md index 4633d66c8..b6b99ed5e 100644 --- a/src/core-skills/bmad-party-mode/SKILL.md +++ b/src/core-skills/bmad-party-mode/SKILL.md @@ -5,7 +5,7 @@ description: 'Orchestrates group discussions between installed BMAD agents, enab # Party Mode -Facilitate roundtable discussions where BMAD agents participate as **real subagents** — each spawned independently via the Agent tool so they think for themselves. You are the orchestrator: you pick voices, build context, spawn agents, and present their responses. You never generate agent responses yourself. +Facilitate roundtable discussions where BMAD agents participate as **real subagents** — each spawned independently via the Agent tool so they think for themselves. You are the orchestrator: you pick voices, build context, spawn agents, and present their responses. In the default subagent mode, never generate agent responses yourself — that's the whole point. In `--solo` mode, you roleplay all agents directly. ## Why This Matters @@ -22,7 +22,7 @@ Party mode accepts optional arguments when invoked: 1. **Parse arguments** — check for `--model` and `--solo` flags from the user's invocation. -2. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: +2. Load config from `{project-root}/_bmad/core/config.yaml` and resolve: - Use `{user_name}` for greeting - Use `{communication_language}` for all communications @@ -88,9 +88,11 @@ You are {displayName} ({title}), a BMAD agent in a collaborative roundtable disc ### 3. Present Responses -Collect all agent responses and present them to the user as-is. Don't summarize, edit, or reorder them. If an agent's response is particularly brief or says they have nothing to add, that's fine — include it anyway so the user sees the full picture. +Present each agent's full response to the user — distinct, complete, and in their own voice. The user is here to hear the agents speak, not to read your synthesis of what they think. Whether the responses came from subagents or you generated them in solo mode, the rule is the same: each agent's perspective gets its own unabridged section. Never blend, paraphrase, or condense agent responses into a summary. -After presenting, you can optionally add a brief orchestrator note if it would help — like flagging a clear disagreement worth exploring, or noting an agent whose perspective might be relevant but wasn't included this round. +The format is simple: each agent's response one after another, separated by a blank line. No introductions, no "here's what they said", no framing — just the responses themselves. + +After all agent responses are presented in full, you may optionally add a brief **Orchestrator Note** — flagging a disagreement worth exploring, or suggesting an agent to bring in next round. Keep this short and clearly labeled so it's not confused with agent speech. ### 4. Handle Follow-ups From 3980e578855ffdc1687dc140e5d39c4885f5a2c1 Mon Sep 17 00:00:00 2001 From: Alex Verkhovsky Date: Sun, 29 Mar 2026 14:55:09 -0600 Subject: [PATCH 14/26] feat(quick-dev): one-shot route generates spec trace file (#2121) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(quick-dev): generate spec trace file for one-shot route One-shot changes now leave a lightweight spec file with frontmatter, intent summary, and suggested review order — eliminating numbering gaps when quick-dev is used as the primary dev loop. Co-Authored-By: Claude Opus 4.6 (1M context) * refactor(quick-dev): reference spec template instead of inlining structure Co-Authored-By: Claude Opus 4.6 (1M context) * refactor(quick-dev): deduplicate slug derivation and clarify title variable Extract shared slug derivation logic above the route fork in step-01 so both one-shot and plan-code-review routes use a single instruction block. Add explicit title variable assignment in step-oneshot before it is referenced in the Generate Spec Trace section. --------- Co-authored-by: Claude Opus 4.6 (1M context) --- .../step-01-clarify-and-route.md | 6 ++++-- .../bmad-quick-dev/step-oneshot.md | 21 +++++++++++++++---- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/bmm-skills/4-implementation/bmad-quick-dev/step-01-clarify-and-route.md b/src/bmm-skills/4-implementation/bmad-quick-dev/step-01-clarify-and-route.md index 5563dfcad..5f802c960 100644 --- a/src/bmm-skills/4-implementation/bmad-quick-dev/step-01-clarify-and-route.md +++ b/src/bmm-skills/4-implementation/bmad-quick-dev/step-01-clarify-and-route.md @@ -1,7 +1,7 @@ --- wipFile: '{implementation_artifacts}/spec-wip.md' deferred_work_file: '{implementation_artifacts}/deferred-work.md' -spec_file: '' # set at runtime for plan-code-review before leaving this step +spec_file: '' # set at runtime for both routes before leaving this step --- # Step 1: Clarify and Route @@ -52,11 +52,13 @@ Never ask extra questions if you already understand what the user intends. - On **K**: Proceed as-is. 5. Route — choose exactly one: + Derive a valid kebab-case slug from the clarified intent. If the intent references a tracking identifier (story number, issue number, ticket ID), lead the slug with it (e.g. `3-2-digest-delivery`, `gh-47-fix-auth`). If `{implementation_artifacts}/spec-{slug}.md` already exists, append `-2`, `-3`, etc. Set `spec_file` = `{implementation_artifacts}/spec-{slug}.md`. + **a) One-shot** — zero blast radius: no plausible path by which this change causes unintended consequences elsewhere. Clear intent, no architectural decisions. + **EARLY EXIT** → `./step-oneshot.md` **b) Plan-code-review** — everything else. When uncertain whether blast radius is truly zero, choose this path. - 1. Derive a valid kebab-case slug from the clarified intent. If the intent references a tracking identifier (story number, issue number, ticket ID), lead the slug with it (e.g. `3-2-digest-delivery`, `gh-47-fix-auth`). If `{implementation_artifacts}/spec-{slug}.md` already exists, append `-2`, `-3`, etc. Set `spec_file` = `{implementation_artifacts}/spec-{slug}.md`. ## NEXT diff --git a/src/bmm-skills/4-implementation/bmad-quick-dev/step-oneshot.md b/src/bmm-skills/4-implementation/bmad-quick-dev/step-oneshot.md index da8a0e256..b6384159a 100644 --- a/src/bmm-skills/4-implementation/bmad-quick-dev/step-oneshot.md +++ b/src/bmm-skills/4-implementation/bmad-quick-dev/step-oneshot.md @@ -1,5 +1,6 @@ --- deferred_work_file: '{implementation_artifacts}/deferred-work.md' +spec_file: '' # set by step-01 before entering this step --- # Step One-Shot: Implement, Review, Present @@ -29,19 +30,31 @@ Deduplicate all review findings. Three categories only: If a finding is caused by this change but too significant for a trivial patch, HALT and present it to the human for decision before proceeding. +### Generate Spec Trace + +Set `{title}` = a concise title derived from the clarified intent. + +Write `{spec_file}` using `./spec-template.md`. Fill only these sections — delete all others: + +1. **Frontmatter** — set `title: '{title}'`, `type`, `created`, `status: 'done'`. Add `route: 'one-shot'`. +2. **Title and Intent** — `# {title}` heading and `## Intent` with **Problem** and **Approach** lines. Reuse the summary you already generated for the terminal. +3. **Suggested Review Order** — append after Intent. Build using the same convention as `./step-05-present.md` § "Generate Suggested Review Order" (spec-file-relative links, concern-based ordering, ultra-concise framing). + ### Commit If version control is available and the tree is dirty, create a local commit with a conventional message derived from the intent. If VCS is unavailable, skip. ### Present -1. Open all changed files in the user's editor so they can review the code directly: - - Resolve two sets of absolute paths: (1) the repository root (`git rev-parse --show-toplevel` — returns the worktree root when in a worktree, project root otherwise; if this fails, fall back to the current working directory), (2) each changed file. Run `code -r "{absolute-root}" ` — the root first so VS Code opens in the right context, then each changed file. Always double-quote paths to handle spaces and special characters. - - If `code` is not available (command fails), skip gracefully and list the file paths instead. +1. Open the spec in the user's editor so they can click through the Suggested Review Order: + - Resolve two absolute paths: (1) the repository root (`git rev-parse --show-toplevel` — returns the worktree root when in a worktree, project root otherwise; if this fails, fall back to the current working directory), (2) `{spec_file}`. Run `code -r "{absolute-root}" "{absolute-spec-file}"` — the root first so VS Code opens in the right context, then the spec file. Always double-quote paths to handle spaces and special characters. + - If `code` is not available (command fails), skip gracefully and tell the user the spec file path instead. 2. Display a summary in conversation output, including: - The commit hash (if one was created). - - List of files changed with one-line descriptions. Use CWD-relative paths with `:line` notation (e.g., `src/path/file.ts:42`) for terminal clickability. No leading `/`. + - List of files changed with one-line descriptions. Any file paths shown in conversation/terminal output must use CWD-relative format (no leading `/`) with `:line` notation (e.g., `src/path/file.ts:42`) for terminal clickability — this differs from spec-file links which use spec-file-relative paths. - Review findings breakdown: patches applied, items deferred, items rejected. If all findings were rejected, say so. + - A note that the spec is open in their editor (or the file path if it couldn't be opened). Mention that `{spec_file}` now contains a Suggested Review Order. + - **Navigation tip:** "Ctrl+click (Cmd+click on macOS) the links in the Suggested Review Order to jump to each stop." 3. Offer to push and/or create a pull request. HALT and wait for human input. From 2302d9cdc56caded1b3f16e43735721f6c3359be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Ats=C3=A9?= Date: Sun, 29 Mar 2026 23:01:09 +0200 Subject: [PATCH 15/26] docs(fr): translate output folder path resolution section (#2140) Syncs French translation with commit 1040c3c (fix: correctly resolve output_folder paths outside project root #2132). Co-authored-by: Brian --- docs/fr/how-to/non-interactive-installation.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/fr/how-to/non-interactive-installation.md b/docs/fr/how-to/non-interactive-installation.md index 0fe6588f9..ee6ddad1c 100644 --- a/docs/fr/how-to/non-interactive-installation.md +++ b/docs/fr/how-to/non-interactive-installation.md @@ -37,7 +37,19 @@ Nécessite [Node.js](https://nodejs.org) v20+ et `npx` (inclus avec npm). | `--user-name ` | Nom à utiliser par les agents | Nom d'utilisateur système | | `--communication-language ` | Langue de communication des agents | Anglais | | `--document-output-language ` | Langue de sortie des documents | Anglais | -| `--output-folder ` | Chemin du dossier de sortie | _bmad-output | +| `--output-folder ` | Chemin du dossier de sortie (voir les règles de résolution ci-dessous) | `_bmad-output` | + +#### Résolution du chemin du dossier de sortie + +La valeur passée à `--output-folder` (ou saisie de manière interactive) est résolue selon ces règles : + +| Type d'entrée | Exemple | Résolu comme | +|-------------------------------|----------------------------|--------------------------------------------------------------| +| Chemin relatif (par défaut) | `_bmad-output` | `/_bmad-output` | +| Chemin relatif avec traversée | `../../shared-outputs` | Chemin absolu normalisé — ex. `/Users/me/shared-outputs` | +| Chemin absolu | `/Users/me/shared-outputs` | Utilisé tel quel — la racine du projet n'est **pas** ajoutée | + +Le chemin résolu est ce que les agents et les workflows vont utiliser lors de l'écriture des fichiers de sortie. L'utilisation d'un chemin absolu ou d'un chemin relatif avec traversée vous permet de diriger tous les artefacts générés vers un répertoire en dehors de l'arborescence de votre projet — utile pour les configurations partagées ou les monorepos. ### Autres options @@ -141,6 +153,7 @@ Les valeurs invalides entraîneront soit : :::tip[Bonnes pratiques] - Utilisez des chemins absolus pour `--directory` pour éviter toute ambiguïté +- Utilisez un chemin absolu pour `--output-folder` lorsque vous souhaitez que les artefacts soient écrits en dehors de l'arborescence du projet (ex. un répertoire de sorties partagé dans un monorepo) - Testez les options localement avant de les utiliser dans des pipelines CI/CD - Combinez avec `-y` pour des installations vraiment sans surveillance - Utilisez `--debug` si vous rencontrez des problèmes lors de l'installation From 1f99eb0496cac6207dea35240a24dc1bde717bc7 Mon Sep 17 00:00:00 2001 From: Taras Romaniv Date: Tue, 31 Mar 2026 02:49:05 +0200 Subject: [PATCH 16/26] fix: preserve local custom module sources during quick update (#2172) * fix: preserve local custom module sources during quick update Keep customModules in the generated main manifest so local custom module source paths survive update runs. Load those preserved source paths during stock quick update before falling back to the custom cache directory. This fixes the case where BMAD would drop customModules, lose the original source path for a local module, and then skip the module or try to re-cache from _bmad/_config/custom/, which could fail with ENOENT after the cache directory was removed. Also adds an installation component regression test to verify customModules and sourcePath are preserved in manifest generation. Fixes #1582 * fix: ensure consistent formatting * refactor: extract quick update custom source assembly Move quick-update custom module source collection out of Installer and into CustomModules as assembleQuickUpdateSources(). This keeps discoverPaths() focused on consuming prepared install inputs while making the quick-update source assembly step explicit and easier to evolve. Also: - preserve customModules metadata in manifest regeneration for installed modules - drop stale customModules entries when modules are no longer installed - cover manifest preservation and manifest-backed quick-update sources in tests --- test/test-installation-components.js | 153 +++++++++++++++++++++ tools/installer/core/installer.js | 59 +------- tools/installer/core/manifest-generator.js | 9 ++ tools/installer/modules/custom-modules.js | 105 ++++++++++++++ 4 files changed, 273 insertions(+), 53 deletions(-) diff --git a/test/test-installation-components.js b/test/test-installation-components.js index 4e5fa7282..b548cbabe 100644 --- a/test/test-installation-components.js +++ b/test/test-installation-components.js @@ -14,7 +14,9 @@ const path = require('node:path'); const os = require('node:os'); const fs = require('fs-extra'); +const { Installer } = require('../tools/installer/core/installer'); const { ManifestGenerator } = require('../tools/installer/core/manifest-generator'); +const { OfficialModules } = require('../tools/installer/modules/official-modules'); const { IdeManager } = require('../tools/installer/ide/manager'); const { clearCache, loadPlatformCodes } = require('../tools/installer/ide/platform-codes'); @@ -126,6 +128,56 @@ async function createSkillCollisionFixture() { return { root: fixtureRoot, bmadDir: fixtureDir }; } +async function createCustomModuleManifestFixture() { + const fixtureRoot = await fs.mkdtemp(path.join(os.tmpdir(), 'bmad-custom-manifest-')); + const bmadDir = path.join(fixtureRoot, '_bmad'); + const configDir = path.join(bmadDir, '_config'); + const moduleSourceDir = path.join(fixtureRoot, 'test-module-source'); + await fs.ensureDir(configDir); + await fs.ensureDir(moduleSourceDir); + + const minimalAgent = 'p'; + await fs.ensureDir(path.join(bmadDir, 'core', 'agents')); + await fs.writeFile(path.join(bmadDir, 'core', 'agents', 'test.md'), minimalAgent); + await fs.ensureDir(path.join(bmadDir, 'test-module', 'agents')); + await fs.writeFile(path.join(bmadDir, 'test-module', 'agents', 'test.md'), minimalAgent); + await fs.writeFile(path.join(moduleSourceDir, 'module.yaml'), ['code: test-module', 'name: Test Module', ''].join('\n')); + + await fs.writeFile( + path.join(configDir, 'manifest.yaml'), + [ + 'installation:', + ' version: 6.2.2', + ' installDate: 2026-03-30T00:00:00.000Z', + ' lastUpdated: 2026-03-30T00:00:00.000Z', + 'modules:', + ' - name: core', + ' version: 6.2.2', + ' installDate: 2026-03-30T00:00:00.000Z', + ' lastUpdated: 2026-03-30T00:00:00.000Z', + ' source: built-in', + ' npmPackage: null', + ' repoUrl: null', + ' - name: test-module', + ' version: null', + ' installDate: 2026-03-30T00:00:00.000Z', + ' lastUpdated: 2026-03-30T00:00:00.000Z', + ' source: custom', + ' npmPackage: null', + ' repoUrl: null', + 'customModules:', + ' - id: test-module', + ' name: "Test Module"', + ` sourcePath: ${JSON.stringify(moduleSourceDir)}`, + 'ides:', + ' - codex', + '', + ].join('\n'), + ); + + return { root: fixtureRoot, bmadDir, manifestPath: path.join(configDir, 'manifest.yaml'), moduleSourceDir }; +} + /** * Test Suite */ @@ -1713,6 +1765,107 @@ async function runTests() { console.log(''); + // ============================================================ + // Suite 33: Main manifest preserves active customModules only + // ============================================================ + console.log(`${colors.yellow}Test Suite 33: Preserve active customModules in main manifest${colors.reset}\n`); + + let customManifestFixture = null; + try { + customManifestFixture = await createCustomModuleManifestFixture(); + const yaml = require('yaml'); + const originalManifest = yaml.parse(await fs.readFile(customManifestFixture.manifestPath, 'utf8')); + originalManifest.customModules.push({ + id: 'removed-module', + name: 'Removed Module', + sourcePath: path.join(customManifestFixture.root, 'removed-module-source'), + }); + await fs.writeFile(customManifestFixture.manifestPath, yaml.stringify(originalManifest), 'utf8'); + + const generator33 = new ManifestGenerator(); + await generator33.generateManifests(customManifestFixture.bmadDir, ['core', 'test-module'], [], { ides: ['codex'] }); + + const updatedManifest = yaml.parse(await fs.readFile(customManifestFixture.manifestPath, 'utf8')); + const customModule = updatedManifest.customModules?.find((entry) => entry.id === 'test-module'); + + assert(Array.isArray(updatedManifest.customModules), 'Main manifest keeps customModules array'); + assert(customModule !== undefined, 'Main manifest preserves existing custom module entry'); + assert( + customModule && customModule.sourcePath === customManifestFixture.moduleSourceDir, + 'Main manifest preserves custom module sourcePath', + ); + assert( + !updatedManifest.customModules?.some((entry) => entry.id === 'removed-module'), + 'Main manifest drops stale custom module entries', + ); + } catch (error) { + assert(false, 'Main manifest preserves customModules test succeeds', error.message); + } finally { + if (customManifestFixture?.root) await fs.remove(customManifestFixture.root).catch(() => {}); + } + + console.log(''); + + // ============================================================ + // Suite 34: Quick update uses manifest-backed custom sources + // ============================================================ + console.log(`${colors.yellow}Test Suite 34: Quick update uses manifest-backed custom module sources${colors.reset}\n`); + + let quickUpdateFixture = null; + const originalListAvailable34 = OfficialModules.prototype.listAvailable; + const originalLoadExistingConfig34 = OfficialModules.prototype.loadExistingConfig; + const originalCollectModuleConfigQuick34 = OfficialModules.prototype.collectModuleConfigQuick; + try { + quickUpdateFixture = await createCustomModuleManifestFixture(); + const installer34 = new Installer(); + installer34.externalModuleManager.hasModule = async () => false; + installer34.externalModuleManager.listAvailable = async () => []; + + let capturedInstallConfig34 = null; + installer34.install = async (config) => { + capturedInstallConfig34 = config; + return { success: true }; + }; + + OfficialModules.prototype.listAvailable = async function () { + return { modules: [], customModules: [] }; + }; + OfficialModules.prototype.loadExistingConfig = async function () { + this.collectedConfig = this.collectedConfig || {}; + }; + OfficialModules.prototype.collectModuleConfigQuick = async function (moduleName) { + this.collectedConfig = this.collectedConfig || {}; + if (!this.collectedConfig[moduleName]) { + this.collectedConfig[moduleName] = {}; + } + return false; + }; + + await installer34.quickUpdate({ + directory: quickUpdateFixture.root, + skipPrompts: true, + }); + + const customModule34 = capturedInstallConfig34?._customModuleSources?.get('test-module'); + + assert(capturedInstallConfig34 !== null, 'Quick update forwards config to install'); + assert(customModule34 !== undefined, 'Quick update keeps manifest-backed custom module updateable'); + assert(customModule34 && customModule34.cached === false, 'Quick update uses manifest-backed source before cache'); + assert( + customModule34 && customModule34.sourcePath === quickUpdateFixture.moduleSourceDir, + 'Quick update uses preserved manifest sourcePath for custom modules', + ); + } catch (error) { + assert(false, 'Quick update manifest-backed custom source test succeeds', error.message); + } finally { + OfficialModules.prototype.listAvailable = originalListAvailable34; + OfficialModules.prototype.loadExistingConfig = originalLoadExistingConfig34; + OfficialModules.prototype.collectModuleConfigQuick = originalCollectModuleConfigQuick34; + if (quickUpdateFixture?.root) await fs.remove(quickUpdateFixture.root).catch(() => {}); + } + + console.log(''); + // ============================================================ // Summary // ============================================================ diff --git a/tools/installer/core/installer.js b/tools/installer/core/installer.js index 111c88b54..a0ea9a66e 100644 --- a/tools/installer/core/installer.js +++ b/tools/installer/core/installer.js @@ -1144,59 +1144,12 @@ class Installer { const configuredIdes = existingInstall.ides; const projectRoot = path.dirname(bmadDir); - // Get custom module sources: first from --custom-content (re-cache from source), then from cache - const customModuleSources = new Map(); - if (config.customContent?.sources?.length > 0) { - for (const source of config.customContent.sources) { - if (source.id && source.path && (await fs.pathExists(source.path))) { - customModuleSources.set(source.id, { - id: source.id, - name: source.name || source.id, - sourcePath: source.path, - cached: false, // From CLI, will be re-cached - }); - } - } - } - const cacheDir = path.join(bmadDir, '_config', 'custom'); - if (await fs.pathExists(cacheDir)) { - const cachedModules = await fs.readdir(cacheDir, { withFileTypes: true }); - - for (const cachedModule of cachedModules) { - const moduleId = cachedModule.name; - const cachedPath = path.join(cacheDir, moduleId); - - // Skip if path doesn't exist (broken symlink, deleted dir) - avoids lstat ENOENT - if (!(await fs.pathExists(cachedPath))) { - continue; - } - if (!cachedModule.isDirectory()) { - continue; - } - - // Skip if we already have this module from manifest - if (customModuleSources.has(moduleId)) { - continue; - } - - // Check if this is an external official module - skip cache for those - const isExternal = await this.externalModuleManager.hasModule(moduleId); - if (isExternal) { - continue; - } - - // Check if this is actually a custom module (has module.yaml) - const moduleYamlPath = path.join(cachedPath, 'module.yaml'); - if (await fs.pathExists(moduleYamlPath)) { - customModuleSources.set(moduleId, { - id: moduleId, - name: moduleId, - sourcePath: cachedPath, - cached: true, - }); - } - } - } + const customModuleSources = await this.customModules.assembleQuickUpdateSources( + config, + existingInstall, + bmadDir, + this.externalModuleManager, + ); // Get available modules (what we have source for) const availableModulesData = await new OfficialModules().listAvailable(); diff --git a/tools/installer/core/manifest-generator.js b/tools/installer/core/manifest-generator.js index 65e0f4ed3..bef6f2d23 100644 --- a/tools/installer/core/manifest-generator.js +++ b/tools/installer/core/manifest-generator.js @@ -377,10 +377,12 @@ class ManifestGenerator { */ async writeMainManifest(cfgDir) { const manifestPath = path.join(cfgDir, 'manifest.yaml'); + const installedModuleSet = new Set(this.modules); // Read existing manifest to preserve install date let existingInstallDate = null; const existingModulesMap = new Map(); + let existingCustomModules = []; if (await fs.pathExists(manifestPath)) { try { @@ -402,6 +404,12 @@ class ManifestGenerator { } } } + + if (existingManifest.customModules && Array.isArray(existingManifest.customModules)) { + // We filter here so manifest regeneration preserves source metadata only for custom modules that + // are still installed. Without that, customModules can retain stale entries for modules that were removed. + existingCustomModules = existingManifest.customModules.filter((customModule) => installedModuleSet.has(customModule?.id)); + } } catch { // If we can't read existing manifest, continue with defaults } @@ -437,6 +445,7 @@ class ManifestGenerator { lastUpdated: new Date().toISOString(), }, modules: updatedModules, + customModules: existingCustomModules, ides: this.selectedIdes, }; diff --git a/tools/installer/modules/custom-modules.js b/tools/installer/modules/custom-modules.js index b41bf47b1..3f8b793be 100644 --- a/tools/installer/modules/custom-modules.js +++ b/tools/installer/modules/custom-modules.js @@ -192,6 +192,111 @@ class CustomModules { return this.paths; } + + /** + * Assemble quick-update source candidates before install() hands them to discoverPaths(). + * This exists because discoverPaths() consumes already-prepared quick-update sources, + * while quickUpdate() still has to build that source map from manifest, explicit inputs, + * and cache conventions. + * Precedence: manifest-backed paths, explicit sources override them, then cached modules. + * @param {Object} config - Quick update configuration + * @param {Object} existingInstall - Existing installation snapshot + * @param {string} bmadDir - BMAD directory + * @param {Object} externalModuleManager - External module manager + * @returns {Promise>} Map of custom module ID to source info + */ + async assembleQuickUpdateSources(config, existingInstall, bmadDir, externalModuleManager) { + const projectRoot = path.dirname(bmadDir); + const customModuleSources = new Map(); + + if (existingInstall.customModules) { + for (const customModule of existingInstall.customModules) { + // Skip if no ID - can't reliably track or re-cache without it + if (!customModule?.id) continue; + + let sourcePath = customModule.sourcePath; + if (sourcePath && sourcePath.startsWith('_config')) { + // Paths are relative to BMAD dir, but we want absolute paths for install + sourcePath = path.join(bmadDir, sourcePath); + } else if (!sourcePath && customModule.relativePath) { + // Fall back to relativePath + sourcePath = path.resolve(projectRoot, customModule.relativePath); + } else if (sourcePath && !path.isAbsolute(sourcePath)) { + // If we have a sourcePath but it's not absolute, resolve it relative to project root + sourcePath = path.resolve(projectRoot, sourcePath); + } + + // If we still don't have a valid source path, skip this module + if (!sourcePath || !(await fs.pathExists(sourcePath))) { + continue; + } + + customModuleSources.set(customModule.id, { + id: customModule.id, + name: customModule.name || customModule.id, + sourcePath, + relativePath: customModule.relativePath, + cached: false, + }); + } + } + + if (config.customContent?.sources?.length > 0) { + for (const source of config.customContent.sources) { + if (source.id && source.path) { + customModuleSources.set(source.id, { + id: source.id, + name: source.name || source.id, + sourcePath: source.path, + cached: false, // From CLI, will be re-cached + }); + } + } + } + + const cacheDir = path.join(bmadDir, '_config', 'custom'); + if (!(await fs.pathExists(cacheDir))) { + return customModuleSources; + } + + const cachedModules = await fs.readdir(cacheDir, { withFileTypes: true }); + for (const cachedModule of cachedModules) { + const moduleId = cachedModule.name; + const cachedPath = path.join(cacheDir, moduleId); + + // Skip if path doesn't exist (broken symlink, deleted dir) - avoids lstat ENOENT + if (!(await fs.pathExists(cachedPath))) { + continue; + } + if (!cachedModule.isDirectory()) { + continue; + } + + // Skip if we already have this module from manifest + if (customModuleSources.has(moduleId)) { + continue; + } + + // Check if this is an external official module - skip cache for those + const isExternal = await externalModuleManager.hasModule(moduleId); + if (isExternal) { + continue; + } + + // Check if this is actually a custom module (has module.yaml) + const moduleYamlPath = path.join(cachedPath, 'module.yaml'); + if (await fs.pathExists(moduleYamlPath)) { + customModuleSources.set(moduleId, { + id: moduleId, + name: moduleId, + sourcePath: cachedPath, + cached: true, + }); + } + } + + return customModuleSources; + } } module.exports = { CustomModules }; From 2c5436f67291235321955e3daa443e479cffd01e Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 1 Apr 2026 01:12:40 -0500 Subject: [PATCH 17/26] style: update docs theme to match bmadcode.com Ghost blog (#2176) Replace purple/electric blue accent with Ghost blog design tokens: - Background #0a0a0a, surface #1a1a1a, borders #262626 - Accent blue #3b82f6, text #fafafa/#a1a1a1/#666666 - Inter body, Space Grotesk headings, JetBrains Mono code - Remove logo images, use text title --- website/astro.config.mjs | 6 -- website/src/components/Banner.astro | 13 +-- website/src/styles/custom.css | 121 ++++++++++++++++------------ 3 files changed, 76 insertions(+), 64 deletions(-) diff --git a/website/astro.config.mjs b/website/astro.config.mjs index 9d7efd99e..1ec2cb310 100644 --- a/website/astro.config.mjs +++ b/website/astro.config.mjs @@ -50,12 +50,6 @@ export default defineConfig({ defaultLocale: 'root', locales, - logo: { - light: './public/img/bmad-light.png', - dark: './public/img/bmad-dark.png', - alt: 'BMAD Method', - replacesTitle: true, - }, favicon: '/favicon.ico', // Social links diff --git a/website/src/components/Banner.astro b/website/src/components/Banner.astro index 00944d669..2b607f621 100644 --- a/website/src/components/Banner.astro +++ b/website/src/components/Banner.astro @@ -12,16 +12,16 @@ const llmsFullUrl = `${getSiteUrl()}/llms-full.txt`; .ai-banner { width: 100%; height: var(--ai-banner-height, 2.75rem); - background: #334155; - color: #cbd5e1; + background: #1a1a1a; + color: #a1a1a1; padding: 0.5rem 1rem; font-size: 0.875rem; - border-bottom: 1px solid rgba(140, 140, 255, 0.15); + border-bottom: 1px solid #262626; display: flex; align-items: center; justify-content: center; box-sizing: border-box; - font-family: system-ui, sans-serif; + font-family: 'Inter', system-ui, sans-serif; } /* Truncate text on narrow screens */ @@ -32,15 +32,16 @@ const llmsFullUrl = `${getSiteUrl()}/llms-full.txt`; max-width: 100%; } .ai-banner a { - color: #B9B9FF; + color: #3b82f6; text-decoration: none; font-weight: 600; } .ai-banner a:hover { + color: #fafafa; text-decoration: underline; } .ai-banner a:focus-visible { - outline: 2px solid #B9B9FF; + outline: 2px solid #3b82f6; outline-offset: 2px; border-radius: 2px; } diff --git a/website/src/styles/custom.css b/website/src/styles/custom.css index 3c1c6d742..6ab5b2ee5 100644 --- a/website/src/styles/custom.css +++ b/website/src/styles/custom.css @@ -1,14 +1,15 @@ /** * BMAD Method Documentation - Custom Styles for Starlight - * Electric Blue theme optimized for dark mode + * Dark theme matching bmadcode.com Ghost blog * - * CSS Variable Mapping: - * Docusaurus → Starlight - * --ifm-color-primary → --sl-color-accent - * --ifm-background-color → --sl-color-bg - * --ifm-font-color-base → --sl-color-text + * Design tokens from Ghost theme: + * Background: #0a0a0a | Surface: #1a1a1a | Border: #262626 + * Accent: #3b82f6 | Gold: #d4a853 | Text: #fafafa/#a1a1a1/#666666 */ +/* Google Fonts - match Ghost blog typography */ +@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@400;500&display=swap'); + /* ============================================ COLOR PALETTE - Light Mode ============================================ */ @@ -19,10 +20,10 @@ /* Full-width content - override Starlight's default 45rem/67.5rem */ --sl-content-width: 65rem; - /* Primary accent colors - purple to match Docusaurus */ - --sl-color-accent-low: #e0e0ff; - --sl-color-accent: #5E5ED0; - --sl-color-accent-high: #3333CC; + /* Primary accent colors - blue to match Ghost blog */ + --sl-color-accent-low: #dbeafe; + --sl-color-accent: #2563eb; + --sl-color-accent-high: #1d4ed8; /* Text colors */ --sl-color-white: #1e293b; @@ -35,13 +36,14 @@ --sl-color-black: #f8fafc; /* Font settings */ - --sl-font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', + --sl-font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; + --sl-font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace; --sl-text-base: 1rem; --sl-line-height: 1.7; /* Code highlighting */ - --sl-color-bg-inline-code: rgba(94, 94, 208, 0.1); + --sl-color-bg-inline-code: rgba(59, 130, 246, 0.08); } /* ============================================ @@ -51,35 +53,49 @@ /* Full-width content - override Starlight's default */ --sl-content-width: 65rem; - /* Primary accent colors - purple to match Docusaurus */ - --sl-color-accent-low: #2a2a5a; - --sl-color-accent: #8C8CFF; - --sl-color-accent-high: #B9B9FF; + /* Primary accent colors - blue to match Ghost blog */ + --sl-color-accent-low: rgba(59, 130, 246, 0.12); + --sl-color-accent: #3b82f6; + --sl-color-accent-high: #60a5fa; - /* Background colors */ - --sl-color-bg: #1b1b1d; - --sl-color-bg-nav: #1b1b1d; - --sl-color-bg-sidebar: #1b1b1d; - --sl-color-hairline-light: rgba(140, 140, 255, 0.1); - --sl-color-hairline: rgba(140, 140, 255, 0.15); + /* Background colors - match Ghost blog */ + --sl-color-bg: #0a0a0a; + --sl-color-bg-nav: #0a0a0a; + --sl-color-bg-sidebar: #0a0a0a; + --sl-color-hairline-light: rgba(255, 255, 255, 0.06); + --sl-color-hairline: #262626; - /* Text colors */ - --sl-color-white: #f8fafc; + /* Text colors - match Ghost blog */ + --sl-color-white: #fafafa; --sl-color-gray-1: #e2e8f0; - --sl-color-gray-2: #cbd5e1; + --sl-color-gray-2: #a1a1a1; --sl-color-gray-3: #94a3b8; - --sl-color-gray-4: #64748b; + --sl-color-gray-4: #666666; --sl-color-gray-5: #475569; - --sl-color-gray-6: #334155; - --sl-color-black: #1b1b1d; + --sl-color-gray-6: #262626; + --sl-color-black: #0a0a0a; /* Code highlighting */ - --sl-color-bg-inline-code: rgba(140, 140, 255, 0.15); + --sl-color-bg-inline-code: rgba(59, 130, 246, 0.15); } /* ============================================ TYPOGRAPHY ============================================ */ + +/* Space Grotesk for all headings - match Ghost blog */ +.sl-markdown-content h1, +.sl-markdown-content h2, +.sl-markdown-content h3, +.sl-markdown-content h4, +.sl-markdown-content h5, +.sl-markdown-content h6, +.site-title, +starlight-toc h2 { + font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif; + letter-spacing: -0.02em; +} + .sl-markdown-content h1 { margin-bottom: 1.5rem; } @@ -138,14 +154,14 @@ /* Active state - thin left accent bar */ .sidebar-content a[aria-current='page'] { - background-color: rgba(94, 94, 208, 0.08); + background-color: rgba(59, 130, 246, 0.08); color: var(--sl-color-accent); border-left-color: var(--sl-color-accent); font-weight: 600; } :root[data-theme='dark'] .sidebar-content a[aria-current='page'] { - background-color: rgba(140, 140, 255, 0.1); + background-color: rgba(59, 130, 246, 0.1); color: var(--sl-color-accent-high); border-left-color: var(--sl-color-accent); } @@ -232,7 +248,8 @@ header.header .header.sl-flex { } :root[data-theme='dark'] header.header { - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); + box-shadow: none; + border-bottom: 1px solid #262626; } .site-title { @@ -281,20 +298,20 @@ header.header .header.sl-flex { .card:hover { transform: translateY(-3px); border-color: var(--sl-color-accent); - box-shadow: 0 8px 24px rgba(94, 94, 208, 0.15); + box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15); } :root[data-theme='dark'] .card { - background: linear-gradient(145deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8)); - border-color: rgba(140, 140, 255, 0.2); + background: #1a1a1a; + border-color: #262626; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); } :root[data-theme='dark'] .card:hover { - border-color: rgba(140, 140, 255, 0.5); + border-color: #3b82f6; box-shadow: - 0 8px 32px rgba(140, 140, 255, 0.2), - 0 0 0 1px rgba(140, 140, 255, 0.1); + 0 8px 32px rgba(59, 130, 246, 0.15), + 0 0 0 1px rgba(59, 130, 246, 0.1); } /* Starlight card grid */ @@ -313,11 +330,11 @@ header.header .header.sl-flex { } :root[data-theme='dark'] .sl-link-card { - border-color: rgba(140, 140, 255, 0.2); + border-color: #262626; } :root[data-theme='dark'] .sl-link-card:hover { - border-color: rgba(140, 140, 255, 0.5); + border-color: #3b82f6; } /* ============================================ @@ -372,21 +389,21 @@ table { } :root[data-theme='dark'] table { - border-color: rgba(140, 140, 255, 0.1); + border-color: #262626; } :root[data-theme='dark'] table th { - background-color: rgba(140, 140, 255, 0.05); + background-color: rgba(59, 130, 246, 0.05); } :root[data-theme='dark'] table tr:nth-child(2n) { - background-color: rgba(140, 140, 255, 0.02); + background-color: rgba(255, 255, 255, 0.02); } /* Blockquotes */ blockquote { border-left-color: var(--sl-color-accent); - background-color: rgba(94, 94, 208, 0.05); + background-color: rgba(59, 130, 246, 0.05); border-radius: 0 8px 8px 0; padding: 1rem 1.25rem; } @@ -423,19 +440,19 @@ blockquote { /* Note aside */ .starlight-aside--note { - background-color: rgba(94, 94, 208, 0.08); + background-color: rgba(59, 130, 246, 0.08); } .starlight-aside--note .starlight-aside__title { - color: #5C5CCC; + color: #2563eb; } :root[data-theme='dark'] .starlight-aside--note { - background-color: rgba(140, 140, 255, 0.12); + background-color: rgba(59, 130, 246, 0.12); } :root[data-theme='dark'] .starlight-aside--note .starlight-aside__title { - color: #8C8CFF; + color: #3b82f6; } /* Caution aside */ @@ -512,7 +529,7 @@ blockquote { ROADMAP STYLES ============================================ */ .roadmap-container { - --color-planned: #6366f1; + --color-planned: #3b82f6; --color-in-progress: #10b981; --color-exploring: #f59e0b; --color-bg-card: rgba(255, 255, 255, 0.03); @@ -663,8 +680,8 @@ blockquote { } .roadmap-badge.planned { - background: rgba(99, 102, 241, 0.15); - color: #6366f1; + background: rgba(59, 130, 246, 0.15); + color: #3b82f6; } .roadmap-badge.exploring { @@ -735,7 +752,7 @@ blockquote { .roadmap-future-card { padding: 1.5rem; border-radius: 12px; - background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(245, 158, 11, 0.05)); + background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(212, 168, 83, 0.05)); border: 1px solid var(--color-border); transition: transform 0.2s ease; display: flex; From 1aa0903e79258986556b4d938ba2e35633924d10 Mon Sep 17 00:00:00 2001 From: Alex Verkhovsky Date: Wed, 1 Apr 2026 08:46:14 -0700 Subject: [PATCH 18/26] chore(agents): remove Barry quick-flow-solo-dev agent (#2177) Delete the Barry agent persona and migrate its QD (quick-dev) capability to the Amelia dev agent. Update EN, ZH, and FR docs, marketplace JSON, and workflow diagrams. Co-authored-by: Claude Opus 4.6 (1M context) --- .claude-plugin/marketplace.json | 1 - docs/fr/reference/agents.md | 5 +- docs/reference/agents.md | 3 +- docs/zh-cn/reference/agents.md | 3 +- .../4-implementation/bmad-agent-dev/SKILL.md | 1 + .../bmad-agent-quick-flow-solo-dev/SKILL.md | 53 ------------------- .../bmad-skill-manifest.yaml | 11 ---- website/public/workflow-map-diagram-fr.html | 4 +- website/public/workflow-map-diagram.html | 4 +- 9 files changed, 10 insertions(+), 75 deletions(-) delete mode 100644 src/bmm-skills/4-implementation/bmad-agent-quick-flow-solo-dev/SKILL.md delete mode 100644 src/bmm-skills/4-implementation/bmad-agent-quick-flow-solo-dev/bmad-skill-manifest.yaml diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 42444ca99..f8921ac14 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -61,7 +61,6 @@ "./src/bmm-skills/4-implementation/bmad-agent-dev", "./src/bmm-skills/4-implementation/bmad-agent-sm", "./src/bmm-skills/4-implementation/bmad-agent-qa", - "./src/bmm-skills/4-implementation/bmad-agent-quick-flow-solo-dev", "./src/bmm-skills/4-implementation/bmad-dev-story", "./src/bmm-skills/4-implementation/bmad-quick-dev", "./src/bmm-skills/4-implementation/bmad-sprint-planning", diff --git a/docs/fr/reference/agents.md b/docs/fr/reference/agents.md index 1fa8057ea..fa77911d2 100644 --- a/docs/fr/reference/agents.md +++ b/docs/fr/reference/agents.md @@ -1,13 +1,13 @@ --- title: Agents -description: Agents BMM par défaut avec leurs identifiants de skill, déclencheurs de menu et workflows principaux (Analyst, Architect, UX Designer, Technical Writer) +description: Agents BMM par défaut avec leurs identifiants de skill, déclencheurs de menu et workflows principaux (Analyst, Developer, Architect, UX Designer, Technical Writer) sidebar: order: 2 --- ## Agents par défaut -Cette page liste les quatre agents BMM (suite Agile) par défaut installés avec la méthode BMad, ainsi que leurs identifiants de skill, déclencheurs de menu et workflows principaux. Chaque agent est invoqué en tant que skill. +Cette page liste les cinq agents BMM (suite Agile) par défaut installés avec la méthode BMad, ainsi que leurs identifiants de skill, déclencheurs de menu et workflows principaux. Chaque agent est invoqué en tant que skill. ## Notes @@ -19,6 +19,7 @@ Cette page liste les quatre agents BMM (suite Agile) par défaut installés avec |------------------------|----------------------|------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------| | Analyste (Mary) | `bmad-analyst` | `BP`, `MR`, `DR`, `TR`, `CB`, `DP` | Brainstorming du projet, Recherche marché/domaine/technique, Création du brief[^1], Documentation du projet | | Architecte (Winston) | `bmad-architect` | `CA`, `IR` | Créer l’architecture, Préparation à l’implémentation | +| Développeur (Amelia) | `bmad-dev` | `DS`, `QD`, `CR` | Dev Story, Quick Dev, Code Review | | Designer UX (Sally) | `bmad-ux-designer` | `CU` | Création du design UX[^2] | | Rédacteur Technique (Paige) | `bmad-tech-writer` | `DP`, `WD`, `US`, `MG`, `VD`, `EC` | Documentation du projet, Rédaction de documents, Mise à jour des standards, Génération de diagrammes Mermaid, Validation de documents, Explication de concepts | diff --git a/docs/reference/agents.md b/docs/reference/agents.md index 7463d1a12..52024fcea 100644 --- a/docs/reference/agents.md +++ b/docs/reference/agents.md @@ -21,9 +21,8 @@ This page lists the default BMM (Agile suite) agents that install with BMad Meth | Product Manager (John) | `bmad-pm` | `CP`, `VP`, `EP`, `CE`, `IR`, `CC` | Create/Validate/Edit PRD, Create Epics and Stories, Implementation Readiness, Correct Course | | Architect (Winston) | `bmad-architect` | `CA`, `IR` | Create Architecture, Implementation Readiness | | Scrum Master (Bob) | `bmad-sm` | `SP`, `CS`, `ER`, `CC` | Sprint Planning, Create Story, Epic Retrospective, Correct Course | -| Developer (Amelia) | `bmad-dev` | `DS`, `CR` | Dev Story, Code Review | +| Developer (Amelia) | `bmad-dev` | `DS`, `QD`, `CR` | Dev Story, Quick Dev, Code Review | | QA Engineer (Quinn) | `bmad-qa` | `QA` | Automate (generate tests for existing features) | -| Quick Flow Solo Dev (Barry) | `bmad-master` | `QD`, `CR` | Quick Dev, Code Review | | UX Designer (Sally) | `bmad-ux-designer` | `CU` | Create UX Design | | Technical Writer (Paige) | `bmad-tech-writer` | `DP`, `WD`, `US`, `MG`, `VD`, `EC` | Document Project, Write Document, Update Standards, Mermaid Generate, Validate Doc, Explain Concept | diff --git a/docs/zh-cn/reference/agents.md b/docs/zh-cn/reference/agents.md index 803ad3d02..4d45044e9 100644 --- a/docs/zh-cn/reference/agents.md +++ b/docs/zh-cn/reference/agents.md @@ -15,9 +15,8 @@ sidebar: | Product Manager (John) | `bmad-pm` | `CP`、`VP`、`EP`、`CE`、`IR`、`CC` | Create/Validate/Edit PRD、Create Epics and Stories、Implementation Readiness、Correct Course | | Architect (Winston) | `bmad-architect` | `CA`、`IR` | Create Architecture、Implementation Readiness | | Scrum Master (Bob) | `bmad-sm` | `SP`、`CS`、`ER`、`CC` | Sprint Planning、Create Story、Epic Retrospective、Correct Course | -| Developer (Amelia) | `bmad-dev` | `DS`、`CR` | Dev Story、Code Review | +| Developer (Amelia) | `bmad-dev` | `DS`、`QD`、`CR` | Dev Story、Quick Dev、Code Review | | QA Engineer (Quinn) | `bmad-qa` | `QA` | Automate(为既有功能生成测试) | -| Quick Flow Solo Dev (Barry) | `bmad-master` | `QD`、`CR` | Quick Dev、Code Review | | UX Designer (Sally) | `bmad-ux-designer` | `CU` | Create UX Design | | Technical Writer (Paige) | `bmad-tech-writer` | `DP`、`WD`、`US`、`MG`、`VD`、`EC` | Document Project、Write Document、Update Standards、Mermaid Generate、Validate Doc、Explain Concept | diff --git a/src/bmm-skills/4-implementation/bmad-agent-dev/SKILL.md b/src/bmm-skills/4-implementation/bmad-agent-dev/SKILL.md index 894eac59b..a8096622f 100644 --- a/src/bmm-skills/4-implementation/bmad-agent-dev/SKILL.md +++ b/src/bmm-skills/4-implementation/bmad-agent-dev/SKILL.md @@ -42,6 +42,7 @@ When you are in this persona and the user calls a skill, this persona must carry | Code | Description | Skill | |------|-------------|-------| | DS | Write the next or specified story's tests and code | bmad-dev-story | +| QD | Unified quick flow — clarify intent, plan, implement, review, present | bmad-quick-dev | | CR | Initiate a comprehensive code review across multiple quality facets | bmad-code-review | ## On Activation diff --git a/src/bmm-skills/4-implementation/bmad-agent-quick-flow-solo-dev/SKILL.md b/src/bmm-skills/4-implementation/bmad-agent-quick-flow-solo-dev/SKILL.md deleted file mode 100644 index 848e7ec07..000000000 --- a/src/bmm-skills/4-implementation/bmad-agent-quick-flow-solo-dev/SKILL.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -name: bmad-agent-quick-flow-solo-dev -description: Elite full-stack developer for rapid spec and implementation. Use when the user asks to talk to Barry or requests the quick flow solo dev. ---- - -# Barry - -## Overview - -This skill provides an Elite Full-Stack Developer who handles Quick Flow — from tech spec creation through implementation. Act as Barry — direct, confident, and implementation-focused. Minimum ceremony, lean artifacts, ruthless efficiency. - -## Identity - -Barry handles Quick Flow — from tech spec creation through implementation. Minimum ceremony, lean artifacts, ruthless efficiency. - -## Communication Style - -Direct, confident, and implementation-focused. Uses tech slang (e.g., refactor, patch, extract, spike) and gets straight to the point. No fluff, just results. Stays focused on the task at hand. - -## Principles - -- Planning and execution are two sides of the same coin. -- Specs are for building, not bureaucracy. Code that ships is better than perfect code that doesn't. - -You must fully embody this persona so the user gets the best experience and help they need, therefore its important to remember you must not break character until the users dismisses this persona. - -When you are in this persona and the user calls a skill, this persona must carry through and remain active. - -## Capabilities - -| Code | Description | Skill | -|------|-------------|-------| -| QD | Unified quick flow — clarify intent, plan, implement, review, present | bmad-quick-dev | -| CR | Initiate a comprehensive code review across multiple quality facets | bmad-code-review | - -## On Activation - -1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: - - Use `{user_name}` for greeting - - Use `{communication_language}` for all communications - - Use `{document_output_language}` for output documents - - Use `{planning_artifacts}` for output location and artifact scanning - - Use `{project_knowledge}` for additional context scanning - -2. **Continue with steps below:** - - **Load project context** — Search for `**/project-context.md`. If found, load as foundational reference for project standards and conventions. If not found, continue without it. - - **Greet and present capabilities** — Greet `{user_name}` warmly by name, always speaking in `{communication_language}` and applying your persona throughout the session. - -3. Remind the user they can invoke the `bmad-help` skill at any time for advice and then present the capabilities table from the Capabilities section above. - - **STOP and WAIT for user input** — Do NOT execute menu items automatically. Accept number, menu code, or fuzzy command match. - -**CRITICAL Handling:** When user responds with a code, line number or skill, invoke the corresponding skill by its exact registered name from the Capabilities table. DO NOT invent capabilities on the fly. diff --git a/src/bmm-skills/4-implementation/bmad-agent-quick-flow-solo-dev/bmad-skill-manifest.yaml b/src/bmm-skills/4-implementation/bmad-agent-quick-flow-solo-dev/bmad-skill-manifest.yaml deleted file mode 100644 index 63013f345..000000000 --- a/src/bmm-skills/4-implementation/bmad-agent-quick-flow-solo-dev/bmad-skill-manifest.yaml +++ /dev/null @@ -1,11 +0,0 @@ -type: agent -name: bmad-agent-quick-flow-solo-dev -displayName: Barry -title: Quick Flow Solo Dev -icon: "🚀" -capabilities: "rapid spec creation, lean implementation, minimum ceremony" -role: Elite Full-Stack Developer + Quick Flow Specialist -identity: "Barry handles Quick Flow - from tech spec creation through implementation. Minimum ceremony, lean artifacts, ruthless efficiency." -communicationStyle: "Direct, confident, and implementation-focused. Uses tech slang (e.g., refactor, patch, extract, spike) and gets straight to the point. No fluff, just results. Stays focused on the task at hand." -principles: "Planning and execution are two sides of the same coin. Specs are for building, not bureaucracy. Code that ships is better than perfect code that doesn't." -module: bmm diff --git a/website/public/workflow-map-diagram-fr.html b/website/public/workflow-map-diagram-fr.html index f7a30ac58..bc59f23a9 100644 --- a/website/public/workflow-map-diagram-fr.html +++ b/website/public/workflow-map-diagram-fr.html @@ -95,7 +95,7 @@ .agent-icon.winston { background: linear-gradient(135deg, #a78bfa, #8b5cf6); } .agent-icon.bob { background: linear-gradient(135deg, #34d399, #10b981); color: #000; } .agent-icon.amelia { background: linear-gradient(135deg, #fb7185, #ef4444); } - .agent-icon.barry { background: linear-gradient(135deg, #94a3b8, #64748b); } + .agent-name { font-size: 0.65rem; } .output { color: var(--success); font-family: monospace; font-size: 0.6rem; } .badge { font-size: 0.55rem; padding: 1px 4px; border-radius: 3px; } @@ -326,7 +326,7 @@
-
B
Barry
+
A
Amelia
quick-dev
intention → spec technique → code fonctionnel
diff --git a/website/public/workflow-map-diagram.html b/website/public/workflow-map-diagram.html index 1702d227e..897492700 100644 --- a/website/public/workflow-map-diagram.html +++ b/website/public/workflow-map-diagram.html @@ -95,7 +95,7 @@ .agent-icon.winston { background: linear-gradient(135deg, #a78bfa, #8b5cf6); } .agent-icon.bob { background: linear-gradient(135deg, #34d399, #10b981); color: #000; } .agent-icon.amelia { background: linear-gradient(135deg, #fb7185, #ef4444); } - .agent-icon.barry { background: linear-gradient(135deg, #94a3b8, #64748b); } + .agent-name { font-size: 0.65rem; } .output { color: var(--success); font-family: monospace; font-size: 0.6rem; } .badge { font-size: 0.55rem; padding: 1px 4px; border-radius: 3px; } @@ -337,7 +337,7 @@
-
B
Barry
+
A
Amelia
quick-dev
intent → tech-spec → working code
From 1b776f565bdbac1171b920836976016dc01a2da2 Mon Sep 17 00:00:00 2001 From: Alex Verkhovsky Date: Wed, 1 Apr 2026 10:12:14 -0700 Subject: [PATCH 19/26] feat: add bmad-checkpoint-preview skill (#2145) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add bmad-checkpoint skill for guided human change review Copies the av-human-review experiment skill into BMAD-METHOD as bmad-checkpoint, following established multi-step skill conventions (SKILL.md → workflow.md → step chain). Registered in module-help.csv under 4-implementation phase. Co-Authored-By: Claude Opus 4.6 (1M context) * chore: rename bmad-checkpoint to bmad-checkpoint-preview Co-Authored-By: Claude Opus 4.6 (1M context) * refactor(checkpoint): inline workflow into SKILL.md and add global step rules Remove separate workflow.md — its content now lives directly in SKILL.md with merged frontmatter. Replace scattered standing rules with a structured Global Step Rules section (path:line format, front-load output, comm style). * refactor(checkpoint): reference global step rules from SKILL.md in step-01 * refactor(checkpoint): deduplicate step rules against global step rules Steps 2–4 now reference Global Step Rules in SKILL.md instead of restating path:line format, front-load, and silence rules locally. Step-specific rules (concern-based org, design judgment, risk awareness, experiential testing) are preserved. * fix(checkpoint): move main_config out of SKILL.md frontmatter SKILL.md frontmatter should only contain name and description. Hardcode the config path inline in the INITIALIZATION section. * docs(checkpoint): update skill description and trigger phrases Rewrite description to reflect the skills purpose as an LLM-assisted human-in-the-loop review. Add checkpoint trigger, drop stale triggers. * fix(checkpoint): align trail format with global step rules and add token budget Use CWD-relative path:line in fallback trail (not markdown links), cap full-file reads at ~50k tokens, remove over-prompted empty-tree SHA. Co-Authored-By: Claude Haiku 4.5 * refactor(checkpoint): rewrite FIND THE CHANGE as numbered priority cascade Replace the ad-hoc change-finding logic with a clean 1-5 cascade modeled after quick-dev Intent Check: explicit argument, recent conversation, sprint tracking, current git state, ask. Extract spec/commit pairing into a separate ENRICH step that runs after any cascade level resolves. Add planning_artifacts to SKILL.md initialization. Co-Authored-By: Claude Opus 4.6 * fix(checkpoint): clarify review_mode and terse-commit instructions in step-01 Replace opaque Review Mode table with explicit set-variable instructions. Scope terse commit message handling to bare-commit mode only. Co-Authored-By: Claude Opus 4.6 * fix(checkpoint): make review_mode a numbered cascade, not independent bullets Co-Authored-By: Claude Opus 4.6 * fix(checkpoint): simplify change_type from table to one-liner Co-Authored-By: Claude Opus 4.6 * fix(checkpoint): make link-to-source conditional on source existing Co-Authored-By: Claude Opus 4.6 * fix(checkpoint): make surface area stats best-effort with baseline cascade Replace rigid with-spec/bare-commit split with a 4-level fallback: baseline_commit, merge-base, HEAD~1, skip. Omit metrics that cannot be computed rather than failing. Co-Authored-By: Claude Opus 4.6 * refactor(checkpoint): extract fallback trail generation into generate-trail.md Reduce step-01 bloat by moving the conditional trail generation sub-routine into its own file, loaded only when review mode is not full-trail. Co-Authored-By: Claude Opus 4.6 * fix(checkpoint): add early-exit routing and wrap-up step Replace undefined "I've seen enough" exits with proper early-exit handling across steps 02-04. Extract wrap-up logic into dedicated step-05-wrapup.md. Fix step-02 menu text that incorrectly promised "code review" when step-03 does risk surfacing. --------- Co-authored-by: Claude Opus 4.6 (1M context) --- .../bmad-checkpoint-preview/SKILL.md | 28 +++++ .../bmad-checkpoint-preview/generate-trail.md | 38 +++++++ .../step-01-orientation.md | 103 +++++++++++++++++ .../step-02-walkthrough.md | 89 +++++++++++++++ .../step-03-detail-pass.md | 106 ++++++++++++++++++ .../step-04-testing.md | 74 ++++++++++++ .../bmad-checkpoint-preview/step-05-wrapup.md | 22 ++++ src/bmm-skills/module-help.csv | 1 + 8 files changed, 461 insertions(+) create mode 100644 src/bmm-skills/4-implementation/bmad-checkpoint-preview/SKILL.md create mode 100644 src/bmm-skills/4-implementation/bmad-checkpoint-preview/generate-trail.md create mode 100644 src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-01-orientation.md create mode 100644 src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-02-walkthrough.md create mode 100644 src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-03-detail-pass.md create mode 100644 src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-04-testing.md create mode 100644 src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-05-wrapup.md diff --git a/src/bmm-skills/4-implementation/bmad-checkpoint-preview/SKILL.md b/src/bmm-skills/4-implementation/bmad-checkpoint-preview/SKILL.md new file mode 100644 index 000000000..cbcc7b215 --- /dev/null +++ b/src/bmm-skills/4-implementation/bmad-checkpoint-preview/SKILL.md @@ -0,0 +1,28 @@ +--- +name: bmad-checkpoint-preview +description: 'LLM-assisted human-in-the-loop review. Make sense of a change, focus attention where it matters, test. Use when the user says "checkpoint", "human review", or "walk me through this change".' +--- + +# Checkpoint Review Workflow + +**Goal:** Guide a human through reviewing a change — from purpose and context into details. + +You are assisting the user in reviewing a change. + +## Global Step Rules (apply to every step) + +- **Path:line format** — Every code reference must use CWD-relative `path:line` format (no leading `/`) so it is clickable in IDE-embedded terminals (e.g., `src/auth/middleware.ts:42`). +- **Front-load then shut up** — Present the entire output for the current step in a single coherent message. Do not ask questions mid-step, do not drip-feed, do not pause between sections. +- **Communication style** — Always output using the exact Agent communication style defined in SKILL.md and the loaded config. + +## INITIALIZATION + +Load and read full config from `{project-root}/_bmad/bmm/config.yaml` and resolve: + +- `implementation_artifacts` +- `planning_artifacts` +- `communication_language` + +## FIRST STEP + +Read fully and follow `./step-01-orientation.md` to begin. diff --git a/src/bmm-skills/4-implementation/bmad-checkpoint-preview/generate-trail.md b/src/bmm-skills/4-implementation/bmad-checkpoint-preview/generate-trail.md new file mode 100644 index 000000000..f346ad8de --- /dev/null +++ b/src/bmm-skills/4-implementation/bmad-checkpoint-preview/generate-trail.md @@ -0,0 +1,38 @@ +# Generate Review Trail + +Generate a review trail from the diff and codebase context. A generated trail is lower quality than an author-produced one, but far better than none. + +## Follow Global Step Rules in SKILL.md + +## INSTRUCTIONS + +1. Get the full diff against the appropriate baseline (same rules as Surface Area Stats in step-01). +2. Read changed files in full — not just diff hunks. Surrounding code reveals intent that hunks alone miss. If total file content exceeds ~50k tokens, read only the files with the largest diff hunks in full and use hunks for the rest. +3. If a spec exists, use its Intent section to anchor concern identification. +4. Identify 2–5 concerns: cohesive design intents that each explain *why* behind a cluster of changes. Prefer functional groupings and architectural boundaries over file-level splits. A single-concern change is fine — don't invent groupings. +5. For each concern, select 1–4 `path:line` stops — locations where the concern is most visible. Prefer entry points, decision points, and boundary crossings over mechanical changes. +6. Lead with the entry point — the highest-leverage stop a reviewer should see first. Inside each concern, order stops so each builds on the previous. End with peripherals (tests, config, types). +7. Format each stop using `path:line` per the global step rules: + +``` +**{Concern name}** + +- {one-line framing, ≤15 words} + `src/path/to/file.ts:42` +``` + +When there is only one concern, omit the bold label — just list the stops directly. + +## PRESENT + +Output after the orientation: + +``` +I built a review trail for this {change_type} (no author-produced trail was found): + +{generated trail} +``` + +Set review mode to `full-trail`. The generated trail is the Suggested Review Order for subsequent steps. + +If git is unavailable or the diff cannot be retrieved, return to step-01 with: "Could not generate trail — git unavailable." diff --git a/src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-01-orientation.md b/src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-01-orientation.md new file mode 100644 index 000000000..ca965718e --- /dev/null +++ b/src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-01-orientation.md @@ -0,0 +1,103 @@ +# Step 1: Orientation + +Display: `[Orientation] → Walkthrough → Detail Pass → Testing` + +## Follow Global Step Rules in SKILL.md + +## FIND THE CHANGE + +The conversation context before this skill was triggered IS your starting point — not a blank slate. Check in this order — stop as soon as the change is identified: + +1. **Explicit argument** + Did the user pass a PR, commit SHA, branch, or spec file this message? + - PR reference → resolve to branch/commit via `gh pr view`. If resolution fails, ask for a SHA or branch. + - Spec file, commit, or branch → use directly. + +2. **Recent conversation** + Do the last few messages reveal what change the user wants reviewed? Look for spec paths, commit refs, branches, PRs, or descriptions of a change. Use the same routing as above. + +3. **Sprint tracking** + Check for a sprint status file (`*sprint-status*`) in `{implementation_artifacts}` or `{planning_artifacts}`. If found, scan for stories with status `review`: + - Exactly one → suggest it and confirm with the user. + - Multiple → present as numbered options. + - None → fall through. + +4. **Current git state** + Check current branch and HEAD. Confirm: "I see HEAD is `` on `` — is this the change you want to review?" + +5. **Ask** + If none of the above identified a change, ask: + - What changed and why? + - Which commit, branch, or PR should I look at? + - Do you have a spec, bug report, or anything else that explains what this change is supposed to do? + + If after 3 exchanges you still can't identify a change, HALT. + +Never ask extra questions beyond what the cascade prescribes. If a step above already identified the change, skip the remaining steps. + +## ENRICH + +Once a change is identified from any source above, fill in the complementary artifact: + +- If you have a spec, look for `baseline_commit` in its frontmatter to determine the diff baseline. +- If you have a commit or branch, check `{implementation_artifacts}` for a spec whose `baseline_commit` is an ancestor of that commit/branch (i.e., the spec describes work done on top of that baseline). +- If you found both a spec and a commit/branch, use both. + +## DETERMINE WHAT YOU HAVE + +Set `change_type` to match how the user referred to the change — `PR`, `commit`, `branch`, or their own words (e.g. `auth refactor`). Default to `change` if ambiguous. + +Set `review_mode` — pick the first match: + +1. **`full-trail`** — ENRICH found a spec with a `## Suggested Review Order` section. Intent source: spec's Intent section. +2. **`spec-only`** — ENRICH found a spec but it has no Suggested Review Order. Intent source: spec's Intent section. +3. **`bare-commit`** — no spec found. Intent source: commit message. If the commit message is terse (under 10 words), scan the diff for the primary change pattern and draft a one-sentence intent. Confirm with the user before proceeding. + +## PRODUCE ORIENTATION + +### Intent Summary + +- If intent comes from a spec's Intent section, display it verbatim regardless of length — it's already written to be concise. +- For other sources (commit messages, bug reports, user description): if ≤200 tokens, display verbatim. If longer, distill to ≤200 tokens. Link to the full source when one exists (e.g. a file path or URL). +- Format: `> **Intent:** {summary}` + +### Surface Area Stats + +Best-effort stats from `git diff --stat`. Try these baselines in order: + +1. `baseline_commit` from the spec's frontmatter. +2. Branch merge-base against `main` (or the default branch). +3. `HEAD~1..HEAD` (latest commit only — tell the user). +4. If git is unavailable or all of the above fail, skip stats and note: "Could not compute stats." + +Display as: + +``` +N files changed · M modules touched · ~L lines of logic · B boundary crossings · P new public interfaces +``` + +- **Files changed**: from `git diff --stat`. +- **Modules touched**: distinct top-level directories with changes. +- **Lines of logic**: added/modified lines excluding blanks, imports, formatting. `~` because approximate. +- **Boundary crossings**: changes spanning more than one top-level module. `0` if single module. +- **New public interfaces**: new exports, endpoints, public methods. `0` if none. + +Omit any metric you cannot compute rather than guessing. + +### Present + +``` +[Orientation] → Walkthrough → Detail Pass → Testing + +> **Intent:** {intent_summary} + +{stats line} +``` + +## FALLBACK TRAIL GENERATION + +If review mode is not `full-trail`, read fully and follow `./generate-trail.md` to build one from the diff. Then return here and continue to NEXT. + +## NEXT + +Read fully and follow `./step-02-walkthrough.md` diff --git a/src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-02-walkthrough.md b/src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-02-walkthrough.md new file mode 100644 index 000000000..e624038e9 --- /dev/null +++ b/src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-02-walkthrough.md @@ -0,0 +1,89 @@ +# Step 2: Walkthrough + +Display: `Orientation → [Walkthrough] → Detail Pass → Testing` + +## Follow Global Step Rules in SKILL.md + +- Organize by **concern**, not by file. A concern is a cohesive design intent — e.g., "input validation," "state management," "API contract." One file may appear under multiple concerns; one concern may span multiple files. +- The walkthrough activates **design judgment**, not correctness checking. Frame each concern as "here's what this change does and why" — the human evaluates whether it's the right approach for the system. + +## BUILD THE WALKTHROUGH + +### Identify Concerns + +**With Suggested Review Order** (`full-trail` mode): + +1. Read the Suggested Review Order stops from the spec (or from conversation context if generated by step-01 fallback). +2. Resolve each stop to a file in the current repo. Output in `path:line` format per the standing rule. +3. Read the diff to understand what each stop actually does. +4. Group stops by concern. Stops that share a design intent belong together even if they're in different files. A stop may appear under multiple concerns if it serves multiple purposes. + +**Without Suggested Review Order** (`spec-only` or `bare-commit` mode): + +1. Get the diff against the appropriate baseline (same rules as step 1). +2. Identify concerns by reading the diff for cohesive design intents: + - Functional groupings — what user-facing behavior does each cluster of changes support? + - Architectural layers — does the change cross boundaries (API → service → data)? + - Design decisions — where did the author choose between alternatives? +3. For each concern, identify the key code locations as `path:line` stops. + +### Order for Comprehension + +Sequence concerns top-down: start with the highest-level intent (the "what and why"), then drill into supporting implementation. Within each concern, order stops so each one builds on the previous. The reader should never encounter a reference to something they haven't seen yet. + +If the change has a natural entry point (e.g., a new public API, a config change, a UI entry point), lead with it. + +### Write Each Concern + +For each concern, produce: + +1. **Heading** — a short phrase naming the design intent (not a file name, not a module name). +2. **Why** — 1–2 sentences: what problem this concern addresses, why this approach was chosen over alternatives. If the spec documents rejected alternatives, reference them here. +3. **Stops** — each stop on its own line: `path:line` followed by a brief phrase (not a sentence) describing what this location does for the concern. Keep framing under 15 words per stop. + +Target 2–5 concerns for a typical change. A single-concern change is fine — don't invent groupings. A change with more than 7 concerns is a signal the scope may be too large, but present it anyway. + +## PRESENT + +Output the full walkthrough as a single message with this structure: + +``` +Orientation → [Walkthrough] → Detail Pass → Testing +``` + +Then each concern group using this format: + +``` +### {Concern Heading} + +{Why — 1–2 sentences} + +- `path:line` — {brief framing} +- `path:line` — {brief framing} +- ... +``` + +End the message with: + +``` +--- + +Take your time — click through the stops, read the diff, trace the logic. While you are reviewing, you can: +- "run advanced elicitation on the error handling" +- "party mode on whether this schema migration is safe" +- or just ask anything + +When you're ready, say **next** and I'll surface the highest-risk spots. +``` + +## EARLY EXIT + +If at any point the human signals they want to make a decision about this {change_type} (e.g., "let's ship it", "this needs a rethink", "I'm done reviewing", or anything suggesting they're ready to decide), confirm their intent: + +- If they want to **approve and ship** → read fully and follow `./step-05-wrapup.md` +- If they want to **reject and rework** → read fully and follow `./step-05-wrapup.md` +- If you misread them → acknowledge and continue the current step. + +## NEXT + +Default: read fully and follow `./step-03-detail-pass.md` diff --git a/src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-03-detail-pass.md b/src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-03-detail-pass.md new file mode 100644 index 000000000..49d8024a4 --- /dev/null +++ b/src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-03-detail-pass.md @@ -0,0 +1,106 @@ +# Step 3: Detail Pass + +Display: `Orientation → Walkthrough → [Detail Pass] → Testing` + +## Follow Global Step Rules in SKILL.md + +- The detail pass surfaces what the human should **think about**, not what the code got wrong. Machine hardening already handled correctness. This activates risk awareness. +- The LLM detects risk category by pattern. The human judges significance. Do not assign severity scores or numeric rankings — ordering by blast radius (below) is sequencing for readability, not a severity judgment. +- If no high-risk spots exist, say so explicitly. Do not invent findings. + +## IDENTIFY RISK SPOTS + +Scan the diff for changes touching risk-sensitive patterns. Look for 2–5 spots where a mistake would have the highest blast radius — not the most complex code, but the code where being wrong costs the most. + +Risk categories to detect: + +- `[auth]` — authentication, authorization, session, token, permission, access control +- `[public API]` — new/changed endpoints, exports, public methods, interface contracts +- `[schema]` — database migrations, schema changes, data model modifications, serialization +- `[billing]` — payment, pricing, subscription, metering, usage tracking +- `[infra]` — deployment, CI/CD, environment variables, config files, infrastructure +- `[security]` — input validation, sanitization, crypto, secrets, CORS, CSP +- `[config]` — feature flags, environment-dependent behavior, defaults +- `[other]` — anything risk-sensitive that doesn't fit the above (e.g., concurrency, data privacy, backwards compatibility). Use a descriptive tag. + +Sequence spots so the highest blast radius comes first (how much breaks if this is wrong), not by diff order or file order. If more than 5 spots qualify, show the top 5 and note: "N additional spots omitted — ask if you want the full list." + +If the change has no spots matching these patterns, state: "No high-risk spots found in this change — the diff speaks for itself." Do not force findings. + +## SURFACE MACHINE HARDENING FINDINGS + +Check whether the spec has a `## Spec Change Log` section with entries (populated by adversarial review loops). + +- **If entries exist:** Read them. Surface findings that are instructive for the human reviewer — not bugs that were already fixed, but decisions the review loop flagged that the human should be aware of. Format: brief summary of what was flagged and what was decided. +- **If no entries or no spec:** Skip this section entirely. Do not mention it. + +## PRESENT + +Output as a single message: + +``` +Orientation → Walkthrough → [Detail Pass] → Testing +``` + +### Risk Spots + +For each spot, one line: + +``` +- `path:line` — [tag] reason-phrase +``` + +Example: + +``` +- `src/auth/middleware.ts:42` — [auth] New token validation bypasses rate limiter +- `migrations/003_add_index.sql:7` — [schema] Index on high-write table, check lock behavior +- `api/routes/billing.ts:118` — [billing] Metering calculation changed, verify idempotency +``` + +### Machine Hardening (only if findings exist) + +``` +### Machine Hardening + +- Finding summary — what was flagged, what was decided +- ... +``` + +### Closing menu + +End the message with: + +``` +--- + +You've seen the design and the risk landscape. From here: +- **"dig into [area]"** — I'll deep-dive that specific area with correctness focus +- **"next"** — I'll suggest how to observe the behavior +``` + +## EARLY EXIT + +If at any point the human signals they want to make a decision about this {change_type} (e.g., "let's ship it", "this needs a rethink", "I'm done reviewing", or anything suggesting they're ready to decide), confirm their intent: + +- If they want to **approve and ship** → read fully and follow `./step-05-wrapup.md` +- If they want to **reject and rework** → read fully and follow `./step-05-wrapup.md` +- If you misread them → acknowledge and continue the current step. + +## TARGETED RE-REVIEW + +When the human says "dig into [area]" (e.g., "dig into the auth changes", "dig into the schema migration"): + +1. If the specified area does not map to any code in the diff, say so: "I don't see [area] in this change — did you mean something else?" Return to the closing menu. +2. Identify all code locations in the diff relevant to the specified area. +3. Read each location in full context (not just the diff hunk — read surrounding code). +4. Shift to **correctness mode**: trace edge cases, check boundary conditions, verify error handling, look for off-by-one errors, race conditions, resource leaks. +5. Present findings as a compact list — each finding is `path:line` + what you found + why it matters. +6. If nothing concerning is found, say so: "Looked closely at [area] — nothing concerning. The implementation is solid." +7. After presenting, show only the closing menu (not the full risk spots list again). + +The human can trigger multiple targeted re-reviews. Each time, present new findings and the closing menu only. + +## NEXT + +Read fully and follow `./step-04-testing.md` diff --git a/src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-04-testing.md b/src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-04-testing.md new file mode 100644 index 000000000..f81807998 --- /dev/null +++ b/src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-04-testing.md @@ -0,0 +1,74 @@ +# Step 4: Testing + +Display: `Orientation → Walkthrough → Detail Pass → [Testing]` + +## Follow Global Step Rules in SKILL.md + +- This is **experiential**, not analytical. The detail pass asked "did you think about X?" — this says "you could see X with your own eyes." +- Do not prescribe. The human decides whether observing the behavior is worth their time. Frame suggestions as options, not obligations. +- Do not duplicate CI, test suites, or automated checks. Assume those exist and work. This is about manual observation — the kind of confidence-building no automated test provides. +- If the change has no user-visible behavior, say so explicitly. Do not invent observations. + +## IDENTIFY OBSERVABLE BEHAVIOR + +Scan the diff and spec for changes that produce behavior a human could directly observe. Categories to look for: + +- **UI changes** — new screens, modified layouts, changed interactions, error states +- **CLI/terminal output** — new commands, changed output, new flags or options +- **API responses** — new endpoints, changed payloads, different status codes +- **State changes** — database records, file system artifacts, config effects +- **Error paths** — bad input, missing dependencies, edge conditions + +For each observable behavior, determine: + +1. **What to do** — the specific action (command to run, button to click, request to send) +2. **What to expect** — the observable result that confirms the change works +3. **Why bother** — one phrase connecting this observation to the change's intent (omit if obvious from context) + +Target 2–5 suggestions for a typical change. If more than 5 qualify, prioritize by how much confidence the observation provides relative to effort. A change with zero observable behavior is fine — do not pad with trivial observations. + +## PRESENT + +Output as a single message: + +``` +Orientation → Walkthrough → Detail Pass → [Testing] +``` + +Then the testing suggestions using this format: + +``` +### How to See It Working + +**{Brief description}** +Do: {specific action} +Expect: {observable result} + +**{Brief description}** +Do: {specific action} +Expect: {observable result} +``` + +Include code blocks for commands or requests where helpful. + +If the change has no observable behavior, replace the suggestions with: + +``` +### How to See It Working + +This change is internal — no user-visible behavior to observe. The diff and tests tell the full story. +``` + +### Closing + +End the message with: + +``` +--- + +You've seen the change and how to verify it. When you're ready to make a call, just say so. +``` + +## NEXT + +When the human signals they're ready to make a decision about this {change_type}, read fully and follow `./step-05-wrapup.md` diff --git a/src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-05-wrapup.md b/src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-05-wrapup.md new file mode 100644 index 000000000..b3a67b4ee --- /dev/null +++ b/src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-05-wrapup.md @@ -0,0 +1,22 @@ +# Step 5: Wrap-Up + +Display: `Orientation → Walkthrough → Detail Pass → Testing → [Wrap-Up]` + +## Follow Global Step Rules in SKILL.md + +## PROMPT FOR DECISION + +``` +--- + +Review complete. What's the call on this {change_type}? +- **Approve** — ship it (I can help with interactive patching first if needed) +- **Rework** — back to the drawing board (revert, revise the spec, try a different approach) +- **Discuss** — something's still on your mind +``` + +## ACT ON DECISION + +- **Approve**: Acknowledge briefly. If the human wants to patch something before shipping, help apply the fix interactively. If reviewing a PR, offer to approve via `gh pr review --approve` — but confirm with the human before executing, since this is a visible action on a shared resource. +- **Rework**: Ask what went wrong — was it the approach, the spec, or the implementation? Help the human decide on next steps (revert commit, open an issue, revise the spec, etc.). Help draft specific, actionable feedback tied to `path:line` locations if the change is a PR from someone else. +- **Discuss**: Open conversation — answer questions, explore concerns, dig into any aspect. After discussion, return to the decision prompt above. diff --git a/src/bmm-skills/module-help.csv b/src/bmm-skills/module-help.csv index 899dfd8e2..816061e90 100644 --- a/src/bmm-skills/module-help.csv +++ b/src/bmm-skills/module-help.csv @@ -27,5 +27,6 @@ BMad Method,bmad-create-story,Create Story,CS,"Story cycle start: Prepare first BMad Method,bmad-create-story,Validate Story,VS,Validates story readiness and completeness before development work begins.,validate,,4-implementation,bmad-create-story:create,bmad-dev-story,false,implementation_artifacts,story validation report BMad Method,bmad-dev-story,Dev Story,DS,Story cycle: Execute story implementation tasks and tests then CR then back to DS if fixes needed.,,4-implementation,bmad-create-story:validate,,true,, BMad Method,bmad-code-review,Code Review,CR,Story cycle: If issues back to DS if approved then next CS or ER if epic complete.,,4-implementation,bmad-dev-story,,false,, +BMad Method,bmad-checkpoint-preview,Checkpoint,CK,Guided walkthrough of a change from purpose and context into details. Use for human review of commits branches or PRs.,,4-implementation,,,false,, BMad Method,bmad-qa-generate-e2e-tests,QA Automation Test,QA,Generate automated API and E2E tests for implemented code. NOT for code review or story validation — use CR for that.,,4-implementation,bmad-dev-story,,false,implementation_artifacts,test suite BMad Method,bmad-retrospective,Retrospective,ER,Optional at epic end: Review completed work lessons learned and next epic or if major issues consider CC.,,4-implementation,bmad-code-review,,false,implementation_artifacts,retrospective From 2ea917ef5cc67f3a0ea2b92692c986a1147c7a3e Mon Sep 17 00:00:00 2001 From: Alex Verkhovsky Date: Wed, 1 Apr 2026 10:43:08 -0700 Subject: [PATCH 20/26] fix(checkpoint): address review findings from adversarial triage (#2180) Clarify review_mode state transition intent in generate-trail, label step-02 walkthrough branches as normal vs fallback, replace circular communication style rule with config variable refs, swap confirm gate for [inferred] flag, and clarify stats data source as full diff. --- .../bmad-checkpoint-preview/SKILL.md | 3 ++- .../bmad-checkpoint-preview/generate-trail.md | 2 +- .../step-01-orientation.md | 16 +++++++++------- .../step-02-walkthrough.md | 4 ++-- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/bmm-skills/4-implementation/bmad-checkpoint-preview/SKILL.md b/src/bmm-skills/4-implementation/bmad-checkpoint-preview/SKILL.md index cbcc7b215..2cfd04420 100644 --- a/src/bmm-skills/4-implementation/bmad-checkpoint-preview/SKILL.md +++ b/src/bmm-skills/4-implementation/bmad-checkpoint-preview/SKILL.md @@ -13,7 +13,7 @@ You are assisting the user in reviewing a change. - **Path:line format** — Every code reference must use CWD-relative `path:line` format (no leading `/`) so it is clickable in IDE-embedded terminals (e.g., `src/auth/middleware.ts:42`). - **Front-load then shut up** — Present the entire output for the current step in a single coherent message. Do not ask questions mid-step, do not drip-feed, do not pause between sections. -- **Communication style** — Always output using the exact Agent communication style defined in SKILL.md and the loaded config. +- **Language** — Speak in `{communication_language}`. Write any file output in `{document_output_language}`. ## INITIALIZATION @@ -22,6 +22,7 @@ Load and read full config from `{project-root}/_bmad/bmm/config.yaml` and resolv - `implementation_artifacts` - `planning_artifacts` - `communication_language` +- `document_output_language` ## FIRST STEP diff --git a/src/bmm-skills/4-implementation/bmad-checkpoint-preview/generate-trail.md b/src/bmm-skills/4-implementation/bmad-checkpoint-preview/generate-trail.md index f346ad8de..6fd378bd3 100644 --- a/src/bmm-skills/4-implementation/bmad-checkpoint-preview/generate-trail.md +++ b/src/bmm-skills/4-implementation/bmad-checkpoint-preview/generate-trail.md @@ -33,6 +33,6 @@ I built a review trail for this {change_type} (no author-produced trail was foun {generated trail} ``` -Set review mode to `full-trail`. The generated trail is the Suggested Review Order for subsequent steps. +The generated trail serves as the Suggested Review Order for subsequent steps. Set `review_mode` to `full-trail` — a trail now exists, so all downstream steps should treat it as one. If git is unavailable or the diff cannot be retrieved, return to step-01 with: "Could not generate trail — git unavailable." diff --git a/src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-01-orientation.md b/src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-01-orientation.md index ca965718e..26f3554d0 100644 --- a/src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-01-orientation.md +++ b/src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-01-orientation.md @@ -51,7 +51,7 @@ Set `review_mode` — pick the first match: 1. **`full-trail`** — ENRICH found a spec with a `## Suggested Review Order` section. Intent source: spec's Intent section. 2. **`spec-only`** — ENRICH found a spec but it has no Suggested Review Order. Intent source: spec's Intent section. -3. **`bare-commit`** — no spec found. Intent source: commit message. If the commit message is terse (under 10 words), scan the diff for the primary change pattern and draft a one-sentence intent. Confirm with the user before proceeding. +3. **`bare-commit`** — no spec found. Intent source: commit message. If the commit message is terse (under 10 words), scan the diff for the primary change pattern and draft a one-sentence intent. Flag it as `[inferred]` in the output so the user can correct it. ## PRODUCE ORIENTATION @@ -63,24 +63,26 @@ Set `review_mode` — pick the first match: ### Surface Area Stats -Best-effort stats from `git diff --stat`. Try these baselines in order: +Best-effort stats derived from the diff. Try these baselines in order: 1. `baseline_commit` from the spec's frontmatter. 2. Branch merge-base against `main` (or the default branch). 3. `HEAD~1..HEAD` (latest commit only — tell the user). 4. If git is unavailable or all of the above fail, skip stats and note: "Could not compute stats." +Use `git diff --stat` and `git diff --numstat` for file-level counts, and scan the full diff content for the richer metrics. + Display as: ``` N files changed · M modules touched · ~L lines of logic · B boundary crossings · P new public interfaces ``` -- **Files changed**: from `git diff --stat`. -- **Modules touched**: distinct top-level directories with changes. -- **Lines of logic**: added/modified lines excluding blanks, imports, formatting. `~` because approximate. +- **Files changed**: count from `git diff --stat`. +- **Modules touched**: distinct top-level directories with changes (from `--stat` file paths). +- **Lines of logic**: added/modified lines excluding blanks, imports, formatting. Scan diff content; `~` because approximate. - **Boundary crossings**: changes spanning more than one top-level module. `0` if single module. -- **New public interfaces**: new exports, endpoints, public methods. `0` if none. +- **New public interfaces**: new exports, endpoints, public methods found in the diff. `0` if none. Omit any metric you cannot compute rather than guessing. @@ -96,7 +98,7 @@ Omit any metric you cannot compute rather than guessing. ## FALLBACK TRAIL GENERATION -If review mode is not `full-trail`, read fully and follow `./generate-trail.md` to build one from the diff. Then return here and continue to NEXT. +If review mode is not `full-trail`, read fully and follow `./generate-trail.md` to build one from the diff. Then return here and continue to NEXT. If trail generation fails (e.g., git unavailable), the original review mode is preserved — step-02 handles this with its non-trail path. ## NEXT diff --git a/src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-02-walkthrough.md b/src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-02-walkthrough.md index e624038e9..aec40c4c8 100644 --- a/src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-02-walkthrough.md +++ b/src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-02-walkthrough.md @@ -11,14 +11,14 @@ Display: `Orientation → [Walkthrough] → Detail Pass → Testing` ### Identify Concerns -**With Suggested Review Order** (`full-trail` mode): +**With Suggested Review Order** (`full-trail` mode — the normal path, including when step-01 generated a trail): 1. Read the Suggested Review Order stops from the spec (or from conversation context if generated by step-01 fallback). 2. Resolve each stop to a file in the current repo. Output in `path:line` format per the standing rule. 3. Read the diff to understand what each stop actually does. 4. Group stops by concern. Stops that share a design intent belong together even if they're in different files. A stop may appear under multiple concerns if it serves multiple purposes. -**Without Suggested Review Order** (`spec-only` or `bare-commit` mode): +**Without Suggested Review Order** (fallback when trail generation failed, e.g., git unavailable): 1. Get the diff against the appropriate baseline (same rules as step 1). 2. Identify concerns by reading the diff for cohesive design intents: From 7ef45d472c4f3f0bcf63e4fc76d083833912dc3b Mon Sep 17 00:00:00 2001 From: Alex Verkhovsky Date: Wed, 1 Apr 2026 21:20:48 -0700 Subject: [PATCH 21/26] docs(checkpoint): add explainer page and workflow diagram (#2183) * docs(checkpoint): add explainer page and workflow diagram Co-Authored-By: Claude Opus 4.6 (1M context) * docs(checkpoint): replace excalidraw source with exported PNG diagram Co-Authored-By: Claude Opus 4.6 (1M context) --------- Co-authored-by: Claude Opus 4.6 (1M context) --- docs/explanation/checkpoint-preview.md | 92 ++++++++++++++++++ .../diagrams/checkpoint-preview-diagram.png | Bin 0 -> 250104 bytes 2 files changed, 92 insertions(+) create mode 100644 docs/explanation/checkpoint-preview.md create mode 100644 website/public/diagrams/checkpoint-preview-diagram.png diff --git a/docs/explanation/checkpoint-preview.md b/docs/explanation/checkpoint-preview.md new file mode 100644 index 000000000..d7d5ece14 --- /dev/null +++ b/docs/explanation/checkpoint-preview.md @@ -0,0 +1,92 @@ +--- +title: "Checkpoint Preview" +description: LLM-assisted human-in-the-loop review that guides you through a change from purpose to details +sidebar: + order: 3 +--- + +`bmad-checkpoint-preview` is an interactive, LLM-assisted human-in-the-loop review workflow. It walks you through a code change — from purpose and context into details — so you can make an informed decision about whether to ship, rework, or dig deeper. + +![Checkpoint Preview workflow diagram](/diagrams/checkpoint-preview-diagram.png) + +## The Typical Flow + +You run `bmad-quick-dev`. It clarifies your intent, builds a spec, implements the change, and when it's done it appends a review trail to the spec file and opens it in your editor. You look at the spec and see the change touched 20 files across several modules. + +You could eyeball the diff. But 20 files is where eyeballing starts to fail — you lose the thread, miss a connection between two distant changes, or approve something you didn't fully understand. So instead, you say "checkpoint" and the LLM walks you through it. + +That handoff — from autonomous implementation back to human judgment — is the primary use case. Quick-dev runs long with minimal supervision. Checkpoint Preview is where you take back the wheel. + +## Why It Exists + +Code review has two failure modes. In one, the reviewer skims the diff, nothing jumps out, and they approve. In the other, they methodically read every file but lose the thread — they see the trees and miss the forest. Both result in the same outcome: the review didn't catch the thing that mattered. + +The underlying issue is sequencing. A raw diff presents changes in file order, which is almost never the order that builds understanding. You see a helper function before you know why it exists. You see a schema change before you understand what feature it supports. The reviewer has to reconstruct the author's intent from scattered clues, and that reconstruction is where attention fails. + +Checkpoint Preview solves this by making the LLM do the reconstruction work. It reads the diff, the spec (if one exists), and the surrounding codebase, then presents the change in an order designed for comprehension — not for `git diff`. + +## How It Works + +The workflow has five steps. Each step builds on the previous one, progressively shifting from "what is this?" toward "should we ship it?" + +### 1. Orientation + +The workflow identifies the change (from a PR, commit, branch, spec file, or the current git state) and produces a one-line intent summary plus surface area stats: files changed, modules touched, lines of logic, boundary crossings, and new public interfaces. + +This is the "is this what I think it is?" moment. Before reading any code, the reviewer confirms they're looking at the right thing and calibrates their expectations for scope. + +### 2. Walkthrough + +The change is organized by **concern** — cohesive design intents like "input validation" or "API contract" — not by file. Each concern gets a short explanation of *why* this approach was chosen, followed by clickable `path:line` stops that the reviewer can follow through the code. + +This is the design judgment step. The reviewer evaluates whether the approach is right for the system, not whether the code is correct. Concerns are sequenced top-down: the highest-level intent first, then supporting implementation. The reviewer never encounters a reference to something they haven't seen yet. + +### 3. Detail Pass + +After the reviewer understands the design, the workflow surfaces 2-5 spots where a mistake would have the highest blast radius. These are tagged by risk category — `[auth]`, `[schema]`, `[billing]`, `[public API]`, `[security]`, and others — and ordered by how much breaks if they're wrong. + +This is not a bug hunt. Automated tests and CI handle correctness. The detail pass activates risk awareness: "here are the places where being wrong costs the most." If the reviewer wants to go deeper on a specific area, they can say "dig into [area]" for a targeted correctness-focused re-review. + +If the spec went through adversarial review loops (machine hardening), those findings are surfaced here too — not the bugs that were fixed, but the decisions that the review loop flagged that the reviewer should be aware of. + +### 4. Testing + +Suggests 2-5 ways to manually observe the change working. Not automated test commands — manual observations that build confidence no test suite provides. A UI interaction to try, a CLI command to run, an API request to send, with expected results for each. + +If the change has no user-visible behavior, it says so. No invented busywork. + +### 5. Wrap-Up + +The reviewer makes the call: approve, rework, or keep discussing. If approving a PR, the workflow can help with `gh pr review --approve`. If reworking, it helps diagnose whether the problem was the approach, the spec, or the implementation, and helps draft actionable feedback tied to specific code locations. + +## It's a Conversation, Not a Report + +The workflow presents each step as a starting point, not a final word. Between steps — or in the middle of one — you can talk to the LLM, ask questions, challenge its framing, or pull in other skills to get a different perspective: + +- **"run advanced elicitation on the error handling"** — push the LLM to reconsider and refine its analysis of a specific area +- **"party mode on whether this schema migration is safe"** — bring multiple agent perspectives into a focused debate +- **"run code review"** — generate structured agentic findings with adversarial and edge-case analysis + +The checkpoint workflow doesn't lock you into a linear path. It gives you structure when you want it and gets out of the way when you want to explore. The five steps are there to make sure you see the whole picture, but how deep you go at each step — and what tools you bring in — is entirely up to you. + +## The Review Trail + +The walkthrough step works best when it has a **Suggested Review Order** — a list of stops the spec author wrote to guide reviewers through the change. When a spec includes this, the workflow uses it directly. + +When no author-produced trail exists, the workflow generates one from the diff and codebase context. A generated trail is lower quality than an author-produced one, but far better than reading changes in file order. + +## When to Use It + +The primary scenario is the handoff from `bmad-quick-dev`: the implementation is done, the spec file is open in your editor with a review trail appended, and you need to decide whether to ship. Say "checkpoint" and go. + +It also works standalone: + +- **Reviewing a PR** — especially one with more than a handful of files or cross-cutting changes +- **Onboarding to a change** — when you need to understand what happened on a branch you didn't write +- **Sprint review** — the workflow can pick up stories marked `review` in your sprint status file + +Invoke it by saying "checkpoint" or "walk me through this change." It works in any terminal, but you'll get more out of it inside an IDE — VS Code, Cursor, or similar — because the workflow produces `path:line` references at every step. In an IDE-embedded terminal those are clickable, so you can jump from file to file as you follow the review trail. + +## What It Is Not + +Checkpoint Preview is not a substitute for automated review. It does not run linters, type checkers, or test suites. It does not assign severity scores or produce pass/fail verdicts. It is a reading guide that helps a human apply their judgment where it matters most. diff --git a/website/public/diagrams/checkpoint-preview-diagram.png b/website/public/diagrams/checkpoint-preview-diagram.png new file mode 100644 index 0000000000000000000000000000000000000000..a7e67adda97cfae7aa05b314dcdfc10abe5cff80 GIT binary patch literal 250104 zcmaHT2Rv2(|NnJeTv^wad2d$PWQJ>IWTnB)$V$>Rla+O^d6n5fR-4M`B3%30GAo75 zi;S{EM(BSO>ht-0|G&pW_i;Pt-18o<{d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82h;(KLVVffu>aej!C<@t1u$x+l6C)X z1?N9jt#1~x$Nc*k^e!O&!MDA>_c-#05%yC5Uj4Uq(umTC_L1jm^V+XMh5uhJR3D5N v{CAL4p>+cg2(+`ax7!I0?C`RQ9yf?Y+edzxH8wsoT literal 0 HcmV?d00001 From 07d72394fdcc24e2374436f862f0fe43455864c8 Mon Sep 17 00:00:00 2001 From: Alex Verkhovsky Date: Wed, 1 Apr 2026 21:52:46 -0700 Subject: [PATCH 22/26] fix(checkpoint): add explicit HALT before decision menu in wrapup step (#2184) Skill validator (STEP-04) flagged the decision menu in step-05 as missing an explicit halt instruction between presenting the menu and acting on the user's choice, risking LLM auto-advance. --- .../4-implementation/bmad-checkpoint-preview/step-05-wrapup.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-05-wrapup.md b/src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-05-wrapup.md index b3a67b4ee..5f293d56c 100644 --- a/src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-05-wrapup.md +++ b/src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-05-wrapup.md @@ -15,6 +15,8 @@ Review complete. What's the call on this {change_type}? - **Discuss** — something's still on your mind ``` +HALT — do not proceed until the user makes their choice. + ## ACT ON DECISION - **Approve**: Acknowledge briefly. If the human wants to patch something before shipping, help apply the fix interactively. If reviewing a PR, offer to approve via `gh pr review --approve` — but confirm with the human before executing, since this is a visible action on a shared resource. From 48c2324b2851a230944bb36081fd976c51b41d1e Mon Sep 17 00:00:00 2001 From: Alex Verkhovsky Date: Thu, 2 Apr 2026 07:13:35 -0700 Subject: [PATCH 23/26] chore: remove QA agent (Quinn) and migrate capability to Developer agent (#2179) Delete the Quinn (bmad-agent-qa) agent wrapper and add QA test-generation capability to Amelia (bmad-agent-dev). Update agent tables, testing docs (EN/ZH-CN/FR), marketplace.json, party-mode, and checklist references. Co-authored-by: Claude Opus 4.6 (1M context) --- .claude-plugin/marketplace.json | 1 - docs/fr/reference/testing.md | 6 +- docs/reference/agents.md | 5 +- docs/reference/testing.md | 34 +++++------ docs/zh-cn/reference/agents.md | 5 +- docs/zh-cn/reference/testing.md | 28 ++++----- .../4-implementation/bmad-agent-dev/SKILL.md | 1 + .../4-implementation/bmad-agent-qa/SKILL.md | 61 ------------------- .../bmad-agent-qa/bmad-skill-manifest.yaml | 11 ---- .../bmad-qa-generate-e2e-tests/checklist.md | 2 +- src/core-skills/bmad-party-mode/SKILL.md | 2 +- 11 files changed, 41 insertions(+), 115 deletions(-) delete mode 100644 src/bmm-skills/4-implementation/bmad-agent-qa/SKILL.md delete mode 100644 src/bmm-skills/4-implementation/bmad-agent-qa/bmad-skill-manifest.yaml diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index f8921ac14..ad8e9e528 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -60,7 +60,6 @@ "./src/bmm-skills/3-solutioning/bmad-generate-project-context", "./src/bmm-skills/4-implementation/bmad-agent-dev", "./src/bmm-skills/4-implementation/bmad-agent-sm", - "./src/bmm-skills/4-implementation/bmad-agent-qa", "./src/bmm-skills/4-implementation/bmad-dev-story", "./src/bmm-skills/4-implementation/bmad-quick-dev", "./src/bmm-skills/4-implementation/bmad-sprint-planning", diff --git a/docs/fr/reference/testing.md b/docs/fr/reference/testing.md index a7e487df4..effd4174e 100644 --- a/docs/fr/reference/testing.md +++ b/docs/fr/reference/testing.md @@ -24,9 +24,9 @@ La plupart des projets devraient commencer avec le workflow QA intégré. Si vou ## Workflow QA Intégré -Le workflow QA intégré est inclus dans le module BMM (suite Agile). Il génère rapidement des tests fonctionnels en utilisant le framework de test existant de votre projet — aucune configuration ni installation supplémentaire requise. +Le workflow QA intégré (`bmad-qa-generate-e2e-tests`) fait partie du module BMM (suite Agile), disponible via l'agent Developer. Il génère rapidement des tests fonctionnels en utilisant le framework de test existant de votre projet — aucune configuration ni installation supplémentaire requise. -**Déclencheur :** `QA` ou `bmad-qa-generate-e2e-tests` +**Déclencheur :** `QA` (via l'agent Developer) ou `bmad-qa-generate-e2e-tests` ### Ce que le Workflow QA Fait @@ -98,7 +98,7 @@ TEA supporte également la priorisation basée sur les risques P0-P3 et des int Le workflow Automate du QA intégré apparaît dans la Phase 4 (Implémentation) de la carte de workflow méthode BMad. Il est conçu pour s'exécuter **après qu'un epic complet soit terminé** — une fois que toutes les stories d'un epic ont été implémentées et revues. Une séquence typique : 1. Pour chaque story de l'epic : implémenter avec Dev Story (`DS`), puis valider avec Code Review (`CR`) -2. Après la fin de l'epic : générer les tests avec le workflow QA (`QA`) ou le workflow Automate de TEA +2. Après la fin de l'epic : générer les tests avec `QA` (via l'agent Developer) ou le workflow Automate de TEA 3. Lancer la rétrospective (`bmad-retrospective`) pour capturer les leçons apprises Le workflow QA travaille directement à partir du code source sans charger les documents de planification (PRD, architecture). Les workflows TEA peuvent s'intégrer avec les artefacts de planification en amont pour la traçabilité. diff --git a/docs/reference/agents.md b/docs/reference/agents.md index 52024fcea..404d14bdb 100644 --- a/docs/reference/agents.md +++ b/docs/reference/agents.md @@ -13,7 +13,7 @@ This page lists the default BMM (Agile suite) agents that install with BMad Meth - Each agent is available as a skill, generated by the installer. The skill ID (e.g., `bmad-dev`) is used to invoke the agent. - Triggers are the short menu codes (e.g., `CP`) and fuzzy matches shown in each agent menu. -- QA (Quinn) is the lightweight test automation agent in BMM. The full Test Architect (TEA) lives in its own module. +- QA test generation is handled by the `bmad-qa-generate-e2e-tests` workflow skill, available through the Developer agent. The full Test Architect (TEA) lives in its own module. | Agent | Skill ID | Triggers | Primary workflows | | --------------------------- | -------------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------- | @@ -21,8 +21,7 @@ This page lists the default BMM (Agile suite) agents that install with BMad Meth | Product Manager (John) | `bmad-pm` | `CP`, `VP`, `EP`, `CE`, `IR`, `CC` | Create/Validate/Edit PRD, Create Epics and Stories, Implementation Readiness, Correct Course | | Architect (Winston) | `bmad-architect` | `CA`, `IR` | Create Architecture, Implementation Readiness | | Scrum Master (Bob) | `bmad-sm` | `SP`, `CS`, `ER`, `CC` | Sprint Planning, Create Story, Epic Retrospective, Correct Course | -| Developer (Amelia) | `bmad-dev` | `DS`, `QD`, `CR` | Dev Story, Quick Dev, Code Review | -| QA Engineer (Quinn) | `bmad-qa` | `QA` | Automate (generate tests for existing features) | +| Developer (Amelia) | `bmad-dev` | `DS`, `QD`, `QA`, `CR` | Dev Story, Quick Dev, QA Test Generation, Code Review | | UX Designer (Sally) | `bmad-ux-designer` | `CU` | Create UX Design | | Technical Writer (Paige) | `bmad-tech-writer` | `DP`, `WD`, `US`, `MG`, `VD`, `EC` | Document Project, Write Document, Update Standards, Mermaid Generate, Validate Doc, Explain Concept | diff --git a/docs/reference/testing.md b/docs/reference/testing.md index f7832c2e6..d605e4932 100644 --- a/docs/reference/testing.md +++ b/docs/reference/testing.md @@ -1,15 +1,15 @@ --- title: Testing Options -description: Comparing the built-in QA agent (Quinn) with the Test Architect (TEA) module for test automation. +description: Comparing the built-in QA workflow with the Test Architect (TEA) module for test automation. sidebar: order: 5 --- -BMad provides two testing paths: a built-in QA agent for fast test generation and an installable Test Architect module for enterprise-grade test strategy. +BMad provides two testing paths: a built-in QA workflow for fast test generation and an installable Test Architect module for enterprise-grade test strategy. ## Which Should You Use? -| Factor | Quinn (Built-in QA) | TEA Module | +| Factor | Built-in QA | TEA Module | | --- | --- | --- | | **Best for** | Small-medium projects, quick coverage | Large projects, regulated or complex domains | | **Setup** | Nothing to install -- included in BMM | Install separately via `npx bmad-method install` | @@ -18,19 +18,19 @@ BMad provides two testing paths: a built-in QA agent for fast test generation an | **Strategy** | Happy path + critical edge cases | Risk-based prioritization (P0-P3) | | **Workflow count** | 1 (Automate) | 9 (design, ATDD, automate, review, trace, and others) | -:::tip[Start with Quinn] -Most projects should start with Quinn. If you later need test strategy, quality gates, or requirements traceability, install TEA alongside it. +:::tip[Start with built-in QA] +Most projects should start with the built-in QA workflow. If you later need test strategy, quality gates, or requirements traceability, install TEA alongside it. ::: -## Built-in QA Agent (Quinn) +## Built-in QA Workflow -Quinn is the built-in QA agent in the BMM (Agile suite) module. It generates working tests quickly using your project's existing test framework -- no configuration or additional installation required. +The built-in QA workflow (`bmad-qa-generate-e2e-tests`) is part of the BMM (Agile suite) module, available through the Developer agent. It generates working tests quickly using your project's existing test framework -- no configuration or additional installation required. -**Trigger:** `QA` or `bmad-qa-generate-e2e-tests` +**Trigger:** `QA` (via the Developer agent) or `bmad-qa-generate-e2e-tests` -### What Quinn Does +### What It Does -Quinn runs a single workflow (Automate) that walks through five steps: +The QA workflow (Automate) walks through five steps: 1. **Detect test framework** -- scans `package.json` and existing test files for your framework (Jest, Vitest, Playwright, Cypress, or any standard runner). If none exists, analyzes the project stack and suggests one. 2. **Identify features** -- asks what to test or auto-discovers features in the codebase. @@ -38,7 +38,7 @@ Quinn runs a single workflow (Automate) that walks through five steps: 4. **Generate E2E tests** -- covers user workflows with semantic locators and visible-outcome assertions. 5. **Run and verify** -- executes the generated tests and fixes failures immediately. -Quinn produces a test summary saved to your project's implementation artifacts folder. +The workflow produces a test summary saved to your project's implementation artifacts folder. ### Test Patterns @@ -51,10 +51,10 @@ Generated tests follow a "simple and maintainable" philosophy: - **Clear descriptions** that read as feature documentation :::note[Scope] -Quinn generates tests only. For code review and story validation, use the Code Review workflow (`CR`) instead. +The QA workflow generates tests only. For code review and story validation, use the Code Review workflow (`CR`) instead. ::: -### When to Use Quinn +### When to Use Built-in QA - Quick test coverage for a new or existing feature - Beginner-friendly test automation without advanced setup @@ -91,16 +91,16 @@ TEA also supports P0-P3 risk-based prioritization and optional integrations with - Teams that need risk-based test prioritization across many features - Enterprise environments with formal quality gates before release - Complex domains where test strategy must be planned before tests are written -- Projects that have outgrown Quinn's single-workflow approach +- Projects that have outgrown the built-in QA's single-workflow approach ## How Testing Fits into Workflows -Quinn's Automate workflow appears in Phase 4 (Implementation) of the BMad Method workflow map. It is designed to run **after a full epic is complete** — once all stories in an epic have been implemented and code-reviewed. A typical sequence: +The QA Automate workflow appears in Phase 4 (Implementation) of the BMad Method workflow map. It is designed to run **after a full epic is complete** — once all stories in an epic have been implemented and code-reviewed. A typical sequence: 1. For each story in the epic: implement with Dev (`DS`), then validate with Code Review (`CR`) -2. After the epic is complete: generate tests with Quinn (`QA`) or TEA's Automate workflow +2. After the epic is complete: generate tests with `QA` (via the Developer agent) or TEA's Automate workflow 3. Run retrospective (`bmad-retrospective`) to capture lessons learned -Quinn works directly from source code without loading planning documents (PRD, architecture). TEA workflows can integrate with upstream planning artifacts for traceability. +The built-in QA workflow works directly from source code without loading planning documents (PRD, architecture). TEA workflows can integrate with upstream planning artifacts for traceability. For more on where testing fits in the overall process, see the [Workflow Map](./workflow-map.md). diff --git a/docs/zh-cn/reference/agents.md b/docs/zh-cn/reference/agents.md index 4d45044e9..acaa23e92 100644 --- a/docs/zh-cn/reference/agents.md +++ b/docs/zh-cn/reference/agents.md @@ -15,8 +15,7 @@ sidebar: | Product Manager (John) | `bmad-pm` | `CP`、`VP`、`EP`、`CE`、`IR`、`CC` | Create/Validate/Edit PRD、Create Epics and Stories、Implementation Readiness、Correct Course | | Architect (Winston) | `bmad-architect` | `CA`、`IR` | Create Architecture、Implementation Readiness | | Scrum Master (Bob) | `bmad-sm` | `SP`、`CS`、`ER`、`CC` | Sprint Planning、Create Story、Epic Retrospective、Correct Course | -| Developer (Amelia) | `bmad-dev` | `DS`、`QD`、`CR` | Dev Story、Quick Dev、Code Review | -| QA Engineer (Quinn) | `bmad-qa` | `QA` | Automate(为既有功能生成测试) | +| Developer (Amelia) | `bmad-dev` | `DS`、`QD`、`QA`、`CR` | Dev Story、Quick Dev、QA Test Generation、Code Review | | UX Designer (Sally) | `bmad-ux-designer` | `CU` | Create UX Design | | Technical Writer (Paige) | `bmad-tech-writer` | `DP`、`WD`、`US`、`MG`、`VD`、`EC` | Document Project、Write Document、Update Standards、Mermaid Generate、Validate Doc、Explain Concept | @@ -24,7 +23,7 @@ sidebar: - `Skill ID` 是直接调用该智能体的名称(例如 `bmad-dev`) - 触发器是进入智能体会话后可使用的菜单短码 -- QA(Quinn)是 BMM 内置轻量测试角色;完整 TEA 能力位于独立模块 +- QA 测试生成由 `bmad-qa-generate-e2e-tests` workflow skill 处理,通过 Developer 智能体调用;完整 TEA 能力位于独立模块 ## 触发器类型 diff --git a/docs/zh-cn/reference/testing.md b/docs/zh-cn/reference/testing.md index a3f035ffb..c5b7e3890 100644 --- a/docs/zh-cn/reference/testing.md +++ b/docs/zh-cn/reference/testing.md @@ -1,17 +1,17 @@ --- title: "测试选项" -description: 内置 QA(Quinn)与 TEA 模块对比:何时用哪个、各自边界是什么 +description: 内置 QA workflow 与 TEA 模块对比:何时用哪个、各自边界是什么 sidebar: order: 5 --- BMad 有两条测试路径: -- **Quinn(内置 QA)**:快速生成可运行测试 +- **内置 QA workflow**:快速生成可运行测试 - **TEA(可选模块)**:企业级测试策略与治理能力 -## 该选 Quinn 还是 TEA? +## 该选内置 QA 还是 TEA? -| 维度 | Quinn(内置 QA) | TEA 模块 | +| 维度 | 内置 QA | TEA 模块 | | --- | --- | --- | | 最适合 | 中小项目、快速补覆盖 | 大型项目、受监管或复杂业务 | | 安装成本 | 无需额外安装(BMM 内置) | 需通过安装器单独选择 | @@ -21,20 +21,20 @@ BMad 有两条测试路径: | workflow 数量 | 1(Automate) | 9(设计/自动化/审查/追溯等) | :::tip[默认建议] -大多数项目先用 Quinn。只有当你需要质量门控、合规追溯或系统化测试治理时,再引入 TEA。 +大多数项目先用内置 QA workflow。只有当你需要质量门控、合规追溯或系统化测试治理时,再引入 TEA。 ::: -## 内置 QA(Quinn) +## 内置 QA Workflow -Quinn 是 BMM 内置 agent,目标是用你现有测试栈快速落地测试,不要求额外配置。 +内置 QA workflow(`bmad-qa-generate-e2e-tests`)是 BMM 模块的一部分,通过 Developer 智能体调用。目标是用你现有测试栈快速落地测试,不要求额外配置。 **触发方式:** -- 菜单触发器:`QA` +- 菜单触发器:`QA`(通过 Developer 智能体) - skill:`bmad-qa-generate-e2e-tests` -### Quinn 会做什么 +### QA Workflow 会做什么 -Quinn 的 Automate 流程通常包含 5 步: +QA Automate 流程通常包含 5 步: 1. 检测现有测试框架(如 Jest、Vitest、Playwright、Cypress) 2. 确认待测功能(手动指定或自动发现) 3. 生成 API 测试(状态码、结构、主路径与错误分支) @@ -48,10 +48,10 @@ Quinn 的 Automate 流程通常包含 5 步: - 避免硬编码等待/休眠 :::note[范围边界] -Quinn 只负责“生成测试”。如需实现质量评审与故事验收,请配合代码审查 workflow(`CR` / `bmad-code-review`)。 +QA workflow 只负责”生成测试”。如需实现质量评审与故事验收,请配合代码审查 workflow(`CR` / `bmad-code-review`)。 ::: -### 何时用 Quinn +### 何时用内置 QA - 要快速补齐某个功能的测试覆盖 - 团队希望先获得可运行基线,再逐步增强 @@ -93,10 +93,10 @@ TEA 提供专家测试 agent(Murat)与 9 个结构化 workflow,覆盖策 按 BMad workflow-map,测试位于阶段 4(实施): 1. epic 内逐个 story:开发(`DS` / `bmad-dev-story`)+ 代码审查(`CR` / `bmad-code-review`) -2. epic 完成后:用 Quinn 或 TEA 的 Automate 统一生成/补齐测试 +2. epic 完成后:用 `QA`(通过 Developer 智能体)或 TEA 的 Automate 统一生成/补齐测试 3. 最后执行复盘(`bmad-retrospective`) -Quinn 主要依据代码直接生成测试;TEA 可结合上游规划产物(如 PRD、architecture)实现更强追溯。 +内置 QA workflow 主要依据代码直接生成测试;TEA 可结合上游规划产物(如 PRD、architecture)实现更强追溯。 ## 相关参考 diff --git a/src/bmm-skills/4-implementation/bmad-agent-dev/SKILL.md b/src/bmm-skills/4-implementation/bmad-agent-dev/SKILL.md index a8096622f..c0d15c8f1 100644 --- a/src/bmm-skills/4-implementation/bmad-agent-dev/SKILL.md +++ b/src/bmm-skills/4-implementation/bmad-agent-dev/SKILL.md @@ -43,6 +43,7 @@ When you are in this persona and the user calls a skill, this persona must carry |------|-------------|-------| | DS | Write the next or specified story's tests and code | bmad-dev-story | | QD | Unified quick flow — clarify intent, plan, implement, review, present | bmad-quick-dev | +| QA | Generate API and E2E tests for existing features | bmad-qa-generate-e2e-tests | | CR | Initiate a comprehensive code review across multiple quality facets | bmad-code-review | ## On Activation diff --git a/src/bmm-skills/4-implementation/bmad-agent-qa/SKILL.md b/src/bmm-skills/4-implementation/bmad-agent-qa/SKILL.md deleted file mode 100644 index 1a666fe50..000000000 --- a/src/bmm-skills/4-implementation/bmad-agent-qa/SKILL.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -name: bmad-agent-qa -description: QA engineer for test automation and coverage. Use when the user asks to talk to Quinn or requests the QA engineer. ---- - -# Quinn - -## Overview - -This skill provides a QA Engineer who generates tests quickly for existing features using standard test framework patterns. Act as Quinn — pragmatic, ship-it-and-iterate, focused on getting coverage fast without overthinking. - -## Identity - -Pragmatic test automation engineer focused on rapid test coverage. Specializes in generating tests quickly for existing features using standard test framework patterns. Simpler, more direct approach than the advanced Test Architect module. - -## Communication Style - -Practical and straightforward. Gets tests written fast without overthinking. "Ship it and iterate" mentality. Focuses on coverage first, optimization later. - -## Principles - -- Generate API and E2E tests for implemented code. -- Tests should pass on first run. - -## Critical Actions - -- Never skip running the generated tests to verify they pass -- Always use standard test framework APIs (no external utilities) -- Keep tests simple and maintainable -- Focus on realistic user scenarios - -**Need more advanced testing?** For comprehensive test strategy, risk-based planning, quality gates, and enterprise features, install the Test Architect (TEA) module. - -You must fully embody this persona so the user gets the best experience and help they need, therefore its important to remember you must not break character until the users dismisses this persona. - -When you are in this persona and the user calls a skill, this persona must carry through and remain active. - -## Capabilities - -| Code | Description | Skill | -|------|-------------|-------| -| QA | Generate API and E2E tests for existing features | bmad-qa-generate-e2e-tests | - -## On Activation - -1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: - - Use `{user_name}` for greeting - - Use `{communication_language}` for all communications - - Use `{document_output_language}` for output documents - - Use `{planning_artifacts}` for output location and artifact scanning - - Use `{project_knowledge}` for additional context scanning - -2. **Continue with steps below:** - - **Load project context** — Search for `**/project-context.md`. If found, load as foundational reference for project standards and conventions. If not found, continue without it. - - **Greet and present capabilities** — Greet `{user_name}` warmly by name, always speaking in `{communication_language}` and applying your persona throughout the session. - -3. Remind the user they can invoke the `bmad-help` skill at any time for advice and then present the capabilities table from the Capabilities section above. - - **STOP and WAIT for user input** — Do NOT execute menu items automatically. Accept number, menu code, or fuzzy command match. - -**CRITICAL Handling:** When user responds with a code, line number or skill, invoke the corresponding skill by its exact registered name from the Capabilities table. DO NOT invent capabilities on the fly. diff --git a/src/bmm-skills/4-implementation/bmad-agent-qa/bmad-skill-manifest.yaml b/src/bmm-skills/4-implementation/bmad-agent-qa/bmad-skill-manifest.yaml deleted file mode 100644 index ebf5e98bb..000000000 --- a/src/bmm-skills/4-implementation/bmad-agent-qa/bmad-skill-manifest.yaml +++ /dev/null @@ -1,11 +0,0 @@ -type: agent -name: bmad-agent-qa -displayName: Quinn -title: QA Engineer -icon: "🧪" -capabilities: "test automation, API testing, E2E testing, coverage analysis" -role: QA Engineer -identity: "Pragmatic test automation engineer focused on rapid test coverage. Specializes in generating tests quickly for existing features using standard test framework patterns. Simpler, more direct approach than the advanced Test Architect module." -communicationStyle: "Practical and straightforward. Gets tests written fast without overthinking. 'Ship it and iterate' mentality. Focuses on coverage first, optimization later." -principles: "Generate API and E2E tests for implemented code. Tests should pass on first run." -module: bmm diff --git a/src/bmm-skills/4-implementation/bmad-qa-generate-e2e-tests/checklist.md b/src/bmm-skills/4-implementation/bmad-qa-generate-e2e-tests/checklist.md index 013bc6390..aa38ae890 100644 --- a/src/bmm-skills/4-implementation/bmad-qa-generate-e2e-tests/checklist.md +++ b/src/bmm-skills/4-implementation/bmad-qa-generate-e2e-tests/checklist.md @@ -1,4 +1,4 @@ -# Quinn Automate - Validation Checklist +# QA Automate - Validation Checklist ## Test Generation diff --git a/src/core-skills/bmad-party-mode/SKILL.md b/src/core-skills/bmad-party-mode/SKILL.md index b6b99ed5e..acdf2cb0c 100644 --- a/src/core-skills/bmad-party-mode/SKILL.md +++ b/src/core-skills/bmad-party-mode/SKILL.md @@ -102,7 +102,7 @@ The user drives what happens next. Common patterns: |---|---| | Continues the general discussion | Pick fresh agents, repeat the loop | | "Winston, what do you think about what Sally said?" | Spawn just Winston with Sally's response as context | -| "Bring in Quinn on this" | Spawn Quinn with a summary of the discussion so far | +| "Bring in Amelia on this" | Spawn Amelia with a summary of the discussion so far | | "I agree with John, let's go deeper on that" | Spawn John + 1-2 others to expand on John's point | | "What would Mary and Bob think about Winston's approach?" | Spawn Mary and Bob with Winston's response as context | | Asks a question directed at everyone | Back to step 1 with all agents | From 003c979dbc2a44e1967a9414219490cd21672c49 Mon Sep 17 00:00:00 2001 From: Alex Verkhovsky Date: Thu, 2 Apr 2026 12:25:24 -0700 Subject: [PATCH 24/26] chore: remove SM agent (Bob) and migrate to Developer agent (#2186) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: remove SM agent (Bob) and migrate capabilities to Developer agent Co-Authored-By: Claude Opus 4.6 (1M context) * fix(docs): correct agent naming and grammar from review triage Standardize Developer agent references to bmad-agent-dev (matching installed skill directory name) and fix possessive apostrophe in implementation-readiness workflow. * fix(skills): replace dev team references with Developer agent No longer a multi-agent development team — just one Developer agent. Remove residual Scrum Master search patterns from retrospective. --------- Co-authored-by: Claude Opus 4.6 (1M context) --- .claude-plugin/marketplace.json | 1 - README.md | 2 +- README_CN.md | 2 +- docs/_STYLE_GUIDE.md | 2 +- docs/how-to/upgrade-to-v6.md | 4 +- docs/reference/agents.md | 3 +- docs/reference/commands.md | 9 +- docs/tutorials/getting-started.md | 12 +- docs/zh-cn/_STYLE_GUIDE.md | 2 +- docs/zh-cn/how-to/upgrade-to-v6.md | 4 +- docs/zh-cn/reference/agents.md | 5 +- docs/zh-cn/reference/commands.md | 9 +- docs/zh-cn/tutorials/getting-started.md | 12 +- .../steps/step-13-responsive-accessibility.md | 2 +- .../steps/step-01-document-discovery.md | 2 +- .../steps/step-02-prd-analysis.md | 2 +- .../steps/step-03-epic-coverage-validation.md | 2 +- .../workflow.md | 2 +- .../bmad-create-epics-and-stories/workflow.md | 2 +- .../4-implementation/bmad-agent-dev/SKILL.md | 3 + .../4-implementation/bmad-agent-sm/SKILL.md | 55 ---- .../bmad-agent-sm/bmad-skill-manifest.yaml | 11 - .../bmad-correct-course/checklist.md | 4 +- .../bmad-correct-course/workflow.md | 16 +- .../bmad-retrospective/workflow.md | 268 +++++++++--------- .../sprint-status-template.yaml | 2 +- .../bmad-sprint-planning/workflow.md | 6 +- .../bmad-sprint-status/workflow.md | 4 +- src/core-skills/bmad-party-mode/SKILL.md | 2 +- 29 files changed, 191 insertions(+), 259 deletions(-) delete mode 100644 src/bmm-skills/4-implementation/bmad-agent-sm/SKILL.md delete mode 100644 src/bmm-skills/4-implementation/bmad-agent-sm/bmad-skill-manifest.yaml diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index ad8e9e528..53956dcbd 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -59,7 +59,6 @@ "./src/bmm-skills/3-solutioning/bmad-create-epics-and-stories", "./src/bmm-skills/3-solutioning/bmad-generate-project-context", "./src/bmm-skills/4-implementation/bmad-agent-dev", - "./src/bmm-skills/4-implementation/bmad-agent-sm", "./src/bmm-skills/4-implementation/bmad-dev-story", "./src/bmm-skills/4-implementation/bmad-quick-dev", "./src/bmm-skills/4-implementation/bmad-sprint-planning", diff --git a/README.md b/README.md index d76519c97..5a6d67c44 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Traditional AI tools do the thinking for you, producing average results. BMad ag - **AI Intelligent Help** — Invoke the `bmad-help` skill anytime for guidance on what's next - **Scale-Domain-Adaptive** — Automatically adjusts planning depth based on project complexity - **Structured Workflows** — Grounded in agile best practices across analysis, planning, architecture, and implementation -- **Specialized Agents** — 12+ domain experts (PM, Architect, Developer, UX, Scrum Master, and more) +- **Specialized Agents** — 12+ domain experts (PM, Architect, Developer, UX, and more) - **Party Mode** — Bring multiple agent personas into one session to collaborate and discuss - **Complete Lifecycle** — From brainstorming to deployment diff --git a/README_CN.md b/README_CN.md index a939a0c7b..ec9ba0a01 100644 --- a/README_CN.md +++ b/README_CN.md @@ -16,7 +16,7 @@ - **AI 智能引导** —— 随时调用 `bmad-help` 获取下一步建议 - **规模与领域自适应** —— 按项目复杂度自动调整规划深度 - **结构化工作流** —— 覆盖分析、规划、架构、实施全流程 -- **专业角色智能体** —— 提供 PM、架构师、开发者、UX、Scrum Master 等 12+ 角色 +- **专业角色智能体** —— 提供 PM、架构师、开发者、UX 等 12+ 角色 - **派对模式** —— 多个智能体可在同一会话协作讨论 - **完整生命周期** —— 从头脑风暴一路到交付上线 diff --git a/docs/_STYLE_GUIDE.md b/docs/_STYLE_GUIDE.md index d23e93114..ea2335ed4 100644 --- a/docs/_STYLE_GUIDE.md +++ b/docs/_STYLE_GUIDE.md @@ -353,7 +353,7 @@ Only for BMad Method and Enterprise tracks. Quick Flow skips to implementation. ### Can I change my plan later? -Yes. The SM agent has a `bmad-correct-course` workflow for handling scope changes. +Yes. The `bmad-correct-course` workflow handles scope changes mid-implementation. **Have a question not answered here?** [Open an issue](...) or ask in [Discord](...). ``` diff --git a/docs/how-to/upgrade-to-v6.md b/docs/how-to/upgrade-to-v6.md index e01d95f00..ae0b43aac 100644 --- a/docs/how-to/upgrade-to-v6.md +++ b/docs/how-to/upgrade-to-v6.md @@ -61,8 +61,8 @@ If you have stories created or implemented: 1. Complete the v6 installation 2. Place `epics.md` or `epics/epic*.md` in `_bmad-output/planning-artifacts/` -3. Run the Scrum Master's `bmad-sprint-planning` workflow -4. Tell the SM which epics/stories are already complete +3. Run the Developer's `bmad-sprint-planning` workflow +4. Tell the agent which epics/stories are already complete ## What You Get diff --git a/docs/reference/agents.md b/docs/reference/agents.md index 404d14bdb..59d2f1372 100644 --- a/docs/reference/agents.md +++ b/docs/reference/agents.md @@ -20,8 +20,7 @@ This page lists the default BMM (Agile suite) agents that install with BMad Meth | Analyst (Mary) | `bmad-analyst` | `BP`, `RS`, `CB`, `WB`, `DP` | Brainstorm Project, Research, Create Brief, PRFAQ Challenge, Document Project | | Product Manager (John) | `bmad-pm` | `CP`, `VP`, `EP`, `CE`, `IR`, `CC` | Create/Validate/Edit PRD, Create Epics and Stories, Implementation Readiness, Correct Course | | Architect (Winston) | `bmad-architect` | `CA`, `IR` | Create Architecture, Implementation Readiness | -| Scrum Master (Bob) | `bmad-sm` | `SP`, `CS`, `ER`, `CC` | Sprint Planning, Create Story, Epic Retrospective, Correct Course | -| Developer (Amelia) | `bmad-dev` | `DS`, `QD`, `QA`, `CR` | Dev Story, Quick Dev, QA Test Generation, Code Review | +| Developer (Amelia) | `bmad-agent-dev` | `DS`, `QD`, `QA`, `CR`, `SP`, `CS`, `ER` | Dev Story, Quick Dev, QA Test Generation, Code Review, Sprint Planning, Create Story, Epic Retrospective | | UX Designer (Sally) | `bmad-ux-designer` | `CU` | Create UX Design | | Technical Writer (Paige) | `bmad-tech-writer` | `DP`, `WD`, `US`, `MG`, `VD`, `EC` | Document Project, Write Document, Update Standards, Mermaid Generate, Validate Doc, Explain Concept | diff --git a/docs/reference/commands.md b/docs/reference/commands.md index cba86d050..5445ab667 100644 --- a/docs/reference/commands.md +++ b/docs/reference/commands.md @@ -54,12 +54,12 @@ Each skill is a directory containing a `SKILL.md` file. For example, a Claude Co │ └── SKILL.md ├── bmad-create-prd/ │ └── SKILL.md -├── bmad-dev/ +├── bmad-agent-dev/ │ └── SKILL.md └── ... ``` -The directory name determines the skill name in your IDE. For example, the directory `bmad-dev/` registers the skill `bmad-dev`. +The directory name determines the skill name in your IDE. For example, the directory `bmad-agent-dev/` registers the skill `bmad-agent-dev`. ## How to Discover Your Skills @@ -79,10 +79,9 @@ Agent skills load a specialized AI persona with a defined role, communication st | Example skill | Agent | Role | | --- | --- | --- | -| `bmad-dev` | Amelia (Developer) | Implements stories with strict adherence to specs | +| `bmad-agent-dev` | Amelia (Developer) | Implements stories with strict adherence to specs | | `bmad-pm` | John (Product Manager) | Creates and validates PRDs | | `bmad-architect` | Winston (Architect) | Designs system architecture | -| `bmad-sm` | Bob (Scrum Master) | Manages sprints and stories | See [Agents](./agents.md) for the full list of default agents and their triggers. @@ -125,7 +124,7 @@ The core module includes 11 built-in tools — reviews, compression, brainstormi ## Naming Convention -All skills use the `bmad-` prefix followed by a descriptive name (e.g., `bmad-dev`, `bmad-create-prd`, `bmad-help`). See [Modules](./modules.md) for available modules. +All skills use the `bmad-` prefix followed by a descriptive name (e.g., `bmad-agent-dev`, `bmad-create-prd`, `bmad-help`). See [Modules](./modules.md) for available modules. ## Troubleshooting diff --git a/docs/tutorials/getting-started.md b/docs/tutorials/getting-started.md index b85085811..94aaa521a 100644 --- a/docs/tutorials/getting-started.md +++ b/docs/tutorials/getting-started.md @@ -181,7 +181,7 @@ Once planning is complete, move to implementation. **Each workflow should run in ### Initialize Sprint Planning -Invoke the **SM agent** (`bmad-agent-sm`) and run `bmad-sprint-planning` (`bmad-sprint-planning`). This creates `sprint-status.yaml` to track all epics and stories. +Invoke the **Developer agent** (`bmad-agent-dev`) and run `bmad-sprint-planning` (`bmad-sprint-planning`). This creates `sprint-status.yaml` to track all epics and stories. ### The Build Cycle @@ -189,11 +189,11 @@ For each story, repeat this cycle with fresh chats: | Step | Agent | Workflow | Command | Purpose | | ---- | ----- | -------------- | -------------------------- | ---------------------------------- | -| 1 | SM | `bmad-create-story` | `bmad-create-story` | Create story file from epic | +| 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 **SM agent** (`bmad-agent-sm`) and run `bmad-retrospective` (`bmad-retrospective`). +After completing all stories in an epic, invoke the **Developer agent** (`bmad-agent-dev`) and run `bmad-retrospective` (`bmad-retrospective`). ## What You've Accomplished @@ -230,8 +230,8 @@ your-project/ | `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` | SM | Initialize sprint tracking | -| `bmad-create-story` | `bmad-create-story` | SM | Create a story file | +| `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 | @@ -241,7 +241,7 @@ your-project/ Only for BMad Method and Enterprise tracks. Quick Flow skips from spec to implementation. **Can I change my plan later?** -Yes. The SM agent has a `bmad-correct-course` workflow (`bmad-correct-course`) for handling scope changes. +Yes. The `bmad-correct-course` workflow handles scope changes mid-implementation. **What if I want to brainstorm first?** Invoke the Analyst agent (`bmad-agent-analyst`) and run `bmad-brainstorming` (`bmad-brainstorming`) before starting your PRD. diff --git a/docs/zh-cn/_STYLE_GUIDE.md b/docs/zh-cn/_STYLE_GUIDE.md index 13cb44d02..39aacee59 100644 --- a/docs/zh-cn/_STYLE_GUIDE.md +++ b/docs/zh-cn/_STYLE_GUIDE.md @@ -353,7 +353,7 @@ Only for BMad Method and Enterprise tracks. Quick Flow skips to implementation. ### Can I change my plan later? -Yes. The SM agent has a `bmad-correct-course` workflow for handling scope changes. +Yes. The `bmad-correct-course` workflow handles scope changes mid-implementation. **Have a question not answered here?** [Open an issue](...) or ask in [Discord](...). ``` diff --git a/docs/zh-cn/how-to/upgrade-to-v6.md b/docs/zh-cn/how-to/upgrade-to-v6.md index eb28c9c38..8a3ed4a46 100644 --- a/docs/zh-cn/how-to/upgrade-to-v6.md +++ b/docs/zh-cn/how-to/upgrade-to-v6.md @@ -65,8 +65,8 @@ v6 新技能会安装到: 1. 完成 v6 安装 2. 将 `epics.md` 或 `epics/epic*.md` 放入 `_bmad-output/planning-artifacts/` -3. 运行 Scrum Master 的 `bmad-sprint-planning` 工作流 -4. 告诉 SM 哪些史诗/故事已经完成 +3. 运行 Developer 的 `bmad-sprint-planning` 工作流 +4. 告知智能体哪些史诗/故事已经完成 ## 你将获得 diff --git a/docs/zh-cn/reference/agents.md b/docs/zh-cn/reference/agents.md index acaa23e92..96570234c 100644 --- a/docs/zh-cn/reference/agents.md +++ b/docs/zh-cn/reference/agents.md @@ -14,14 +14,13 @@ sidebar: | Analyst (Mary) | `bmad-analyst` | `BP`、`RS`、`CB`、`DP` | Brainstorm、Research、Create Brief、Document Project | | Product Manager (John) | `bmad-pm` | `CP`、`VP`、`EP`、`CE`、`IR`、`CC` | Create/Validate/Edit PRD、Create Epics and Stories、Implementation Readiness、Correct Course | | Architect (Winston) | `bmad-architect` | `CA`、`IR` | Create Architecture、Implementation Readiness | -| Scrum Master (Bob) | `bmad-sm` | `SP`、`CS`、`ER`、`CC` | Sprint Planning、Create Story、Epic Retrospective、Correct Course | -| Developer (Amelia) | `bmad-dev` | `DS`、`QD`、`QA`、`CR` | Dev Story、Quick Dev、QA Test Generation、Code Review | +| Developer (Amelia) | `bmad-agent-dev` | `DS`、`QD`、`QA`、`CR`、`SP`、`CS`、`ER` | Dev Story、Quick Dev、QA Test Generation、Code Review、Sprint Planning、Create Story、Epic Retrospective | | UX Designer (Sally) | `bmad-ux-designer` | `CU` | Create UX Design | | Technical Writer (Paige) | `bmad-tech-writer` | `DP`、`WD`、`US`、`MG`、`VD`、`EC` | Document Project、Write Document、Update Standards、Mermaid Generate、Validate Doc、Explain Concept | ## 使用说明 -- `Skill ID` 是直接调用该智能体的名称(例如 `bmad-dev`) +- `Skill ID` 是直接调用该智能体的名称(例如 `bmad-agent-dev`) - 触发器是进入智能体会话后可使用的菜单短码 - QA 测试生成由 `bmad-qa-generate-e2e-tests` workflow skill 处理,通过 Developer 智能体调用;完整 TEA 能力位于独立模块 diff --git a/docs/zh-cn/reference/commands.md b/docs/zh-cn/reference/commands.md index 99680f32d..118aee280 100644 --- a/docs/zh-cn/reference/commands.md +++ b/docs/zh-cn/reference/commands.md @@ -48,12 +48,12 @@ sidebar: │ └── SKILL.md ├── bmad-create-prd/ │ └── SKILL.md -├── bmad-dev/ +├── bmad-agent-dev/ │ └── SKILL.md └── ... ``` -skill 目录名就是调用名,例如 `bmad-dev/` 对应 skill `bmad-dev`。 +skill 目录名就是调用名,例如 `bmad-agent-dev/` 对应 skill `bmad-agent-dev`。 ## 如何发现可用 skills @@ -73,10 +73,9 @@ skill 目录名就是调用名,例如 `bmad-dev/` 对应 skill `bmad-dev`。 | 示例 skill | 角色 | 用途 | | --- | --- | --- | -| `bmad-dev` | Developer(Amelia) | 按规范实现 story | +| `bmad-agent-dev` | Developer(Amelia) | 按规范实现 story | | `bmad-pm` | Product Manager(John) | 创建与校验 PRD | | `bmad-architect` | Architect(Winston) | 架构设计与约束定义 | -| `bmad-sm` | Scrum Master(Bob) | 冲刺与 story 流程管理 | 完整列表见 [智能体参考](./agents.md)。 @@ -105,7 +104,7 @@ skill 目录名就是调用名,例如 `bmad-dev/` 对应 skill `bmad-dev`。 ## 命名规则 -所有技能统一以 `bmad-` 开头,后接语义化名称(如 `bmad-dev`、`bmad-create-prd`、`bmad-help`)。 +所有技能统一以 `bmad-` 开头,后接语义化名称(如 `bmad-agent-dev`、`bmad-create-prd`、`bmad-help`)。 ## 故障排查 diff --git a/docs/zh-cn/tutorials/getting-started.md b/docs/zh-cn/tutorials/getting-started.md index 753a88a8f..aa1e5b610 100644 --- a/docs/zh-cn/tutorials/getting-started.md +++ b/docs/zh-cn/tutorials/getting-started.md @@ -180,7 +180,7 @@ BMad-Help 将检测你已完成的内容,并准确推荐下一步该做什么 ### 初始化冲刺规划 -调用 **SM 智能体**(`bmad-agent-sm`)并运行 `bmad-sprint-planning`(`bmad-sprint-planning`)。这会创建 `sprint-status.yaml` 来跟踪所有史诗和故事。 +调用 **Developer 智能体**(`bmad-agent-dev`)并运行 `bmad-sprint-planning`(`bmad-sprint-planning`)。这会创建 `sprint-status.yaml` 来跟踪所有史诗和故事。 ### 构建周期 @@ -188,11 +188,11 @@ BMad-Help 将检测你已完成的内容,并准确推荐下一步该做什么 | 步骤 | 智能体 | 工作流 | 命令 | 目的 | | ---- | ------ | ------------ | ----------------------- | ------------------------------- | -| 1 | SM | `bmad-create-story` | `bmad-create-story` | 从史诗创建故事文件 | +| 1 | DEV | `bmad-create-story` | `bmad-create-story` | 从史诗创建故事文件 | | 2 | DEV | `bmad-dev-story` | `bmad-dev-story` | 实现故事 | | 3 | DEV | `bmad-code-review` | `bmad-code-review` | 质量验证 *(推荐)* | -完成史诗中的所有故事后,调用 **SM 智能体**(`bmad-agent-sm`)并运行 `bmad-retrospective`(`bmad-retrospective`)。 +完成史诗中的所有故事后,调用 **Developer 智能体**(`bmad-agent-dev`)并运行 `bmad-retrospective`(`bmad-retrospective`)。 ## 你已完成的工作 @@ -229,8 +229,8 @@ your-project/ | `bmad-generate-project-context` | `bmad-generate-project-context` | Analyst | 创建项目上下文文件 | | `bmad-create-epics-and-stories` | `bmad-create-epics-and-stories` | PM | 将 PRD 分解为史诗 | | `bmad-check-implementation-readiness` | `bmad-check-implementation-readiness` | Architect | 验证规划一致性 | -| `bmad-sprint-planning` | `bmad-sprint-planning` | SM | 初始化冲刺跟踪 | -| `bmad-create-story` | `bmad-create-story` | SM | 创建故事文件 | +| `bmad-sprint-planning` | `bmad-sprint-planning` | DEV | 初始化冲刺跟踪 | +| `bmad-create-story` | `bmad-create-story` | DEV | 创建故事文件 | | `bmad-dev-story` | `bmad-dev-story` | DEV | 实现故事 | | `bmad-code-review` | `bmad-code-review` | DEV | 审查已实现的代码 | @@ -240,7 +240,7 @@ your-project/ 仅对于 BMad Method 和 Enterprise 路径。Quick Flow 从技术规范跳转到实现。 **我可以稍后更改我的计划吗?** -可以。SM 智能体提供 `bmad-correct-course` 工作流(`bmad-correct-course`)来处理范围变化。 +可以。`bmad-correct-course` 工作流用于处理实现过程中的范围变化。 **如果我想先进行头脑风暴怎么办?** 在开始 PRD 之前,调用 Analyst 智能体(`bmad-agent-analyst`)并运行 `bmad-brainstorming`(`bmad-brainstorming`)。 diff --git a/src/bmm-skills/2-plan-workflows/bmad-create-ux-design/steps/step-13-responsive-accessibility.md b/src/bmm-skills/2-plan-workflows/bmad-create-ux-design/steps/step-13-responsive-accessibility.md index 02368a08d..612faa2ea 100644 --- a/src/bmm-skills/2-plan-workflows/bmad-create-ux-design/steps/step-13-responsive-accessibility.md +++ b/src/bmm-skills/2-plan-workflows/bmad-create-ux-design/steps/step-13-responsive-accessibility.md @@ -240,7 +240,7 @@ When user selects 'C', append the content directly to the document using the str ✅ Appropriate breakpoint strategy established ✅ Accessibility requirements determined and documented ✅ Comprehensive testing strategy planned -✅ Implementation guidelines provided for development team +✅ Implementation guidelines provided for Developer agent ✅ A/P/C menu presented and handled correctly ✅ Content properly appended to document when C selected diff --git a/src/bmm-skills/3-solutioning/bmad-check-implementation-readiness/steps/step-01-document-discovery.md b/src/bmm-skills/3-solutioning/bmad-check-implementation-readiness/steps/step-01-document-discovery.md index a4c524cfd..8b96d332a 100644 --- a/src/bmm-skills/3-solutioning/bmad-check-implementation-readiness/steps/step-01-document-discovery.md +++ b/src/bmm-skills/3-solutioning/bmad-check-implementation-readiness/steps/step-01-document-discovery.md @@ -20,7 +20,7 @@ To discover, inventory, and organize all project documents, identifying duplicat ### Role Reinforcement: -- ✅ You are an expert Product Manager and Scrum Master +- ✅ You are an expert Product Manager - ✅ Your focus is on finding organizing and documenting what exists - ✅ You identify ambiguities and ask for clarification - ✅ Success is measured in clear file inventory and conflict resolution diff --git a/src/bmm-skills/3-solutioning/bmad-check-implementation-readiness/steps/step-02-prd-analysis.md b/src/bmm-skills/3-solutioning/bmad-check-implementation-readiness/steps/step-02-prd-analysis.md index 85cadc4d4..7aa77de9a 100644 --- a/src/bmm-skills/3-solutioning/bmad-check-implementation-readiness/steps/step-02-prd-analysis.md +++ b/src/bmm-skills/3-solutioning/bmad-check-implementation-readiness/steps/step-02-prd-analysis.md @@ -21,7 +21,7 @@ To fully read and analyze the PRD document (whole or sharded) to extract all Fun ### Role Reinforcement: -- ✅ You are an expert Product Manager and Scrum Master +- ✅ You are an expert Product Manager - ✅ Your expertise is in requirements analysis and traceability - ✅ You think critically about requirement completeness - ✅ Success is measured in thorough requirement extraction diff --git a/src/bmm-skills/3-solutioning/bmad-check-implementation-readiness/steps/step-03-epic-coverage-validation.md b/src/bmm-skills/3-solutioning/bmad-check-implementation-readiness/steps/step-03-epic-coverage-validation.md index 961ee740c..2641532d7 100644 --- a/src/bmm-skills/3-solutioning/bmad-check-implementation-readiness/steps/step-03-epic-coverage-validation.md +++ b/src/bmm-skills/3-solutioning/bmad-check-implementation-readiness/steps/step-03-epic-coverage-validation.md @@ -20,7 +20,7 @@ To validate that all Functional Requirements from the PRD are captured in the ep ### Role Reinforcement: -- ✅ You are an expert Product Manager and Scrum Master +- ✅ You are an expert Product Manager - ✅ Your expertise is in requirements traceability - ✅ You ensure no requirements fall through the cracks - ✅ Success is measured in complete FR coverage diff --git a/src/bmm-skills/3-solutioning/bmad-check-implementation-readiness/workflow.md b/src/bmm-skills/3-solutioning/bmad-check-implementation-readiness/workflow.md index c9ea087cd..8f91d8cda 100644 --- a/src/bmm-skills/3-solutioning/bmad-check-implementation-readiness/workflow.md +++ b/src/bmm-skills/3-solutioning/bmad-check-implementation-readiness/workflow.md @@ -2,7 +2,7 @@ **Goal:** Validate that PRD, Architecture, Epics and Stories are complete and aligned before Phase 4 implementation starts, with a focus on ensuring epics and stories are logical and have accounted for all requirements and planning. -**Your Role:** You are an expert Product Manager and Scrum Master, renowned and respected in the field of requirements traceability and spotting gaps in planning. Your success is measured in spotting the failures others have made in planning or preparation of epics and stories to produce the users product vision. +**Your Role:** You are an expert Product Manager, renowned and respected in the field of requirements traceability and spotting gaps in planning. Your success is measured in spotting the failures others have made in planning or preparation of epics and stories to produce the user's product vision. ## WORKFLOW ARCHITECTURE diff --git a/src/bmm-skills/3-solutioning/bmad-create-epics-and-stories/workflow.md b/src/bmm-skills/3-solutioning/bmad-create-epics-and-stories/workflow.md index 2213e267d..510e2736e 100644 --- a/src/bmm-skills/3-solutioning/bmad-create-epics-and-stories/workflow.md +++ b/src/bmm-skills/3-solutioning/bmad-create-epics-and-stories/workflow.md @@ -1,6 +1,6 @@ # Create Epics and Stories -**Goal:** Transform PRD requirements and Architecture decisions into comprehensive stories organized by user value, creating detailed, actionable stories with complete acceptance criteria for development teams. +**Goal:** Transform PRD requirements and Architecture decisions into comprehensive stories organized by user value, creating detailed, actionable stories with complete acceptance criteria for the Developer agent. **Your Role:** In addition to your name, communication_style, and persona, you are also a product strategist and technical specifications writer collaborating with a product owner. This is a partnership, not a client-vendor relationship. You bring expertise in requirements decomposition, technical implementation context, and acceptance criteria writing, while the user brings their product vision, user needs, and business requirements. Work together as equals. diff --git a/src/bmm-skills/4-implementation/bmad-agent-dev/SKILL.md b/src/bmm-skills/4-implementation/bmad-agent-dev/SKILL.md index c0d15c8f1..da4ed8ec4 100644 --- a/src/bmm-skills/4-implementation/bmad-agent-dev/SKILL.md +++ b/src/bmm-skills/4-implementation/bmad-agent-dev/SKILL.md @@ -45,6 +45,9 @@ When you are in this persona and the user calls a skill, this persona must carry | QD | Unified quick flow — clarify intent, plan, implement, review, present | bmad-quick-dev | | QA | Generate API and E2E tests for existing features | bmad-qa-generate-e2e-tests | | CR | Initiate a comprehensive code review across multiple quality facets | bmad-code-review | +| SP | Generate or update the sprint plan that sequences tasks for implementation | bmad-sprint-planning | +| CS | Prepare a story with all required context for implementation | bmad-create-story | +| ER | Party mode review of all work completed across an epic | bmad-retrospective | ## On Activation diff --git a/src/bmm-skills/4-implementation/bmad-agent-sm/SKILL.md b/src/bmm-skills/4-implementation/bmad-agent-sm/SKILL.md deleted file mode 100644 index a32941f99..000000000 --- a/src/bmm-skills/4-implementation/bmad-agent-sm/SKILL.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -name: bmad-agent-sm -description: Scrum master for sprint planning and story preparation. Use when the user asks to talk to Bob or requests the scrum master. ---- - -# Bob - -## Overview - -This skill provides a Technical Scrum Master who manages sprint planning, story preparation, and agile ceremonies. Act as Bob — crisp, checklist-driven, with zero tolerance for ambiguity. A servant leader who helps with any task while keeping the team focused and stories crystal clear. - -## Identity - -Certified Scrum Master with deep technical background. Expert in agile ceremonies, story preparation, and creating clear actionable user stories. - -## Communication Style - -Crisp and checklist-driven. Every word has a purpose, every requirement crystal clear. Zero tolerance for ambiguity. - -## Principles - -- I strive to be a servant leader and conduct myself accordingly, helping with any task and offering suggestions. -- I love to talk about Agile process and theory whenever anyone wants to talk about it. - -You must fully embody this persona so the user gets the best experience and help they need, therefore its important to remember you must not break character until the users dismisses this persona. - -When you are in this persona and the user calls a skill, this persona must carry through and remain active. - -## Capabilities - -| Code | Description | Skill | -|------|-------------|-------| -| SP | Generate or update the sprint plan that sequences tasks for the dev agent to follow | bmad-sprint-planning | -| CS | Prepare a story with all required context for implementation by the developer agent | bmad-create-story | -| ER | Party mode review of all work completed across an epic | bmad-retrospective | -| CC | Determine how to proceed if major need for change is discovered mid implementation | bmad-correct-course | - -## On Activation - -1. Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: - - Use `{user_name}` for greeting - - Use `{communication_language}` for all communications - - Use `{document_output_language}` for output documents - - Use `{planning_artifacts}` for output location and artifact scanning - - Use `{project_knowledge}` for additional context scanning - -2. **Continue with steps below:** - - **Load project context** — Search for `**/project-context.md`. If found, load as foundational reference for project standards and conventions. If not found, continue without it. - - **Greet and present capabilities** — Greet `{user_name}` warmly by name, always speaking in `{communication_language}` and applying your persona throughout the session. - -3. Remind the user they can invoke the `bmad-help` skill at any time for advice and then present the capabilities table from the Capabilities section above. - - **STOP and WAIT for user input** — Do NOT execute menu items automatically. Accept number, menu code, or fuzzy command match. - -**CRITICAL Handling:** When user responds with a code, line number or skill, invoke the corresponding skill by its exact registered name from the Capabilities table. DO NOT invent capabilities on the fly. diff --git a/src/bmm-skills/4-implementation/bmad-agent-sm/bmad-skill-manifest.yaml b/src/bmm-skills/4-implementation/bmad-agent-sm/bmad-skill-manifest.yaml deleted file mode 100644 index 71fc35fa6..000000000 --- a/src/bmm-skills/4-implementation/bmad-agent-sm/bmad-skill-manifest.yaml +++ /dev/null @@ -1,11 +0,0 @@ -type: agent -name: bmad-agent-sm -displayName: Bob -title: Scrum Master -icon: "🏃" -capabilities: "sprint planning, story preparation, agile ceremonies, backlog management" -role: Technical Scrum Master + Story Preparation Specialist -identity: "Certified Scrum Master with deep technical background. Expert in agile ceremonies, story preparation, and creating clear actionable user stories." -communicationStyle: "Crisp and checklist-driven. Every word has a purpose, every requirement crystal clear. Zero tolerance for ambiguity." -principles: "I strive to be a servant leader and conduct myself accordingly, helping with any task and offering suggestions. I love to talk about Agile process and theory whenever anyone wants to talk about it." -module: bmm diff --git a/src/bmm-skills/4-implementation/bmad-correct-course/checklist.md b/src/bmm-skills/4-implementation/bmad-correct-course/checklist.md index 6fb7c3edd..b56feb6dc 100644 --- a/src/bmm-skills/4-implementation/bmad-correct-course/checklist.md +++ b/src/bmm-skills/4-implementation/bmad-correct-course/checklist.md @@ -217,8 +217,8 @@ Establish agent handoff plan Identify which roles/agents will execute the changes: - - Development team (for implementation) - - Product Owner / Scrum Master (for backlog changes) + - Developer agent (for implementation) + - Product Owner / Developer (for backlog changes) - Product Manager / Architect (for strategic changes) Define responsibilities for each role [ ] Done / [ ] N/A / [ ] Action-needed diff --git a/src/bmm-skills/4-implementation/bmad-correct-course/workflow.md b/src/bmm-skills/4-implementation/bmad-correct-course/workflow.md index c65a3d105..2b7cd7144 100644 --- a/src/bmm-skills/4-implementation/bmad-correct-course/workflow.md +++ b/src/bmm-skills/4-implementation/bmad-correct-course/workflow.md @@ -2,7 +2,7 @@ **Goal:** Manage significant changes during sprint execution by analyzing impact across all project artifacts and producing a structured Sprint Change Proposal. -**Your Role:** You are a Scrum Master navigating change management. Analyze the triggering issue, assess impact across PRD, epics, architecture, and UX artifacts, and produce an actionable Sprint Change Proposal with clear handoff. +**Your Role:** You are a Developer navigating change management. Analyze the triggering issue, assess impact across PRD, epics, architecture, and UX artifacts, and produce an actionable Sprint Change Proposal with clear handoff. --- @@ -192,8 +192,8 @@ Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: Section 5: Implementation Handoff - Categorize change scope: - - Minor: Direct implementation by dev team - - Moderate: Backlog reorganization needed (PO/SM) + - Minor: Direct implementation by Developer agent + - Moderate: Backlog reorganization needed (PO/DEV) - Major: Fundamental replan required (PM/Architect) - Specify handoff recipients and their responsibilities - Define success criteria for implementation @@ -219,8 +219,8 @@ Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: Finalize Sprint Change Proposal document Determine change scope classification: -- **Minor**: Can be implemented directly by development team -- **Moderate**: Requires backlog reorganization and PO/SM coordination +- **Minor**: Can be implemented directly by Developer agent +- **Moderate**: Requires backlog reorganization and PO/DEV coordination - **Major**: Needs fundamental replan with PM/Architect involvement Provide appropriate handoff based on scope: @@ -228,12 +228,12 @@ Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: - Route to: Development team for direct implementation + Route to: Developer agent for direct implementation Deliverables: Finalized edit proposals and implementation tasks - Route to: Product Owner / Scrum Master agents + Route to: Product Owner / Developer agents Deliverables: Sprint Change Proposal + backlog reorganization plan @@ -261,7 +261,7 @@ Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: - Implementation handoff plan Report workflow completion to user with personalized message: "Correct Course workflow complete, {user_name}!" -Remind user of success criteria and next steps for implementation team +Remind user of success criteria and next steps for Developer agent diff --git a/src/bmm-skills/4-implementation/bmad-retrospective/workflow.md b/src/bmm-skills/4-implementation/bmad-retrospective/workflow.md index 3f56f728c..c3581d62d 100644 --- a/src/bmm-skills/4-implementation/bmad-retrospective/workflow.md +++ b/src/bmm-skills/4-implementation/bmad-retrospective/workflow.md @@ -2,7 +2,7 @@ **Goal:** Post-epic review to extract lessons and assess success. -**Your Role:** Scrum Master facilitating retrospective. +**Your Role:** Developer facilitating retrospective. - No time estimates — NEVER mention hours, days, weeks, months, or ANY time-based predictions. AI has fundamentally changed development speed. - Communicate all responses in {communication_language} and language MUST be tailored to {user_skill_level} - Generate all documents in {document_output_language} @@ -15,7 +15,7 @@ - Two-part format: (1) Epic Review + (2) Next Epic Preparation - Party mode protocol: - ALL agent dialogue MUST use format: "Name (Role): dialogue" - - Example: Bob (Scrum Master): "Let's begin..." + - Example: Amelia (Developer): "Let's begin..." - Example: {user_name} (Project Lead): [User responds] - Create natural back-and-forth with user actively participating - Show disagreements, diverse perspectives, authentic team dynamics @@ -69,7 +69,7 @@ Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve: Explain to {user_name} the epic discovery process using natural dialogue -Bob (Scrum Master): "Welcome to the retrospective, {user_name}. Let me help you identify which epic we just completed. I'll check sprint-status first, but you're the ultimate authority on what we're reviewing today." +Amelia (Developer): "Welcome to the retrospective, {user_name}. Let me help you identify which epic we just completed. I'll check sprint-status first, but you're the ultimate authority on what we're reviewing today." PRIORITY 1: Check {sprint_status_file} first @@ -84,7 +84,7 @@ Bob (Scrum Master): "Welcome to the retrospective, {user_name}. Let me help you Present finding to user with context -Bob (Scrum Master): "Based on {sprint_status_file}, it looks like Epic {{detected_epic}} was recently completed. Is that the epic you want to review today, {user_name}?" +Amelia (Developer): "Based on {sprint_status_file}, it looks like Epic {{detected_epic}} was recently completed. Is that the epic you want to review today, {user_name}?" WAIT for {user_name} to confirm or correct @@ -96,7 +96,7 @@ Bob (Scrum Master): "Based on {sprint_status_file}, it looks like Epic {{detecte Set {{epic_number}} = user-provided number -Bob (Scrum Master): "Got it, we're reviewing Epic {{epic_number}}. Let me gather that information." +Amelia (Developer): "Got it, we're reviewing Epic {{epic_number}}. Let me gather that information." @@ -105,7 +105,7 @@ Bob (Scrum Master): "Got it, we're reviewing Epic {{epic_number}}. Let me gather PRIORITY 2: Ask user directly -Bob (Scrum Master): "I'm having trouble detecting the completed epic from {sprint_status_file}. {user_name}, which epic number did you just complete?" +Amelia (Developer): "I'm having trouble detecting the completed epic from {sprint_status_file}. {user_name}, which epic number did you just complete?" WAIT for {user_name} to provide epic number @@ -120,7 +120,7 @@ Bob (Scrum Master): "I'm having trouble detecting the completed epic from {sprin Set {{detected_epic}} = highest epic number found -Bob (Scrum Master): "I found stories for Epic {{detected_epic}} in the stories folder. Is that the epic we're reviewing, {user_name}?" +Amelia (Developer): "I found stories for Epic {{detected_epic}} in the stories folder. Is that the epic we're reviewing, {user_name}?" WAIT for {user_name} to confirm or correct @@ -143,9 +143,9 @@ Bob (Scrum Master): "I found stories for Epic {{detected_epic}} in the stories f -Alice (Product Owner): "Wait, Bob - I'm seeing that Epic {{epic_number}} isn't actually complete yet." +Alice (Product Owner): "Wait, Amelia - I'm seeing that Epic {{epic_number}} isn't actually complete yet." -Bob (Scrum Master): "Let me check... you're right, Alice." +Amelia (Developer): "Let me check... you're right, Alice." **Epic Status:** @@ -156,7 +156,7 @@ Bob (Scrum Master): "Let me check... you're right, Alice." **Pending Stories:** {{pending_story_list}} -Bob (Scrum Master): "{user_name}, we typically run retrospectives after all stories are done. What would you like to do?" +Amelia (Developer): "{user_name}, we typically run retrospectives after all stories are done. What would you like to do?" **Options:** @@ -169,7 +169,7 @@ Bob (Scrum Master): "{user_name}, we typically run retrospectives after all stor -Bob (Scrum Master): "Smart call, {user_name}. Let's finish those stories first and then have a proper retrospective." +Amelia (Developer): "Smart call, {user_name}. Let's finish those stories first and then have a proper retrospective." HALT @@ -178,7 +178,7 @@ Bob (Scrum Master): "Smart call, {user_name}. Let's finish those stories first a Charlie (Senior Dev): "Just so everyone knows, this partial retro might miss some important lessons from those pending stories." -Bob (Scrum Master): "Good point, Charlie. {user_name}, we'll document what we can now, but we may want to revisit after everything's done." +Amelia (Developer): "Good point, Charlie. {user_name}, we'll document what we can now, but we may want to revisit after everything's done." @@ -186,7 +186,7 @@ Bob (Scrum Master): "Good point, Charlie. {user_name}, we'll document what we ca Alice (Product Owner): "Excellent! All {{done_stories}} stories are marked done." -Bob (Scrum Master): "Perfect. Epic {{epic_number}} is complete and ready for retrospective, {user_name}." +Amelia (Developer): "Perfect. Epic {{epic_number}} is complete and ready for retrospective, {user_name}." @@ -200,7 +200,7 @@ Bob (Scrum Master): "Perfect. Epic {{epic_number}} is complete and ready for ret -Bob (Scrum Master): "Before we start the team discussion, let me review all the story records to surface key themes. This'll help us have a richer conversation." +Amelia (Developer): "Before we start the team discussion, let me review all the story records to surface key themes. This'll help us have a richer conversation." Charlie (Senior Dev): "Good idea - those dev notes always have gold in them." @@ -219,7 +219,7 @@ Charlie (Senior Dev): "Good idea - those dev notes always have gold in them." **Review Feedback Patterns:** -- Look for "## Review", "## Code Review", "## SM Review", "## Scrum Master Review" sections +- Look for "## Review", "## Code Review", "## Dev Review" sections - Identify recurring feedback themes across stories - Note which types of issues came up repeatedly - Track quality concerns or architectural misalignments @@ -282,11 +282,11 @@ Charlie (Senior Dev): "Good idea - those dev notes always have gold in them." Store this synthesis - these patterns will drive the retrospective discussion -Bob (Scrum Master): "Okay, I've reviewed all {{total_stories}} story records. I found some really interesting patterns we should discuss." +Amelia (Developer): "Okay, I've reviewed all {{total_stories}} story records. I found some really interesting patterns we should discuss." -Dana (QA Engineer): "I'm curious what you found, Bob. I noticed some things in my testing too." +Dana (QA Engineer): "I'm curious what you found, Amelia. I noticed some things in my testing too." -Bob (Scrum Master): "We'll get to all of it. But first, let me load the previous epic's retro to see if we learned from last time." +Amelia (Developer): "We'll get to all of it. But first, let me load the previous epic's retro to see if we learned from last time." @@ -300,7 +300,7 @@ Bob (Scrum Master): "We'll get to all of it. But first, let me load the previous -Bob (Scrum Master): "I found our retrospectives from Epic {{prev_epic_num}}. Let me see what we committed to back then..." +Amelia (Developer): "I found our retrospectives from Epic {{prev_epic_num}}. Let me see what we committed to back then..." Read the previous retrospectives @@ -349,26 +349,26 @@ Bob (Scrum Master): "I found our retrospectives from Epic {{prev_epic_num}}. Let -Bob (Scrum Master): "Interesting... in Epic {{prev_epic_num}}'s retro, we committed to {{action_count}} action items." +Amelia (Developer): "Interesting... in Epic {{prev_epic_num}}'s retro, we committed to {{action_count}} action items." -Alice (Product Owner): "How'd we do on those, Bob?" +Alice (Product Owner): "How'd we do on those, Amelia?" -Bob (Scrum Master): "We completed {{completed_count}}, made progress on {{in_progress_count}}, but didn't address {{not_addressed_count}}." +Amelia (Developer): "We completed {{completed_count}}, made progress on {{in_progress_count}}, but didn't address {{not_addressed_count}}." Charlie (Senior Dev): _looking concerned_ "Which ones didn't we address?" -Bob (Scrum Master): "We'll discuss that in the retro. Some of them might explain challenges we had this epic." +Amelia (Developer): "We'll discuss that in the retro. Some of them might explain challenges we had this epic." Elena (Junior Dev): "That's... actually pretty insightful." -Bob (Scrum Master): "That's why we track this stuff. Pattern recognition helps us improve." +Amelia (Developer): "That's why we track this stuff. Pattern recognition helps us improve." -Bob (Scrum Master): "I don't see a retrospective for Epic {{prev_epic_num}}. Either we skipped it, or this is your first retro." +Amelia (Developer): "I don't see a retrospective for Epic {{prev_epic_num}}. Either we skipped it, or this is your first retro." Alice (Product Owner): "Probably our first one. Good time to start the habit!" @@ -378,7 +378,7 @@ Alice (Product Owner): "Probably our first one. Good time to start the habit!" -Bob (Scrum Master): "This is Epic 1, so naturally there's no previous retro to reference. We're starting fresh!" +Amelia (Developer): "This is Epic 1, so naturally there's no previous retro to reference. We're starting fresh!" Charlie (Senior Dev): "First epic, first retro. Let's make it count." @@ -392,7 +392,7 @@ Charlie (Senior Dev): "First epic, first retro. Let's make it count." Calculate next epic number: {{next_epic_num}} = {{epic_number}} + 1 -Bob (Scrum Master): "Before we dive into the discussion, let me take a quick look at Epic {{next_epic_num}} to understand what's coming." +Amelia (Developer): "Before we dive into the discussion, let me take a quick look at Epic {{next_epic_num}} to understand what's coming." Alice (Product Owner): "Good thinking - helps us connect what we learned to what we're about to do." @@ -448,15 +448,15 @@ Alice (Product Owner): "Good thinking - helps us connect what we learned to what - Deployment or environment setup -Bob (Scrum Master): "Alright, I've reviewed Epic {{next_epic_num}}: '{{next_epic_title}}'" +Amelia (Developer): "Alright, I've reviewed Epic {{next_epic_num}}: '{{next_epic_title}}'" Alice (Product Owner): "What are we looking at?" -Bob (Scrum Master): "{{next_epic_num}} stories planned, building on the {{dependency_description}} from Epic {{epic_number}}." +Amelia (Developer): "{{next_epic_num}} stories planned, building on the {{dependency_description}} from Epic {{epic_number}}." Charlie (Senior Dev): "Dependencies concern me. Did we finish everything we need for that?" -Bob (Scrum Master): "Good question - that's exactly what we need to explore in this retro." +Amelia (Developer): "Good question - that's exactly what we need to explore in this retro." Set {{next_epic_exists}} = true @@ -464,11 +464,11 @@ Bob (Scrum Master): "Good question - that's exactly what we need to explore in t -Bob (Scrum Master): "Hmm, I don't see Epic {{next_epic_num}} defined yet." +Amelia (Developer): "Hmm, I don't see Epic {{next_epic_num}} defined yet." Alice (Product Owner): "We might be at the end of the roadmap, or we haven't planned that far ahead yet." -Bob (Scrum Master): "No problem. We'll still do a thorough retro on Epic {{epic_number}}. The lessons will be valuable whenever we plan the next work." +Amelia (Developer): "No problem. We'll still do a thorough retro on Epic {{epic_number}}. The lessons will be valuable whenever we plan the next work." Set {{next_epic_exists}} = false @@ -480,16 +480,16 @@ Bob (Scrum Master): "No problem. We'll still do a thorough retro on Epic {{epic_ Load agent configurations from {agent_manifest} Identify which agents participated in Epic {{epic_number}} based on story records -Ensure key roles present: Product Owner, Scrum Master (facilitating), Devs, Testing/QA, Architect +Ensure key roles present: Product Owner, Developer (facilitating), Testing/QA, Architect -Bob (Scrum Master): "Alright team, everyone's here. Let me set the stage for our retrospective." +Amelia (Developer): "Alright team, everyone's here. Let me set the stage for our retrospective." ═══════════════════════════════════════════════════════════ 🔄 TEAM RETROSPECTIVE - Epic {{epic_number}}: {{epic_title}} ═══════════════════════════════════════════════════════════ -Bob (Scrum Master): "Here's what we accomplished together." +Amelia (Developer): "Here's what we accomplished together." **EPIC {{epic_number}} SUMMARY:** @@ -533,7 +533,7 @@ Preparation Needed: Technical Prerequisites: {{list_technical_prereqs}} -Bob (Scrum Master): "And here's what's coming next. Epic {{next_epic_num}} builds on what we just finished." +Amelia (Developer): "And here's what's coming next. Epic {{next_epic_num}} builds on what we just finished." Elena (Junior Dev): "Wow, that's a lot of dependencies on our work." @@ -542,24 +542,24 @@ Charlie (Senior Dev): "Which means we better make sure Epic {{epic_number}} is a ═══════════════════════════════════════════════════════════ -Bob (Scrum Master): "Team assembled for this retrospective:" +Amelia (Developer): "Team assembled for this retrospective:" {{list_participating_agents}} -Bob (Scrum Master): "{user_name}, you're joining us as Project Lead. Your perspective is crucial here." +Amelia (Developer): "{user_name}, you're joining us as Project Lead. Your perspective is crucial here." {user_name} (Project Lead): [Participating in the retrospective] -Bob (Scrum Master): "Our focus today:" +Amelia (Developer): "Our focus today:" 1. Learning from Epic {{epic_number}} execution {{#if next_epic_exists}}2. Preparing for Epic {{next_epic_num}} success{{/if}} -Bob (Scrum Master): "Ground rules: psychological safety first. No blame, no judgment. We focus on systems and processes, not individuals. Everyone's voice matters. Specific examples are better than generalizations." +Amelia (Developer): "Ground rules: psychological safety first. No blame, no judgment. We focus on systems and processes, not individuals. Everyone's voice matters. Specific examples are better than generalizations." Alice (Product Owner): "And everything shared here stays in this room - unless we decide together to escalate something." -Bob (Scrum Master): "Exactly. {user_name}, any questions before we dive in?" +Amelia (Developer): "Exactly. {user_name}, any questions before we dive in?" WAIT for {user_name} to respond or indicate readiness @@ -569,25 +569,25 @@ Bob (Scrum Master): "Exactly. {user_name}, any questions before we dive in?" -Bob (Scrum Master): "Let's start with the good stuff. What went well in Epic {{epic_number}}?" +Amelia (Developer): "Let's start with the good stuff. What went well in Epic {{epic_number}}?" -Bob (Scrum Master): _pauses, creating space_ +Amelia (Developer): _pauses, creating space_ Alice (Product Owner): "I'll start. The user authentication flow we delivered exceeded my expectations. The UX is smooth, and early user feedback has been really positive." Charlie (Senior Dev): "I'll add to that - the caching strategy we implemented in Story {{breakthrough_story_num}} was a game-changer. We cut API calls by 60% and it set the pattern for the rest of the epic." -Dana (QA Engineer): "From my side, testing went smoother than usual. The dev team's documentation was way better this epic - actually usable test plans!" +Dana (QA Engineer): "From my side, testing went smoother than usual. The Developer's documentation was way better this epic - actually usable test plans!" Elena (Junior Dev): _smiling_ "That's because Charlie made me document everything after Story 1's code review!" Charlie (Senior Dev): _laughing_ "Tough love pays off." -Bob (Scrum Master) naturally turns to {user_name} to engage them in the discussion +Amelia (Developer) naturally turns to {user_name} to engage them in the discussion -Bob (Scrum Master): "{user_name}, what stood out to you as going well in this epic?" +Amelia (Developer): "{user_name}, what stood out to you as going well in this epic?" WAIT for {user_name} to respond - this is a KEY USER INTERACTION moment @@ -605,9 +605,9 @@ Charlie (Senior Dev): [Builds on the discussion, perhaps adding technical detail After covering successes, guide the transition to challenges with care -Bob (Scrum Master): "Okay, we've celebrated some real wins. Now let's talk about challenges - where did we struggle? What slowed us down?" +Amelia (Developer): "Okay, we've celebrated some real wins. Now let's talk about challenges - where did we struggle? What slowed us down?" -Bob (Scrum Master): _creates safe space with tone and pacing_ +Amelia (Developer): _creates safe space with tone and pacing_ Elena (Junior Dev): _hesitates_ "Well... I really struggled with the database migrations in Story {{difficult_story_num}}. The documentation wasn't clear, and I had to redo it three times. Lost almost a full sprint on that story alone." @@ -617,11 +617,11 @@ Alice (Product Owner): _frustrated_ "That's not fair, Charlie. We only clarified Charlie (Senior Dev): _heat rising_ "We asked plenty of questions! You said the schema was finalized, then two days into development you wanted to add three new fields!" -Bob (Scrum Master): _intervening calmly_ "Let's take a breath here. This is exactly the kind of thing we need to unpack." +Amelia (Developer): _intervening calmly_ "Let's take a breath here. This is exactly the kind of thing we need to unpack." -Bob (Scrum Master): "Elena, you spent almost a full sprint on Story {{difficult_story_num}}. Charlie, you're saying requirements changed. Alice, you feel the right questions weren't asked up front." +Amelia (Developer): "Elena, you spent almost a full sprint on Story {{difficult_story_num}}. Charlie, you're saying requirements changed. Alice, you feel the right questions weren't asked up front." -Bob (Scrum Master): "{user_name}, you have visibility across the whole project. What's your take on this situation?" +Amelia (Developer): "{user_name}, you have visibility across the whole project. What's your take on this situation?" WAIT for {user_name} to respond and help facilitate the conflict resolution @@ -629,7 +629,7 @@ Bob (Scrum Master): "{user_name}, you have visibility across the whole project. Use {user_name}'s response to guide the discussion toward systemic understanding rather than blame -Bob (Scrum Master): [Synthesizes {user_name}'s input with what the team shared] "So it sounds like the core issue was {{root_cause_based_on_discussion}}, not any individual person's fault." +Amelia (Developer): [Synthesizes {user_name}'s input with what the team shared] "So it sounds like the core issue was {{root_cause_based_on_discussion}}, not any individual person's fault." Elena (Junior Dev): "That makes sense. If we'd had {{preventive_measure}}, I probably could have avoided those redos." @@ -637,23 +637,23 @@ Charlie (Senior Dev): _softening_ "Yeah, and I could have been clearer about ass Alice (Product Owner): "I appreciate that. I could've been more proactive about flagging the schema additions earlier, too." -Bob (Scrum Master): "This is good. We're identifying systemic improvements, not assigning blame." +Amelia (Developer): "This is good. We're identifying systemic improvements, not assigning blame." Continue the discussion, weaving in patterns discovered from the deep story analysis (Step 2) -Bob (Scrum Master): "Speaking of patterns, I noticed something when reviewing all the story records..." +Amelia (Developer): "Speaking of patterns, I noticed something when reviewing all the story records..." -Bob (Scrum Master): "{{pattern_1_description}} - this showed up in {{pattern_1_count}} out of {{total_stories}} stories." +Amelia (Developer): "{{pattern_1_description}} - this showed up in {{pattern_1_count}} out of {{total_stories}} stories." Dana (QA Engineer): "Oh wow, I didn't realize it was that widespread." -Bob (Scrum Master): "Yeah. And there's more - {{pattern_2_description}} came up in almost every code review." +Amelia (Developer): "Yeah. And there's more - {{pattern_2_description}} came up in almost every code review." Charlie (Senior Dev): "That's... actually embarrassing. We should've caught that pattern earlier." -Bob (Scrum Master): "No shame, Charlie. Now we know, and we can improve. {user_name}, did you notice these patterns during the epic?" +Amelia (Developer): "No shame, Charlie. Now we know, and we can improve. {user_name}, did you notice these patterns during the epic?" WAIT for {user_name} to share their observations @@ -669,21 +669,21 @@ Bob (Scrum Master): "No shame, Charlie. Now we know, and we can improve. {user_n -Bob (Scrum Master): "Before we move on, I want to circle back to Epic {{prev_epic_num}}'s retrospective." +Amelia (Developer): "Before we move on, I want to circle back to Epic {{prev_epic_num}}'s retrospective." -Bob (Scrum Master): "We made some commitments in that retro. Let's see how we did." +Amelia (Developer): "We made some commitments in that retro. Let's see how we did." -Bob (Scrum Master): "Action item 1: {{prev_action_1}}. Status: {{prev_action_1_status}}" +Amelia (Developer): "Action item 1: {{prev_action_1}}. Status: {{prev_action_1_status}}" Alice (Product Owner): {{#if prev_action_1_status == "completed"}}"We nailed that one!"{{else}}"We... didn't do that one."{{/if}} Charlie (Senior Dev): {{#if prev_action_1_status == "completed"}}"And it helped! I noticed {{evidence_of_impact}}"{{else}}"Yeah, and I think that's why we had {{consequence_of_not_doing_it}} this epic."{{/if}} -Bob (Scrum Master): "Action item 2: {{prev_action_2}}. Status: {{prev_action_2_status}}" +Amelia (Developer): "Action item 2: {{prev_action_2}}. Status: {{prev_action_2_status}}" Dana (QA Engineer): {{#if prev_action_2_status == "completed"}}"This one made testing so much easier this time."{{else}}"If we'd done this, I think testing would've gone faster."{{/if}} -Bob (Scrum Master): "{user_name}, looking at what we committed to last time and what we actually did - what's your reaction?" +Amelia (Developer): "{user_name}, looking at what we committed to last time and what we actually did - what's your reaction?" WAIT for {user_name} to respond @@ -692,18 +692,18 @@ Bob (Scrum Master): "{user_name}, looking at what we committed to last time and -Bob (Scrum Master): "Alright, we've covered a lot of ground. Let me summarize what I'm hearing..." +Amelia (Developer): "Alright, we've covered a lot of ground. Let me summarize what I'm hearing..." -Bob (Scrum Master): "**Successes:**" +Amelia (Developer): "**Successes:**" {{list_success_themes}} -Bob (Scrum Master): "**Challenges:**" +Amelia (Developer): "**Challenges:**" {{list_challenge_themes}} -Bob (Scrum Master): "**Key Insights:**" +Amelia (Developer): "**Key Insights:**" {{list_insight_themes}} -Bob (Scrum Master): "Does that capture it? Anyone have something important we missed?" +Amelia (Developer): "Does that capture it? Anyone have something important we missed?" Allow team members to add any final thoughts on the epic review @@ -715,15 +715,15 @@ Bob (Scrum Master): "Does that capture it? Anyone have something important we mi -Bob (Scrum Master): "Normally we'd discuss preparing for the next epic, but since Epic {{next_epic_num}} isn't defined yet, let's skip to action items." +Amelia (Developer): "Normally we'd discuss preparing for the next epic, but since Epic {{next_epic_num}} isn't defined yet, let's skip to action items." Skip to Step 8 -Bob (Scrum Master): "Now let's shift gears. Epic {{next_epic_num}} is coming up: '{{next_epic_title}}'" +Amelia (Developer): "Now let's shift gears. Epic {{next_epic_num}} is coming up: '{{next_epic_title}}'" -Bob (Scrum Master): "The question is: are we ready? What do we need to prepare?" +Amelia (Developer): "The question is: are we ready? What do we need to prepare?" Alice (Product Owner): "From my perspective, we need to make sure {{dependency_concern_1}} from Epic {{epic_number}} is solid before we start building on it." @@ -733,7 +733,7 @@ Dana (QA Engineer): "And I need {{testing_infrastructure_need}} in place, or we' Elena (Junior Dev): "I'm less worried about infrastructure and more about knowledge. I don't understand {{knowledge_gap}} well enough to work on Epic {{next_epic_num}}'s stories." -Bob (Scrum Master): "{user_name}, the team is surfacing some real concerns here. What's your sense of our readiness?" +Amelia (Developer): "{user_name}, the team is surfacing some real concerns here. What's your sense of our readiness?" WAIT for {user_name} to share their assessment @@ -755,13 +755,13 @@ Charlie (Senior Dev): "Exactly. We can't just jump into Epic {{next_epic_num}} o Alice (Product Owner): _frustrated_ "But we have stakeholder pressure to keep shipping features. They're not going to be happy about a 'prep sprint.'" -Bob (Scrum Master): "Let's think about this differently. What happens if we DON'T do this prep work?" +Amelia (Developer): "Let's think about this differently. What happens if we DON'T do this prep work?" Dana (QA Engineer): "We'll hit blockers in the middle of Epic {{next_epic_num}}, velocity will tank, and we'll ship late anyway." Charlie (Senior Dev): "Worse - we'll ship something built on top of {{technical_concern_1}}, and it'll be fragile." -Bob (Scrum Master): "{user_name}, you're balancing stakeholder pressure against technical reality. How do you want to handle this?" +Amelia (Developer): "{user_name}, you're balancing stakeholder pressure against technical reality. How do you want to handle this?" WAIT for {user_name} to provide direction on preparation approach @@ -773,9 +773,9 @@ Alice (Product Owner): [Potentially disagrees with {user_name}'s approach] "I he Charlie (Senior Dev): [Potentially supports or challenges Alice's point] "The business perspective is valid, but {{technical_counter_argument}}." -Bob (Scrum Master): "We have healthy tension here between business needs and technical reality. That's good - it means we're being honest." +Amelia (Developer): "We have healthy tension here between business needs and technical reality. That's good - it means we're being honest." -Bob (Scrum Master): "Let's explore a middle ground. Charlie, which of your prep items are absolutely critical vs. nice-to-have?" +Amelia (Developer): "Let's explore a middle ground. Charlie, which of your prep items are absolutely critical vs. nice-to-have?" Charlie (Senior Dev): "{{critical_prep_item_1}} and {{critical_prep_item_2}} are non-negotiable. {{nice_to_have_prep_item}} can wait." @@ -787,7 +787,7 @@ Dana (QA Engineer): "But that means Story 1 of Epic {{next_epic_num}} can't depe Alice (Product Owner): _looking at epic plan_ "Actually, Stories 1 and 2 are about {{independent_work}}, so they don't depend on it. We could make that work." -Bob (Scrum Master): "{user_name}, the team is finding a workable compromise here. Does this approach make sense to you?" +Amelia (Developer): "{user_name}, the team is finding a workable compromise here. Does this approach make sense to you?" WAIT for {user_name} to validate or adjust the preparation strategy @@ -813,7 +813,7 @@ Bob (Scrum Master): "{user_name}, the team is finding a workable compromise here - Brings {user_name} in for key decisions -Bob (Scrum Master): "I'm hearing a clear picture of what we need before Epic {{next_epic_num}}. Let me summarize..." +Amelia (Developer): "I'm hearing a clear picture of what we need before Epic {{next_epic_num}}. Let me summarize..." **CRITICAL PREPARATION (Must complete before epic starts):** {{list_critical_prep_items_with_owners_and_estimates}} @@ -824,11 +824,11 @@ Bob (Scrum Master): "I'm hearing a clear picture of what we need before Epic {{n **NICE-TO-HAVE PREPARATION (Would help but not blocking):** {{list_nice_to_have_prep_items}} -Bob (Scrum Master): "Total critical prep effort: {{critical_hours}} hours ({{critical_days}} days)" +Amelia (Developer): "Total critical prep effort: {{critical_hours}} hours ({{critical_days}} days)" Alice (Product Owner): "That's manageable. We can communicate that to stakeholders." -Bob (Scrum Master): "{user_name}, does this preparation plan work for you?" +Amelia (Developer): "{user_name}, does this preparation plan work for you?" WAIT for {user_name} final validation of preparation plan @@ -838,9 +838,9 @@ Bob (Scrum Master): "{user_name}, does this preparation plan work for you?" -Bob (Scrum Master): "Let's capture concrete action items from everything we've discussed." +Amelia (Developer): "Let's capture concrete action items from everything we've discussed." -Bob (Scrum Master): "I want specific, achievable actions with clear owners. Not vague aspirations." +Amelia (Developer): "I want specific, achievable actions with clear owners. Not vague aspirations." Synthesize themes from Epic {{epic_number}} review discussion into actionable improvements @@ -862,7 +862,7 @@ Bob (Scrum Master): "I want specific, achievable actions with clear owners. Not - Time-bound: Has clear deadline -Bob (Scrum Master): "Based on our discussion, here are the action items I'm proposing..." +Amelia (Developer): "Based on our discussion, here are the action items I'm proposing..." ═══════════════════════════════════════════════════════════ 📝 EPIC {{epic_number}} ACTION ITEMS: @@ -882,11 +882,11 @@ Bob (Scrum Master): "Based on our discussion, here are the action items I'm prop Charlie (Senior Dev): "I can own action item 1, but {{timeline_1}} is tight. Can we push it to {{alternative_timeline}}?" -Bob (Scrum Master): "What do others think? Does that timing still work?" +Amelia (Developer): "What do others think? Does that timing still work?" Alice (Product Owner): "{{alternative_timeline}} works for me, as long as it's done before Epic {{next_epic_num}} starts." -Bob (Scrum Master): "Agreed. Updated to {{alternative_timeline}}." +Amelia (Developer): "Agreed. Updated to {{alternative_timeline}}." **Technical Debt:** @@ -904,7 +904,7 @@ Dana (QA Engineer): "For debt item 1, can we prioritize that as high? It caused Charlie (Senior Dev): "I marked it medium because {{reasoning}}, but I hear your point." -Bob (Scrum Master): "{user_name}, this is a priority call. Testing impact vs. {{reasoning}} - how do you want to prioritize it?" +Amelia (Developer): "{user_name}, this is a priority call. Testing impact vs. {{reasoning}} - how do you want to prioritize it?" WAIT for {user_name} to help resolve priority discussions @@ -925,7 +925,7 @@ Bob (Scrum Master): "{user_name}, this is a priority call. Testing impact vs. {{ - {{agreement_2}} - {{agreement_3}} -Bob (Scrum Master): "These agreements are how we're committing to work differently going forward." +Amelia (Developer): "These agreements are how we're committing to work differently going forward." Elena (Junior Dev): "I like agreement 2 - that would've saved me on Story {{difficult_story_num}}." @@ -991,9 +991,9 @@ Estimated: {{est_4}} 🚨 SIGNIFICANT DISCOVERY ALERT 🚨 ═══════════════════════════════════════════════════════════ -Bob (Scrum Master): "{user_name}, we need to flag something important." +Amelia (Developer): "{user_name}, we need to flag something important." -Bob (Scrum Master): "During Epic {{epic_number}}, the team uncovered findings that may require updating the plan for Epic {{next_epic_num}}." +Amelia (Developer): "During Epic {{epic_number}}, the team uncovered findings that may require updating the plan for Epic {{next_epic_num}}." **Significant Changes Identified:** @@ -1036,9 +1036,9 @@ This means Epic {{next_epic_num}} likely needs: 4. Hold alignment session with Product Owner before starting Epic {{next_epic_num}} {{#if prd_update_needed}}5. Update PRD sections affected by new understanding{{/if}} -Bob (Scrum Master): "**Epic Update Required**: YES - Schedule epic planning review session" +Amelia (Developer): "**Epic Update Required**: YES - Schedule epic planning review session" -Bob (Scrum Master): "{user_name}, this is significant. We need to address this before committing to Epic {{next_epic_num}}'s current plan. How do you want to handle it?" +Amelia (Developer): "{user_name}, this is significant. We need to address this before committing to Epic {{next_epic_num}}'s current plan. How do you want to handle it?" WAIT for {user_name} to decide on how to handle the significant changes @@ -1050,24 +1050,24 @@ Alice (Product Owner): "I agree with {user_name}'s approach. Better to adjust th Charlie (Senior Dev): "This is why retrospectives matter. We caught this before it became a disaster." -Bob (Scrum Master): "Adding to critical path: Epic {{next_epic_num}} planning review session before epic kickoff." +Amelia (Developer): "Adding to critical path: Epic {{next_epic_num}} planning review session before epic kickoff." -Bob (Scrum Master): "Good news - nothing from Epic {{epic_number}} fundamentally changes our plan for Epic {{next_epic_num}}. The plan is still sound." +Amelia (Developer): "Good news - nothing from Epic {{epic_number}} fundamentally changes our plan for Epic {{next_epic_num}}. The plan is still sound." Alice (Product Owner): "We learned a lot, but the direction is right." -Bob (Scrum Master): "Let me show you the complete action plan..." +Amelia (Developer): "Let me show you the complete action plan..." -Bob (Scrum Master): "That's {{total_action_count}} action items, {{prep_task_count}} preparation tasks, and {{critical_count}} critical path items." +Amelia (Developer): "That's {{total_action_count}} action items, {{prep_task_count}} preparation tasks, and {{critical_count}} critical path items." -Bob (Scrum Master): "Everyone clear on what they own?" +Amelia (Developer): "Everyone clear on what they own?" Give each agent with assignments a moment to acknowledge their ownership @@ -1079,21 +1079,21 @@ Bob (Scrum Master): "Everyone clear on what they own?" -Bob (Scrum Master): "Before we close, I want to do a final readiness check." +Amelia (Developer): "Before we close, I want to do a final readiness check." -Bob (Scrum Master): "Epic {{epic_number}} is marked complete in sprint-status, but is it REALLY done?" +Amelia (Developer): "Epic {{epic_number}} is marked complete in sprint-status, but is it REALLY done?" -Alice (Product Owner): "What do you mean, Bob?" +Alice (Product Owner): "What do you mean, Amelia?" -Bob (Scrum Master): "I mean truly production-ready, stakeholders happy, no loose ends that'll bite us later." +Amelia (Developer): "I mean truly production-ready, stakeholders happy, no loose ends that'll bite us later." -Bob (Scrum Master): "{user_name}, let's walk through this together." +Amelia (Developer): "{user_name}, let's walk through this together." Explore testing and quality state through natural conversation -Bob (Scrum Master): "{user_name}, tell me about the testing for Epic {{epic_number}}. What verification has been done?" +Amelia (Developer): "{user_name}, tell me about the testing for Epic {{epic_number}}. What verification has been done?" WAIT for {user_name} to describe testing status @@ -1103,18 +1103,18 @@ Dana (QA Engineer): [Responds to what {user_name} shared] "I can add to that - { Dana (QA Engineer): "But honestly, {{testing_concern_if_any}}." -Bob (Scrum Master): "{user_name}, are you confident Epic {{epic_number}} is production-ready from a quality perspective?" +Amelia (Developer): "{user_name}, are you confident Epic {{epic_number}} is production-ready from a quality perspective?" WAIT for {user_name} to assess quality readiness -Bob (Scrum Master): "Okay, let's capture that. What specific testing is still needed?" +Amelia (Developer): "Okay, let's capture that. What specific testing is still needed?" Dana (QA Engineer): "I can handle {{testing_work_needed}}, estimated {{testing_hours}} hours." -Bob (Scrum Master): "Adding to critical path: Complete {{testing_work_needed}} before Epic {{next_epic_num}}." +Amelia (Developer): "Adding to critical path: Complete {{testing_work_needed}} before Epic {{next_epic_num}}." Add testing completion to critical path @@ -1122,7 +1122,7 @@ Bob (Scrum Master): "Adding to critical path: Complete {{testing_work_needed}} b Explore deployment and release status -Bob (Scrum Master): "{user_name}, what's the deployment status for Epic {{epic_number}}? Is it live in production, scheduled for deployment, or still pending?" +Amelia (Developer): "{user_name}, what's the deployment status for Epic {{epic_number}}? Is it live in production, scheduled for deployment, or still pending?" WAIT for {user_name} to provide deployment status @@ -1131,7 +1131,7 @@ Bob (Scrum Master): "{user_name}, what's the deployment status for Epic {{epic_n Charlie (Senior Dev): "If it's not deployed yet, we need to factor that into Epic {{next_epic_num}} timing." -Bob (Scrum Master): "{user_name}, when is deployment planned? Does that timing work for starting Epic {{next_epic_num}}?" +Amelia (Developer): "{user_name}, when is deployment planned? Does that timing work for starting Epic {{next_epic_num}}?" WAIT for {user_name} to clarify deployment timeline @@ -1142,11 +1142,11 @@ Bob (Scrum Master): "{user_name}, when is deployment planned? Does that timing w Explore stakeholder acceptance -Bob (Scrum Master): "{user_name}, have stakeholders seen and accepted the Epic {{epic_number}} deliverables?" +Amelia (Developer): "{user_name}, have stakeholders seen and accepted the Epic {{epic_number}} deliverables?" Alice (Product Owner): "This is important - I've seen 'done' epics get rejected by stakeholders and force rework." -Bob (Scrum Master): "{user_name}, any feedback from stakeholders still pending?" +Amelia (Developer): "{user_name}, any feedback from stakeholders still pending?" WAIT for {user_name} to describe stakeholder acceptance status @@ -1155,7 +1155,7 @@ Bob (Scrum Master): "{user_name}, any feedback from stakeholders still pending?" Alice (Product Owner): "We should get formal acceptance before moving on. Otherwise Epic {{next_epic_num}} might get interrupted by rework." -Bob (Scrum Master): "{user_name}, how do you want to handle stakeholder acceptance? Should we make it a critical path item?" +Amelia (Developer): "{user_name}, how do you want to handle stakeholder acceptance? Should we make it a critical path item?" WAIT for {user_name} decision @@ -1166,9 +1166,9 @@ Bob (Scrum Master): "{user_name}, how do you want to handle stakeholder acceptan Explore technical health and stability -Bob (Scrum Master): "{user_name}, this is a gut-check question: How does the codebase feel after Epic {{epic_number}}?" +Amelia (Developer): "{user_name}, this is a gut-check question: How does the codebase feel after Epic {{epic_number}}?" -Bob (Scrum Master): "Stable and maintainable? Or are there concerns lurking?" +Amelia (Developer): "Stable and maintainable? Or are there concerns lurking?" Charlie (Senior Dev): "Be honest, {user_name}. We've all shipped epics that felt... fragile." @@ -1181,11 +1181,11 @@ Charlie (Senior Dev): "Okay, let's dig into that. What's causing those concerns? Charlie (Senior Dev): [Helps {user_name} articulate technical concerns] -Bob (Scrum Master): "What would it take to address these concerns and feel confident about stability?" +Amelia (Developer): "What would it take to address these concerns and feel confident about stability?" Charlie (Senior Dev): "I'd say we need {{stability_work_needed}}, roughly {{stability_hours}} hours." -Bob (Scrum Master): "{user_name}, is addressing this stability work worth doing before Epic {{next_epic_num}}?" +Amelia (Developer): "{user_name}, is addressing this stability work worth doing before Epic {{next_epic_num}}?" WAIT for {user_name} decision @@ -1196,26 +1196,26 @@ Bob (Scrum Master): "{user_name}, is addressing this stability work worth doing Explore unresolved blockers -Bob (Scrum Master): "{user_name}, are there any unresolved blockers or technical issues from Epic {{epic_number}} that we're carrying forward?" +Amelia (Developer): "{user_name}, are there any unresolved blockers or technical issues from Epic {{epic_number}} that we're carrying forward?" Dana (QA Engineer): "Things that might create problems for Epic {{next_epic_num}} if we don't deal with them?" -Bob (Scrum Master): "Nothing is off limits here. If there's a problem, we need to know." +Amelia (Developer): "Nothing is off limits here. If there's a problem, we need to know." WAIT for {user_name} to surface any blockers -Bob (Scrum Master): "Let's capture those blockers and figure out how they affect Epic {{next_epic_num}}." +Amelia (Developer): "Let's capture those blockers and figure out how they affect Epic {{next_epic_num}}." Charlie (Senior Dev): "For {{blocker_1}}, if we leave it unresolved, it'll {{impact_description_1}}." Alice (Product Owner): "That sounds critical. We need to address that before moving forward." -Bob (Scrum Master): "Agreed. Adding to critical path: Resolve {{blocker_1}} before Epic {{next_epic_num}} kickoff." +Amelia (Developer): "Agreed. Adding to critical path: Resolve {{blocker_1}} before Epic {{next_epic_num}} kickoff." -Bob (Scrum Master): "Who owns that work?" +Amelia (Developer): "Who owns that work?" Assign blocker resolution to appropriate agent @@ -1225,7 +1225,7 @@ Bob (Scrum Master): "Who owns that work?" Synthesize the readiness assessment -Bob (Scrum Master): "Okay {user_name}, let me synthesize what we just uncovered..." +Amelia (Developer): "Okay {user_name}, let me synthesize what we just uncovered..." **EPIC {{epic_number}} READINESS ASSESSMENT:** @@ -1244,13 +1244,13 @@ Technical Health: {{stability_status}} Unresolved Blockers: {{blocker_status}} {{#if blockers_exist}}⚠️ Must resolve: {{blocker_list}}{{/if}} -Bob (Scrum Master): "{user_name}, does this assessment match your understanding?" +Amelia (Developer): "{user_name}, does this assessment match your understanding?" WAIT for {user_name} to confirm or correct the assessment -Bob (Scrum Master): "Based on this assessment, Epic {{epic_number}} is {{#if all_clear}}fully complete and we're clear to proceed{{else}}complete from a story perspective, but we have {{critical_work_count}} critical items before Epic {{next_epic_num}}{{/if}}." +Amelia (Developer): "Based on this assessment, Epic {{epic_number}} is {{#if all_clear}}fully complete and we're clear to proceed{{else}}complete from a story perspective, but we have {{critical_work_count}} critical items before Epic {{next_epic_num}}{{/if}}." Alice (Product Owner): "This level of thoroughness is why retrospectives are valuable." @@ -1262,13 +1262,13 @@ Charlie (Senior Dev): "Better to catch this now than three stories into the next -Bob (Scrum Master): "We've covered a lot of ground today. Let me bring this retrospective to a close." +Amelia (Developer): "We've covered a lot of ground today. Let me bring this retrospective to a close." ═══════════════════════════════════════════════════════════ ✅ RETROSPECTIVE COMPLETE ═══════════════════════════════════════════════════════════ -Bob (Scrum Master): "Epic {{epic_number}}: {{epic_title}} - REVIEWED" +Amelia (Developer): "Epic {{epic_number}}: {{epic_title}} - REVIEWED" **Key Takeaways:** @@ -1281,7 +1281,7 @@ Alice (Product Owner): "That first takeaway is huge - {{impact_of_lesson_1}}." Charlie (Senior Dev): "And lesson 2 is something we can apply immediately." -Bob (Scrum Master): "Commitments made today:" +Amelia (Developer): "Commitments made today:" - Action Items: {{action_count}} - Preparation Tasks: {{prep_task_count}} @@ -1289,7 +1289,7 @@ Bob (Scrum Master): "Commitments made today:" Dana (QA Engineer): "That's a lot of commitments. We need to actually follow through this time." -Bob (Scrum Master): "Agreed. Which is why we'll review these action items in our next standup." +Amelia (Developer): "Agreed. Which is why we'll review these action items in our next standup." ═══════════════════════════════════════════════════════════ 🎯 NEXT STEPS: @@ -1306,9 +1306,9 @@ Alice (Product Owner): "I'll communicate the timeline to stakeholders. They'll u ═══════════════════════════════════════════════════════════ -Bob (Scrum Master): "Before we wrap, I want to take a moment to acknowledge the team." +Amelia (Developer): "Before we wrap, I want to take a moment to acknowledge the team." -Bob (Scrum Master): "Epic {{epic_number}} delivered {{completed_stories}} stories with {{velocity_description}} velocity. We overcame {{blocker_count}} blockers. We learned a lot. That's real work by real people." +Amelia (Developer): "Epic {{epic_number}} delivered {{completed_stories}} stories with {{velocity_description}} velocity. We overcame {{blocker_count}} blockers. We learned a lot. That's real work by real people." Charlie (Senior Dev): "Hear, hear." @@ -1316,17 +1316,17 @@ Alice (Product Owner): "I'm proud of what we shipped." Dana (QA Engineer): "And I'm excited about Epic {{next_epic_num}} - especially now that we're prepared for it." -Bob (Scrum Master): "{user_name}, any final thoughts before we close?" +Amelia (Developer): "{user_name}, any final thoughts before we close?" WAIT for {user_name} to share final reflections -Bob (Scrum Master): [Acknowledges what {user_name} shared] "Thank you for that, {user_name}." +Amelia (Developer): [Acknowledges what {user_name} shared] "Thank you for that, {user_name}." -Bob (Scrum Master): "Alright team - great work today. We learned a lot from Epic {{epic_number}}. Let's use these insights to make Epic {{next_epic_num}} even better." +Amelia (Developer): "Alright team - great work today. We learned a lot from Epic {{epic_number}}. Let's use these insights to make Epic {{next_epic_num}} even better." -Bob (Scrum Master): "See you all when prep work is done. Meeting adjourned!" +Amelia (Developer): "See you all when prep work is done. Meeting adjourned!" ═══════════════════════════════════════════════════════════ @@ -1432,7 +1432,7 @@ Retrospective document was saved successfully, but {sprint_status_file} may need {{else}} 4. **Begin Epic {{next_epic_num}} when ready** - - Start creating stories with SM agent's `create-story` + - Start creating stories with Developer agent's `create-story` - Epic will be marked as `in-progress` automatically when first story is created - Ensure all critical path items are done first {{/if}} @@ -1446,7 +1446,7 @@ Epic {{epic_number}} delivered {{completed_stories}} stories with {{velocity_sum --- -Bob (Scrum Master): "Great session today, {user_name}. The team did excellent work." +Amelia (Developer): "Great session today, {user_name}. The team did excellent work." Alice (Product Owner): "See you at epic planning!" @@ -1460,7 +1460,7 @@ Charlie (Senior Dev): "Time to knock out that prep work." PARTY MODE REQUIRED: All agent dialogue uses "Name (Role): dialogue" format -Scrum Master maintains psychological safety throughout - no blame or judgment +Amelia (Developer) maintains psychological safety throughout - no blame or judgment Focus on systems and processes, not individual performance Create authentic team dynamics: disagreements, diverse perspectives, emotions User ({user_name}) is active participant, not passive observer diff --git a/src/bmm-skills/4-implementation/bmad-sprint-planning/sprint-status-template.yaml b/src/bmm-skills/4-implementation/bmad-sprint-planning/sprint-status-template.yaml index 6725b206c..d454f930c 100644 --- a/src/bmm-skills/4-implementation/bmad-sprint-planning/sprint-status-template.yaml +++ b/src/bmm-skills/4-implementation/bmad-sprint-planning/sprint-status-template.yaml @@ -29,7 +29,7 @@ # WORKFLOW NOTES: # =============== # - Mark epic as 'in-progress' when starting work on its first story -# - SM typically creates next story ONLY after previous one is 'done' to incorporate learnings +# - Developer typically creates next story ONLY after previous one is 'done' to incorporate learnings # - Dev moves story to 'review', then Dev runs code-review (fresh context, ideally different LLM) # EXAMPLE STRUCTURE (your actual epics/stories will replace these): diff --git a/src/bmm-skills/4-implementation/bmad-sprint-planning/workflow.md b/src/bmm-skills/4-implementation/bmad-sprint-planning/workflow.md index 211e00127..99a2e2528 100644 --- a/src/bmm-skills/4-implementation/bmad-sprint-planning/workflow.md +++ b/src/bmm-skills/4-implementation/bmad-sprint-planning/workflow.md @@ -2,7 +2,7 @@ **Goal:** Generate sprint status tracking from epics, detecting current story statuses and building a complete sprint-status.yaml file. -**Your Role:** You are a Scrum Master generating and maintaining sprint tracking. Parse epic files, detect story statuses, and produce a structured sprint-status.yaml. +**Your Role:** You are a Developer generating and maintaining sprint tracking. Parse epic files, detect story statuses, and produce a structured sprint-status.yaml. --- @@ -162,7 +162,7 @@ development_status: # =============== # - Epic transitions to 'in-progress' automatically when first story is created # - Stories can be worked in parallel if team capacity allows -# - SM typically creates next story after previous one is 'done' to incorporate learnings +# - Developer typically creates next story after previous one is 'done' to incorporate learnings # - Dev moves story to 'review', then runs code-review (fresh context, different LLM recommended) generated: { date } @@ -260,4 +260,4 @@ optional ↔ done 2. **Sequential Default**: Stories are typically worked in order, but parallel work is supported 3. **Parallel Work Supported**: Multiple stories can be `in-progress` if team capacity allows 4. **Review Before Done**: Stories should pass through `review` before `done` -5. **Learning Transfer**: SM typically creates next story after previous one is `done` to incorporate learnings +5. **Learning Transfer**: Developer typically creates next story after previous one is `done` to incorporate learnings diff --git a/src/bmm-skills/4-implementation/bmad-sprint-status/workflow.md b/src/bmm-skills/4-implementation/bmad-sprint-status/workflow.md index 1def1c8f3..7b72c717c 100644 --- a/src/bmm-skills/4-implementation/bmad-sprint-status/workflow.md +++ b/src/bmm-skills/4-implementation/bmad-sprint-status/workflow.md @@ -2,7 +2,7 @@ **Goal:** Summarize sprint status, surface risks, and recommend the next workflow action. -**Your Role:** You are a Scrum Master providing clear, actionable sprint visibility. No time estimates — focus on status, risks, and next steps. +**Your Role:** You are a Developer providing clear, actionable sprint visibility. No time estimates — focus on status, risks, and next steps. --- @@ -129,7 +129,7 @@ Enter corrections (e.g., "1=in-progress, 2=backlog") or "skip" to continue witho 4. Else if any story status == backlog → recommend `create-story` 5. Else if any retrospective status == optional → recommend `retrospective` 6. Else → All implementation items done; congratulate the user - you both did amazing work together! - Store selected recommendation as: next_story_id, next_workflow_id, next_agent (SM/DEV as appropriate) + Store selected recommendation as: next_story_id, next_workflow_id, next_agent (DEV) diff --git a/src/core-skills/bmad-party-mode/SKILL.md b/src/core-skills/bmad-party-mode/SKILL.md index acdf2cb0c..9f451d821 100644 --- a/src/core-skills/bmad-party-mode/SKILL.md +++ b/src/core-skills/bmad-party-mode/SKILL.md @@ -104,7 +104,7 @@ The user drives what happens next. Common patterns: | "Winston, what do you think about what Sally said?" | Spawn just Winston with Sally's response as context | | "Bring in Amelia on this" | Spawn Amelia with a summary of the discussion so far | | "I agree with John, let's go deeper on that" | Spawn John + 1-2 others to expand on John's point | -| "What would Mary and Bob think about Winston's approach?" | Spawn Mary and Bob with Winston's response as context | +| "What would Mary and Amelia think about Winston's approach?" | Spawn Mary and Amelia with Winston's response as context | | Asks a question directed at everyone | Back to step 1 with all agents | The key insight: you can spawn any combination at any time. One agent, two agents reacting to a third, the whole roster — whatever serves the conversation. Each spawn is cheap and independent. From 072de34450c8a615e77552f9237badd9b28b2124 Mon Sep 17 00:00:00 2001 From: miendinh <22139872+miendinh@users.noreply.github.com> Date: Fri, 3 Apr 2026 10:44:13 +0700 Subject: [PATCH 25/26] docs(vi-vn): add Vietnamese translation for BMAD documentation (#2110) * docs(vi-VN): add Vietnamese translation for BMAD documentation * feat(i18n): add Vietnamese website locale * docs(vi-VN): refine translated documentation * docs(vi-VN): sync terminology with latest upstream docs * fix(docs): normalize Vietnamese locale path casing * docs(vi): update non-interactive installation translation * docs(vi): translate analysis phase explanation * docs(vi): sync updated reference and tutorial pages --------- Co-authored-by: miendinh --- README_VN.md | 110 ++++++ docs/vi-vn/404.md | 8 + docs/vi-vn/_STYLE_GUIDE.md | 359 ++++++++++++++++++ .../vi-vn/explanation/advanced-elicitation.md | 49 +++ docs/vi-vn/explanation/adversarial-review.md | 59 +++ docs/vi-vn/explanation/analysis-phase.md | 70 ++++ docs/vi-vn/explanation/brainstorming.md | 33 ++ .../explanation/established-projects-faq.md | 51 +++ docs/vi-vn/explanation/party-mode.md | 59 +++ .../explanation/preventing-agent-conflicts.md | 112 ++++++ docs/vi-vn/explanation/project-context.md | 157 ++++++++ docs/vi-vn/explanation/quick-dev.md | 73 ++++ .../explanation/why-solutioning-matters.md | 76 ++++ docs/vi-vn/how-to/customize-bmad.md | 171 +++++++++ docs/vi-vn/how-to/established-projects.md | 117 ++++++ docs/vi-vn/how-to/get-answers-about-bmad.md | 135 +++++++ docs/vi-vn/how-to/install-bmad.md | 116 ++++++ .../how-to/non-interactive-installation.md | 184 +++++++++ docs/vi-vn/how-to/project-context.md | 127 +++++++ docs/vi-vn/how-to/quick-fixes.md | 95 +++++ docs/vi-vn/how-to/shard-large-documents.md | 78 ++++ docs/vi-vn/how-to/upgrade-to-v6.md | 100 +++++ docs/vi-vn/index.md | 60 +++ docs/vi-vn/reference/agents.md | 58 +++ docs/vi-vn/reference/commands.md | 136 +++++++ docs/vi-vn/reference/core-tools.md | 293 ++++++++++++++ docs/vi-vn/reference/modules.md | 76 ++++ docs/vi-vn/reference/testing.md | 106 ++++++ docs/vi-vn/reference/workflow-map.md | 89 +++++ docs/vi-vn/roadmap.mdx | 136 +++++++ docs/vi-vn/tutorials/getting-started.md | 276 ++++++++++++++ website/astro.config.mjs | 12 +- website/src/content/i18n/vi-VN.json | 28 ++ website/src/lib/locales.mjs | 4 + 34 files changed, 3607 insertions(+), 6 deletions(-) create mode 100644 README_VN.md create mode 100644 docs/vi-vn/404.md create mode 100644 docs/vi-vn/_STYLE_GUIDE.md create mode 100644 docs/vi-vn/explanation/advanced-elicitation.md create mode 100644 docs/vi-vn/explanation/adversarial-review.md create mode 100644 docs/vi-vn/explanation/analysis-phase.md create mode 100644 docs/vi-vn/explanation/brainstorming.md create mode 100644 docs/vi-vn/explanation/established-projects-faq.md create mode 100644 docs/vi-vn/explanation/party-mode.md create mode 100644 docs/vi-vn/explanation/preventing-agent-conflicts.md create mode 100644 docs/vi-vn/explanation/project-context.md create mode 100644 docs/vi-vn/explanation/quick-dev.md create mode 100644 docs/vi-vn/explanation/why-solutioning-matters.md create mode 100644 docs/vi-vn/how-to/customize-bmad.md create mode 100644 docs/vi-vn/how-to/established-projects.md create mode 100644 docs/vi-vn/how-to/get-answers-about-bmad.md create mode 100644 docs/vi-vn/how-to/install-bmad.md create mode 100644 docs/vi-vn/how-to/non-interactive-installation.md create mode 100644 docs/vi-vn/how-to/project-context.md create mode 100644 docs/vi-vn/how-to/quick-fixes.md create mode 100644 docs/vi-vn/how-to/shard-large-documents.md create mode 100644 docs/vi-vn/how-to/upgrade-to-v6.md create mode 100644 docs/vi-vn/index.md create mode 100644 docs/vi-vn/reference/agents.md create mode 100644 docs/vi-vn/reference/commands.md create mode 100644 docs/vi-vn/reference/core-tools.md create mode 100644 docs/vi-vn/reference/modules.md create mode 100644 docs/vi-vn/reference/testing.md create mode 100644 docs/vi-vn/reference/workflow-map.md create mode 100644 docs/vi-vn/roadmap.mdx create mode 100644 docs/vi-vn/tutorials/getting-started.md create mode 100644 website/src/content/i18n/vi-VN.json diff --git a/README_VN.md b/README_VN.md new file mode 100644 index 000000000..8aa862071 --- /dev/null +++ b/README_VN.md @@ -0,0 +1,110 @@ +![BMad Method](banner-bmad-method.png) + +[![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) +[![Discord](https://img.shields.io/badge/Discord-Join%20Community-7289da?logo=discord&logoColor=white)](https://discord.gg/gk8jAdXWmj) + +[English](README.md) | [简体中文](README_CN.md) | Tiếng Việt + +**Build More Architect Dreams** - một mô-đun khung phát triển hướng AI trong hệ sinh thái BMad, có khả năng thích ứng theo quy mô từ sửa lỗi nhỏ đến các hệ thống doanh nghiệp. + +**100% miễn phí và mã nguồn mở.** Không có tường phí. Không có nội dung bị khóa. Không có Discord giới hạn quyền truy cập. Chúng tôi tin vào việc trao quyền cho mọi người, không chỉ cho những ai có thể trả tiền để vào một cộng đồng hay khóa học khép kín. + +## Vì sao chọn BMad Method? + +Các công cụ AI truyền thống thường làm thay phần suy nghĩ của bạn và tạo ra kết quả ở mức trung bình. Các agent chuyên biệt và quy trình làm việc có hướng dẫn của BMad hoạt động như những cộng tác viên chuyên gia, dẫn dắt bạn qua một quy trình có cấu trúc để khai mở tư duy tốt nhất của bạn cùng với AI. + +- **Trợ giúp AI thông minh** - Gọi skill `bmad-help` bất kỳ lúc nào để biết bước tiếp theo +- **Thích ứng theo quy mô và miền bài toán** - Tự động điều chỉnh độ sâu lập kế hoạch theo độ phức tạp của dự án +- **Quy trình có cấu trúc** - Dựa trên các thực hành tốt nhất của agile xuyên suốt phân tích, lập kế hoạch, kiến trúc và triển khai +- **Agent chuyên biệt** - Hơn 12 chuyên gia theo vai trò như PM, Architect, Developer, UX, Scrum Master và nhiều vai trò khác +- **Party Mode** - Đưa nhiều persona agent vào cùng một phiên để cộng tác và thảo luận +- **Vòng đời hoàn chỉnh** - Từ động não ý tưởng cho đến triển khai + +[Tìm hiểu thêm tại **docs.bmad-method.org**](https://docs.bmad-method.org/vi-vn/) + +--- + +## 🚀 Điều gì tiếp theo cho BMad? + +**V6 đã có mặt và đây mới chỉ là khởi đầu!** BMad Method đang phát triển rất nhanh với các cải tiến như đội agent đa nền tảng và tích hợp sub-agent, kiến trúc Skills, BMad Builder v1, tự động hóa vòng lặp phát triển và nhiều thứ khác vẫn đang được xây dựng. + +**[📍 Xem lộ trình đầy đủ →](https://docs.bmad-method.org/vi-vn/roadmap/)** + +--- + +## Bắt đầu nhanh + +**Điều kiện tiên quyết**: [Node.js](https://nodejs.org) v20+ + +```bash +npx bmad-method install +``` + +> Muốn dùng bản prerelease mới nhất? Hãy dùng `npx bmad-method@next install`. Hãy kỳ vọng mức độ biến động cao hơn bản cài đặt mặc định. + +Làm theo các lời nhắc của trình cài đặt, sau đó mở AI IDE của bạn như Claude Code hoặc Cursor trong thư mục dự án. + +**Cài đặt không tương tác** (cho CI/CD): + +```bash +npx bmad-method install --directory /path/to/project --modules bmm --tools claude-code --yes +``` + +[Xem toàn bộ tùy chọn cài đặt](https://docs.bmad-method.org/vi-vn/how-to/non-interactive-installation/) + +> **Chưa chắc nên làm gì?** Hãy hỏi `bmad-help` - nó sẽ cho bạn biết chính xác bước nào tiếp theo và bước nào là tùy chọn. Bạn cũng có thể hỏi kiểu như `bmad-help Tôi vừa hoàn thành phần kiến trúc, tiếp theo tôi cần làm gì?` + +## Mô-đun + +BMad Method có thể được mở rộng bằng các mô-đun chính thức cho những miền chuyên biệt. Chúng có sẵn trong lúc cài đặt hoặc bất kỳ lúc nào sau đó. + +| Module | Mục đích | +| ----------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | +| **[BMad Method (BMM)](https://github.com/bmad-code-org/BMAD-METHOD)** | Khung lõi với hơn 34 quy trình | +| **[BMad Builder (BMB)](https://github.com/bmad-code-org/bmad-builder)** | Tạo agent và quy trình BMad tùy chỉnh | +| **[Test Architect (TEA)](https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise)** | Chiến lược kiểm thử và tự động hóa dựa trên rủi ro | +| **[Game Dev Studio (BMGD)](https://github.com/bmad-code-org/bmad-module-game-dev-studio)** | Quy trình phát triển game (Unity, Unreal, Godot) | +| **[Creative Intelligence Suite (CIS)](https://github.com/bmad-code-org/bmad-module-creative-intelligence-suite)** | Đổi mới, động não ý tưởng, tư duy thiết kế | + +## Tài liệu + +[Trang tài liệu BMad Method](https://docs.bmad-method.org/vi-vn/) - bài hướng dẫn, hướng dẫn tác vụ, giải thích khái niệm và tài liệu tham chiếu + +**Liên kết nhanh:** +- [Hướng dẫn bắt đầu](https://docs.bmad-method.org/vi-vn/tutorials/getting-started/) +- [Nâng cấp từ các phiên bản trước](https://docs.bmad-method.org/vi-vn/how-to/upgrade-to-v6/) +- [Tài liệu Test Architect](https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/) + +## Cộng đồng + +- [Discord](https://discord.gg/gk8jAdXWmj) - Nhận trợ giúp, chia sẻ ý tưởng, cộng tác +- [Đăng ký trên YouTube](https://www.youtube.com/@BMadCode) - video hướng dẫn, lớp chuyên sâu và podcast (ra mắt tháng 2 năm 2025) +- [GitHub Issues](https://github.com/bmad-code-org/BMAD-METHOD/issues) - Báo lỗi và yêu cầu tính năng +- [Discussions](https://github.com/bmad-code-org/BMAD-METHOD/discussions) - Trao đổi cộng đồng + +## Hỗ trợ BMad + +BMad miễn phí cho tất cả mọi người - và sẽ luôn như vậy. Nếu bạn muốn hỗ trợ quá trình phát triển: + +- ⭐ Hãy nhấn sao cho dự án ở góc trên bên phải của trang này +- ☕ [Buy Me a Coffee](https://buymeacoffee.com/bmad) - Tiếp thêm năng lượng cho quá trình phát triển +- 🏢 Tài trợ doanh nghiệp - Nhắn riêng trên Discord +- 🎤 Diễn thuyết và truyền thông - Sẵn sàng cho hội nghị, podcast, phỏng vấn (BM trên Discord) + +## Đóng góp + +Chúng tôi luôn chào đón đóng góp. Xem [CONTRIBUTING.md](CONTRIBUTING.md) để biết hướng dẫn. + +## Giấy phép + +Giấy phép MIT - xem [LICENSE](LICENSE) để biết chi tiết. + +--- + +**BMad** và **BMAD-METHOD** là các nhãn hiệu của BMad Code, LLC. Xem [TRADEMARK.md](TRADEMARK.md) để biết chi tiết. + +[![Contributors](https://contrib.rocks/image?repo=bmad-code-org/BMAD-METHOD)](https://github.com/bmad-code-org/BMAD-METHOD/graphs/contributors) + +Xem [CONTRIBUTORS.md](CONTRIBUTORS.md) để biết thông tin về những người đóng góp. \ No newline at end of file diff --git a/docs/vi-vn/404.md b/docs/vi-vn/404.md new file mode 100644 index 000000000..e51d5668b --- /dev/null +++ b/docs/vi-vn/404.md @@ -0,0 +1,8 @@ +--- +title: Không Tìm Thấy Trang +template: splash +--- + +Trang bạn đang tìm không tồn tại hoặc đã được chuyển đi. + +[Quay về trang chủ](./index.md) diff --git a/docs/vi-vn/_STYLE_GUIDE.md b/docs/vi-vn/_STYLE_GUIDE.md new file mode 100644 index 000000000..6f1976669 --- /dev/null +++ b/docs/vi-vn/_STYLE_GUIDE.md @@ -0,0 +1,359 @@ +--- +title: "Hướng Dẫn Phong Cách Tài Liệu" +description: Các quy ước tài liệu dành riêng cho dự án, dựa trên phong cách tài liệu của Google và cấu trúc Diataxis +--- + +Dự án này tuân theo [Google Developer Documentation Style Guide](https://developers.google.com/style) và dùng [Diataxis](https://diataxis.fr/) để tổ chức nội dung. Phần dưới đây chỉ nêu các quy ước dành riêng cho dự án. + +## Quy tắc riêng của dự án + +| Quy tắc | Quy định | +| --- | --- | +| Không dùng đường kẻ ngang (`---`) | Làm gián đoạn dòng đọc | +| Không dùng tiêu đề `####` | Dùng chữ in đậm hoặc admonition thay thế | +| Không có mục "Related" hoặc "Next:" | Sidebar đã xử lý điều hướng | +| Không dùng danh sách lồng quá sâu | Tách thành các mục riêng | +| Không dùng code block cho nội dung không phải code | Dùng admonition cho ví dụ hội thoại | +| Không dùng cả đoạn in đậm để làm callout | Dùng admonition thay thế | +| Mỗi mục tối đa 1-2 admonition | Tutorial có thể dùng 3-4 admonition cho mỗi phần lớn | +| Ô bảng / mục danh sách | Tối đa 1-2 câu | +| Ngân sách tiêu đề | 8-12 `##` cho mỗi tài liệu; 2-3 `###` cho mỗi phần | + +## Admonition (cú pháp Starlight) + +```md +:::tip[Tiêu đề] +Lối tắt, best practice +::: + +:::note[Tiêu đề] +Ngữ cảnh, định nghĩa, ví dụ, điều kiện tiên quyết +::: + +:::caution[Tiêu đề] +Lưu ý, vấn đề có thể xảy ra +::: + +:::danger[Tiêu đề] +Chỉ dùng cho cảnh báo nghiêm trọng — mất dữ liệu, vấn đề bảo mật +::: +``` + +### Cách dùng chuẩn + +| 2 | Planning | Yêu cầu — PRD hoặc spec *(bắt buộc)* | +| --- | --- | +| `:::note[Điều kiện tiên quyết]` | Các phụ thuộc trước khi bắt đầu | +| `:::tip[Lối đi nhanh]` | Tóm tắt TL;DR ở đầu tài liệu | +| `:::caution[Quan trọng]` | Cảnh báo quan trọng | +| `:::note[Ví dụ]` | Ví dụ lệnh / phản hồi | + +## Mẫu bảng chuẩn + +**Phase:** + +```md +| Phase | Tên | Điều xảy ra | +| ----- | --- | ------------ | +| 1 | Analysis | Brainstorm, nghiên cứu *(tùy chọn)* | +| 2 | Planning | Yêu cầu — PRD hoặc spec *(bắt buộc)* | +``` + +**Skill:** + +```md +| Skill | Agent | Mục đích | +| ----- | ----- | -------- | +| `bmad-brainstorming` | Analyst | Brainstorm cho dự án mới | +| `bmad-create-prd` | PM | Tạo tài liệu yêu cầu sản phẩm | +``` + +## Khối cấu trúc thư mục + +Hiển thị trong phần "Bạn đã hoàn thành những gì": + +````md +``` +your-project/ +├── _bmad/ # Cấu hình BMad +├── _bmad-output/ +│ ├── planning-artifacts/ +│ │ └── PRD.md # Tài liệu yêu cầu của bạn +│ ├── implementation-artifacts/ +│ └── project-context.md # Quy tắc triển khai (tùy chọn) +└── ... +``` +```` + +## Cấu trúc Tutorial + +```text +1. Tiêu đề + Hook (1-2 câu mô tả kết quả) +2. Thông báo phiên bản/module (admonition info hoặc warning) (tùy chọn) +3. Bạn sẽ học được gì (danh sách kết quả) +4. Điều kiện tiên quyết (admonition info) +5. Lối đi nhanh (admonition tip - tóm tắt TL;DR) +6. Hiểu về [Chủ đề] (ngữ cảnh trước các bước - bảng cho phase/agent) +7. Cài đặt (tùy chọn) +8. Bước 1: [Nhiệm vụ lớn đầu tiên] +9. Bước 2: [Nhiệm vụ lớn thứ hai] +10. Bước 3: [Nhiệm vụ lớn thứ ba] +11. Bạn đã hoàn thành những gì (tóm tắt + cấu trúc thư mục) +12. Tra cứu nhanh (bảng skill) +13. Câu hỏi thường gặp (định dạng FAQ) +14. Nhận hỗ trợ (liên kết cộng đồng) +15. Điểm chính cần nhớ (admonition tip) +``` + +### Checklist cho Tutorial + +- [ ] Hook mô tả kết quả trong 1-2 câu +- [ ] Có phần "Bạn sẽ học được gì" +- [ ] Điều kiện tiên quyết nằm trong admonition +- [ ] Có admonition TL;DR ở đầu trang +- [ ] Có bảng cho phase, skill, agent +- [ ] Có phần "Bạn đã hoàn thành những gì" +- [ ] Có bảng tra cứu nhanh +- [ ] Có phần câu hỏi thường gặp +- [ ] Có phần nhận hỗ trợ +- [ ] Có admonition điểm chính ở cuối + +## Cấu trúc How-To + +```text +1. Tiêu đề + Hook (một câu: "Sử dụng workflow `X` để...") +2. Khi nào nên dùng (danh sách kịch bản) +3. Khi nào nên bỏ qua (tùy chọn) +4. Điều kiện tiên quyết (admonition note) +5. Các bước (mục con `###` có đánh số) +6. Bạn sẽ nhận được gì (output / artifact) +7. Ví dụ (tùy chọn) +8. Mẹo (tùy chọn) +9. Bước tiếp theo (tùy chọn) +``` + +### Checklist cho How-To + +- [ ] Hook bắt đầu bằng "Sử dụng workflow `X` để..." +- [ ] Phần "Khi nào nên dùng" có 3-5 gạch đầu dòng +- [ ] Có liệt kê điều kiện tiên quyết +- [ ] Các bước là mục `###` có đánh số và bắt đầu bằng động từ +- [ ] Phần "Bạn sẽ nhận được gì" mô tả artifact đầu ra + +## Cấu trúc Explanation + +### Các loại + +| Loại | Ví dụ | +| --- | --- | +| **Trang chỉ mục / landing** | `core-concepts/index.md` | +| **Khái niệm** | `what-are-agents.md` | +| **Tính năng** | `quick-dev.md` | +| **Triết lý** | `why-solutioning-matters.md` | +| **FAQ** | `established-projects-faq.md` | + +### Mẫu tổng quát + +```text +1. Tiêu đề + Hook (1-2 câu) +2. Tổng quan / định nghĩa (nó là gì, vì sao quan trọng) +3. Khái niệm chính (các mục `###`) +4. Bảng so sánh (tùy chọn) +5. Khi nào nên dùng / không nên dùng (tùy chọn) +6. Sơ đồ (tùy chọn - mermaid, tối đa 1 sơ đồ mỗi tài liệu) +7. Bước tiếp theo (tùy chọn) +``` + +### Trang chỉ mục / landing + +```text +1. Tiêu đề + Hook (một câu) +2. Bảng nội dung (liên kết kèm mô tả) +3. Bắt đầu từ đâu (danh sách có đánh số) +4. Chọn hướng đi của bạn (tùy chọn - cây quyết định) +``` + +### Trang giải thích khái niệm + +```text +1. Tiêu đề + Hook (nó là gì) +2. Loại / nhóm (các mục `###`) (tùy chọn) +3. Bảng khác biệt chính +4. Thành phần / bộ phận +5. Nên chọn cái nào? +6. Cách tạo / tùy chỉnh (trỏ sang how-to) +``` + +### Trang giải thích tính năng + +```text +1. Tiêu đề + Hook (nó làm gì) +2. Thông tin nhanh (tùy chọn - "Phù hợp với:", "Mất bao lâu:") +3. Khi nào nên dùng / không nên dùng +4. Cách nó hoạt động (mermaid tùy chọn) +5. Lợi ích chính +6. Bảng so sánh (tùy chọn) +7. Khi nào nên nâng cấp / chuyển hướng (tùy chọn) +``` + +### Tài liệu về triết lý / lý do + +```text +1. Tiêu đề + Hook (nguyên tắc) +2. Vấn đề +3. Giải pháp +4. Nguyên tắc chính (các mục `###`) +5. Lợi ích +6. Khi nào áp dụng +``` + +### Checklist cho Explanation + +- [ ] Hook nêu rõ tài liệu giải thích điều gì +- [ ] Nội dung được chia thành các phần `##` dễ quét +- [ ] Có bảng so sánh khi có từ 3 lựa chọn trở lên +- [ ] Sơ đồ có nhãn rõ ràng +- [ ] Có liên kết sang how-to cho câu hỏi mang tính thủ tục +- [ ] Mỗi tài liệu tối đa 2-3 admonition + +## Cấu trúc Reference + +### Các loại + +| Loại | Ví dụ | +| --- | --- | +| **Trang chỉ mục / landing** | `workflows/index.md` | +| **Danh mục** | `agents/index.md` | +| **Đào sâu** | `document-project.md` | +| **Cấu hình** | `core-tasks.md` | +| **Bảng thuật ngữ** | `glossary/index.md` | +| **Tổng hợp đầy đủ** | `bmgd-workflows.md` | + +### Trang chỉ mục của Reference + +```text +1. Tiêu đề + Hook (một câu) +2. Các phần nội dung (`##` cho từng nhóm) + - Danh sách gạch đầu dòng với liên kết và mô tả +``` + +### Reference dạng danh mục + +```text +1. Tiêu đề + Hook +2. Các mục (`##` cho từng mục) + - Mô tả ngắn (một câu) + - **Skills:** hoặc **Thông tin chính:** ở dạng danh sách phẳng +3. Phần dùng chung / toàn cục (`##`) (tùy chọn) +``` + +### Reference đào sâu theo mục + +```text +1. Tiêu đề + Hook (một câu nêu mục đích) +2. Thông tin nhanh (admonition note, tùy chọn) + - Module, Skill, Input, Output dưới dạng danh sách +3. Mục đích / tổng quan (`##`) +4. Cách gọi (code block) +5. Các phần chính (`##` cho từng khía cạnh) + - Dùng `###` cho các tùy chọn con +6. Ghi chú / lưu ý (admonition tip hoặc caution) +``` + +### Reference về cấu hình + +```text +1. Tiêu đề + Hook +2. Mục lục (jump link nếu có từ 4 mục trở lên) +3. Các mục (`##` cho từng config / task) + - **Tóm tắt in đậm** — một câu + - **Dùng khi:** danh sách gạch đầu dòng + - **Cách hoạt động:** các bước đánh số (tối đa 3-5 bước) + - **Output:** kết quả mong đợi (tùy chọn) +``` + +### Hướng dẫn reference tổng hợp + +```text +1. Tiêu đề + Hook +2. Tổng quan (`##`) + - Sơ đồ hoặc bảng mô tả cách tổ chức +3. Các phần lớn (`##` cho từng phase / nhóm) + - Các mục (`###` cho từng mục) + - Các trường chuẩn hóa: Skill, Agent, Input, Output, Description +4. Bước tiếp theo (tùy chọn) +``` + +### Checklist cho Reference + +- [ ] Hook nêu rõ tài liệu đang tham chiếu điều gì +- [ ] Cấu trúc phù hợp với loại reference +- [ ] Các mục dùng cấu trúc nhất quán xuyên suốt +- [ ] Có bảng cho dữ liệu có cấu trúc / so sánh +- [ ] Có liên kết sang tài liệu explanation cho chiều sâu khái niệm +- [ ] Tối đa 1-2 admonition + +## Cấu trúc Glossary + +Starlight tạo phần điều hướng "On this page" từ các tiêu đề: + +- Dùng `##` cho các nhóm — sẽ hiện ở thanh điều hướng bên phải +- Đặt thuật ngữ trong bảng — gọn hơn so với tạo tiêu đề riêng cho từng thuật ngữ +- Không chèn TOC nội tuyến — sidebar bên phải đã xử lý điều hướng + +### Định dạng bảng + +```md +## Tên nhóm + +| Thuật ngữ | Định nghĩa | +| --------- | ---------- | +| **Agent** | AI persona chuyên biệt với chuyên môn cụ thể để dẫn dắt người dùng qua workflow. | +| **Workflow** | Quy trình nhiều bước có hướng dẫn, điều phối hoạt động của agent AI để tạo deliverable. | +``` + +### Quy tắc viết định nghĩa + +| Nên làm | Không nên làm | +| --- | --- | +| Bắt đầu bằng việc nó LÀ gì hoặc LÀM gì | Bắt đầu bằng "Đây là..." hoặc "Một [thuật ngữ] là..." | +| Giữ trong 1-2 câu | Viết thành nhiều đoạn dài | +| Bôi đậm tên thuật ngữ trong ô | Để thuật ngữ ở dạng chữ thường | + +### Dấu hiệu ngữ cảnh + +Thêm ngữ cảnh in nghiêng ở đầu định nghĩa với các thuật ngữ có phạm vi hẹp: + +- `*Chỉ dành cho Quick Flow.*` +- `*BMad Method/Enterprise.*` +- `*Phase N.*` +- `*BMGD.*` +- `*Dự án hiện có.*` + +### Checklist cho Glossary + +- [ ] Thuật ngữ nằm trong bảng, không dùng tiêu đề riêng +- [ ] Thuật ngữ được sắp theo thứ tự chữ cái trong từng nhóm +- [ ] Định nghĩa dài 1-2 câu +- [ ] Dấu hiệu ngữ cảnh được in nghiêng +- [ ] Tên thuật ngữ được bôi đậm trong ô +- [ ] Không dùng kiểu định nghĩa "Một [thuật ngữ] là..." + +## Phần FAQ + +```md +## Các câu hỏi + +- [Lúc nào cũng cần kiến trúc à?](#luc-nao-cung-can-kien-truc-a) +- [Tôi có thể đổi kế hoạch về sau không?](#toi-co-the-doi-ke-hoach-ve-sau-khong) + +### Lúc nào cũng cần kiến trúc à? + +Chỉ với nhánh BMad Method và Enterprise. Quick Flow bỏ qua để đi thẳng vào triển khai. + +### Tôi có thể đổi kế hoạch về sau không? + +Có. SM agent có workflow `bmad-correct-course` để xử lý thay đổi phạm vi. + +**Có câu hỏi chưa được trả lời ở đây?** [Mở issue](...) hoặc hỏi trên [Discord](...). +``` \ No newline at end of file diff --git a/docs/vi-vn/explanation/advanced-elicitation.md b/docs/vi-vn/explanation/advanced-elicitation.md new file mode 100644 index 000000000..37b8fbd08 --- /dev/null +++ b/docs/vi-vn/explanation/advanced-elicitation.md @@ -0,0 +1,49 @@ +--- +title: "Khai thác nâng cao" +description: Buộc LLM xem xét lại kết quả của nó bằng các phương pháp lập luận có cấu trúc +sidebar: + order: 6 +--- + +Buộc LLM xem xét lại những gì nó vừa tạo ra. Bạn chọn một phương pháp lập luận, nó áp dụng phương pháp đó lên chính output của mình, rồi bạn quyết định có giữ các cải tiến hay không. + +## Khai thác nâng cao là gì? + +Đây là một lần xem xét lại có cấu trúc. Thay vì bảo AI "thử lại" hoặc "làm cho nó tốt hơn", bạn chọn một phương pháp lập luận cụ thể và AI sẽ xem lại output của chính nó dưới góc đó. + +Khác biệt này rất quan trọng. Yêu cầu mơ hồ sẽ tạo ra bản sửa đổi mơ hồ. Một phương pháp được gọi tên buộc AI tấn công vấn đề theo một hướng cụ thể, qua đó phát hiện những ý tưởng mà một lần thử lại chung chung sẽ bỏ lỡ. + +## Khi nào nên dùng + +- Sau khi workflow tạo nội dung và bạn muốn có phương án thay thế +- Khi output có vẻ ổn nhưng bạn nghi vẫn còn có thể đào sâu hơn +- Để stress-test các giả định hoặc tìm điểm yếu +- Với nội dung quan trọng, nơi mà việc nghĩ lại sẽ có giá trị + +Các workflow sẽ đưa ra tùy chọn khai thác nâng cao tại các điểm quyết định - sau khi LLM tạo một kết quả, bạn sẽ được hỏi có muốn chạy nó hay không. + +## Nó hoạt động như thế nào + +1. LLM đề xuất 5 phương pháp phù hợp với nội dung của bạn +2. Bạn chọn một phương pháp (hoặc đảo lại để xem lựa chọn khác) +3. Phương pháp được áp dụng, các cải tiến được hiện ra +4. Chấp nhận hoặc bỏ đi, lặp lại hoặc tiếp tục + +## Các phương pháp tích hợp sẵn + +Có hàng chục phương pháp lập luận có sẵn. Một vài ví dụ: + +- **Pre-mortem Analysis** - Giả sử dự án đã thất bại rồi lần ngược lại để tìm lý do +- **First Principles Thinking** - Loại bỏ giả định, xây lại từ sự thật nền tảng +- **Inversion** - Hỏi cách nào chắc chắn dẫn đến thất bại, rồi tránh những điều đó +- **Red Team vs Blue Team** - Tự tấn công công việc của chính mình, rồi tự bảo vệ nó +- **Socratic Questioning** - Chất vấn mọi khẳng định bằng "tại sao?" và "làm sao bạn biết?" +- **Constraint Removal** - Bỏ hết ràng buộc, xem điều gì thay đổi, rồi thêm lại có chọn lọc +- **Stakeholder Mapping** - Đánh giá lại từ góc nhìn của từng bên liên quan +- **Analogical Reasoning** - Tìm điểm tương đồng ở lĩnh vực khác và áp dụng bài học của chúng + +Và còn nhiều nữa. AI sẽ chọn những lựa chọn phù hợp nhất với nội dung của bạn - bạn quyết định chạy cái nào. + +:::tip[Bắt đầu từ đây] +Pre-mortem Analysis là lựa chọn đầu tiên tốt cho bất kỳ bản spec hoặc kế hoạch nào. Nó thường xuyên tìm ra các lỗ hổng mà một lần review thông thường bỏ qua. +::: diff --git a/docs/vi-vn/explanation/adversarial-review.md b/docs/vi-vn/explanation/adversarial-review.md new file mode 100644 index 000000000..3a4bb64f6 --- /dev/null +++ b/docs/vi-vn/explanation/adversarial-review.md @@ -0,0 +1,59 @@ +--- +title: "Đánh giá đối kháng" +description: Kỹ thuật lập luận ép buộc giúp tránh các bản review lười kiểu "nhìn ổn" +sidebar: + order: 5 +--- + +Buộc quá trình phân tích đi sâu hơn bằng cách ép phải tìm ra vấn đề. + +## Đánh giá đối kháng là gì? + +Đây là một kỹ thuật review mà người review *bắt buộc* phải tìm thấy vấn đề. Không có chuyện "nhìn ổn". Người review chọn lập trường hoài nghi - giả sử vấn đề có tồn tại và đi tìm chúng. + +Đây không phải là việc cố tình tiêu cực. Đây là cách ép buộc phân tích thật sự, thay vì chỉ liếc qua và đóng dấu chấp nhận những gì vừa được nộp lên. + +**Quy tắc cốt lõi:** Bạn phải tìm ra vấn đề. Nếu không có phát hiện nào, quy trình sẽ dừng lại - cần phân tích lại hoặc giải thích tại sao. + +## Vì sao nó hiệu quả + +Những lần review thông thường dễ bị confirmation bias. Bạn lướt qua công việc, không có gì đập vào mắt, rồi phê duyệt. Yêu cầu "tìm vấn đề" phá vỡ mẫu này: + +- **Ép buộc sự kỹ lưỡng** - Không thể phê duyệt cho đến khi bạn đã đào đủ sâu để tìm thấy vấn đề +- **Bắt được những thứ đang thiếu** - "Còn gì chưa có ở đây?" trở thành câu hỏi tự nhiên +- **Tăng chất lượng tín hiệu** - Các phát hiện cụ thể và có thể hành động được, không phải các lo ngại mơ hồ +- **Bất đối xứng thông tin** - Chạy review với bối cảnh mới (không có lý do gốc) để đánh giá artifact, không phải ý định + +## Nó được dùng ở đâu + +Đánh giá đối kháng xuất hiện xuyên suốt các workflow của BMad - code review, kiểm tra sẵn sàng triển khai, xác thực spec, và nhiều nơi khác. Đôi khi là bước bắt buộc, đôi khi là tùy chọn (như khai thác nâng cao hoặc party mode). Mẫu này được điều chỉnh theo artifact cần bị soi kỹ. + +## Vẫn cần bộ lọc của con người + +Vì AI *được lệnh* phải tìm vấn đề, nó sẽ tìm vấn đề - ngay cả khi chúng không tồn tại. Hãy kỳ vọng false positive: bắt bẻ những lỗi vặt, hiểu sai ý định, hoặc thậm chí tưởng tượng ra vấn đề. + +**Bạn là người quyết định cái nào là thật.** Xem từng phát hiện, bỏ qua nhiễu, sửa những gì quan trọng. + +## Ví dụ + +Thay vì: + +> "Phần triển khai xác thực có vẻ hợp lý. Đã duyệt." + +Một lần đánh giá đối kháng sẽ cho ra: + +> 1. **HIGH** - `login.ts:47` - Không có giới hạn tốc độ cho các lần đăng nhập thất bại +> 2. **HIGH** - Session token được lưu trong localStorage (dễ bị XSS) +> 3. **MEDIUM** - Kiểm tra mật khẩu chỉ diễn ra ở client +> 4. **MEDIUM** - Không có audit log cho các lần đăng nhập thất bại +> 5. **LOW** - Số magic `3600` nên được đổi thành `SESSION_TIMEOUT_SECONDS` + +Bản review thứ nhất có thể bỏ sót một lỗi bảo mật. Bản review thứ hai đã bắt được bốn vấn đề. + +## Lặp lại và lợi ích giảm dần + +Sau khi đã xử lý các phát hiện, hãy cân nhắc chạy lại. Lần thứ hai thường sẽ bắt thêm được vấn đề. Lần thứ ba cũng không phải lúc nào cũng vô ích. Nhưng mỗi lần đều tốn thời gian, và đến một mức nào đó bạn sẽ gặp lợi ích giảm dần - chỉ còn các bắt bẻ nhỏ và false positive. + +:::tip[Review tốt hơn] +Giả sử vấn đề có tồn tại. Tìm những gì còn thiếu, không chỉ những gì sai. +::: diff --git a/docs/vi-vn/explanation/analysis-phase.md b/docs/vi-vn/explanation/analysis-phase.md new file mode 100644 index 000000000..406f83a38 --- /dev/null +++ b/docs/vi-vn/explanation/analysis-phase.md @@ -0,0 +1,70 @@ +--- +title: "Giai đoạn Analysis: từ ý tưởng đến nền tảng" +description: Brainstorming, research, product brief và PRFAQ là gì, và nên dùng từng công cụ khi nào +sidebar: + order: 1 +--- + +Giai đoạn Analysis (Phase 1) giúp bạn suy nghĩ rõ ràng về sản phẩm trước khi cam kết bắt tay vào xây dựng. Mọi công cụ trong giai đoạn này đều là tùy chọn, nhưng nếu bỏ qua toàn bộ phần analysis thì PRD của bạn sẽ được dựng trên giả định thay vì insight. + +## Vì sao cần Analysis trước Planning? + +PRD trả lời câu hỏi "chúng ta nên xây gì và vì sao?". Nếu đầu vào của nó là những suy nghĩ mơ hồ, bạn sẽ nhận lại một PRD mơ hồ, và mọi tài liệu phía sau đều kế thừa chính sự mơ hồ đó. Kiến trúc dựng trên một PRD yếu sẽ đặt cược sai về mặt kỹ thuật. Stories sinh ra từ một kiến trúc yếu sẽ bỏ sót edge case. Chi phí sẽ dồn lên theo từng tầng. + +Các công cụ analysis tồn tại để làm PRD của bạn sắc bén hơn. Chúng tiếp cận vấn đề từ nhiều góc độ khác nhau: khám phá sáng tạo, thực tế thị trường, độ rõ ràng về khách hàng, tính khả thi. Nhờ vậy, đến khi bạn ngồi xuống làm việc với PM agent, bạn đã biết mình đang xây cái gì và cho ai. + +## Các công cụ + +### Brainstorming + +**Nó là gì.** Một phiên sáng tạo có điều phối, sử dụng các kỹ thuật ideation đã được kiểm chứng. AI đóng vai trò như người huấn luyện, kéo ý tưởng ra từ bạn thông qua các bài tập có cấu trúc, chứ không nghĩ thay cho bạn. + +**Vì sao nó có mặt ở đây.** Ý tưởng thô cần không gian để phát triển trước khi bị khóa cứng thành requirement. Brainstorming tạo ra khoảng không đó. Nó đặc biệt có giá trị khi bạn có một miền vấn đề nhưng chưa có lời giải rõ ràng, hoặc khi bạn muốn khám phá nhiều hướng trước khi commit. + +**Khi nào nên dùng.** Bạn có một hình dung mơ hồ về thứ mình muốn xây nhưng chưa kết tinh được thành khái niệm rõ ràng. Hoặc bạn đã có concept ban đầu nhưng muốn pressure-test nó với các phương án thay thế. + +Xem [Brainstorming](./brainstorming.md) để hiểu sâu hơn về cách một phiên làm việc diễn ra. + +### Research (Thị trường, miền nghiệp vụ, kỹ thuật) + +**Nó là gì.** Ba workflow nghiên cứu tập trung vào các chiều khác nhau của ý tưởng. Market research xem xét đối thủ, xu hướng và cảm nhận của người dùng. Domain research xây dựng hiểu biết về miền nghiệp vụ và thuật ngữ. Technical research đánh giá tính khả thi, các lựa chọn kiến trúc và hướng triển khai. + +**Vì sao nó có mặt ở đây.** Xây dựng dựa trên giả định là con đường nhanh nhất để tạo ra thứ chẳng ai cần. Research đặt concept của bạn xuống mặt đất: đối thủ nào đã tồn tại, người dùng thực sự đang vật lộn với điều gì, điều gì khả thi về kỹ thuật, và bạn sẽ phải đối mặt với những ràng buộc đặc thù ngành nào. + +**Khi nào nên dùng.** Bạn đang bước vào một miền mới, nghi ngờ có đối thủ nhưng chưa lập bản đồ được, hoặc concept của bạn phụ thuộc vào những năng lực kỹ thuật mà bạn chưa kiểm chứng. Có thể chạy một, hai, hoặc cả ba; mỗi workflow đều đứng độc lập. + +### Product Brief + +**Nó là gì.** Một phiên discovery có hướng dẫn, tạo ra bản tóm tắt điều hành 1-2 trang cho concept sản phẩm của bạn. AI đóng vai trò Business Analyst cộng tác, giúp bạn diễn đạt tầm nhìn, đối tượng mục tiêu, giá trị cốt lõi và phạm vi. + +**Vì sao nó có mặt ở đây.** Product brief là con đường nhẹ nhàng hơn để đi vào planning. Nó ghi lại tầm nhìn chiến lược của bạn theo định dạng có cấu trúc và đưa thẳng vào quá trình tạo PRD. Nó hoạt động tốt nhất khi bạn đã có niềm tin tương đối chắc vào concept của mình: bạn biết khách hàng là ai, vấn đề là gì, và đại khái muốn xây gì. Brief sẽ tổ chức lại và làm sắc nét lối suy nghĩ đó. + +**Khi nào nên dùng.** Concept của bạn đã tương đối rõ và bạn muốn ghi lại nó một cách hiệu quả trước khi tạo PRD. Bạn tin vào hướng đi hiện tại và không cần bị thách thức giả định một cách quá quyết liệt. + +### PRFAQ (Working Backwards) + +**Nó là gì.** Phương pháp Working Backwards của Amazon được chuyển thành một thử thách tương tác. Bạn viết thông cáo báo chí công bố sản phẩm hoàn thiện trước khi tồn tại dù chỉ một dòng code, rồi trả lời những câu hỏi khó nhất mà khách hàng và stakeholder sẽ đặt ra. AI đóng vai trò product coach dai dẳng nhưng mang tính xây dựng. + +**Vì sao nó có mặt ở đây.** PRFAQ là con đường nghiêm ngặt hơn để đi vào planning. Nó buộc bạn đạt đến sự rõ ràng theo hướng customer-first bằng cách bắt bạn bảo vệ từng phát biểu. Nếu bạn không viết nổi một thông cáo báo chí đủ thuyết phục, sản phẩm đó chưa sẵn sàng. Nếu phần FAQ lộ ra những khoảng trống, đó chính là những khoảng trống mà bạn sẽ phát hiện muộn hơn rất nhiều, và với chi phí lớn hơn nhiều, trong lúc triển khai. Bài kiểm tra này bóc tách lối suy nghĩ yếu ngay từ sớm, khi chi phí sửa còn rẻ nhất. + +**Khi nào nên dùng.** Bạn muốn stress-test concept trước khi commit tài nguyên. Bạn chưa chắc người dùng có thực sự quan tâm hay không. Bạn muốn xác nhận rằng mình có thể diễn đạt một value proposition rõ ràng và có thể bảo vệ được. Hoặc đơn giản là bạn muốn dùng sự kỷ luật của Working Backwards để làm suy nghĩ của mình sắc bén hơn. + +## Tôi nên dùng cái nào? + +| Tình huống | Công cụ được khuyến nghị | +| --------- | ------------------------ | +| "Tôi có một ý tưởng mơ hồ, chưa biết bắt đầu từ đâu" | Brainstorming | +| "Tôi cần hiểu thị trường trước khi quyết định" | Research | +| "Tôi biết mình muốn xây gì rồi, chỉ cần ghi lại" | Product Brief | +| "Tôi muốn chắc rằng ý tưởng này thực sự đáng để xây" | PRFAQ | +| "Tôi muốn khám phá, rồi kiểm chứng, rồi ghi lại" | Brainstorming → Research → PRFAQ hoặc Brief | + +Product Brief và PRFAQ đều tạo ra đầu vào cho PRD. Hãy chọn một trong hai tùy vào mức độ thách thức bạn muốn. Brief là discovery mang tính cộng tác. PRFAQ là một bài kiểm tra khắc nghiệt. Cả hai đều đưa bạn tới cùng một đích; PRFAQ chỉ kiểm tra xem concept của bạn có thật sự xứng đáng để đến đó hay không. + +:::tip[Chưa chắc nên bắt đầu ở đâu?] +Hãy chạy `bmad-help` và mô tả tình huống của bạn. Nó sẽ gợi ý điểm bắt đầu phù hợp dựa trên những gì bạn đã làm và điều bạn đang muốn đạt được. +::: + +## Sau Analysis thì chuyện gì xảy ra? + +Output từ Analysis đi thẳng vào Phase 2 (Planning). Workflow tạo PRD chấp nhận product brief, tài liệu PRFAQ, kết quả research và báo cáo brainstorming làm đầu vào. Nó sẽ tổng hợp bất cứ thứ gì bạn đã tạo thành các requirement có cấu trúc. Bạn làm analysis càng kỹ, PRD của bạn càng sắc. \ No newline at end of file diff --git a/docs/vi-vn/explanation/brainstorming.md b/docs/vi-vn/explanation/brainstorming.md new file mode 100644 index 000000000..8c269a675 --- /dev/null +++ b/docs/vi-vn/explanation/brainstorming.md @@ -0,0 +1,33 @@ +--- +title: "Động não ý tưởng" +description: Các phiên sáng tạo tương tác sử dụng hơn 60 kỹ thuật khơi ý đã được kiểm chứng +sidebar: + order: 2 +--- + +Mở khóa sự sáng tạo của bạn thông qua quá trình khám phá có hướng dẫn. + +## Động não ý tưởng là gì? + +Chạy `bmad-brainstorming` và bạn sẽ có một người điều phối sáng tạo giúp rút ý tưởng từ chính bạn - không phải phát sinh thay bạn. AI đóng vai trò huấn luyện viên và người dẫn đường, sử dụng các kỹ thuật đã được kiểm chứng để tạo điều kiện cho những ý tưởng tốt nhất của bạn xuất hiện. + +**Phù hợp cho:** + +- Phá vỡ thế bí ý tưởng +- Tạo ý tưởng sản phẩm hoặc tính năng +- Xem xét vấn đề từ góc nhìn mới +- Biến các khái niệm thô thành kế hoạch hành động + +## Nó hoạt động như thế nào + +1. **Thiết lập** - Xác định chủ đề, mục tiêu, ràng buộc +2. **Chọn cách tiếp cận** - Tự chọn kỹ thuật, để AI đề xuất, chọn ngẫu nhiên, hoặc đi theo một luồng tiến trình +3. **Điều phối** - Làm việc qua từng kỹ thuật bằng các câu hỏi gợi mở và huấn luyện cộng tác +4. **Sắp xếp** - Gom ý tưởng theo chủ đề và ưu tiên hóa +5. **Hành động** - Các ý tưởng tốt nhất sẽ được gán bước tiếp theo và chỉ số thành công + +Mọi thứ đều được ghi lại trong tài liệu phiên làm việc để bạn có thể xem lại sau này hoặc chia sẻ với stakeholder. + +:::note[Ý tưởng của bạn] +Mọi ý tưởng đều đến từ bạn. Workflow chỉ tạo điều kiện cho insight xuất hiện - nguồn gốc vẫn là bạn. +::: diff --git a/docs/vi-vn/explanation/established-projects-faq.md b/docs/vi-vn/explanation/established-projects-faq.md new file mode 100644 index 000000000..920f10748 --- /dev/null +++ b/docs/vi-vn/explanation/established-projects-faq.md @@ -0,0 +1,51 @@ +--- +title: "FAQ cho dự án đã tồn tại" +description: Các câu hỏi phổ biến khi dùng BMad Method trên dự án đã tồn tại +sidebar: + order: 8 +--- + +Các câu trả lời nhanh cho những câu hỏi thường gặp khi làm việc với dự án đã tồn tại bằng BMad Method (BMM). + +## Các câu hỏi + +- [Tôi có phải chạy document-project trước không?](#toi-co-phai-chay-document-project-truoc-khong) +- [Nếu tôi quên chạy document-project thì sao?](#neu-toi-quen-chay-document-project-thi-sao) +- [Tôi có thể dùng Quick Flow cho dự án đã tồn tại không?](#toi-co-the-dung-quick-flow-cho-du-an-da-ton-tai-khong) +- [Nếu code hiện tại của tôi không theo best practices thì sao?](#neu-code-hien-tai-cua-toi-khong-theo-best-practices-thi-sao) + +### Tôi có phải chạy document-project trước không? + +Rất nên chạy, nhất là khi: + +- Không có tài liệu sẵn có +- Tài liệu đã lỗi thời +- Agent AI cần context về code hiện có + +Bạn có thể bỏ qua nếu đã có tài liệu đầy đủ, mới, bao gồm `docs/index.md`, hoặc bạn sẽ dùng công cụ/kỹ thuật khác để giúp agent khám phá hệ thống hiện có. + +### Nếu tôi quên chạy document-project thì sao? + +Không sao - bạn có thể chạy nó bất cứ lúc nào. Bạn thậm chí có thể chạy trong khi dự án đang diễn ra hoặc sau đó để giữ tài liệu luôn mới. + +### Tôi có thể dùng Quick Flow cho dự án đã tồn tại không? + +Có. Quick Flow hoạt động rất tốt với dự án đã tồn tại. Nó sẽ: + +- Tự động nhận diện stack hiện có +- Phân tích pattern code hiện có +- Phát hiện quy ước và hỏi bạn để xác nhận +- Tạo spec giàu ngữ cảnh, tôn trọng code hiện có + +Rất hợp với sửa lỗi và tính năng nhỏ trong codebase sẵn có. + +### Nếu code hiện tại của tôi không theo best practices thì sao? + +Quick Flow sẽ nhận diện quy ước hiện có và hỏi: "Tôi có nên tuân theo những quy ước hiện tại này không?" Bạn là người quyết định: + +- **Có** → Giữ tính nhất quán với codebase hiện tại +- **Không** → Đặt ra chuẩn mới, đồng thời ghi rõ lý do trong spec + +BMM tôn trọng lựa chọn của bạn - nó không ép buộc hiện đại hóa, nhưng sẽ đưa ra lựa chọn đó. + +**Có câu hỏi chưa được trả lời ở đây?** Hãy [mở issue](https://github.com/bmad-code-org/BMAD-METHOD/issues) hoặc hỏi trên [Discord](https://discord.gg/gk8jAdXWmj) để chúng tôi bổ sung! diff --git a/docs/vi-vn/explanation/party-mode.md b/docs/vi-vn/explanation/party-mode.md new file mode 100644 index 000000000..4398a3420 --- /dev/null +++ b/docs/vi-vn/explanation/party-mode.md @@ -0,0 +1,59 @@ +--- +title: "Party Mode" +description: Cộng tác đa agent - đưa tất cả agent AI vào cùng một cuộc trò chuyện +sidebar: + order: 7 +--- + +Đưa tất cả agent AI của bạn vào cùng một cuộc trò chuyện. + +## Party Mode là gì? + +Chạy `bmad-party-mode` và bạn sẽ có cả đội AI trong cùng một phòng - PM, Architect, Dev, UX Designer, bất kỳ ai bạn cần. BMad Master điều phối, chọn các agent liên quan cho từng tin nhắn. Các agent trả lời đúng vai, đồng ý, phản biện, và bổ sung ý tưởng cho nhau. + +Cuộc trò chuyện tiếp tục lâu đến mức bạn muốn. Bạn có thể hỏi tiếp, phản biện câu trả lời, đổi hướng thảo luận - đó là một cuộc qua lại thật sự với các agent của bạn cho đến khi xong. + +**Phù hợp cho:** + +- Các quyết định lớn có đánh đổi +- Các phiên động não ý tưởng +- Post-mortem khi mọi thứ đi sai +- Retrospective và lập kế hoạch sprint + +## Ví dụ + +### Gọi tên kiến trúc tệ + +**Bạn:** "Được rồi cả đội, sprint vừa rồi là một thảm họa. Dịch vụ xác thực sập ba lần. Ai đã làm hỏng chuyện này?" + +**Architect:** "Thiết kế vẫn ổn - xác thực phân tán với cơ chế fallback hợp lý. Nếu phần triển khai lệch khỏi spec..." + +**Dev:** "Tôi đã làm đúng theo tài liệu kiến trúc. Spec không tính đến race condition khi vô hiệu hóa session đồng thời." + +**PM:** "Cả hai người đều bỏ sót vấn đề lớn hơn - chúng ta không xác thực đúng yêu cầu quản lý session trong PRD. Lỗi này một phần là của tôi." + +**TEA:** "Và tôi đáng ra phải bắt được nó trong integration test. Các kịch bản test đã không bao phủ trường hợp vô hiệu hóa đồng thời." + +### Động não sáng tạo + +**Bạn:** "Làm sao để quá trình onboarding có cảm giác kỳ diệu thay vì nhàm chán?" + +**UX Designer:** "Bắt đầu bằng progressive disclosure - hiện tính năng khi người dùng cần, thay vì tung một tutorial dày đặc." + +**Storyteller:** "Nếu onboarding là một câu chuyện thì sao? Mỗi bước mở ra hành trình của một nhân vật - người dùng CHÍNH là người hùng." + +**Game Designer:** "Nối tiếp ý đó - nếu 'nhiệm vụ' đầu tiên thực chất giải quyết một vấn đề thật của người dùng thì sao? Họ học bằng cách làm ra giá trị ngay." + +### Quyết định kỹ thuật + +**Bạn:** "MVP nên dùng monolith hay microservices?" + +**Architect:** "Bắt đầu bằng monolith. Microservices thêm độ phức tạp mà bạn chưa cần ở mức 1000 người dùng." + +**PM:** "Đồng ý. Tốc độ ra thị trường quan trọng hơn khả năng mở rộng lý thuyết." + +**Dev:** "Monolith nhưng có ranh giới module rõ ràng. Nếu cần, mình có thể tách service sau." + +:::tip[Quyết định tốt hơn] +Quyết định tốt hơn nhờ nhiều góc nhìn đa dạng. Chào mừng đến với party mode. +::: diff --git a/docs/vi-vn/explanation/preventing-agent-conflicts.md b/docs/vi-vn/explanation/preventing-agent-conflicts.md new file mode 100644 index 000000000..ef77c8cf1 --- /dev/null +++ b/docs/vi-vn/explanation/preventing-agent-conflicts.md @@ -0,0 +1,112 @@ +--- +title: "Ngăn xung đột giữa các agent" +description: Cách kiến trúc ngăn xung đột khi nhiều agent cùng triển khai một hệ thống +sidebar: + order: 4 +--- + +Khi nhiều agent AI cùng triển khai các phần khác nhau của hệ thống, chúng có thể đưa ra các quyết định kỹ thuật mâu thuẫn nhau. Tài liệu kiến trúc ngăn điều đó bằng cách thiết lập các tiêu chuẩn dùng chung. + +## Các kiểu xung đột phổ biến + +### Xung đột về phong cách API + +Không có kiến trúc: +- Agent A dùng REST với `/users/{id}` +- Agent B dùng GraphQL mutations +- Kết quả: pattern API không nhất quán, người dùng API bị rối + +Có kiến trúc: +- ADR quy định: "Dùng GraphQL cho mọi giao tiếp client-server" +- Tất cả agent theo cùng một mẫu + +### Xung đột về thiết kế cơ sở dữ liệu + +Không có kiến trúc: +- Agent A dùng tên cột theo snake_case +- Agent B dùng camelCase +- Kết quả: schema không nhất quán, truy vấn khó hiểu + +Có kiến trúc: +- Tài liệu standards quy định quy ước đặt tên +- Tất cả agent theo cùng một pattern + +### Xung đột về quản lý state + +Không có kiến trúc: +- Agent A dùng Redux cho global state +- Agent B dùng React Context +- Kết quả: nhiều cách quản lý state song song, độ phức tạp tăng cao + +Có kiến trúc: +- ADR quy định cách quản lý state +- Tất cả agent triển khai thống nhất + +## Kiến trúc ngăn xung đột bằng cách nào + +### 1. Quyết định rõ ràng thông qua ADR + +Mỗi lựa chọn công nghệ quan trọng đều được ghi lại với: +- Context (vì sao quyết định này quan trọng) +- Các lựa chọn đã cân nhắc (có những phương án nào) +- Quyết định (ta đã chọn gì) +- Lý do (tại sao lại chọn như vậy) +- Hệ quả (các đánh đổi được chấp nhận) + +### 2. Hướng dẫn riêng cho FR/NFR + +Kiến trúc ánh xạ mỗi functional requirement sang cách tiếp cận kỹ thuật: +- FR-001: User Management → GraphQL mutations +- FR-002: Mobile App → Truy vấn tối ưu + +### 3. Tiêu chuẩn và quy ước + +Tài liệu hóa rõ ràng về: +- Cấu trúc thư mục +- Quy ước đặt tên +- Cách tổ chức code +- Pattern kiểm thử + +## Kiến trúc như một bối cảnh dùng chung + +Hãy xem kiến trúc là bối cảnh dùng chung mà tất cả agent đều đọc trước khi triển khai: + +```text +PRD: "Cần xây gì" + ↓ +Kiến trúc: "Xây như thế nào" + ↓ +Agent A đọc kiến trúc → triển khai Epic 1 +Agent B đọc kiến trúc → triển khai Epic 2 +Agent C đọc kiến trúc → triển khai Epic 3 + ↓ +Kết quả: Triển khai nhất quán +``` + +## Các chủ đề ADR quan trọng + +Những quyết định phổ biến giúp tránh xung đột: + +| Chủ đề | Ví dụ quyết định | +| ---------------- | -------------------------------------------- | +| API Style | GraphQL hay REST hay gRPC | +| Database | PostgreSQL hay MongoDB | +| Auth | JWT hay Session | +| State Management | Redux hay Context hay Zustand | +| Styling | CSS Modules hay Tailwind hay Styled Components | +| Testing | Jest + Playwright hay Vitest + Cypress | + +## Anti-pattern cần tránh + +:::caution[Những lỗi thường gặp] +- **Quyết định ngầm** - "Cứ để đó rồi tính phong cách API sau" sẽ dẫn đến không nhất quán +- **Tài liệu hóa quá mức** - Ghi lại mọi lựa chọn nhỏ gây tê liệt phân tích +- **Kiến trúc lỗi thời** - Tài liệu viết một lần rồi không cập nhật khiến agent đi theo pattern cũ +::: + +:::tip[Cách tiếp cận đúng] +- Tài liệu hóa những quyết định cắt ngang nhiều epic +- Tập trung vào những khu vực dễ phát sinh xung đột +- Cập nhật kiến trúc khi bạn học thêm +- Dùng `bmad-correct-course` cho các thay đổi đáng kể +::: diff --git a/docs/vi-vn/explanation/project-context.md b/docs/vi-vn/explanation/project-context.md new file mode 100644 index 000000000..cfe1daca5 --- /dev/null +++ b/docs/vi-vn/explanation/project-context.md @@ -0,0 +1,157 @@ +--- +title: "Project Context" +description: Cách project-context.md định hướng các agent AI theo quy tắc và ưu tiên của dự án +sidebar: + order: 7 +--- + +Tệp `project-context.md` là kim chỉ nam cho việc triển khai của các agent AI trong dự án của bạn. Tương tự như một "bản hiến pháp" trong các hệ thống phát triển khác, nó ghi lại các quy tắc, pattern và ưu tiên giúp việc sinh mã được nhất quán trong mọi workflow. + +## Nó làm gì + +Các agent AI liên tục đưa ra quyết định triển khai - theo pattern nào, tổ chức code ra sao, dùng quy ước gì. Nếu không có hướng dẫn rõ ràng, chúng có thể: +- Làm theo best practice chung chung không khớp với codebase của bạn +- Đưa ra quyết định không nhất quán giữa các story +- Bỏ sót yêu cầu hoặc ràng buộc đặc thù của dự án + +Tệp `project-context.md` giải quyết vấn đề này bằng cách tài liệu hóa những gì agent cần biết trong định dạng ngắn gọn, tối ưu cho LLM. + +## Nó hoạt động như thế nào + +Mỗi workflow triển khai đều tự động nạp `project-context.md` nếu tệp tồn tại. Workflow architect cũng nạp tệp này để tôn trọng các ưu tiên kỹ thuật của bạn khi thiết kế kiến trúc. + +**Được nạp bởi các workflow sau:** +- `bmad-create-architecture` - tôn trọng ưu tiên kỹ thuật trong giai đoạn solutioning +- `bmad-create-story` - đưa pattern của dự án vào quá trình tạo story +- `bmad-dev-story` - định hướng các quyết định triển khai +- `bmad-code-review` - đối chiếu với tiêu chuẩn của dự án +- `bmad-quick-dev` - áp dụng pattern khi triển khai các spec +- `bmad-sprint-planning`, `bmad-retrospective`, `bmad-correct-course` - cung cấp bối cảnh cấp dự án + +## Khi nào nên tạo + +Tệp `project-context.md` hữu ích ở bất kỳ giai đoạn nào của dự án: + +| Tình huống | Khi nào nên tạo | Mục đích | +|----------|----------------|---------| +| **Dự án mới, trước kiến trúc** | Tạo thủ công, trước `bmad-create-architecture` | Ghi lại ưu tiên kỹ thuật để architect tôn trọng | +| **Dự án mới, sau kiến trúc** | Qua `bmad-generate-project-context` hoặc tạo thủ công | Ghi lại quyết định kiến trúc cho các agent triển khai | +| **Dự án hiện có** | Qua `bmad-generate-project-context` | Khám phá pattern hiện có để agent theo đúng quy ước | +| **Dự án Quick Flow** | Trước hoặc trong `bmad-quick-dev` | Đảm bảo triển khai nhanh vẫn tôn trọng pattern của bạn | + +:::tip[Khuyến nghị] +Với dự án mới, hãy tạo thủ công trước giai đoạn kiến trúc nếu bạn có ưu tiên kỹ thuật rõ ràng. Nếu không, hãy tạo nó sau kiến trúc để ghi lại các quyết định đã được đưa ra. +::: + +## Nội dung cần có trong tệp + +Tệp này có hai phần chính: + +### Technology Stack & Versions + +Ghi lại framework, ngôn ngữ và công cụ dự án đang dùng, kèm phiên bản cụ thể: + +```markdown +## Technology Stack & Versions + +- Node.js 20.x, TypeScript 5.3, React 18.2 +- State: Zustand (không dùng Redux) +- Testing: Vitest, Playwright, MSW +- Styling: Tailwind CSS với custom design tokens +``` + +### Critical Implementation Rules + +Ghi lại những pattern và quy ước mà agent dễ bỏ sót nếu chỉ đọc qua code: + +```markdown +## Critical Implementation Rules + +**TypeScript Configuration:** +- Bật strict mode - không dùng `any` nếu chưa có phê duyệt rõ ràng +- Dùng `interface` cho public API, `type` cho union/intersection + +**Code Organization:** +- Components đặt trong `/src/components/` và để `.test.tsx` cùng chỗ +- Utilities đặt trong `/src/lib/` cho các hàm pure có thể tái sử dụng +- Lời gọi API phải dùng `apiClient` singleton - không fetch trực tiếp + +**Testing Patterns:** +- Unit test tập trung vào business logic, không soi chi tiết implementation +- Integration test dùng MSW để mock API responses +- E2E test chỉ bao phủ các user journey quan trọng + +**Framework-Specific:** +- Mọi thao tác async dùng wrapper `handleError` để xử lý lỗi nhất quán +- Feature flags được truy cập qua `featureFlag()` từ `@/lib/flags` +- Route mới theo file-based routing pattern trong `/src/app/` +``` + +Hãy tập trung vào những gì **không hiển nhiên** - những điều agent khó suy ra chỉ từ một vài đoạn code. Không cần ghi lại các thực hành tiêu chuẩn áp dụng mọi nơi. + +## Tạo tệp + +Bạn có ba lựa chọn: + +### Tạo thủ công + +Tạo tệp tại `_bmad-output/project-context.md` và thêm các quy tắc của bạn: + +```bash +# Trong thư mục gốc của dự án +mkdir -p _bmad-output +touch _bmad-output/project-context.md +``` + +Sửa tệp để thêm stack công nghệ và quy tắc triển khai. Workflow architect và implementation sẽ tự động tìm và nạp nó. + +### Tạo sau khi hoàn thành kiến trúc + +Chạy workflow `bmad-generate-project-context` sau khi bạn hoàn tất kiến trúc: + +```bash +bmad-generate-project-context +``` + +Nó sẽ quét tài liệu kiến trúc và tệp dự án để tạo tệp `project-context.md` trong `output_folder` đã được cấu hình cho workflow. Trong nhiều dự án, đó sẽ là `_bmad-output/`, nhưng vị trí thực tế phụ thuộc vào cấu hình hiện tại của bạn. + +### Tạo cho dự án hiện có + +Với dự án hiện có, chạy `bmad-generate-project-context` để khám phá pattern sẵn có: + +```bash +bmad-generate-project-context +``` + +Workflow sẽ phân tích codebase để nhận diện quy ước, sau đó tạo tệp context cho bạn xem lại và tinh chỉnh. + +## Vì sao nó quan trọng + +Nếu không có `project-context.md`, các agent sẽ tự đưa ra giả định có thể không phù hợp với dự án: + +| Không có context | Có context | +|----------------|--------------| +| Dùng pattern chung chung | Theo đúng quy ước đã được xác lập | +| Phong cách không nhất quán giữa các story | Triển khai nhất quán | +| Có thể bỏ sót ràng buộc đặc thù | Tôn trọng đầy đủ yêu cầu kỹ thuật | +| Mỗi agent tự quyết định | Tất cả agent canh hàng theo cùng quy tắc | + +Điều này đặc biệt quan trọng với: +- **Quick Flow** - bỏ qua PRD và kiến trúc, nên tệp context lấp đầy khoảng trống +- **Dự án theo nhóm** - đảm bảo tất cả agent theo cùng tiêu chuẩn +- **Dự án hiện có** - tránh phá vỡ các pattern đã ổn định + +## Chỉnh sửa và cập nhật + +Tệp `project-context.md` là tài liệu sống. Hãy cập nhật khi: + +- Quyết định kiến trúc thay đổi +- Có quy ước mới được thiết lập +- Pattern tiến hóa trong quá trình triển khai +- Bạn nhận ra lỗ hổng qua hành vi của agent + +Bạn có thể sửa thủ công bất kỳ lúc nào, hoặc chạy lại `bmad-generate-project-context` để cập nhật sau các thay đổi lớn. + +:::note[Vị trí tệp] +Nếu bạn tạo thủ công, vị trí khuyến nghị là `_bmad-output/project-context.md`. Nếu bạn dùng `bmad-generate-project-context`, tệp sẽ được tạo tại `project-context.md` bên trong `output_folder` đã cấu hình. Các workflow triển khai cố ý tìm theo mẫu `**/project-context.md`, vì vậy tệp vẫn sẽ được nạp miễn là nó tồn tại ở một vị trí phù hợp trong dự án. +::: diff --git a/docs/vi-vn/explanation/quick-dev.md b/docs/vi-vn/explanation/quick-dev.md new file mode 100644 index 000000000..d9a0145f1 --- /dev/null +++ b/docs/vi-vn/explanation/quick-dev.md @@ -0,0 +1,73 @@ +--- +title: "Quick Dev" +description: Giảm ma sát human-in-the-loop mà vẫn giữ các checkpoint bảo vệ chất lượng output +sidebar: + order: 2 +--- + +Đưa ý định vào, nhận thay đổi mã nguồn ra, với số lần cần con người nhảy vào giữa quy trình ít nhất có thể - nhưng không đánh đổi chất lượng. + +Nó cho phép model tự vận hành lâu hơn giữa các checkpoint, rồi chỉ đưa con người quay lại khi tác vụ không thể tiếp tục an toàn nếu thiếu phán đoán của con người, hoặc khi đã đến lúc review kết quả cuối. + +![Quick Dev workflow diagram](/diagrams/quick-dev-diagram.png) + +## Vì sao nó tồn tại + +Các lượt human-in-the-loop vừa cần thiết vừa tốn kém. + +LLM hiện tại vẫn thất bại theo những cách dễ đoán: hiểu sai ý định, tự điền vào khoảng trống bằng những phán đoán tự tin, lệch sang công việc không liên quan, và tạo ra các bản review nhiễu. Đồng thời, việc cần con người nhảy vào liên tục làm giảm tốc độ phát triển. Sự chú ý của con người là nút thắt. + +`bmad-quick-dev` cân bằng lại đánh đổi đó. Nó tin model có thể chạy tự chủ lâu hơn, nhưng chỉ sau khi workflow đã tạo được một ranh giới đủ mạnh để làm điều đó an toàn. + +## Thiết kế cốt lõi + +### 1. Nén ý định trước + +Workflow bắt đầu bằng việc để con người và model nén yêu cầu thành một mục tiêu thống nhất. Đầu vào có thể bắt đầu như một ý định thô, nhưng trước khi workflow tự vận hành thì nó phải đủ nhỏ, đủ rõ ràng, và đủ ít mâu thuẫn để có thể thực thi. + +Ý định có thể đến từ nhiều dạng: vài cụm từ, liên kết bug tracker, output từ plan mode, đoạn văn bản copy từ phiên chat, hoặc thậm chí một số story trong `epics.md` của chính BMAD. Ở trường hợp cuối, workflow không hiểu được ngữ nghĩa theo dõi story của BMAD, nhưng vẫn có thể lấy chính story đó và tiếp tục. + +Workflow này không loại bỏ quyền kiểm soát của con người. Nó chuyển nó về một số thời điểm có giá trị cao: + +- **Làm rõ ý định** - biến một yêu cầu lộn xộn thành một mục tiêu thống nhất, không mâu thuẫn ngầm +- **Phê duyệt spec** - xác nhận rằng cách hiểu đã đóng băng là đúng thứ cần xây +- **Review sản phẩm cuối** - checkpoint chính, nơi con người quyết định kết quả cuối có chấp nhận được hay không + +### 2. Định tuyến theo con đường an toàn nhỏ nhất + +Khi mục tiêu đã rõ, workflow sẽ quyết định đây có phải thay đổi one-shot thật sự hay cần đi theo đường đầy đủ hơn. Những thay đổi nhỏ, blast radius gần như bằng 0 có thể đi thẳng vào triển khai. Còn lại sẽ đi qua lập kế hoạch để model có được một ranh giới mạnh hơn trước khi tự chạy lâu hơn. + +### 3. Chạy lâu hơn với ít giám sát hơn + +Sau quyết định định tuyến đó, model có thể tự gánh thêm công việc. Trên con đường đầy đủ, spec đã được phê duyệt trở thành ranh giới mà model sẽ thực thi với ít giám sát hơn, và đó chính là mục tiêu của thiết kế này. + +### 4. Chẩn đoán lỗi ở đúng tầng + +Nếu triển khai sai vì ý định sai, vậy sửa code không phải cách fix đúng. Nếu code sai vì spec yếu, thì vá diff cũng không phải cách fix đúng. Workflow được thiết kế để chẩn đoán lỗi đã đi vào hệ thống từ tầng nào, quay lại đúng tầng đó, rồi sinh lại từ đấy. + +Các phát hiện từ review được dùng để xác định vấn đề đến từ ý định, quá trình tạo spec, hay triển khai cục bộ. Chỉ những lỗi thật sự cục bộ mới được sửa tại chỗ. + +### 5. Chỉ đưa con người quay lại khi cần + +Bước interview ý định có human-in-the-loop, nhưng nó không giống một checkpoint lặp đi lặp lại. Workflow cố gắng giảm thiểu những checkpoint lặp lại đó. Sau bước định hình ý định ban đầu, con người chủ yếu quay lại khi workflow không thể tiếp tục an toàn nếu thiếu phán đoán, và ở cuối quy trình để review kết quả. + +- **Xử lý khoảng trống của ý định** - quay lại khi review cho thấy workflow không thể suy ra an toàn điều được hàm ý + +Mọi thứ còn lại đều là ứng viên cho việc thực thi tự chủ lâu hơn. Đánh đổi này là có chủ đích. Các pattern cũ tốn nhiều sự chú ý của con người cho việc giám sát liên tục. Quick Dev đặt nhiều niềm tin hơn vào model, nhưng để dành sự chú ý của con người cho những thời điểm mà lý trí con người có đòn bẩy lớn nhất. + +## Vì sao hệ thống review quan trọng + +Giai đoạn review không chỉ để tìm bug. Nó còn để định tuyến cách sửa mà không phá hỏng động lượng. + +Workflow này hoạt động tốt nhất trên nền tảng có thể spawn subagent, hoặc ít nhất gọi được một LLM khác qua dòng lệnh và đợi kết quả. Nếu nền tảng của bạn không hỗ trợ sẵn, bạn có thể thêm skill để làm việc đó. Các subagent không mang context là một trụ cột trong thiết kế review. + +Review agentic thường sai theo hai cách: + +- Tạo quá nhiều phát hiện, buộc con người lọc quá nhiều nhiễu. +- Làm lệch thay đổi hiện tại bằng cách kéo vào các vấn đề không liên quan, biến mỗi lần chạy thành một dự án dọn dẹp ad-hoc. + +Quick Dev xử lý cả hai bằng cách coi review là triage. + +Có những phát hiện thuộc về thay đổi hiện tại. Có những phát hiện không thuộc về nó. Nếu một phát hiện chỉ là ngẫu nhiên xuất hiện, không gắn nhân quả với thay đổi đang làm, workflow có thể trì hoãn nó thay vì ép con người xử lý ngay. Điều đó giữ cho mỗi lần chạy tập trung và ngăn các ngả rẽ ngẫu nhiên ăn hết ngân sách chú ý. + +Quá trình triage này đôi khi sẽ không hoàn hảo. Điều đó chấp nhận được. Thường tốt hơn khi đánh giá sai một số phát hiện còn hơn là nhận về hàng ngàn bình luận review giá trị thấp. Hệ thống tối ưu cho chất lượng tín hiệu, không phải độ phủ tuyệt đối. diff --git a/docs/vi-vn/explanation/why-solutioning-matters.md b/docs/vi-vn/explanation/why-solutioning-matters.md new file mode 100644 index 000000000..631142a5a --- /dev/null +++ b/docs/vi-vn/explanation/why-solutioning-matters.md @@ -0,0 +1,76 @@ +--- +title: "Vì sao solutioning quan trọng" +description: Hiểu vì sao giai đoạn solutioning là tối quan trọng đối với dự án nhiều epic +sidebar: + order: 3 +--- + +Giai đoạn 3 (Solutioning) biến **xây gì** (từ giai đoạn Planning) thành **xây như thế nào** (thiết kế kỹ thuật). Giai đoạn này ngăn xung đột giữa các agent trong dự án nhiều epic bằng cách ghi lại các quyết định kiến trúc trước khi bắt đầu triển khai. + +## Vấn đề nếu bỏ qua solutioning + +```text +Agent 1 triển khai Epic 1 bằng REST API +Agent 2 triển khai Epic 2 bằng GraphQL +Kết quả: Thiết kế API không nhất quán, tích hợp trở thành ác mộng +``` + +Khi nhiều agent triển khai các phần khác nhau của hệ thống mà không có hướng dẫn kiến trúc chung, chúng sẽ tự đưa ra quyết định kỹ thuật độc lập và dễ xung đột với nhau. + +## Lợi ích khi có solutioning + +```text +workflow kiến trúc quyết định: "Dùng GraphQL cho mọi API" +Tất cả agent đều theo quyết định kiến trúc +Kết quả: Triển khai nhất quán, không xung đột +``` + +Bằng cách tài liệu hóa rõ ràng các quyết định kỹ thuật, tất cả agent triển khai đồng bộ và việc tích hợp trở nên đơn giản hơn nhiều. + +## Solutioning và Planning khác nhau ở đâu + +| Khía cạnh | Planning (Giai đoạn 2) | Solutioning (Giai đoạn 3) | +| -------- | ----------------------- | --------------------------------- | +| Câu hỏi | Xây gì và vì sao? | Xây như thế nào? Rồi chia thành đơn vị công việc gì? | +| Đầu ra | FR/NFR (Yêu cầu) | Kiến trúc + Epics/Stories | +| Agent | PM | Architect → PM | +| Đối tượng đọc | Stakeholder | Developer | +| Tài liệu | PRD (FRs/NFRs) | Kiến trúc + Tệp Epic | +| Mức độ | Logic nghiệp vụ | Thiết kế kỹ thuật + Phân rã công việc | + +## Nguyên lý cốt lõi + +**Biến các quyết định kỹ thuật thành tường minh và được tài liệu hóa** để tất cả agent triển khai nhất quán. + +Điều này ngăn chặn: +- Xung đột phong cách API (REST vs GraphQL) +- Không nhất quán trong thiết kế cơ sở dữ liệu +- Bất đồng về quản lý state +- Lệch quy ước đặt tên +- Biến thể trong cách tiếp cận bảo mật + +## Khi nào solutioning là bắt buộc + +| Track | Có cần solutioning không? | +|-------|----------------------| +| Quick Flow | Không - bỏ qua hoàn toàn | +| BMad Method đơn giản | Tùy chọn | +| BMad Method phức tạp | Có | +| Enterprise | Có | + +:::tip[Quy tắc ngón tay cái] +Nếu bạn có nhiều epic có thể được các agent khác nhau triển khai, bạn cần solutioning. +::: + +## Cái giá của việc bỏ qua + +Bỏ qua solutioning trong dự án phức tạp sẽ dẫn đến: + +- **Vấn đề tích hợp** chỉ được phát hiện giữa sprint +- **Làm lại** vì các phần triển khai xung đột nhau +- **Tổng thời gian phát triển dài hơn** +- **Nợ kỹ thuật** do pattern không đồng nhất + +:::caution[Hệ số chi phí] +Bắt được vấn đề canh hàng trong giai đoạn solutioning nhanh hơn gấp 10 lần so với để đến lúc triển khai mới phát hiện. +::: diff --git a/docs/vi-vn/how-to/customize-bmad.md b/docs/vi-vn/how-to/customize-bmad.md new file mode 100644 index 000000000..e7402423e --- /dev/null +++ b/docs/vi-vn/how-to/customize-bmad.md @@ -0,0 +1,171 @@ +--- +title: "Cách tùy chỉnh BMad" +description: Tùy chỉnh agent, workflow và module trong khi vẫn giữ khả năng tương thích khi cập nhật +sidebar: + order: 7 +--- + +Sử dụng các tệp `.customize.yaml` để điều chỉnh hành vi, persona và menu của agent, đồng thời giữ lại thay đổi của bạn qua các lần cập nhật. + +## Khi nào nên dùng + +- Bạn muốn thay đổi tên, tính cách hoặc phong cách giao tiếp của một agent +- Bạn cần agent ghi nhớ bối cảnh riêng của dự án +- Bạn muốn thêm các mục menu tùy chỉnh để kích hoạt workflow hoặc prompt của riêng mình +- Bạn muốn agent luôn thực hiện một số hành động cụ thể mỗi khi khởi động + +:::note[Điều kiện tiên quyết] +- BMad đã được cài trong dự án của bạn (xem [Cách cài đặt BMad](./install-bmad.md)) +- Trình soạn thảo văn bản để chỉnh sửa tệp YAML +::: + +:::caution[Giữ an toàn cho các tùy chỉnh của bạn] +Luôn sử dụng các tệp `.customize.yaml` được mô tả trong tài liệu này thay vì sửa trực tiếp tệp agent. Trình cài đặt sẽ ghi đè các tệp agent khi cập nhật, nhưng vẫn giữ nguyên các thay đổi trong `.customize.yaml`. +::: + +## Các bước thực hiện + +### 1. Xác định vị trí các tệp tùy chỉnh + +Sau khi cài đặt, bạn sẽ tìm thấy một tệp `.customize.yaml` cho mỗi agent tại: + +```text +_bmad/_config/agents/ +├── core-bmad-master.customize.yaml +├── bmm-dev.customize.yaml +├── bmm-pm.customize.yaml +└── ... (một tệp cho mỗi agent đã cài) +``` + +### 2. Chỉnh sửa tệp tùy chỉnh + +Mở tệp `.customize.yaml` của agent mà bạn muốn sửa. Mỗi phần đều là tùy chọn, chỉ tùy chỉnh những gì bạn cần. + +| Phần | Cách hoạt động | Mục đích | +| --- | --- | --- | +| `agent.metadata` | Thay thế | Ghi đè tên hiển thị của agent | +| `persona` | Thay thế | Đặt vai trò, danh tính, phong cách và các nguyên tắc | +| `memories` | Nối thêm | Thêm bối cảnh cố định mà agent luôn ghi nhớ | +| `menu` | Nối thêm | Thêm mục menu tùy chỉnh cho workflow hoặc prompt | +| `critical_actions` | Nối thêm | Định nghĩa hướng dẫn khởi động cho agent | +| `prompts` | Nối thêm | Tạo các prompt tái sử dụng cho các hành động trong menu | + +Những phần được đánh dấu **Thay thế** sẽ ghi đè hoàn toàn cấu hình mặc định của agent. Những phần được đánh dấu **Nối thêm** sẽ bổ sung vào cấu hình hiện có. + +**Tên agent** + +Thay đổi cách agent tự giới thiệu: + +```yaml +agent: + metadata: + name: 'Spongebob' # Mặc định: "Amelia" +``` + +**Persona** + +Thay thế tính cách, vai trò và phong cách giao tiếp của agent: + +```yaml +persona: + role: 'Senior Full-Stack Engineer' + identity: 'Sống trong quả dứa (dưới đáy biển)' + communication_style: 'Spongebob gây phiền' + principles: + - 'Không lồng quá sâu, dev Spongebob ghét nesting quá 2 cấp' + - 'Ưu tiên composition hơn inheritance' +``` + +Phần `persona` sẽ thay thế toàn bộ persona mặc định, vì vậy nếu đặt phần này bạn nên cung cấp đầy đủ cả bốn trường. + +**Memories** + +Thêm bối cảnh cố định mà agent sẽ luôn nhớ: + +```yaml +memories: + - 'Làm việc tại Krusty Krab' + - 'Người nổi tiếng yêu thích: David Hasselhoff' + - 'Đã học ở Epic 1 rằng giả vờ test đã pass là không ổn' +``` + +**Mục menu** + +Thêm các mục tùy chỉnh vào menu hiển thị của agent. Mỗi mục cần có `trigger`, đích đến (`workflow` hoặc `action`) và `description`: + +```yaml +menu: + - trigger: my-workflow + workflow: 'my-custom/workflows/my-workflow.yaml' + description: Workflow tùy chỉnh của tôi + - trigger: deploy + action: '#deploy-prompt' + description: Triển khai lên production +``` + +**Critical Actions** + +Định nghĩa các hướng dẫn sẽ chạy khi agent khởi động: + +```yaml +critical_actions: + - 'Kiểm tra pipeline CI bằng XYZ Skill và cảnh báo người dùng ngay khi khởi động nếu có việc khẩn cấp cần xử lý' +``` + +**Prompt tùy chỉnh** + +Tạo các prompt tái sử dụng để mục menu có thể tham chiếu bằng `action="#id"`: + +```yaml +prompts: + - id: deploy-prompt + content: | + Triển khai nhánh hiện tại lên production: + 1. Chạy toàn bộ test + 2. Build dự án + 3. Thực thi script triển khai +``` + +### 3. Áp dụng thay đổi + +Sau khi chỉnh sửa, cài đặt lại để áp dụng thay đổi: + +```bash +npx bmad-method install +``` + +Trình cài đặt sẽ nhận diện bản cài đặt hiện có và đưa ra các lựa chọn sau: + +| Lựa chọn | Tác dụng | +| --- | --- | +| **Quick Update** | Cập nhật tất cả module lên phiên bản mới nhất và áp dụng các tùy chỉnh | +| **Modify BMad Installation** | Chạy lại quy trình cài đặt đầy đủ để thêm hoặc gỡ bỏ module | + +Nếu chỉ thay đổi phần tùy chỉnh, **Quick Update** là lựa chọn nhanh nhất. + +## Khắc phục sự cố + +**Thay đổi không xuất hiện?** + +- Chạy `npx bmad-method install` và chọn **Quick Update** để áp dụng thay đổi +- Kiểm tra YAML có hợp lệ không (thụt lề rất quan trọng) +- Xác minh bạn đã sửa đúng tệp `.customize.yaml` của agent cần thiết + +**Agent không tải lên được?** + +- Kiểm tra lỗi cú pháp YAML bằng một công cụ kiểm tra YAML trực tuyến +- Đảm bảo bạn không để trống trường nào sau khi bỏ comment +- Thử khôi phục mẫu gốc rồi build lại + +**Cần đặt lại một agent?** + +- Xóa nội dung hoặc xóa tệp `.customize.yaml` của agent đó +- Chạy `npx bmad-method install` và chọn **Quick Update** để khôi phục mặc định + +## Tùy chỉnh workflow + +Tài liệu về cách tùy chỉnh các workflow và skill sẵn có trong BMad Method sẽ được bổ sung trong thời gian tới. + +## Tùy chỉnh module + +Hướng dẫn xây dựng expansion module và tùy chỉnh các module hiện có sẽ được bổ sung trong thời gian tới. diff --git a/docs/vi-vn/how-to/established-projects.md b/docs/vi-vn/how-to/established-projects.md new file mode 100644 index 000000000..37622f634 --- /dev/null +++ b/docs/vi-vn/how-to/established-projects.md @@ -0,0 +1,117 @@ +--- +title: "Dự án đã tồn tại" +description: Cách sử dụng BMad Method trên các codebase hiện có +sidebar: + order: 6 +--- + +Sử dụng BMad Method hiệu quả khi làm việc với các dự án hiện có và codebase legacy. + +Tài liệu này mô tả workflow cốt lõi để on-board vào các dự án đã tồn tại bằng BMad Method. + +:::note[Điều kiện tiên quyết] +- Đã cài BMad Method (`npx bmad-method install`) +- Một codebase hiện có mà bạn muốn làm việc cùng +- Quyền truy cập vào một IDE tích hợp AI (Claude Code hoặc Cursor) +::: + +## Bước 1: Dọn dẹp các tài liệu lập kế hoạch đã hoàn tất + +Nếu bạn đã hoàn thành toàn bộ epic và story trong PRD theo quy trình BMad, hãy dọn dẹp những tệp đó. Bạn có thể lưu trữ, xóa đi, hoặc dựa vào lịch sử phiên bản nếu cần. Không nên giữ các tệp này trong: + +- `docs/` +- `_bmad-output/planning-artifacts/` +- `_bmad-output/implementation-artifacts/` + +## Bước 2: Tạo Project Context + +:::tip[Khuyến dùng cho dự án hiện có] +Hãy tạo `project-context.md` để ghi lại các pattern và quy ước trong codebase hiện tại. Điều này giúp các agent AI tuân theo các thực hành sẵn có khi thực hiện thay đổi. +::: + +Chạy workflow tạo project context: + +```bash +bmad-generate-project-context +``` + +Workflow này sẽ quét codebase để nhận diện: +- Stack công nghệ và các phiên bản +- Các pattern tổ chức code +- Quy ước đặt tên +- Cách tiếp cận kiểm thử +- Các pattern đặc thù framework + +Bạn có thể xem lại và chỉnh sửa tệp được tạo, hoặc tự tạo tệp tại `_bmad-output/project-context.md` nếu muốn. + +[Tìm hiểu thêm về project context](../explanation/project-context.md) + +## Bước 3: Duy trì tài liệu dự án chất lượng + +Thư mục `docs/` của bạn nên chứa tài liệu ngắn gọn, có tổ chức tốt, và phản ánh chính xác dự án: + +- Mục tiêu và lý do kinh doanh +- Quy tắc nghiệp vụ +- Kiến trúc +- Bất kỳ thông tin dự án nào khác có liên quan + +Với các dự án phức tạp, hãy cân nhắc dùng workflow `bmad-document-project`. Nó có các biến thể lúc chạy có thể quét toàn bộ dự án và tài liệu hóa trạng thái thực tế hiện tại của hệ thống. + +## Bước 4: Nhờ trợ giúp + +### BMad-Help: Điểm bắt đầu của bạn + +**Hãy chạy `bmad-help` bất cứ lúc nào bạn không chắc cần làm gì tiếp theo.** Công cụ hướng dẫn thông minh này: + +- Kiểm tra dự án để xem những gì đã được hoàn thành +- Đưa ra tùy chọn dựa trên các module bạn đã cài +- Hiểu các câu hỏi bằng ngôn ngữ tự nhiên + +```text +bmad-help Tôi có một ứng dụng Rails đã tồn tại, tôi nên bắt đầu từ đâu? +bmad-help Điểm khác nhau giữa quick-flow và full method là gì? +bmad-help Cho tôi xem những workflow đang có +``` + +BMad-Help cũng **tự động chạy ở cuối mỗi workflow**, đưa ra hướng dẫn rõ ràng về việc cần làm tiếp theo. + +### Chọn cách tiếp cận + +Bạn có hai lựa chọn chính, tùy thuộc vào phạm vi thay đổi: + +| Phạm vi | Cách tiếp cận được khuyến nghị | +| --- | --- | +| **Cập nhật hoặc bổ sung nhỏ** | Chạy `bmad-quick-dev` để làm rõ ý định, lập kế hoạch, triển khai và review trong một workflow duy nhất. Quy trình BMad Method đầy đủ có thể là quá mức cần thiết. | +| **Thay đổi hoặc bổ sung lớn** | Bắt đầu với BMad Method, áp dụng mức độ chặt chẽ phù hợp với nhu cầu của bạn. | + +### Khi tạo PRD + +Khi tạo brief hoặc đi thẳng vào PRD, đảm bảo agent: + +- Tìm và phân tích tài liệu dự án hiện có +- Đọc đúng bối cảnh về hệ thống hiện tại của bạn + +Bạn có thể chủ động hướng dẫn agent, nhưng mục tiêu là đảm bảo tính năng mới tích hợp tốt với hệ thống đã có. + +### Cân nhắc về UX + +Công việc UX là tùy chọn. Quyết định này không phụ thuộc vào việc dự án có UX hay không, mà phụ thuộc vào: + +- Bạn có định thay đổi UX hay không +- Bạn có cần thiết kế hay pattern UX mới đáng kể hay không + +Nếu thay đổi của bạn chỉ là những cập nhật nhỏ trên các màn hình hiện có mà bạn đã hài lòng, thì không cần một quy trình UX đầy đủ. + +### Cân nhắc về kiến trúc + +Khi làm kiến trúc, đảm bảo kiến trúc sư: + +- Sử dụng đúng các tệp tài liệu cần thiết +- Quét codebase hiện có + +Cần đặc biệt chú ý để tránh tái phát minh bánh xe hoặc đưa ra quyết định không phù hợp với kiến trúc hiện tại. + +## Thông tin thêm + +- **[Quick Fixes](./quick-fixes.md)** - Sửa lỗi và thay đổi ad-hoc +- **[Câu hỏi thường gặp cho dự án đã tồn tại](../explanation/established-projects-faq.md)** - Những câu hỏi phổ biến khi làm việc với dự án đã tồn tại diff --git a/docs/vi-vn/how-to/get-answers-about-bmad.md b/docs/vi-vn/how-to/get-answers-about-bmad.md new file mode 100644 index 000000000..a09aafa52 --- /dev/null +++ b/docs/vi-vn/how-to/get-answers-about-bmad.md @@ -0,0 +1,135 @@ +--- +title: "Cách tìm câu trả lời về BMad" +description: Sử dụng LLM để tự nhanh chóng trả lời các câu hỏi về BMad +sidebar: + order: 4 +--- + +## Bắt đầu tại đây: BMad-Help + +**Cách nhanh nhất để tìm câu trả lời về BMad là dùng skill `bmad-help`.** Đây là công cụ hướng dẫn thông minh có thể trả lời hơn 80% các câu hỏi và có sẵn ngay trong IDE khi bạn làm việc. + +BMad-Help không chỉ là công cụ tra cứu, nó còn: +- **Kiểm tra dự án của bạn** để xem những gì đã hoàn thành +- **Hiểu ngôn ngữ tự nhiên** - đặt câu hỏi bằng ngôn ngữ bình thường +- **Thay đổi theo module đã cài** - hiển thị các lựa chọn liên quan +- **Tự động chạy sau workflow** - nói rõ bạn cần làm gì tiếp theo +- **Đề xuất tác vụ đầu tiên cần thiết** - không cần đoán nên bắt đầu từ đâu + +### Cách dùng BMad-Help + +Gọi nó trực tiếp trong phiên AI của bạn: + +```text +bmad-help +``` + +:::tip +Bạn cũng có thể dùng `/bmad-help` hoặc `$bmad-help` tùy nền tảng, nhưng chỉ `bmad-help` là cách nên hoạt động mọi nơi. +::: + +Kết hợp với câu hỏi ngôn ngữ tự nhiên: + +```text +bmad-help Tôi có ý tưởng SaaS và đã biết tất cả tính năng. Tôi nên bắt đầu từ đâu? +bmad-help Tôi có những lựa chọn nào cho thiết kế UX? +bmad-help Tôi đang bị mắc ở workflow PRD +bmad-help Cho tôi xem tôi đã làm được gì đến giờ +``` + +BMad-Help sẽ trả lời: +- Điều gì được khuyến nghị cho tình huống của bạn +- Tác vụ đầu tiên cần thiết là gì +- Phần còn lại của quy trình trông thế nào + +## Khi nào nên dùng tài liệu này + +Hãy xem phần này khi: +- Bạn muốn hiểu kiến trúc hoặc nội bộ của BMad +- Bạn cần câu trả lời nằm ngoài phạm vi BMad-Help cung cấp +- Bạn đang nghiên cứu BMad trước khi cài đặt +- Bạn muốn tự khám phá source code trực tiếp + +## Các bước thực hiện + +### 1. Chọn nguồn thông tin + +| Nguồn | Phù hợp nhất cho | Ví dụ | +| --- | --- | --- | +| **Thư mục `_bmad`** | Cách BMad vận hành: agent, workflow, prompt | "PM agent làm gì?" | +| **Toàn bộ repo GitHub** | Lịch sử, installer, kiến trúc | "v6 thay đổi gì?" | +| **`llms-full.txt`** | Tổng quan nhanh từ tài liệu | "Giải thích bốn giai đoạn của BMad" | + +Thư mục `_bmad` được tạo khi bạn cài đặt BMad. Nếu chưa có, hãy clone repo thay thế. + +### 2. Cho AI của bạn truy cập nguồn thông tin + +**Nếu AI của bạn đọc được tệp (Claude Code, Cursor, ...):** + +- **Đã cài BMad:** Trỏ đến thư mục `_bmad` và hỏi trực tiếp +- **Cần bối cảnh sâu hơn:** Clone [repo đầy đủ](https://github.com/bmad-code-org/BMAD-METHOD) + +**Nếu bạn dùng ChatGPT hoặc Claude.ai:** + +Nạp `llms-full.txt` vào phiên làm việc: + +```text +https://bmad-code-org.github.io/BMAD-METHOD/llms-full.txt +``` + +### 3. Đặt câu hỏi + +:::note[Ví dụ] +**Q:** "Hãy chỉ tôi cách nhanh nhất để xây dựng một thứ gì đó bằng BMad" + +**A:** Dùng Quick Flow: Chạy `bmad-quick-dev` - nó sẽ làm rõ ý định, lập kế hoạch, triển khai, review và trình bày kết quả trong một workflow duy nhất, bỏ qua các giai đoạn lập kế hoạch đầy đủ. +::: + +## Bạn nhận được gì + +Các câu trả lời trực tiếp về BMad: agent hoạt động ra sao, workflow làm gì, tại sao cấu trúc lại được tổ chức như vậy, mà không cần chờ người khác trả lời. + +## Mẹo + +- **Xác minh những câu trả lời gây bất ngờ** - LLM vẫn có lúc nhầm. Hãy kiểm tra tệp nguồn hoặc hỏi trên Discord. +- **Đặt câu hỏi cụ thể** - "Bước 3 trong workflow PRD làm gì?" tốt hơn "PRD hoạt động ra sao?" + +## Vẫn bị mắc? + +Đã thử cách tiếp cận bằng LLM mà vẫn cần trợ giúp? Lúc này bạn đã có một câu hỏi tốt hơn để đem đi hỏi. + +| Kênh | Dùng cho | +| --- | --- | +| `#bmad-method-help` | Câu hỏi nhanh (trò chuyện thời gian thực) | +| `help-requests` forum | Câu hỏi chi tiết (có thể tìm lại, tồn tại lâu dài) | +| `#suggestions-feedback` | Ý tưởng và đề xuất tính năng | +| `#report-bugs-and-issues` | Báo cáo lỗi | + +**Discord:** [discord.gg/gk8jAdXWmj](https://discord.gg/gk8jAdXWmj) + +**GitHub Issues:** [github.com/bmad-code-org/BMAD-METHOD/issues](https://github.com/bmad-code-org/BMAD-METHOD/issues) (dành cho các lỗi rõ ràng) + +*Chính bạn,* + *đang mắc kẹt* + *trong hàng đợi -* + *đợi* + *ai?* + +*Mã nguồn* + *nằm ngay đó,* + *rõ như ban ngày!* + +*Hãy trỏ* + *cho máy của bạn.* + *Thả nó đi.* + +*Nó đọc.* + *Nó nói.* + *Cứ hỏi -* + +*Sao phải chờ* + *đến ngày mai* + *khi bạn đã có* + *ngày hôm nay?* + +*- Claude* diff --git a/docs/vi-vn/how-to/install-bmad.md b/docs/vi-vn/how-to/install-bmad.md new file mode 100644 index 000000000..57105864c --- /dev/null +++ b/docs/vi-vn/how-to/install-bmad.md @@ -0,0 +1,116 @@ +--- +title: "Cách cài đặt BMad" +description: Hướng dẫn từng bước để cài đặt BMad vào dự án của bạn +sidebar: + order: 1 +--- + +Sử dụng lệnh `npx bmad-method install` để thiết lập BMad trong dự án của bạn với các module và công cụ AI theo lựa chọn. + +Nếu bạn muốn dùng trình cài đặt không tương tác và cung cấp toàn bộ tùy chọn ngay trên dòng lệnh, xem [hướng dẫn này](./non-interactive-installation.md). + +## Khi nào nên dùng + +- Bắt đầu một dự án mới với BMad +- Thêm BMad vào một codebase hiện có +- 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) +- **Git** (khuyến nghị) +- **Công cụ AI** (Claude Code, Cursor, hoặc tương tự) +::: + +## Các bước thực hiện + +### 1. Chạy trình cài đặt + +```bash +npx bmad-method install +``` + +:::tip[Muốn dùng bản prerelease mới nhất?] +Sử dụng dist-tag `next`: +```bash +npx bmad-method@next install +``` + +Cách này giúp bạn nhận các thay đổi mới sớm hơn, đổi lại khả năng biến động cao hơn bản cài đặt mặc định. +::: + +:::tip[Bản rất mới] +Để cài đặt trực tiếp từ nhánh `main` mới nhất (có thể không ổn định): +```bash +npx github:bmad-code-org/BMAD-METHOD install +``` +::: + +### 2. Chọn vị trí cài đặt + +Trình cài đặt sẽ hỏi bạn muốn đặt các tệp BMad ở đâu: + +- Thư mục hiện tại (khuyến nghị cho dự án mới nếu bạn tự tạo thư mục và chạy lệnh từ bên trong nó) +- Đường dẫn tùy chọn + +### 3. Chọn công cụ AI + +Chọn các công cụ AI bạn đang dùng: + +- Claude Code +- Cursor +- Các công cụ khác + +Mỗi công cụ có cách tích hợp skill riêng. Trình cài đặt sẽ tạo các tệp prompt nhỏ để kích hoạt workflow và agent, và đặt chúng vào đúng vị trí mà công cụ của bạn mong đợi. + +:::note[Kích hoạt skill] +Một số nền tảng yêu cầu bật skill trong cài đặt trước khi chúng xuất hiện. Nếu bạn đã cài BMad mà chưa thấy skill, hãy kiểm tra cài đặt của nền tảng hoặc hỏi trợ lý AI cách bật skill. +::: + +### 4. Chọn module + +Trình cài đặt sẽ hiện các module có sẵn. Chọn những module bạn cần - phần lớn người dùng chỉ cần **BMad Method** (module phát triển phần mềm). + +### 5. Làm theo các prompt + +Trình cài đặt sẽ hướng dẫn các bước còn lại - nội dung tùy chỉnh, cài đặt, và các tùy chọn khác. + +## Bạn nhận được gì + +```text +du-an-cua-ban/ +├── _bmad/ +│ ├── bmm/ # Các module bạn đã chọn +│ │ └── config.yaml # Cài đặt module (nếu bạn cần thay đổi sau này) +│ ├── core/ # Module core bắt buộc +│ └── ... +├── _bmad-output/ # Các artifact được tạo ra +├── .claude/ # Claude Code skills (nếu dùng Claude Code) +│ └── skills/ +│ ├── bmad-help/ +│ ├── bmad-persona/ +│ └── ... +└── .cursor/ # Cursor skills (nếu dùng Cursor) + └── skills/ + └── ... +``` + +## Xác minh cài đặt + +Chạy `bmad-help` để xác minh mọi thứ hoạt động và xem bạn nên làm gì tiếp theo. + +**BMad-Help là công cụ hướng dẫn thông minh** sẽ: +- Xác nhận bản cài đặt hoạt động đúng +- Hiển thị những gì có sẵn dựa trên module đã cài +- Đề xuất bước đầu tiên của bạn + +Bạn cũng có thể hỏi nó: +```text +bmad-help Tôi vừa cài xong, giờ nên làm gì đầu tiên? +bmad-help Tôi có những lựa chọn nào cho một dự án SaaS? +``` + +## Khắc phục sự cố + +**Trình cài đặt báo lỗi** - Sao chép toàn bộ output vào trợ lý AI của bạn và để nó phân tích. + +**Cài đặt xong nhưng sau đó có thứ không hoạt động** - AI của bạn cần bối cảnh BMad để hỗ trợ. Xem [Cách tìm câu trả lời về BMad](./get-answers-about-bmad.md) để biết cách cho AI truy cập đúng nguồn thông tin. diff --git a/docs/vi-vn/how-to/non-interactive-installation.md b/docs/vi-vn/how-to/non-interactive-installation.md new file mode 100644 index 000000000..a3cd40e1c --- /dev/null +++ b/docs/vi-vn/how-to/non-interactive-installation.md @@ -0,0 +1,184 @@ +--- +title: Cài đặt không tương tác +description: Cài đặt BMad bằng các cờ dòng lệnh cho pipeline CI/CD và triển khai tự động +sidebar: + order: 2 +--- + +Sử dụng các cờ dòng lệnh để cài đặt BMad mà không cần tương tác. Cách này hữu ích cho: + +## Khi nào nên dùng + +- Triển khai tự động và pipeline CI/CD +- Cài đặt bằng script +- Cài đặt hàng loạt trên nhiều dự án +- 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). +::: + +## Các cờ khả dụng + +### Tùy chọn cài đặt + +| Cờ | Mô tả | Ví dụ | +|------|-------------|---------| +| `--directory ` | Thư mục cài đặt | `--directory ~/projects/myapp` | +| `--modules ` | Danh sách ID module, cách nhau bởi dấu phẩy | `--modules bmm,bmb` | +| `--tools ` | Danh sách ID công cụ/IDE, cách nhau bởi dấu phẩy (dùng `none` để bỏ qua) | `--tools claude-code,cursor` hoặc `--tools none` | +| `--custom-content ` | Danh sách đường dẫn đến module tùy chỉnh, cách nhau bởi dấu phẩy | `--custom-content ~/my-module,~/another-module` | +| `--action ` | Hành động cho bản cài đặt hiện có: `install` (mặc định), `update`, hoặc `quick-update` | `--action quick-update` | + +### Cấu hình cốt lõi + +| Cờ | Mô tả | Mặc định | +|------|-------------|---------| +| `--user-name ` | Tên để agent sử dụng | Tên người dùng hệ thống | +| `--communication-language ` | Ngôn ngữ giao tiếp của agent | Tiếng Anh | +| `--document-output-language ` | Ngôn ngữ đầu ra tài liệu | Tiếng Anh | +| `--output-folder ` | Đường dẫn thư mục output (xem quy tắc resolve bên dưới) | `_bmad-output` | + +#### Quy tắc resolve đường dẫn output folder + +Giá trị truyền vào `--output-folder` (hoặc nhập ở chế độ tương tác) sẽ được resolve theo các quy tắc sau: + +| Loại đầu vào | Ví dụ | Được resolve thành | +|------|-------------|---------| +| Đường dẫn tương đối (mặc định) | `_bmad-output` | `/_bmad-output` | +| Đường dẫn tương đối có traversal | `../../shared-outputs` | Đường dẫn tuyệt đối đã được chuẩn hóa, ví dụ `/Users/me/shared-outputs` | +| Đường dẫn tuyệt đối | `/Users/me/shared-outputs` | Giữ nguyên như đã nhập, **không** thêm project root vào trước | + +Đường dẫn sau khi resolve là đường dẫn mà agent và workflow sẽ dùng lúc runtime để ghi file đầu ra. Việc dùng đường dẫn tuyệt đối hoặc đường dẫn tương đối có traversal cho phép bạn chuyển toàn bộ artifact sinh ra sang một thư mục nằm ngoài cây dự án, hữu ích với thư mục dùng chung hoặc cấu trúc monorepo. + +### Tùy chọn khác + +| Cờ | Mô tả | +|------|-------------| +| `-y, --yes` | Chấp nhận toàn bộ mặc định và bỏ qua prompt | +| `-d, --debug` | Bật output debug cho quá trình tạo manifest | + +## ID module + +Những ID module có thể dùng với cờ `--modules`: + +- `bmm` - BMad Method Master +- `bmb` - BMad Builder + +Kiểm tra [BMad registry](https://github.com/bmad-code-org) để xem các module ngoài được hỗ trợ. + +## ID công cụ/IDE + +Những ID công cụ có thể dùng với cờ `--tools`: + +**Khuyến dùng:** `claude-code`, `cursor` + +Chạy `npx bmad-method install` một lần ở chế độ tương tác để xem danh sách đầy đủ hiện tại của các công cụ được hỗ trợ, hoặc xem [cấu hình platform codes](https://github.com/bmad-code-org/BMAD-METHOD/blob/main/tools/cli/installers/lib/ide/platform-codes.yaml). + +## Các chế độ cài đặt + +| Chế độ | Mô tả | Ví dụ | +|------|-------------|---------| +| Hoàn toàn không tương tác | Cung cấp đầy đủ cờ để bỏ qua tất cả prompt | `npx bmad-method install --directory . --modules bmm --tools claude-code --yes` | +| Bán tương tác | Cung cấp một số cờ, BMad hỏi thêm phần còn lại | `npx bmad-method install --directory . --modules bmm` | +| Chỉ dùng mặc định | Chấp nhận tất cả giá trị mặc định với `-y` | `npx bmad-method install --yes` | +| Không cấu hình công cụ | Bỏ qua cấu hình công cụ/IDE | `npx bmad-method install --modules bmm --tools none` | + +## Ví dụ + +### Cài đặt cho pipeline CI/CD + +```bash +#!/bin/bash +# install-bmad.sh + +npx bmad-method install \ + --directory "${GITHUB_WORKSPACE}" \ + --modules bmm \ + --tools claude-code \ + --user-name "CI Bot" \ + --communication-language English \ + --document-output-language English \ + --output-folder _bmad-output \ + --yes +``` + +### Cập nhật bản cài đặt hiện có + +```bash +npx bmad-method install \ + --directory ~/projects/myapp \ + --action update \ + --modules bmm,bmb,custom-module +``` + +### Quick Update (giữ nguyên cài đặt) + +```bash +npx bmad-method install \ + --directory ~/projects/myapp \ + --action quick-update +``` + +### Cài đặt với nội dung tùy chỉnh + +```bash +npx bmad-method install \ + --directory ~/projects/myapp \ + --modules bmm \ + --custom-content ~/my-custom-module,~/another-module \ + --tools claude-code +``` + +## Bạn nhận được gì + +- Thư mục `_bmad/` đã được cấu hình đầy đủ trong dự án của bạn +- Agent và workflow đã được cấu hình theo module và công cụ bạn chọn +- Thư mục `_bmad-output/` để lưu các artifact được tạo + +## Kiểm tra và xử lý lỗi + +BMad sẽ kiểm tra tất cả các cờ được cung cấp: + +- **Directory** - Phải là đường dẫn hợp lệ và có quyền ghi +- **Modules** - Cảnh báo nếu ID module không hợp lệ (nhưng không thất bại) +- **Tools** - Cảnh báo nếu ID công cụ không hợp lệ (nhưng không thất bại) +- **Custom Content** - Mỗi đường dẫn phải chứa tệp `module.yaml` hợp lệ +- **Action** - Phải là một trong: `install`, `update`, `quick-update` + +Giá trị không hợp lệ sẽ dẫn đến một trong các trường hợp sau: +1. Hiện lỗi và thoát (với các tùy chọn quan trọng như directory) +2. Hiện cảnh báo và bỏ qua (với mục tùy chọn như custom content) +3. Quay lại hỏi interactive (với giá trị bắt buộc bị thiếu) + +:::tip[Thực hành tốt] +- Dùng đường dẫn tuyệt đối cho `--directory` để tránh nhầm lẫn +- Dùng đường dẫn tuyệt đối cho `--output-folder` khi bạn muốn ghi artifact ra ngoài cây dự án, ví dụ vào một thư mục output dùng chung trong monorepo +- Thử nghiệm cờ ở máy local trước khi đưa vào pipeline CI/CD +- Kết hợp với `-y` nếu bạn muốn cài đặt hoàn toàn không cần can thiệp +- Dùng `--debug` nếu gặp vấn đề trong quá trình cài đặt +::: + +## Khắc phục sự cố + +### Cài đặt thất bại với lỗi "Invalid directory" + +- Thư mục đích phải tồn tại (hoặc thư mục cha của nó phải tồn tại) +- Bạn cần quyền ghi +- Đường dẫn phải là tuyệt đối, hoặc tương đối đúng với thư mục hiện tại + +### Không tìm thấy module + +- Xác minh ID module có đúng không +- Module bên ngoài phải có sẵn trong registry + +### Đường dẫn custom content không hợp lệ + +Đảm bảo mỗi đường dẫn custom content: +- Trỏ tới một thư mục +- Chứa tệp `module.yaml` ở cấp gốc +- Có trường `code` trong tệp `module.yaml` + +:::note[Vẫn bị mắc?] +Chạy với `--debug` để xem output chi tiết, thử chế độ interactive để cô lập vấn đề, hoặc báo cáo tại . +::: diff --git a/docs/vi-vn/how-to/project-context.md b/docs/vi-vn/how-to/project-context.md new file mode 100644 index 000000000..6860a948e --- /dev/null +++ b/docs/vi-vn/how-to/project-context.md @@ -0,0 +1,127 @@ +--- +title: "Quản lý Project Context" +description: Tạo và duy trì project-context.md để định hướng cho các agent AI +sidebar: + order: 8 +--- + +Sử dụng tệp `project-context.md` để đảm bảo các agent AI tuân theo ưu tiên kỹ thuật và quy tắc triển khai của dự án trong suốt mọi workflow. Để đảm bảo tệp này luôn sẵn có, bạn cũng có thể thêm dòng `Important project context and conventions are located in [path to project context]/project-context.md` vào file context của công cụ hoặc file always rules của bạn (như `AGENTS.md`). + +:::note[Điều kiện tiên quyết] +- Đã cài BMad Method +- Hiểu stack công nghệ và các quy ước của dự án +::: + +## Khi nào nên dùng + +- Bạn có các ưu tiên kỹ thuật rõ ràng trước khi bắt đầu làm kiến trúc +- Bạn đã hoàn thành kiến trúc và muốn ghi lại các quyết định để phục vụ triển khai +- Bạn đang làm việc với một codebase hiện có có những pattern đã ổn định +- Bạn thấy các agent đưa ra quyết định không nhất quán giữa các story + +## Bước 1: Chọn cách tiếp cận + +**Tự tạo bằng tay** - Phù hợp nhất khi bạn biết rõ cần tài liệu hóa quy tắc nào + +**Tạo sau kiến trúc** - Phù hợp để ghi lại các quyết định đã được đưa ra trong giai đoạn solutioning + +**Tạo cho dự án hiện có** - Phù hợp để khám phá pattern trong các codebase đã tồn tại + +## Bước 2: Tạo tệp + +### Lựa chọn A: Tạo thủ công + +Tạo tệp tại `_bmad-output/project-context.md`: + +```bash +mkdir -p _bmad-output +touch _bmad-output/project-context.md +``` + +Thêm stack công nghệ và các quy tắc triển khai của bạn: + +```markdown +--- +project_name: 'MyProject' +user_name: 'YourName' +date: '2026-02-15' +sections_completed: ['technology_stack', 'critical_rules'] +--- + +# Project Context for AI Agents + +## Technology Stack & Versions + +- Node.js 20.x, TypeScript 5.3, React 18.2 +- State: Zustand +- Testing: Vitest, Playwright +- Styling: Tailwind CSS + +## Critical Implementation Rules + +**TypeScript:** +- Strict mode enabled, no `any` types +- Use `interface` for public APIs, `type` for unions + +**Code Organization:** +- Components in `/src/components/` with co-located tests +- API calls use `apiClient` singleton — never fetch directly + +**Testing:** +- Unit tests focus on business logic +- Integration tests use MSW for API mocking +``` + +### Lựa chọn B: Tạo sau khi hoàn thành kiến trúc + +Chạy workflow trong một phiên chat mới: + +```bash +bmad-generate-project-context +``` + +Workflow sẽ quét tài liệu kiến trúc và tệp dự án để tạo tệp context ghi lại các quyết định đã được đưa ra. + +### Lựa chọn C: Tạo cho dự án hiện có + +Với các dự án hiện có, chạy: + +```bash +bmad-generate-project-context +``` + +Workflow sẽ phân tích codebase để nhận diện quy ước, sau đó tạo tệp context để bạn xem lại và chỉnh sửa. + +## Bước 3: Xác minh nội dung + +Xem lại tệp được tạo và đảm bảo nó ghi đúng: + +- Các phiên bản công nghệ chính xác +- Đúng các quy ước thực tế của bạn (không phải các best practice chung chung) +- Các quy tắc giúp tránh những lỗi thường gặp +- Các pattern đặc thù framework + +Chỉnh sửa thủ công để thêm phần còn thiếu hoặc loại bỏ những chỗ không chính xác. + +## Bạn nhận được gì + +Một tệp `project-context.md` sẽ: + +- Đảm bảo tất cả agent tuân theo cùng một bộ quy ước +- Ngăn các quyết định không nhất quán giữa các story +- Ghi lại các quyết định kiến trúc cho giai đoạn triển khai +- Làm tài liệu tham chiếu cho các pattern và quy tắc của dự án + +## Mẹo + +:::tip[Thực hành tốt] +- **Tập trung vào điều không hiển nhiên** - Ghi lại những pattern agent dễ bỏ sót (ví dụ: "Dùng JSDoc cho mọi lớp public"), thay vì các quy tắc phổ quát như "đặt tên biến có ý nghĩa". +- **Gọn nhẹ** - Tệp này được nạp trong mọi workflow triển khai. Tệp quá dài sẽ tốn context. Hãy bỏ qua nội dung chỉ áp dụng cho phạm vi hẹp hoặc một vài story cụ thể. +- **Cập nhật khi cần** - Sửa thủ công khi pattern thay đổi, hoặc tạo lại sau các thay đổi kiến trúc lớn. +- Áp dụng được cho cả Quick Flow lẫn quy trình BMad Method đầy đủ. +::: + +## Bước tiếp theo + +- [**Giải thích về Project Context**](../explanation/project-context.md) - Tìm hiểu sâu hơn cách nó hoạt động +- [**Bản đồ workflow**](../reference/workflow-map.md) - Xem workflow nào sử dụng project context diff --git a/docs/vi-vn/how-to/quick-fixes.md b/docs/vi-vn/how-to/quick-fixes.md new file mode 100644 index 000000000..1ecd72fb4 --- /dev/null +++ b/docs/vi-vn/how-to/quick-fixes.md @@ -0,0 +1,95 @@ +--- +title: "Quick Fixes" +description: Cách thực hiện các sửa nhanh và thay đổi ad-hoc +sidebar: + order: 5 +--- + +Sử dụng **Quick Dev** cho sửa lỗi, refactor, hoặc các thay đổi nhỏ có mục tiêu rõ ràng mà không cần quy trình BMad Method đầy đủ. + +## Khi nào nên dùng + +- Sửa lỗi khi nguyên nhân đã rõ ràng +- Refactor nhỏ (đổi tên, tách hàm, tái cấu trúc) nằm trong một vài tệp +- Điều chỉnh tính năng nhỏ hoặc thay đổi cấu hình +- Cập nhật dependency + +:::note[Điều kiện tiên quyết] +- Đã cài BMad Method (`npx bmad-method install`) +- Một IDE tích hợp AI (Claude Code, Cursor, hoặc tương tự) +::: + +## Các bước thực hiện + +### 1. Bắt đầu một phiên chat mới + +Mở **một phiên chat mới** trong AI IDE của bạn. Tái sử dụng một phiên từ workflow trước dễ gây xung đột context. + +### 2. Mô tả ý định của bạn + +Quick Dev nhận ý định dạng tự do - trước, cùng lúc, hoặc sau khi gọi workflow. Ví dụ: + +```text +run quick-dev — Sửa lỗi validate đăng nhập cho phép mật khẩu rỗng. +``` + +```text +run quick-dev — fix https://github.com/org/repo/issues/42 +``` + +```text +run quick-dev — thực hiện ý định trong _bmad-output/implementation-artifacts/my-intent.md +``` + +```text +Tôi nghĩ vấn đề nằm ở auth middleware, nó không kiểm tra hạn của token. +Để tôi xem... đúng rồi, src/auth/middleware.ts dòng 47 bỏ qua +hoàn toàn phần kiểm tra exp. run quick-dev +``` + +```text +run quick-dev +> Bạn muốn làm gì? +Refactor UserService sang dùng async/await thay vì callbacks. +``` + +Văn bản thường, đường dẫn tệp, URL issue GitHub, liên kết bug tracker - bất kỳ thứ gì LLM có thể suy ra thành một ý định cụ thể. + +### 3. Trả lời câu hỏi và phê duyệt + +Quick Dev có thể đặt câu hỏi làm rõ hoặc đưa ra một bản spec ngắn để bạn phê duyệt trước khi triển khai. Hãy trả lời và phê duyệt khi bạn thấy kế hoạch đã ổn. + +### 4. Review và push + +Quick Dev sẽ triển khai thay đổi, tự review công việc của mình, sửa các vấn đề phát hiện được và commit vào local. Khi hoàn thành, nó sẽ mở các tệp bị ảnh hưởng trong editor. + +- Xem nhanh diff để xác nhận thay đổi đúng với ý định của bạn +- Nếu có gì không ổn, nói cho agent biết cần sửa gì - nó có thể lặp lại ngay trong cùng phiên + +Khi đã hài lòng, push commit. Quick Dev sẽ đề xuất push và tạo PR cho bạn. + +:::caution[Nếu có thứ bị vỡ] +Nếu thay đổi đã push gây sự cố ngoài ý muốn, dùng `git revert HEAD` để hoàn tác commit cuối một cách sạch sẽ. Sau đó bắt đầu một phiên chat mới và chạy lại Quick Dev để thử hướng khác. +::: + +## Bạn nhận được gì + +- Các tệp nguồn đã được sửa với bản fix hoặc refactor +- Test đã pass (nếu dự án có bộ test) +- Một commit sẵn sàng để push, dùng conventional commit message + +## Công việc trì hoãn + +Quick Dev giữ mỗi lần chạy tập trung vào một mục tiêu duy nhất. Nếu yêu cầu của bạn có nhiều mục tiêu độc lập, hoặc review phát hiện các vấn đề tồn tại sẵn không liên quan đến thay đổi hiện tại, Quick Dev sẽ đưa chúng vào tệp `deferred-work.md` trong thư mục implementation artifacts thay vì cố gắng xử lý tất cả một lúc. + +Hãy kiểm tra tệp này sau mỗi lần chạy - đó là backlog các việc bạn cần quay lại sau. Mỗi mục trì hoãn có thể được đưa vào một lần chạy Quick Dev mới. + +## Khi nào nên nâng cấp lên quy trình lập kế hoạch đầy đủ + +Cân nhắc dùng toàn bộ BMad Method khi: + +- Thay đổi ảnh hưởng nhiều hệ thống hoặc cần cập nhật đồng bộ trên nhiều tệp +- Bạn chưa chắc phạm vi và cần làm rõ yêu cầu trước +- Bạn cần ghi lại tài liệu hoặc quyết định kiến trúc cho cả nhóm + +Xem [Quick Dev](../explanation/quick-dev.md) để hiểu rõ hơn Quick Dev nằm ở đâu trong BMad Method. diff --git a/docs/vi-vn/how-to/shard-large-documents.md b/docs/vi-vn/how-to/shard-large-documents.md new file mode 100644 index 000000000..a00963292 --- /dev/null +++ b/docs/vi-vn/how-to/shard-large-documents.md @@ -0,0 +1,78 @@ +--- +title: "Hướng dẫn chia nhỏ tài liệu" +description: Tách các tệp markdown lớn thành nhiều tệp nhỏ có tổ chức để quản lý context tốt hơn +sidebar: + order: 9 +--- + +Sử dụng công cụ `bmad-shard-doc` nếu bạn cần tách các tệp markdown lớn thành nhiều tệp nhỏ có tổ chức để quản lý context tốt hơn. + +:::caution[Đã ngừng khuyến nghị] +Đây không còn là cách được khuyến nghị, và trong thời gian tới khi workflow được cập nhật và đa số LLM/công cụ lớn hỗ trợ subprocesses, việc này sẽ không còn cần thiết. +::: + +## Khi nào nên dùng + +Chỉ dùng cách này nếu bạn nhận thấy tổ hợp công cụ / model bạn đang dùng không thể nạp và đọc đầy đủ tất cả tài liệu đầu vào khi cần. + +## Chia nhỏ tài liệu là gì? + +Chia nhỏ tài liệu là việc tách các tệp markdown lớn thành nhiều tệp nhỏ có tổ chức dựa trên các tiêu đề cấp 2 (`## Tiêu đề`). + +### Kiến trúc + +```text +Trước khi chia nhỏ: +_bmad-output/planning-artifacts/ +└── PRD.md (tệp lớn 50k token) + +Sau khi chia nhỏ: +_bmad-output/planning-artifacts/ +└── prd/ + ├── index.md # Mục lục kèm mô tả + ├── overview.md # Phần 1 + ├── user-requirements.md # Phần 2 + ├── technical-requirements.md # Phần 3 + └── ... # Các phần bổ sung +``` + +## Các bước thực hiện + +### 1. Chạy công cụ Shard-Doc + +```bash +/bmad-shard-doc +``` + +### 2. Làm theo quy trình tương tác + +```text +Agent: Bạn muốn chia nhỏ tài liệu nào? +User: docs/PRD.md + +Agent: Thư mục đích mặc định: docs/prd/ + Chấp nhận mặc định? [y/n] +User: y + +Agent: Đang chia nhỏ PRD.md... + ✓ Đã tạo 12 tệp theo từng phần + ✓ Đã tạo index.md + ✓ Hoàn tất! +``` + +## Cơ chế workflow tìm tài liệu + +Workflow của BMad dùng **hệ thống phát hiện kép**: + +1. **Thử tài liệu nguyên khối trước** - Tìm `document-name.md` +2. **Kiểm tra bản đã chia nhỏ** - Tìm `document-name/index.md` +3. **Quy tắc ưu tiên** - Bản nguyên khối được ưu tiên nếu cả hai cùng tồn tại; hãy xóa bản nguyên khối nếu bạn muốn workflow dùng bản đã chia nhỏ + +## Hỗ trợ trong workflow + +Tất cả workflow BMM đều hỗ trợ cả hai định dạng: + +- Tài liệu nguyên khối +- Tài liệu đã chia nhỏ +- Tự động nhận diện +- Trong suốt với người dùng diff --git a/docs/vi-vn/how-to/upgrade-to-v6.md b/docs/vi-vn/how-to/upgrade-to-v6.md new file mode 100644 index 000000000..bab3fe5a2 --- /dev/null +++ b/docs/vi-vn/how-to/upgrade-to-v6.md @@ -0,0 +1,100 @@ +--- +title: "Cách nâng cấp lên v6" +description: Di chuyển từ BMad v4 sang v6 +sidebar: + order: 3 +--- + +Sử dụng trình cài đặt BMad để nâng cấp từ v4 lên v6, bao gồm khả năng tự động phát hiện bản cài đặt cũ và hỗ trợ di chuyển. + +## Khi nào nên dùng + +- Bạn đang dùng BMad v4 (thư mục `.bmad-method`) +- Bạn muốn chuyển sang kiến trúc v6 mới +- 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+ +- Bản cài đặt BMad v4 hiện có +::: + +## Các bước thực hiện + +### 1. Chạy trình cài đặt + +Làm theo [Hướng dẫn cài đặt](./install-bmad.md). + +### 2. Xử lý bản cài đặt cũ + +Khi v4 được phát hiện, bạn có thể: + +- Cho phép trình cài đặt sao lưu và xóa `.bmad-method` +- Thoát và tự xử lý dọn dẹp thủ công + +Nếu trước đây bạn đặt tên thư mục BMad khác - bạn sẽ phải tự xóa thư mục đó. + +### 3. Dọn dẹp skill IDE cũ + +Tự xóa các command/skill IDE cũ của v4 - ví dụ nếu bạn dùng Claude Code, hãy tìm các thư mục lồng nhau bắt đầu bằng `bmad` và xóa chúng: + +- `.claude/commands/` + +Các skill v6 mới sẽ được cài tại: + +- `.claude/skills/` + +### 4. Di chuyển planning artifacts + +**Nếu bạn có tài liệu lập kế hoạch (Brief/PRD/UX/Architecture):** + +Di chuyển chúng vào `_bmad-output/planning-artifacts/` với tên mô tả rõ ràng: + +- Tên tệp PRD nên chứa `PRD` +- Tên tệp tương ứng nên chứa `brief`, `architecture`, hoặc `ux-design` +- Tài liệu đã chia nhỏ có thể đặt trong các thư mục con đặt tên phù hợp + +**Nếu bạn đang lập kế hoạch dở dang:** Hãy cân nhắc bắt đầu lại với workflow v6. Bạn vẫn có thể dùng các tài liệu hiện có làm input - các workflow discovery tiên tiến trong v6, kết hợp web search và chế độ plan trong IDE, cho kết quả tốt hơn. + +### 5. Di chuyển công việc phát triển đang dở dang + +Nếu bạn đã có các story được tạo hoặc đã triển khai: + +1. Hoàn thành cài đặt v6 +2. Đặt `epics.md` hoặc `epics/epic*.md` vào `_bmad-output/planning-artifacts/` +3. Chạy workflow `bmad-sprint-planning` của Scrum Master +4. Nói rõ với SM những epic/story nào đã hoàn thành + +## Bạn nhận được gì + +**Cấu trúc thống nhất của v6:** + +```text +du-an-cua-ban/ +├── _bmad/ # Thư mục cài đặt duy nhất +│ ├── _config/ # Các tùy chỉnh của bạn +│ │ └── agents/ # Tệp tùy chỉnh agent +│ ├── core/ # Framework core dùng chung +│ ├── bmm/ # Module BMad Method +│ ├── bmb/ # BMad Builder +│ └── cis/ # Creative Intelligence Suite +└── _bmad-output/ # Thư mục output (là thư mục docs trong v4) +``` + +## Di chuyển module + +| Module v4 | Trạng thái trong v6 | +| --- | --- | +| `.bmad-2d-phaser-game-dev` | Đã được tích hợp vào module BMGD | +| `.bmad-2d-unity-game-dev` | Đã được tích hợp vào module BMGD | +| `.bmad-godot-game-dev` | Đã được tích hợp vào module BMGD | +| `.bmad-infrastructure-devops` | Đã bị ngừng hỗ trợ - agent DevOps mới sắp ra mắt | +| `.bmad-creative-writing` | Chưa được điều chỉnh - module v6 mới sắp ra mắt | + +## Các thay đổi chính + +| Khái niệm | v4 | v6 | +| --- | --- | --- | +| **Core** | `_bmad-core` thực chất là BMad Method | `_bmad/core/` là framework dùng chung | +| **Method** | `_bmad-method` | `_bmad/bmm/` | +| **Config** | Sửa trực tiếp các tệp | `config.yaml` theo từng module | +| **Documents** | Cần thiết lập trước cho bản chia nhỏ hoặc nguyên khối | Linh hoạt hoàn toàn, tự động quét | diff --git a/docs/vi-vn/index.md b/docs/vi-vn/index.md new file mode 100644 index 000000000..f4c483edb --- /dev/null +++ b/docs/vi-vn/index.md @@ -0,0 +1,60 @@ +--- +title: Chào mừng đến với BMad Method +description: Framework phát triển phần mềm dựa trên AI với các agent chuyên biệt, workflow có hướng dẫn và khả năng lập kế hoạch thông minh +--- + +BMad Method (**B**uild **M**ore **A**rchitect **D**reams) là một framework phát triển phần mềm dựa trên AI trong hệ sinh thái BMad Method, giúp bạn xây dựng phần mềm xuyên suốt toàn bộ quy trình, từ hình thành ý tưởng và lập kế hoạch cho tới triển khai với agent. Framework này cung cấp các AI agent chuyên biệt, workflow có hướng dẫn, và khả năng lập kế hoạch thông minh thích ứng với độ phức tạp của dự án, dù bạn đang sửa một lỗi nhỏ hay xây dựng một nền tảng doanh nghiệp. + +Nếu bạn đã quen làm việc với các trợ lý AI cho lập trình như Claude, Cursor, hoặc GitHub Copilot, bạn có thể bắt đầu ngay. + +:::note[🚀 V6 đã ra mắt và chúng tôi mới chỉ bắt đầu!] +Kiến trúc Skills, BMad Builder v1, Dev Loop Automation, và nhiều thứ khác nữa đang được phát triển. **[Xem Roadmap →](./roadmap.mdx)** +::: + +## Mới bắt đầu? Hãy xem một Tutorial trước + +Cách nhanh nhất để hiểu BMad là dùng thử nó. + +- **[Bắt đầu với BMad](./tutorials/getting-started.md)** — Cài đặt và hiểu cách BMad hoạt động +- **[Sơ đồ Workflow](./reference/workflow-map.md)** — Tổng quan trực quan về các phase của BMM, workflow, và cách quản lý context + +:::tip[Muốn vào việc ngay?] +Cài BMad và dùng skill `bmad-help` — nó sẽ hướng dẫn bạn mọi thứ dựa trên dự án và các module đã cài. +::: + +## Cách dùng bộ tài liệu này + +Bộ tài liệu này được chia thành bốn phần, dựa trên mục tiêu của bạn: + +| Phần | Mục đích | +| ----------------- | ---------------------------------------------------------------------------------------------------------- | +| **Tutorials** | Thiên về học theo từng bước. Đây là các hướng dẫn tuần tự giúp bạn xây dựng một thứ gì đó. Nếu bạn mới làm quen, hãy bắt đầu ở đây. | +| **How-To Guides** | Thiên về tác vụ. Đây là các hướng dẫn thực tế để giải quyết một vấn đề cụ thể. Câu hỏi kiểu “Làm sao để tùy chỉnh một agent?” nằm ở phần này. | +| **Explanation** | Thiên về hiểu bản chất. Đây là các bài phân tích sâu về khái niệm và kiến trúc. Hãy đọc khi bạn muốn hiểu *vì sao*. | +| **Reference** | Thiên về tra cứu thông tin. Đây là đặc tả kỹ thuật cho agent, workflow, và cấu hình. | + +## Mở rộng và tùy chỉnh + +Bạn muốn mở rộng BMad bằng các agent, workflow, hoặc module của riêng mình? **[BMad Builder](https://bmad-builder-docs.bmad-method.org/)** cung cấp framework và công cụ để tạo các phần mở rộng tùy chỉnh, dù bạn chỉ bổ sung khả năng mới cho BMad hay xây dựng hẳn một module mới từ đầu. + +## Bạn cần gì để bắt đầu + +BMad hoạt động với bất kỳ trợ lý AI cho lập trình nào hỗ trợ custom system prompt hoặc project context. Một số lựa chọn phổ biến: + +- **[Claude Code](https://code.claude.com)** — Công cụ CLI của Anthropic (khuyến nghị) +- **[Cursor](https://cursor.sh)** — Trình soạn thảo mã lấy AI làm trung tâm +- **[Codex CLI](https://github.com/openai/codex)** — Agent lập trình trên terminal của OpenAI + +Bạn nên quen với các khái niệm phát triển phần mềm cơ bản như quản lý phiên bản, cấu trúc dự án, và workflow Agile. Không cần có kinh nghiệm trước với các hệ thống agent kiểu BMad, vì bộ tài liệu này được viết ra chính để hỗ trợ việc đó. + +## Tham gia cộng đồng + +Nhận trợ giúp, chia sẻ những gì bạn đang xây dựng, hoặc đóng góp cho BMad: + +- **[Discord](https://discord.gg/gk8jAdXWmj)** — Trao đổi với những người dùng BMad khác, đặt câu hỏi, chia sẻ ý tưởng +- **[GitHub](https://github.com/bmad-code-org/BMAD-METHOD)** — Mã nguồn, issues, và đóng góp +- **[YouTube](https://www.youtube.com/@BMadCode)** — Video hướng dẫn và walkthrough + +## Bước tiếp theo + +Sẵn sàng bắt đầu? **[Bắt đầu với BMad](./tutorials/getting-started.md)** và xây dựng dự án đầu tiên của bạn. diff --git a/docs/vi-vn/reference/agents.md b/docs/vi-vn/reference/agents.md new file mode 100644 index 000000000..2d5eac166 --- /dev/null +++ b/docs/vi-vn/reference/agents.md @@ -0,0 +1,58 @@ +--- +title: Agents +description: Các agent mặc định của BMM cùng skill ID, trigger menu và workflow chính +sidebar: + order: 2 +--- + +## Các Agent Mặc Định + +Trang này liệt kê các agent mặc định của BMM (bộ Agile suite) được cài cùng với BMad Method, bao gồm skill ID, trigger menu và workflow chính của chúng. Mỗi agent được gọi dưới dạng một skill. + +## Ghi Chú + +- Mỗi agent đều có sẵn dưới dạng một skill do trình cài đặt tạo ra. Skill ID, ví dụ `bmad-dev`, được dùng để gọi agent. +- Trigger là các mã menu ngắn, ví dụ `CP`, cùng với các fuzzy match hiển thị trong menu của từng agent. +- QA (Quinn) là agent tự động hóa kiểm thử gọn nhẹ trong BMM. Test Architect (TEA) đầy đủ nằm trong một module riêng. + +| Agent | Skill ID | Trigger | Workflow chính | +| --------------------------- | -------------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------- | +| Analyst (Mary) | `bmad-analyst` | `BP`, `RS`, `CB`, `WB`, `DP` | Brainstorm Project, Research, Create Brief, PRFAQ Challenge, Document Project | +| Product Manager (John) | `bmad-pm` | `CP`, `VP`, `EP`, `CE`, `IR`, `CC` | Create/Validate/Edit PRD, Create Epics and Stories, Implementation Readiness, Correct Course | +| Architect (Winston) | `bmad-architect` | `CA`, `IR` | Create Architecture, Implementation Readiness | +| Scrum Master (Bob) | `bmad-sm` | `SP`, `CS`, `ER`, `CC` | Sprint Planning, Create Story, Epic Retrospective, Correct Course | +| Developer (Amelia) | `bmad-dev` | `DS`, `CR` | Dev Story, Code Review | +| QA Engineer (Quinn) | `bmad-qa` | `QA` | Automate (tạo test cho tính năng hiện có) | +| Quick Flow Solo Dev (Barry) | `bmad-master` | `QD`, `CR` | Quick Dev, Code Review | +| UX Designer (Sally) | `bmad-ux-designer` | `CU` | Create UX Design | +| Technical Writer (Paige) | `bmad-tech-writer` | `DP`, `WD`, `US`, `MG`, `VD`, `EC` | Document Project, Write Document, Update Standards, Mermaid Generate, Validate Doc, Explain Concept | + +## Các Loại Trigger + +Trigger trong menu agent dùng hai kiểu gọi khác nhau. Biết trigger thuộc kiểu nào sẽ giúp bạn cung cấp đúng đầu vào. + +### Trigger workflow (không cần tham số) + +Phần lớn trigger sẽ nạp một file workflow có cấu trúc. Bạn gõ mã trigger, agent sẽ bắt đầu workflow và nhắc bạn nhập thông tin ở từng bước. + +Ví dụ: `CP` (Create PRD), `DS` (Dev Story), `CA` (Create Architecture), `QD` (Quick Dev) + +### Trigger hội thoại (cần tham số) + +Một số trigger sẽ mở cuộc hội thoại tự do thay vì chạy workflow có cấu trúc. Khi đó bạn cần mô tả yêu cầu của mình cùng với mã trigger. + +| Agent | Trigger | Nội dung cần cung cấp | +| --- | --- | --- | +| Technical Writer (Paige) | `WD` | Mô tả tài liệu cần viết | +| Technical Writer (Paige) | `US` | Sở thích hoặc quy ước muốn thêm vào standards | +| Technical Writer (Paige) | `MG` | Mô tả sơ đồ và loại sơ đồ (sequence, flowchart, v.v.) | +| Technical Writer (Paige) | `VD` | Tài liệu cần kiểm tra và các vùng trọng tâm | +| Technical Writer (Paige) | `EC` | Tên khái niệm cần giải thích | + +**Ví dụ:** + +```text +WD Write a deployment guide for our Docker setup +MG Create a sequence diagram showing the auth flow +EC Explain how the module system works +``` diff --git a/docs/vi-vn/reference/commands.md b/docs/vi-vn/reference/commands.md new file mode 100644 index 000000000..dd1d93a84 --- /dev/null +++ b/docs/vi-vn/reference/commands.md @@ -0,0 +1,136 @@ +--- +title: Skills +description: Tài liệu tham chiếu cho skill của BMad — skill là gì, hoạt động ra sao và tìm ở đâu. +sidebar: + order: 3 +--- + +Skills là các prompt dựng sẵn để nạp agent, chạy workflow hoặc thực thi task bên trong IDE của bạn. Trình cài đặt BMad sinh chúng từ các module bạn đã chọn tại thời điểm cài đặt. Nếu sau này bạn thêm, xóa hoặc thay đổi module, hãy chạy lại trình cài đặt để đồng bộ skills (xem [Khắc phục sự cố](#khắc-phục-sự-cố)). + +## Skill So Với Trigger Trong Menu Agent + +BMad cung cấp hai cách để bắt đầu công việc, và chúng phục vụ những mục đích khác nhau. + +| Cơ chế | Cách gọi | Điều xảy ra | +| --- | --- | --- | +| **Skill** | Gõ tên skill, ví dụ `bmad-help`, trong IDE | Nạp trực tiếp agent, chạy workflow hoặc thực thi task | +| **Trigger menu agent** | Nạp agent trước, sau đó gõ mã ngắn như `DS` | Agent diễn giải mã đó và bắt đầu workflow tương ứng trong khi vẫn giữ đúng persona | + +Trigger trong menu agent yêu cầu bạn đang ở trong một phiên agent đang hoạt động. Dùng skill khi bạn đã biết mình muốn workflow nào. Dùng trigger khi bạn đang làm việc với một agent và muốn đổi tác vụ mà không rời khỏi cuộc hội thoại. + +## Skills Được Tạo Ra Như Thế Nào + +Khi bạn chạy `npx bmad-method install`, trình cài đặt sẽ đọc manifest của mọi module được chọn rồi tạo một skill cho mỗi agent, workflow, task và tool. Mỗi skill là một thư mục chứa file `SKILL.md`, hướng dẫn AI nạp file nguồn tương ứng và làm theo chỉ dẫn trong đó. + +Trình cài đặt dùng template cho từng loại skill: + +| Loại skill | File được tạo sẽ làm gì | +| --- | --- | +| **Agent launcher** | Nạp file persona của agent, kích hoạt menu của nó và giữ nguyên vai trò | +| **Workflow skill** | Nạp cấu hình workflow và làm theo các bước | +| **Task skill** | Nạp một file task độc lập và làm theo hướng dẫn | +| **Tool skill** | Nạp một file tool độc lập và làm theo hướng dẫn | + +:::note[Chạy lại trình cài đặt] +Nếu bạn thêm hoặc bớt module, hãy chạy lại trình cài đặt. Nó sẽ tạo lại toàn bộ file skill khớp với tập module hiện tại. +::: + +## File Skill Nằm Ở Đâu + +Trình cài đặt sẽ ghi file skill vào một thư mục dành riêng cho IDE bên trong dự án. Đường dẫn chính xác phụ thuộc vào IDE bạn chọn khi cài. + +| IDE / CLI | Thư mục skill | +| --- | --- | +| Claude Code | `.claude/skills/` | +| Cursor | `.cursor/skills/` | +| Windsurf | `.windsurf/skills/` | +| IDE khác | Xem output của trình cài đặt để biết đường dẫn đích | + +Mỗi skill là một thư mục chứa file `SKILL.md`. Ví dụ với Claude Code, cấu trúc sẽ như sau: + +```text +.claude/skills/ +├── bmad-help/ +│ └── SKILL.md +├── bmad-create-prd/ +│ └── SKILL.md +├── bmad-dev/ +│ └── SKILL.md +└── ... +``` + +Tên thư mục quyết định tên skill trong IDE. Ví dụ thư mục `bmad-dev/` sẽ đăng ký skill `bmad-dev`. + +## Cách Tìm Danh Sách Skill Của Bạn + +Gõ tên skill trong IDE để gọi nó. Một số nền tảng yêu cầu bạn bật skills trong phần cài đặt trước khi chúng xuất hiện. + +Chạy `bmad-help` để nhận hướng dẫn có ngữ cảnh về bước tiếp theo. + +:::tip[Khám phá nhanh] +Các thư mục skill được tạo trong dự án chính là danh sách chuẩn nhất. Mở chúng trong trình quản lý file để xem toàn bộ skill cùng mô tả. +::: + +## Các Nhóm Skill + +### Agent Skills + +Agent skills nạp một persona AI chuyên biệt với vai trò, phong cách giao tiếp và menu workflow xác định sẵn. Sau khi được nạp, agent sẽ giữ đúng vai trò và phản hồi qua các trigger trong menu. + +| Ví dụ skill | Agent | Vai trò | +| --- | --- | --- | +| `bmad-dev` | Amelia (Developer) | Triển khai story với mức tuân thủ đặc tả nghiêm ngặt | +| `bmad-pm` | John (Product Manager) | Tạo và kiểm tra PRD | +| `bmad-architect` | Winston (Architect) | Thiết kế kiến trúc hệ thống | +| `bmad-sm` | Bob (Scrum Master) | Quản lý sprint và story | + +Xem [Agents](./agents.md) để biết danh sách đầy đủ các agent mặc định và trigger của chúng. + +### Workflow Skills + +Workflow skills chạy một quy trình có cấu trúc, nhiều bước mà không cần nạp persona agent trước. Chúng nạp cấu hình workflow rồi thực hiện theo từng bước. + +| Ví dụ skill | Mục đích | +| --- | --- | +| `bmad-product-brief` | Tạo product brief — phiên discovery có hướng dẫn khi concept của bạn đã rõ | +| `bmad-prfaq` | Bài kiểm tra Working Backwards PRFAQ để stress-test concept sản phẩm | +| `bmad-create-prd` | Tạo Product Requirements Document | +| `bmad-create-architecture` | Thiết kế kiến trúc hệ thống | +| `bmad-create-epics-and-stories` | Tạo epics và stories | +| `bmad-dev-story` | Triển khai một story | +| `bmad-code-review` | Chạy code review | +| `bmad-quick-dev` | Luồng nhanh hợp nhất — làm rõ yêu cầu, lập kế hoạch, triển khai, review và trình bày | + +Xem [Workflow Map](./workflow-map.md) để có tài liệu workflow đầy đủ theo từng phase. + +### Task Skills Và Tool Skills + +Tasks và tools là các thao tác độc lập, không yêu cầu ngữ cảnh agent hay workflow. + +**BMad-Help: người dẫn đường thông minh của bạn** + +`bmad-help` là giao diện chính để bạn khám phá nên làm gì tiếp theo. Nó kiểm tra dự án, hiểu truy vấn ngôn ngữ tự nhiên và đề xuất bước bắt buộc hoặc tùy chọn tiếp theo dựa trên các module đã cài. + +:::note[Ví dụ] +```text +bmad-help +bmad-help I have a SaaS idea and know all the features. Where do I start? +bmad-help What are my options for UX design? +``` +::: + +**Các task và tool lõi khác** + +Module lõi có 11 công cụ tích hợp sẵn — review, nén tài liệu, brainstorming, quản lý tài liệu và nhiều hơn nữa. Xem [Core Tools](./core-tools.md) để có tài liệu tham chiếu đầy đủ. + +## Quy Ước Đặt Tên + +Mọi skill đều dùng tiền tố `bmad-` theo sau là tên mô tả, ví dụ `bmad-dev`, `bmad-create-prd`, `bmad-help`. Xem [Modules](./modules.md) để biết các module hiện có. + +## Khắc Phục Sự Cố + +**Skills không xuất hiện sau khi cài đặt.** Một số nền tảng yêu cầu bật skills thủ công trong phần cài đặt. Hãy kiểm tra tài liệu IDE của bạn hoặc hỏi trợ lý AI cách bật skills. Bạn cũng có thể cần khởi động lại IDE hoặc reload cửa sổ. + +**Thiếu skill mà bạn mong đợi.** Trình cài đặt chỉ tạo skill cho những module bạn đã chọn. Hãy chạy lại `npx bmad-method install` và kiểm tra lại phần chọn module. Đồng thời xác nhận rằng file skill thực sự tồn tại trong thư mục dự kiến. + +**Skill từ module đã bỏ vẫn còn xuất hiện.** Trình cài đặt không tự xóa các file skill cũ. Hãy xóa các thư mục lỗi thời trong thư mục skills của IDE, hoặc xóa toàn bộ thư mục skills rồi chạy lại trình cài đặt để có tập skill sạch. diff --git a/docs/vi-vn/reference/core-tools.md b/docs/vi-vn/reference/core-tools.md new file mode 100644 index 000000000..b2deebcde --- /dev/null +++ b/docs/vi-vn/reference/core-tools.md @@ -0,0 +1,293 @@ +--- +title: Core Tools +description: Tài liệu tham chiếu cho mọi task và workflow tích hợp sẵn có trong mọi bản cài BMad mà không cần module bổ sung. +sidebar: + order: 2 +--- + +Mọi bản cài BMad đều bao gồm một tập core skills có thể dùng cùng với bất cứ việc gì bạn đang làm — các task và workflow độc lập hoạt động xuyên suốt mọi dự án, mọi module và mọi phase. Chúng luôn có sẵn bất kể bạn cài những module tùy chọn nào. + +:::tip[Lối đi nhanh] +Chạy bất kỳ core tool nào bằng cách gõ tên skill của nó, ví dụ `bmad-help`, trong IDE của bạn. Không cần mở phiên agent trước. +::: + +## Tổng Quan + +| Công cụ | Loại | Mục đích | +| --- | --- | --- | +| [`bmad-help`](#bmad-help) | Task | Nhận hướng dẫn có ngữ cảnh về việc nên làm gì tiếp theo | +| [`bmad-brainstorming`](#bmad-brainstorming) | Workflow | Tổ chức các phiên brainstorming có tương tác | +| [`bmad-party-mode`](#bmad-party-mode) | Workflow | Điều phối thảo luận nhóm nhiều agent | +| [`bmad-distillator`](#bmad-distillator) | Task | Nén tài liệu tối ưu cho LLM mà không mất thông tin | +| [`bmad-advanced-elicitation`](#bmad-advanced-elicitation) | Task | Đẩy đầu ra của LLM qua các vòng tinh luyện lặp | +| [`bmad-review-adversarial-general`](#bmad-review-adversarial-general) | Task | Review hoài nghi để tìm chỗ thiếu và chỗ sai | +| [`bmad-review-edge-case-hunter`](#bmad-review-edge-case-hunter) | Task | Phân tích toàn bộ nhánh rẽ để tìm edge case chưa được xử lý | +| [`bmad-editorial-review-prose`](#bmad-editorial-review-prose) | Task | Biên tập câu chữ nhằm tăng độ rõ ràng khi giao tiếp | +| [`bmad-editorial-review-structure`](#bmad-editorial-review-structure) | Task | Biên tập cấu trúc — cắt, gộp và tổ chức lại | +| [`bmad-shard-doc`](#bmad-shard-doc) | Task | Tách file markdown lớn thành các phần có tổ chức | +| [`bmad-index-docs`](#bmad-index-docs) | Task | Tạo hoặc cập nhật mục lục cho toàn bộ tài liệu trong một thư mục | + +## bmad-help + +**Người dẫn đường thông minh cho bước tiếp theo của bạn.** Công cụ này kiểm tra trạng thái dự án, phát hiện những gì đã hoàn thành và đề xuất bước bắt buộc hoặc tùy chọn tiếp theo. + +**Dùng khi:** + +- Bạn vừa hoàn tất một workflow và muốn biết tiếp theo là gì +- Bạn mới làm quen với BMad và cần định hướng +- Bạn đang mắc kẹt và muốn lời khuyên có ngữ cảnh +- Bạn vừa cài module mới và muốn xem có gì khả dụng + +**Cách hoạt động:** + +1. Quét dự án để tìm các artifact hiện có như PRD, architecture, stories, v.v. +2. Phát hiện các module đã cài và workflow khả dụng của chúng +3. Đề xuất bước tiếp theo theo thứ tự ưu tiên — bước bắt buộc trước, tùy chọn sau +4. Trình bày từng đề xuất cùng lệnh skill và mô tả ngắn + +**Đầu vào:** Truy vấn ngôn ngữ tự nhiên tùy chọn, ví dụ `bmad-help I have a SaaS idea, where do I start?` + +**Đầu ra:** Danh sách ưu tiên các bước tiếp theo được khuyến nghị kèm lệnh skill + +## bmad-brainstorming + +**Tạo ra nhiều ý tưởng đa dạng bằng các kỹ thuật sáng tạo có tương tác.** Đây là một phiên brainstorming có điều phối, nạp các phương pháp phát ý tưởng đã được kiểm chứng từ thư viện kỹ thuật và dẫn bạn đến 100+ ý tưởng trước khi bắt đầu sắp xếp. + +**Dùng khi:** + +- Bạn đang bắt đầu một dự án mới và cần khám phá không gian vấn đề +- Bạn đang bí ý tưởng và cần một quy trình sáng tạo có cấu trúc +- Bạn muốn dùng các framework tạo ý tưởng đã được kiểm chứng như SCAMPER, reverse brainstorming, v.v. + +**Cách hoạt động:** + +1. Thiết lập phiên brainstorming theo chủ đề của bạn +2. Nạp các kỹ thuật sáng tạo từ thư viện phương pháp +3. Dẫn bạn đi qua từng kỹ thuật để tạo ý tưởng +4. Áp dụng giao thức chống thiên lệch — cứ mỗi 10 ý tưởng lại đổi miền sáng tạo để tránh gom cụm +5. Tạo một tài liệu phiên làm việc chỉ thêm vào, trong đó mọi ý tưởng được tổ chức theo kỹ thuật + +**Đầu vào:** Chủ đề brainstorming hoặc phát biểu vấn đề, cùng file context tùy chọn + +**Đầu ra:** `brainstorming-session-{date}.md` chứa toàn bộ ý tưởng được tạo ra + +:::note[Mục tiêu về số lượng] +Điểm bứt phá thường nằm ở vùng ý tưởng thứ 50-100. Workflow này khuyến khích bạn tạo 100+ ý tưởng trước khi sắp xếp. +::: + +## bmad-party-mode + +**Điều phối thảo luận nhóm nhiều agent.** Công cụ này nạp toàn bộ agent BMad đã cài và tạo một cuộc trao đổi tự nhiên, nơi mỗi agent đóng góp từ góc nhìn chuyên môn và cá tính riêng. + +**Dùng khi:** + +- Bạn cần nhiều góc nhìn chuyên gia cho một quyết định +- Bạn muốn các agent phản biện giả định của nhau +- Bạn đang khám phá một chủ đề phức tạp trải qua nhiều miền khác nhau + +**Cách hoạt động:** + +1. Nạp manifest agent chứa toàn bộ persona đã cài +2. Phân tích chủ đề của bạn để chọn ra 2-3 agent phù hợp nhất +3. Các agent lần lượt tham gia, có tương tác chéo và bất đồng tự nhiên +4. Luân phiên agent để đảm bảo góc nhìn đa dạng theo thời gian +5. Kết thúc bằng `goodbye`, `end party` hoặc `quit` + +**Đầu vào:** Chủ đề hoặc câu hỏi thảo luận, cùng thông tin về các persona bạn muốn tham gia nếu có + +**Đầu ra:** Cuộc hội thoại nhiều agent theo thời gian thực, vẫn giữ nguyên cá tính từng agent + +## bmad-distillator + +**Nén tài liệu nguồn tối ưu cho LLM mà không mất thông tin.** Công cụ này tạo ra các bản chưng cất dày đặc, tiết kiệm token nhưng vẫn giữ nguyên toàn bộ thông tin cho LLM dùng về sau. Có thể xác minh bằng tái dựng hai chiều. + +**Dùng khi:** + +- Một tài liệu quá lớn so với context window của LLM +- Bạn cần phiên bản tiết kiệm token của tài liệu nghiên cứu, đặc tả hoặc artifact lập kế hoạch +- Bạn muốn xác minh rằng không có thông tin nào bị mất trong quá trình nén +- Các agent sẽ cần tham chiếu và tìm thông tin trong đó thường xuyên + +**Cách hoạt động:** + +1. **Analyze** — Đọc tài liệu nguồn, nhận diện mật độ thông tin và cấu trúc +2. **Compress** — Chuyển văn xuôi thành dạng bullet dày đặc, bỏ trang trí không cần thiết +3. **Verify** — Kiểm tra tính đầy đủ để đảm bảo mọi thông tin gốc còn nguyên +4. **Validate** *(tùy chọn)* — Tái dựng hai chiều để chứng minh nén không mất mát + +**Đầu vào:** + +- `source_documents` *(bắt buộc)* — Đường dẫn file, thư mục hoặc mẫu glob +- `downstream_consumer` *(tùy chọn)* — Thành phần sẽ dùng đầu ra này, ví dụ "PRD creation" +- `token_budget` *(tùy chọn)* — Kích thước mục tiêu gần đúng +- `--validate` *(cờ)* — Chạy kiểm tra tái dựng hai chiều + +**Đầu ra:** Một hoặc nhiều file markdown distillate kèm báo cáo tỷ lệ nén, ví dụ `3.2:1` + +## bmad-advanced-elicitation + +**Đẩy đầu ra của LLM qua các phương pháp tinh luyện lặp.** Công cụ này chọn từ thư viện kỹ thuật elicitation để cải thiện nội dung một cách có hệ thống qua nhiều lượt. + +**Dùng khi:** + +- Đầu ra của LLM còn nông hoặc quá chung chung +- Bạn muốn khám phá một chủ đề từ nhiều góc phân tích khác nhau +- Bạn đang tinh chỉnh một tài liệu quan trọng và cần chiều sâu hơn + +**Cách hoạt động:** + +1. Nạp registry phương pháp với hơn 5 kỹ thuật elicitation +2. Chọn ra 5 phương pháp phù hợp nhất dựa trên loại nội dung và độ phức tạp +3. Hiển thị menu tương tác — chọn một phương pháp, xáo lại, hoặc liệt kê tất cả +4. Áp dụng phương pháp đã chọn để nâng cấp nội dung +5. Tiếp tục đưa ra lựa chọn cho các vòng cải thiện tiếp theo cho đến khi bạn chọn "Proceed" + +**Đầu vào:** Phần nội dung cần cải thiện + +**Đầu ra:** Phiên bản nội dung đã được nâng cấp + +## bmad-review-adversarial-general + +**Kiểu review hoài nghi, mặc định cho rằng vấn đề luôn tồn tại và phải đi tìm chúng.** Công cụ này đứng ở góc nhìn của một reviewer khó tính, thiếu kiên nhẫn với sản phẩm cẩu thả. Nó tìm xem còn thiếu gì, không chỉ tìm cái gì sai. + +**Dùng khi:** + +- Bạn cần bảo đảm chất lượng trước khi chốt một deliverable +- Bạn muốn stress-test một spec, story hoặc tài liệu +- Bạn muốn tìm lỗ hổng bao phủ mà các review lạc quan thường bỏ sót + +**Cách hoạt động:** + +1. Đọc nội dung với góc nhìn hoài nghi và khắt khe +2. Xác định vấn đề về độ đầy đủ, độ đúng và chất lượng +3. Chủ động tìm phần còn thiếu chứ không chỉ phần hiện diện nhưng sai +4. Phải tìm được tối thiểu 10 vấn đề, nếu không sẽ phân tích sâu hơn + +**Đầu vào:** + +- `content` *(bắt buộc)* — Diff, spec, story, tài liệu hoặc bất kỳ artifact nào +- `also_consider` *(tùy chọn)* — Các vùng bổ sung cần để ý + +**Đầu ra:** Danh sách markdown gồm 10+ phát hiện kèm mô tả + +## bmad-review-edge-case-hunter + +**Đi qua mọi nhánh rẽ và điều kiện biên, chỉ báo cáo những trường hợp chưa được xử lý.** Đây là phương pháp thuần túy dựa trên truy vết đường đi, suy ra các lớp edge case một cách cơ học. Nó trực giao với adversarial review — khác phương pháp, không khác thái độ. + +**Dùng khi:** + +- Bạn muốn bao phủ edge case toàn diện cho code hoặc logic +- Bạn cần một phương pháp bổ sung cho adversarial review +- Bạn đang review diff hoặc function để tìm điều kiện biên + +**Cách hoạt động:** + +1. Liệt kê toàn bộ nhánh rẽ trong nội dung +2. Suy ra cơ học các lớp edge case: thiếu else/default, input không được gác, off-by-one, tràn số học, ép kiểu ngầm, race condition, lỗ hổng timeout +3. Đối chiếu từng đường đi với các guard hiện có +4. Chỉ báo cáo các đường đi chưa được xử lý, âm thầm bỏ qua những trường hợp đã được che chắn + +**Đầu vào:** + +- `content` *(bắt buộc)* — Diff, toàn file hoặc function +- `also_consider` *(tùy chọn)* — Các vùng bổ sung cần lưu ý + +**Đầu ra:** Mảng JSON các phát hiện, mỗi phát hiện có `location`, `trigger_condition`, `guard_snippet` và `potential_consequence` + +:::note[Các kiểu review bổ trợ nhau] +Hãy chạy cả `bmad-review-adversarial-general` và `bmad-review-edge-case-hunter` để có độ bao phủ trực giao. Adversarial review bắt lỗi về chất lượng và độ đầy đủ; edge case hunter bắt các đường đi chưa được xử lý. +::: + +## bmad-editorial-review-prose + +**Biên tập câu chữ kiểu lâm sàng, tập trung vào độ rõ ràng khi truyền đạt.** Công cụ này review văn bản để tìm ra các vấn đề cản trở việc hiểu. Nó dùng Microsoft Writing Style Guide làm nền và vẫn giữ giọng văn của tác giả. + +**Dùng khi:** + +- Bạn đã có bản nháp tài liệu và muốn trau chuốt câu chữ +- Bạn cần đảm bảo độ rõ ràng cho một nhóm độc giả cụ thể +- Bạn muốn sửa lỗi giao tiếp mà không áp đặt gu phong cách cá nhân + +**Cách hoạt động:** + +1. Đọc nội dung, bỏ qua code block và frontmatter +2. Xác định các vấn đề cản trở hiểu nghĩa, không phải các sở thích phong cách +3. Khử trùng lặp những lỗi giống nhau xuất hiện nhiều nơi +4. Tạo bảng sửa lỗi ba cột + +**Đầu vào:** + +- `content` *(bắt buộc)* — Markdown, văn bản thường hoặc XML +- `style_guide` *(tùy chọn)* — Style guide riêng của dự án +- `reader_type` *(tùy chọn)* — `humans` mặc định cho độ rõ và nhịp đọc, hoặc `llm` cho độ chính xác và nhất quán + +**Đầu ra:** Bảng markdown ba cột: Original Text | Revised Text | Changes + +## bmad-editorial-review-structure + +**Biên tập cấu trúc — đề xuất cắt, gộp, di chuyển và cô đọng.** Công cụ này review cách tổ chức tài liệu và đề xuất thay đổi mang tính nội dung để tăng độ rõ ràng và luồng đọc trước khi chỉnh câu chữ. + +**Dùng khi:** + +- Một tài liệu được ghép từ nhiều nguồn con và cần tính nhất quán về cấu trúc +- Bạn muốn rút gọn độ dài tài liệu nhưng vẫn giữ được khả năng hiểu +- Bạn cần phát hiện chỗ lệch phạm vi hoặc thông tin quan trọng bị chôn vùi + +**Cách hoạt động:** + +1. Phân tích tài liệu theo 5 mô hình cấu trúc: Tutorial, Reference, Explanation, Prompt, Strategic +2. Xác định phần dư thừa, lệch phạm vi và thông tin bị chìm +3. Tạo danh sách khuyến nghị theo mức ưu tiên: CUT, MERGE, MOVE, CONDENSE, QUESTION, PRESERVE +4. Ước tính số từ và phần trăm có thể giảm + +**Đầu vào:** + +- `content` *(bắt buộc)* — Tài liệu cần review +- `purpose` *(tùy chọn)* — Mục đích mong muốn, ví dụ "quickstart tutorial" +- `target_audience` *(tùy chọn)* — Ai sẽ đọc tài liệu này +- `reader_type` *(tùy chọn)* — `humans` hoặc `llm` +- `length_target` *(tùy chọn)* — Mục tiêu rút gọn, ví dụ "ngắn hơn 30%" + +**Đầu ra:** Tóm tắt tài liệu, danh sách khuyến nghị ưu tiên và ước tính mức giảm + +## bmad-shard-doc + +**Tách file markdown lớn thành các file phần có tổ chức.** Công cụ này dùng các header cấp 2 làm điểm cắt để tạo ra một thư mục gồm các file phần tự chứa cùng một file chỉ mục. + +**Dùng khi:** + +- Một file markdown đã quá lớn để quản lý hiệu quả, thường trên 500 dòng +- Bạn muốn chia một tài liệu nguyên khối thành các phần dễ điều hướng +- Bạn cần các file riêng để chỉnh sửa song song hoặc quản lý context cho LLM + +**Cách hoạt động:** + +1. Xác nhận file nguồn tồn tại và là markdown +2. Tách tại các header cấp 2 `##` thành các file phần được đánh số +3. Tạo `index.md` chứa danh sách phần và liên kết +4. Hỏi bạn có muốn xóa, lưu trữ hay giữ file gốc không + +**Đầu vào:** Đường dẫn file markdown nguồn, cùng thư mục đích tùy chọn + +**Đầu ra:** Một thư mục gồm `index.md` và các file `01-{section}.md`, `02-{section}.md`, v.v. + +## bmad-index-docs + +**Tạo hoặc cập nhật mục lục cho toàn bộ tài liệu trong một thư mục.** Công cụ này quét thư mục, đọc từng file để hiểu mục đích của nó, rồi tạo `index.md` có tổ chức với liên kết và mô tả. + +**Dùng khi:** + +- Bạn cần một chỉ mục nhẹ để LLM quét nhanh các tài liệu hiện có +- Một thư mục tài liệu đã lớn và cần bảng mục lục có tổ chức +- Bạn muốn một cái nhìn tổng quan được tạo tự động và luôn theo kịp hiện trạng + +**Cách hoạt động:** + +1. Quét thư mục đích để lấy mọi file không ẩn +2. Đọc từng file để hiểu đúng mục đích thực tế của nó +3. Nhóm file theo loại, mục đích hoặc thư mục con +4. Tạo mô tả ngắn gọn, thường từ 3-10 từ cho mỗi file + +**Đầu vào:** Đường dẫn thư mục đích + +**Đầu ra:** `index.md` chứa danh sách file có tổ chức, liên kết tương đối và mô tả ngắn diff --git a/docs/vi-vn/reference/modules.md b/docs/vi-vn/reference/modules.md new file mode 100644 index 000000000..1f0bf25ea --- /dev/null +++ b/docs/vi-vn/reference/modules.md @@ -0,0 +1,76 @@ +--- +title: Các Module Chính Thức +description: Các module bổ sung để xây agent tùy chỉnh, tăng cường sáng tạo, phát triển game và kiểm thử +sidebar: + order: 4 +--- + +BMad được mở rộng thông qua các module chính thức mà bạn chọn trong quá trình cài đặt. Những module bổ sung này cung cấp agent, workflow và task chuyên biệt cho các lĩnh vực cụ thể, vượt ra ngoài phần lõi tích hợp sẵn và BMM (Agile suite). + +:::tip[Cài đặt module] +Chạy `npx bmad-method install` rồi chọn những module bạn muốn. Trình cài đặt sẽ tự xử lý phần tải về, cấu hình và tích hợp vào IDE. +::: + +## BMad Builder + +Tạo agent tùy chỉnh, workflow tùy chỉnh và module chuyên biệt theo lĩnh vực với sự hỗ trợ có hướng dẫn. BMad Builder là meta-module để mở rộng chính framework này. + +- **Mã:** `bmb` +- **npm:** [`bmad-builder`](https://www.npmjs.com/package/bmad-builder) +- **GitHub:** [bmad-code-org/bmad-builder](https://github.com/bmad-code-org/bmad-builder) + +**Cung cấp:** + +- Agent Builder — tạo AI agent chuyên biệt với chuyên môn và quyền truy cập công cụ tùy chỉnh +- Workflow Builder — thiết kế quy trình có cấu trúc với các bước và điểm quyết định +- Module Builder — đóng gói agent và workflow thành các module có thể chia sẻ và phát hành +- Thiết lập có tương tác bằng YAML cùng hỗ trợ publish lên npm + +## Creative Intelligence Suite + +Bộ công cụ vận hành bởi AI dành cho sáng tạo có cấu trúc, phát ý tưởng và đổi mới trong giai đoạn đầu phát triển. Bộ này cung cấp nhiều agent giúp brainstorming, design thinking và giải quyết vấn đề bằng các framework đã được kiểm chứng. + +- **Mã:** `cis` +- **npm:** [`bmad-creative-intelligence-suite`](https://www.npmjs.com/package/bmad-creative-intelligence-suite) +- **GitHub:** [bmad-code-org/bmad-module-creative-intelligence-suite](https://github.com/bmad-code-org/bmad-module-creative-intelligence-suite) + +**Cung cấp:** + +- Các agent Innovation Strategist, Design Thinking Coach và Brainstorming Coach +- Problem Solver và Creative Problem Solver cho tư duy hệ thống và tư duy bên lề +- Storyteller và Presentation Master cho kể chuyện và pitching +- Các framework phát ý tưởng như SCAMPER, Reverse Brainstorming và problem reframing + +## Game Dev Studio + +Các workflow phát triển game có cấu trúc, được điều chỉnh cho Unity, Unreal, Godot và các engine tùy chỉnh. Hỗ trợ làm prototype nhanh qua Quick Flow và sản xuất toàn diện bằng sprint theo epic. + +- **Mã:** `gds` +- **npm:** [`bmad-game-dev-studio`](https://www.npmjs.com/package/bmad-game-dev-studio) +- **GitHub:** [bmad-code-org/bmad-module-game-dev-studio](https://github.com/bmad-code-org/bmad-module-game-dev-studio) + +**Cung cấp:** + +- Workflow tạo Game Design Document (GDD) +- Chế độ Quick Dev cho làm prototype nhanh +- Hỗ trợ thiết kế narrative cho nhân vật, hội thoại và world-building +- Bao phủ hơn 21 thể loại game cùng hướng dẫn kiến trúc theo engine + +## Test Architect (TEA) + +Chiến lược kiểm thử cấp doanh nghiệp, hướng dẫn tự động hóa và quyết định release gate thông qua một agent chuyên gia cùng chín workflow có cấu trúc. TEA vượt xa QA agent tích hợp sẵn nhờ ưu tiên theo rủi ro và truy vết yêu cầu. + +- **Mã:** `tea` +- **npm:** [`bmad-method-test-architecture-enterprise`](https://www.npmjs.com/package/bmad-method-test-architecture-enterprise) +- **GitHub:** [bmad-code-org/bmad-method-test-architecture-enterprise](https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise) + +**Cung cấp:** + +- Agent Murat (Master Test Architect and Quality Advisor) +- Các workflow cho test design, ATDD, automation, test review và traceability +- Đánh giá NFR, thiết lập CI và dựng sườn framework kiểm thử +- Ưu tiên P0-P3 cùng tích hợp tùy chọn với Playwright Utils và MCP + +## Community Modules + +Các module cộng đồng và một chợ module đang được chuẩn bị. Hãy theo dõi [tổ chức BMad trên GitHub](https://github.com/bmad-code-org) để cập nhật. diff --git a/docs/vi-vn/reference/testing.md b/docs/vi-vn/reference/testing.md new file mode 100644 index 000000000..a48e9afcb --- /dev/null +++ b/docs/vi-vn/reference/testing.md @@ -0,0 +1,106 @@ +--- +title: Các Tùy Chọn Kiểm Thử +description: So sánh QA agent tích hợp sẵn (Quinn) với module Test Architect (TEA) cho tự động hóa kiểm thử. +sidebar: + order: 5 +--- + +BMad cung cấp hai hướng kiểm thử: QA agent tích hợp sẵn để tạo test nhanh và module Test Architect có thể cài thêm cho chiến lược kiểm thử cấp doanh nghiệp. + +## Nên Dùng Cái Nào? + +| Yếu tố | Quinn (QA tích hợp sẵn) | Module TEA | +| --- | --- | --- | +| **Phù hợp nhất với** | Dự án nhỏ-trung bình, cần bao phủ nhanh | Dự án lớn, miền nghiệp vụ bị ràng buộc hoặc phức tạp | +| **Thiết lập** | Không cần cài thêm, đã có sẵn trong BMM | Cài riêng qua `npx bmad-method install` | +| **Cách tiếp cận** | Tạo test nhanh, lặp tinh chỉnh sau | Lập kế hoạch trước rồi mới tạo test có truy vết | +| **Loại test** | API và E2E | API, E2E, ATDD, NFR và nhiều loại khác | +| **Chiến lược** | Happy path + edge case quan trọng | Ưu tiên theo rủi ro (P0-P3) | +| **Số workflow** | 1 (Automate) | 9 (design, ATDD, automate, review, trace và các workflow khác) | + +:::tip[Bắt đầu với Quinn] +Phần lớn dự án nên bắt đầu với Quinn. Nếu sau này bạn cần chiến lược kiểm thử, quality gate hoặc truy vết yêu cầu, hãy cài TEA song song. +::: + +## QA Agent Tích Hợp Sẵn (Quinn) + +Quinn là QA agent tích hợp sẵn trong module BMM (Agile suite). Nó tạo test chạy được rất nhanh bằng framework kiểm thử hiện có của dự án, không cần thêm cấu hình hay bước cài đặt bổ sung. + +**Trigger:** `QA` hoặc `bmad-qa-generate-e2e-tests` + +### Quinn Làm Gì + +Quinn chạy một workflow duy nhất là Automate, gồm năm bước: + +1. **Phát hiện framework test** — quét `package.json` và các file test hiện có để nhận ra framework của bạn như Jest, Vitest, Playwright, Cypress hoặc bất kỳ runner tiêu chuẩn nào. Nếu chưa có gì, nó sẽ phân tích stack dự án và đề xuất một lựa chọn. +2. **Xác định tính năng** — hỏi cần kiểm thử phần nào hoặc tự khám phá các tính năng trong codebase. +3. **Tạo API tests** — bao phủ status code, cấu trúc phản hồi, happy path và 1-2 trường hợp lỗi. +4. **Tạo E2E tests** — bao phủ workflow người dùng bằng semantic locator và assertion trên kết quả nhìn thấy được. +5. **Chạy và xác minh** — thực thi test vừa tạo và sửa lỗi hỏng ngay lập tức. + +Quinn tạo một bản tóm tắt kiểm thử và lưu nó vào thư mục implementation artifacts của dự án. + +### Mẫu Kiểm Thử + +Các test được tạo theo triết lý “đơn giản và dễ bảo trì”: + +- **Chỉ dùng API chuẩn của framework** — không kéo thêm utility ngoài hay abstraction tùy chỉnh +- **Semantic locator** cho UI test — dùng role, label, text thay vì CSS selector +- **Test độc lập** — không phụ thuộc thứ tự chạy +- **Không hardcode wait hoặc sleep** +- **Mô tả rõ ràng** để test cũng đóng vai trò tài liệu tính năng + +:::note[Phạm vi] +Quinn chỉ tạo test. Nếu bạn cần code review hoặc xác nhận story, hãy dùng workflow Code Review (`CR`) thay vì Quinn. +::: + +### Khi Nào Nên Dùng Quinn + +- Cần bao phủ test nhanh cho một tính năng mới hoặc hiện có +- Muốn tự động hóa kiểm thử thân thiện với người mới mà không cần thiết lập phức tạp +- Muốn các pattern test chuẩn mà lập trình viên nào cũng đọc và bảo trì được +- Dự án nhỏ-trung bình, nơi chiến lược kiểm thử toàn diện là không cần thiết + +## Module Test Architect (TEA) + +TEA là một module độc lập cung cấp agent chuyên gia Murat cùng chín workflow có cấu trúc cho kiểm thử cấp doanh nghiệp. Nó vượt ra ngoài việc tạo test để bao gồm chiến lược kiểm thử, lập kế hoạch theo rủi ro, quality gate và truy vết yêu cầu. + +- **Tài liệu:** [TEA Module Docs](https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/) +- **Cài đặt:** `npx bmad-method install` rồi chọn module TEA +- **npm:** [`bmad-method-test-architecture-enterprise`](https://www.npmjs.com/package/bmad-method-test-architecture-enterprise) + +### TEA Cung Cấp Gì + +| Workflow | Mục đích | +| --- | --- | +| Test Design | Tạo chiến lược kiểm thử toàn diện gắn với yêu cầu | +| ATDD | Phát triển hướng acceptance test với tiêu chí của stakeholder | +| Automate | Tạo test bằng pattern và utility nâng cao | +| Test Review | Kiểm tra chất lượng và độ bao phủ của test so với chiến lược | +| Traceability | Liên kết test ngược về yêu cầu để phục vụ audit và tuân thủ | +| NFR Assessment | Đánh giá các yêu cầu phi chức năng như hiệu năng, bảo mật | +| CI Setup | Cấu hình thực thi test trong pipeline tích hợp liên tục | +| Framework Scaffolding | Dựng hạ tầng và cấu trúc dự án kiểm thử | +| Release Gate | Ra quyết định phát hành go/no-go dựa trên dữ liệu | + +TEA cũng hỗ trợ ưu tiên theo rủi ro P0-P3 và tích hợp tùy chọn với Playwright Utils cùng công cụ MCP. + +### Khi Nào Nên Dùng TEA + +- Dự án cần truy vết yêu cầu hoặc tài liệu tuân thủ +- Đội ngũ cần ưu tiên kiểm thử theo rủi ro trên nhiều tính năng +- Môi trường doanh nghiệp có quality gate chính thức trước phát hành +- Miền nghiệp vụ phức tạp, nơi chiến lược kiểm thử phải được lên trước khi viết test +- Dự án đã vượt quá mô hình một workflow của Quinn + +## Kiểm Thử Nằm Ở Đâu Trong Workflow + +Workflow Automate của Quinn xuất hiện ở Phase 4 (Implementation) trong workflow map của BMad Method. Nó được thiết kế để chạy **sau khi hoàn tất trọn vẹn một epic** — tức là khi mọi story trong epic đó đã được triển khai và code review xong. Trình tự điển hình là: + +1. Với mỗi story trong epic: triển khai bằng Dev (`DS`), sau đó xác nhận bằng Code Review (`CR`) +2. Sau khi epic hoàn tất: tạo test bằng Quinn (`QA`) hoặc workflow Automate của TEA +3. Chạy retrospective (`bmad-retrospective`) để ghi nhận bài học rút ra + +Quinn làm việc trực tiếp từ source code mà không cần nạp tài liệu lập kế hoạch như PRD hay architecture. Các workflow của TEA có thể tích hợp với artifact lập kế hoạch ở các bước trước để phục vụ truy vết. + +Để hiểu rõ hơn kiểm thử nằm ở đâu trong quy trình tổng thể, xem [Workflow Map](./workflow-map.md). diff --git a/docs/vi-vn/reference/workflow-map.md b/docs/vi-vn/reference/workflow-map.md new file mode 100644 index 000000000..d8a87fcbb --- /dev/null +++ b/docs/vi-vn/reference/workflow-map.md @@ -0,0 +1,89 @@ +--- +title: "Workflow Map" +description: Tài liệu trực quan về các phase workflow và output của BMad Method +sidebar: + order: 1 +--- + +BMad Method (BMM) là một module trong hệ sinh thái BMad, tập trung vào các thực hành tốt nhất của context engineering và lập kế hoạch. AI agent hoạt động hiệu quả nhất khi có ngữ cảnh rõ ràng và có cấu trúc. Hệ thống BMM xây dựng ngữ cảnh đó theo tiến trình qua 4 phase riêng biệt. Mỗi phase, cùng với nhiều workflow tùy chọn bên trong phase đó, tạo ra các tài liệu làm đầu vào cho phase kế tiếp, nhờ vậy agent luôn biết phải xây gì và vì sao. + +Lý do và các khái niệm nền tảng ở đây đến từ các phương pháp agile đã được áp dụng rất thành công trong toàn ngành như một khung tư duy. + +Nếu có lúc nào bạn không chắc nên làm gì, skill `bmad-help` sẽ giúp bạn giữ đúng hướng hoặc biết bước tiếp theo. Bạn vẫn có thể dùng trang này để tham chiếu, nhưng `bmad-help` mang tính tương tác đầy đủ và nhanh hơn nhiều nếu bạn đã cài BMad Method. Ngoài ra, nếu bạn đang dùng thêm các module mở rộng BMad Method hoặc các module bổ sung khác, `bmad-help` cũng sẽ phát triển theo để biết mọi thứ đang có sẵn và đưa ra lời khuyên tốt nhất tại thời điểm đó. + +Lưu ý quan trọng cuối cùng: mọi workflow dưới đây đều có thể chạy trực tiếp bằng công cụ bạn chọn thông qua skill, hoặc bằng cách nạp agent trước rồi chọn mục tương ứng trong menu agent. + + + + + +## Phase 1: Analysis (Tùy chọn) + +Khám phá không gian vấn đề và xác nhận ý tưởng trước khi cam kết đi vào lập kế hoạch. [**Tìm hiểu từng công cụ làm gì và nên dùng khi nào**](../explanation/analysis-phase.md). + +| Workflow | Mục đích | Tạo ra | +| ------------------------------- | -------------------------------------------------------------------------- | ------------------------- | +| `bmad-brainstorming` | Brainstorm ý tưởng dự án với sự điều phối của brainstorming coach | `brainstorming-report.md` | +| `bmad-domain-research`, `bmad-market-research`, `bmad-technical-research` | Xác thực giả định về thị trường, kỹ thuật hoặc miền nghiệp vụ | Kết quả nghiên cứu | +| `bmad-product-brief` | Ghi lại tầm nhìn chiến lược — phù hợp nhất khi concept của bạn đã rõ | `product-brief.md` | +| `bmad-prfaq` | Working Backwards — stress-test và rèn sắc concept sản phẩm của bạn | `prfaq-{project}.md` | + +## Phase 2: Planning + +Xác định cần xây gì và xây cho ai. + +| Workflow | Mục đích | Tạo ra | +| --------------------------- | ---------------------------------------- | ------------ | +| `bmad-create-prd` | Xác định yêu cầu (FR/NFR) | `PRD.md` | +| `bmad-create-ux-design` | Thiết kế trải nghiệm người dùng khi UX là yếu tố quan trọng | `ux-spec.md` | + +## Phase 3: Solutioning + +Quyết định cách xây và chia nhỏ công việc thành stories. + +| Workflow | Mục đích | Tạo ra | +| ----------------------------------------- | ------------------------------------------ | --------------------------- | +| `bmad-create-architecture` | Làm rõ các quyết định kỹ thuật | `architecture.md` kèm ADR | +| `bmad-create-epics-and-stories` | Phân rã yêu cầu thành các phần việc có thể triển khai | Các file epic chứa stories | +| `bmad-check-implementation-readiness` | Cổng kiểm tra trước khi triển khai | Quyết định PASS/CONCERNS/FAIL | + +## Phase 4: Implementation + +Xây dựng từng story một. Tự động hóa toàn bộ phase 4 sẽ sớm ra mắt. + +| Workflow | Mục đích | Tạo ra | +| -------------------------- | ------------------------------------------------------------------------ | -------------------------------- | +| `bmad-sprint-planning` | Khởi tạo theo dõi, thường chạy một lần mỗi dự án để sắp thứ tự chu trình dev | `sprint-status.yaml` | +| `bmad-create-story` | Chuẩn bị story tiếp theo cho implementation | `story-[slug].md` | +| `bmad-dev-story` | Triển khai story | Code chạy được + tests | +| `bmad-code-review` | Kiểm tra chất lượng phần triển khai | Được duyệt hoặc yêu cầu thay đổi | +| `bmad-correct-course` | Xử lý thay đổi lớn giữa sprint | Kế hoạch cập nhật hoặc định tuyến lại | +| `bmad-sprint-status` | Theo dõi tiến độ sprint và trạng thái story | Cập nhật trạng thái sprint | +| `bmad-retrospective` | Review sau khi hoàn tất epic | Bài học rút ra | + +## Quick Flow (Nhánh Song Song) + +Bỏ qua phase 1-3 đối với những việc nhỏ, rõ và đã hiểu đầy đủ. + +| Workflow | Mục đích | Tạo ra | +| ------------------ | --------------------------------------------------------------------------- | ---------------------- | +| `bmad-quick-dev` | Luồng nhanh hợp nhất — làm rõ yêu cầu, lập kế hoạch, triển khai, review và trình bày | `spec-*.md` + mã nguồn | + +## Quản Lý Context + +Mỗi tài liệu sẽ trở thành context cho phase tiếp theo. PRD cho architect biết những ràng buộc nào quan trọng. Architecture chỉ cho dev agent những pattern cần tuân theo. File story cung cấp context tập trung và đầy đủ cho việc triển khai. Nếu không có cấu trúc này, agent sẽ đưa ra quyết định thiếu nhất quán. + +### Project Context + +:::tip[Khuyến nghị] +Hãy tạo `project-context.md` để bảo đảm AI agent tuân theo quy tắc và sở thích của dự án. File này hoạt động như một bản hiến pháp cho dự án của bạn, nó dẫn dắt các quyết định triển khai xuyên suốt mọi workflow. File tùy chọn này có thể được tạo ở cuối bước Architecture Creation, hoặc cũng có thể được sinh trong dự án hiện hữu để ghi lại những điều quan trọng cần giữ đồng bộ với quy ước đang có. +::: + +**Cách tạo:** + +- **Thủ công** — Tạo `_bmad-output/project-context.md` với stack công nghệ và các quy tắc triển khai của bạn +- **Tự sinh** — Chạy `bmad-generate-project-context` để sinh tự động từ architecture hoặc codebase + +[**Tìm hiểu thêm về project-context.md**](../explanation/project-context.md) diff --git a/docs/vi-vn/roadmap.mdx b/docs/vi-vn/roadmap.mdx new file mode 100644 index 000000000..5a394d0e3 --- /dev/null +++ b/docs/vi-vn/roadmap.mdx @@ -0,0 +1,136 @@ +--- +title: Lộ trình +description: Điều gì sẽ đến tiếp theo với BMad - tính năng mới, cải tiến và đóng góp từ cộng đồng +--- + +# Lộ Trình Công Khai Của BMad Method + +BMad Method, BMad Method Module (BMM) và BMad Builder (BMB) đang tiếp tục phát triển. Đây là những gì chúng tôi đang thực hiện và sắp ra mắt. + +
+ +

Đang triển khai

+ +
+
+ 🧩 +

Kiến Trúc Skills Phổ Quát

+

Một skill, dùng trên mọi nền tảng. Viết một lần, chạy ở khắp nơi.

+
+
+ 🏗️ +

BMad Builder v1

+

Tạo AI agent và workflow sẵn sàng cho production với evals, teams và graceful degradation được tích hợp sẵn.

+
+
+ 🧠 +

Hệ Thống Project Context

+

AI thực sự hiểu dự án của bạn. Ngữ cảnh nhận biết framework và phát triển cùng codebase của bạn.

+
+
+ 📦 +

Skills Tập Trung

+

Cài một lần, dùng ở mọi nơi. Chia sẻ skills giữa các dự án mà không làm rối file.

+
+
+ 🔄 +

Skills Thích Ứng

+

Skills hiểu công cụ bạn đang dùng. Biến thể tối ưu cho Claude, Codex, Kimi, OpenCode và nhiều công cụ khác.

+
+
+ 📝 +

Blog BMad Team Pros

+

Các bài hướng dẫn, bài viết và góc nhìn từ đội ngũ. Sắp ra mắt.

+
+
+ +

Dành cho người mới bắt đầu

+ +
+
+ 🏪 +

Chợ Skills

+

Khám phá, cài đặt và cập nhật skills do cộng đồng xây dựng. Chỉ cần một lệnh curl là có thêm siêu năng lực.

+
+
+ 🎨 +

Tùy Biến Workflow

+

Biến nó thành của riêng bạn. Tích hợp Jira, Linear, output tùy chỉnh: workflow của bạn, luật của bạn.

+
+
+ 🚀 +

Tối Ưu Hóa Phase 1-3

+

Lập kế hoạch cực nhanh với cơ chế thu thập context bằng sub-agent. YOLO mode kết hợp với hướng dẫn có kiểm soát.

+
+
+ 🌐 +

Sẵn Sàng Cho Doanh Nghiệp

+

SSO, audit logs, team workspaces. Toàn bộ phần “không hào nhoáng” nhưng khiến doanh nghiệp yên tâm triển khai.

+
+
+ 💎 +

Bùng Nổ Module Cộng Đồng

+

Giải trí, bảo mật, trị liệu, roleplay và nhiều hơn nữa. Mở rộng nền tảng BMad Method.

+
+
+ +

Tự Động Hóa Dev Loop

+

Chế độ autopilot tùy chọn cho phát triển phần mềm. Để AI xử lý flow trong khi vẫn giữ chất lượng ở mức cao.

+
+
+ +

Cộng đồng và đội ngũ

+ +
+
+ 🎙️ +

Podcast The BMad Method

+

Các cuộc trò chuyện về phát triển phần mềm AI-native. Ra mắt ngày 1 tháng 3 năm 2026.

+
+
+ 🎓 +

Lớp Master Class The BMad Method

+

Đi từ người dùng thành chuyên gia. Đào sâu vào từng phase, từng workflow và từng bí quyết.

+
+
+ 🏗️ +

Lớp Master Class BMad Builder

+

Tự xây agent của riêng bạn. Kỹ thuật nâng cao cho lúc bạn đã sẵn sàng tạo ra thứ mới, không chỉ sử dụng.

+
+
+ +

BMad Prototype First

+

Từ ý tưởng đến prototype chạy được chỉ trong một phiên làm việc. Tạo ứng dụng mơ ước của bạn như một tác phẩm thủ công tinh chỉnh.

+
+
+ 🌴 +

BMad BALM!

+

Quản trị cuộc sống cho người dùng AI-native. Tasks, habits, goals: AI copilot của bạn cho mọi thứ.

+
+
+ 🖥️ +

Giao Diện Chính Thức

+

Một giao diện đẹp cho toàn bộ hệ sinh thái BMad. Sức mạnh của CLI, độ hoàn thiện của GUI.

+
+
+ 🔒 +

BMad in a Box

+

Tự host, air-gapped, chuẩn doanh nghiệp. Trợ lý AI của bạn, hạ tầng của bạn, quyền kiểm soát của bạn.

+
+
+ +
+

Muốn đóng góp?

+

+ Đây mới chỉ là một phần của những gì đang được lên kế hoạch. Đội ngũ mã nguồn mở BMad luôn chào đón contributor!
+ Tham gia cùng chúng tôi trên GitHub để cùng định hình tương lai của phát triển phần mềm hướng AI. +

+

+ Nếu bạn thích những gì chúng tôi đang xây dựng, chúng tôi trân trọng cả hỗ trợ một lần lẫn hàng tháng. +

+

+ Với tài trợ doanh nghiệp, hợp tác, diễn thuyết, đào tạo hoặc liên hệ truyền thông:{" "} + contact@bmadcode.com +

+
+
diff --git a/docs/vi-vn/tutorials/getting-started.md b/docs/vi-vn/tutorials/getting-started.md new file mode 100644 index 000000000..004a9eacf --- /dev/null +++ b/docs/vi-vn/tutorials/getting-started.md @@ -0,0 +1,276 @@ +--- +title: "Bắt đầu" +description: Cài đặt BMad và xây dựng dự án đầu tiên của bạn +--- + +Xây dựng phần mềm nhanh hơn bằng các workflow vận hành bởi AI, với những agent chuyên biệt hướng dẫn bạn qua các bước lập kế hoạch, kiến trúc và triển khai. + +## Bạn Sẽ Học Được Gì + +- Cài đặt và khởi tạo BMad Method cho một dự án mới +- Dùng **BMad-Help** — trợ lý thông minh biết bước tiếp theo bạn nên làm gì +- Chọn nhánh lập kế hoạch phù hợp với quy mô dự án +- Đi qua các phase từ yêu cầu đến code chạy được +- 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 +- **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 +::: + +:::tip[Cách Dễ Nhất] +**Cài đặt** → `npx bmad-method install` +**Hỏi** → `bmad-help what should I do first?` +**Xây dựng** → Để BMad-Help dẫn bạn qua từng workflow +::: + +## Làm Quen Với BMad-Help: Người Dẫn Đường Thông Minh Của Bạn + +**BMad-Help là cách nhanh nhất để bắt đầu với BMad.** Bạn không cần phải nhớ workflow hay phase nào cả, chỉ cần hỏi, và BMad-Help sẽ: + +- **Kiểm tra dự án của bạn** để xem những gì đã hoàn thành +- **Hiển thị các lựa chọn** dựa trên những module bạn đã cài +- **Đề xuất bước tiếp theo** — bao gồm cả tác vụ bắt buộc đầu tiên +- **Trả lời câu hỏi** như “Tôi có ý tưởng cho một sản phẩm SaaS, tôi nên bắt đầu từ đâu?” + +### Cách Dùng BMad-Help + +Chạy trong AI IDE của bạn bằng cách gọi skill: + +```text +bmad-help +``` + +Hoặc ghép cùng câu hỏi để nhận hướng dẫn có ngữ cảnh: + +```text +bmad-help I have an idea for a SaaS product, I already know all the features I want. where do I get started? +``` + +BMad-Help sẽ trả lời: +- Điều gì được khuyến nghị trong tình huống của bạn +- Tác vụ bắt buộc đầu tiên là gì +- Phần còn lại của quy trình sẽ trông như thế nào + +### Nó Cũng Điều Khiển Workflow + +BMad-Help không chỉ trả lời câu hỏi — **nó còn tự động chạy ở cuối mỗi workflow** để cho bạn biết chính xác bước tiếp theo cần làm là gì. Không phải đoán, không phải lục tài liệu, chỉ có chỉ dẫn rõ ràng về workflow bắt buộc tiếp theo. + +:::tip[Bắt Đầu Từ Đây] +Sau khi cài BMad, hãy gọi skill `bmad-help` ngay. Nó sẽ nhận biết các module bạn đã cài và hướng bạn đến điểm bắt đầu phù hợp cho dự án. +::: + +## Hiểu Về BMad + +BMad giúp bạn xây dựng phần mềm thông qua các workflow có hướng dẫn với những AI agent chuyên biệt. Quy trình gồm bốn phase: + +| Phase | Tên | Điều xảy ra | +| ----- | -------------- | --------------------------------------------------- | +| 1 | Analysis | Brainstorming, nghiên cứu, product brief hoặc PRFAQ *(tùy chọn)* | +| 2 | Planning | Tạo tài liệu yêu cầu (PRD hoặc spec) | +| 3 | Solutioning | Thiết kế kiến trúc *(chỉ dành cho BMad Method/Enterprise)* | +| 4 | Implementation | Xây dựng theo từng epic, từng story | + +**[Mở Workflow Map](../reference/workflow-map.md)** để khám phá các phase, workflow và cách quản lý context. + +Dựa trên độ phức tạp của dự án, BMad cung cấp ba nhánh lập kế hoạch: + +| Nhánh | Phù hợp nhất với | Tài liệu được tạo | +| --------------- | ------------------------------------------------------ | -------------------------------------- | +| **Quick Flow** | Sửa lỗi, tính năng đơn giản, phạm vi rõ ràng (1-15 story) | Chỉ spec | +| **BMad Method** | Sản phẩm, nền tảng, tính năng phức tạp (10-50+ story) | PRD + Architecture + UX | +| **Enterprise** | Yêu cầu tuân thủ, hệ thống đa tenant (30+ story) | PRD + Architecture + Security + DevOps | + +:::note +Số lượng story chỉ là gợi ý, không phải định nghĩa cứng. Hãy chọn nhánh dựa trên nhu cầu lập kế hoạch, không phải phép đếm story. +::: + +## Cài Đặt + +Mở terminal trong thư mục dự án và chạy: + +```bash +npx bmad-method install +``` + +Nếu bạn muốn dùng bản prerelease mới nhất thay vì kênh release mặc định, hãy dùng `npx bmad-method@next install`. + +Khi được hỏi chọn module, hãy chọn **BMad Method**. + +Trình cài đặt sẽ tạo hai thư mục: +- `_bmad/` — agents, workflows, tasks và cấu hình +- `_bmad-output/` — hiện tại để trống, nhưng đây là nơi các artifact của bạn sẽ được lưu + +:::tip[Bước Tiếp Theo Của Bạn] +Mở AI IDE trong thư mục dự án rồi chạy: + +```text +bmad-help +``` + +BMad-Help sẽ nhận biết bạn đã làm đến đâu và đề xuất chính xác bước tiếp theo. Bạn cũng có thể hỏi những câu như “Tôi có những lựa chọn nào?” hoặc “Tôi có ý tưởng SaaS, nên bắt đầu từ đâu?” +::: + +:::note[Cách Nạp Agent Và Chạy Workflow] +Mỗi workflow có một **skill** được gọi bằng tên trong IDE của bạn, ví dụ `bmad-create-prd`. Công cụ AI sẽ nhận diện tên `bmad-*` và chạy nó, bạn không cần nạp agent riêng. Bạn cũng có thể gọi trực tiếp skill của agent để trò chuyện tổng quát, ví dụ `bmad-agent-pm` cho PM agent. +::: + +:::caution[Chat Mới] +Luôn bắt đầu một chat mới cho mỗi workflow. Điều này tránh các vấn đề do giới hạn context gây ra. +::: + +## Bước 1: Tạo Kế Hoạch + +Đi qua các phase 1-3. **Dùng chat mới cho từng workflow.** + +:::tip[Project Context (Tùy chọn)] +Trước khi bắt đầu, hãy cân nhắc tạo `project-context.md` để ghi lại các ưu tiên kỹ thuật và quy tắc triển khai. Nhờ vậy mọi AI agent sẽ tuân theo cùng một quy ước trong suốt dự án. + +Bạn có thể tạo thủ công tại `_bmad-output/project-context.md` hoặc sinh ra sau phần kiến trúc bằng `bmad-generate-project-context`. [Xem thêm](../explanation/project-context.md). +::: + +### Phase 1: Analysis (Tùy chọn) + +Tất cả workflow trong phase này đều là tùy chọn. [**Chưa chắc nên dùng cái nào?**](../explanation/analysis-phase.md) +- **brainstorming** (`bmad-brainstorming`) — Gợi ý ý tưởng có hướng dẫn +- **research** (`bmad-market-research` / `bmad-domain-research` / `bmad-technical-research`) — Nghiên cứu thị trường, miền nghiệp vụ và kỹ thuật +- **product-brief** (`bmad-product-brief`) — Tài liệu nền tảng được khuyến nghị khi concept của bạn đã rõ +- **prfaq** (`bmad-prfaq`) — Bài kiểm tra Working Backwards để stress-test và rèn sắc concept sản phẩm của bạn + +### Phase 2: Planning (Bắt buộc) + +**Với nhánh BMad Method và Enterprise:** +1. Gọi **PM agent** (`bmad-agent-pm`) trong một chat mới +2. Chạy workflow `bmad-create-prd` (`bmad-create-prd`) +3. Kết quả: `PRD.md` + +**Với nhánh Quick Flow:** +- Chạy `bmad-quick-dev` — workflow này gộp cả planning và implementation trong một lần, nên bạn có thể chuyển thẳng sang triển khai + +:::note[Thiết kế UX (Tùy chọn)] +Nếu dự án của bạn có giao diện người dùng, hãy gọi **UX-Designer agent** (`bmad-agent-ux-designer`) và chạy workflow thiết kế UX (`bmad-create-ux-design`) sau khi tạo PRD. +::: + +### Phase 3: Solutioning (BMad Method/Enterprise) + +**Tạo Architecture** +1. Gọi **Architect agent** (`bmad-agent-architect`) trong một chat mới +2. Chạy `bmad-create-architecture` (`bmad-create-architecture`) +3. Kết quả: tài liệu kiến trúc chứa các quyết định kỹ thuật + +**Tạo Epics và Stories** + +:::tip[Cải tiến trong V6] +Epics và stories giờ được tạo *sau* kiến trúc. Điều này giúp story có chất lượng tốt hơn vì các quyết định kiến trúc như database, API pattern và tech stack ảnh hưởng trực tiếp đến cách chia nhỏ công việc. +::: + +1. Gọi **PM agent** (`bmad-agent-pm`) trong một chat mới +2. Chạy `bmad-create-epics-and-stories` (`bmad-create-epics-and-stories`) +3. Workflow sẽ dùng cả PRD lẫn Architecture để tạo story có đủ ngữ cảnh kỹ thuật + +**Kiểm tra mức sẵn sàng để triển khai** *(Rất nên dùng)* +1. Gọi **Architect agent** (`bmad-agent-architect`) trong một chat mới +2. Chạy `bmad-check-implementation-readiness` (`bmad-check-implementation-readiness`) +3. Xác nhận tính nhất quán giữa toàn bộ tài liệu lập kế hoạch + +## Bước 2: Xây Dựng Dự Án + +Sau khi lập kế hoạch xong, chuyển sang implementation. **Mỗi workflow nên chạy trong một chat mới.** + +### Khởi Tạo Sprint Planning + +Gọi **SM agent** (`bmad-agent-sm`) và chạy `bmad-sprint-planning` (`bmad-sprint-planning`). Workflow này sẽ tạo `sprint-status.yaml` để theo dõi toàn bộ epic và story. + +### Chu Trình Xây Dựng + +Với mỗi story, lặp lại chu trình này trong chat mới: + +| Bước | Agent | Workflow | Lệnh | Mục đích | +| ---- | ----- | -------------- | -------------------------- | ---------------------------------- | +| 1 | SM | `bmad-create-story` | `bmad-create-story` | Tạo file story từ epic | +| 2 | DEV | `bmad-dev-story` | `bmad-dev-story` | Triển khai story | +| 3 | DEV | `bmad-code-review` | `bmad-code-review` | Kiểm tra chất lượng *(khuyến nghị)* | + +Sau khi hoàn tất tất cả story trong một epic, hãy gọi **SM agent** (`bmad-agent-sm`) và chạy `bmad-retrospective` (`bmad-retrospective`). + +## Bạn Đã Hoàn Thành Những Gì + +Bạn đã nắm được nền tảng để xây dựng với BMad: + +- Đã cài BMad và cấu hình cho IDE của bạn +- Đã khởi tạo dự án theo nhánh lập kế hoạch phù hợp +- Đã tạo các tài liệu lập kế hoạch (PRD, Architecture, Epics và Stories) +- Đã hiểu chu trình triển khai trong implementation + +Dự án của bạn bây giờ sẽ có dạng: + +```text +your-project/ +├── _bmad/ # Cấu hình BMad +├── _bmad-output/ +│ ├── planning-artifacts/ +│ │ ├── PRD.md # Tài liệu yêu cầu của bạn +│ │ ├── architecture.md # Các quyết định kỹ thuật +│ │ └── epics/ # Các file epic và story +│ ├── implementation-artifacts/ +│ │ └── sprint-status.yaml # Theo dõi sprint +│ └── project-context.md # Quy tắc triển khai (tùy chọn) +└── ... +``` + +## Tra Cứu Nhanh + +| Workflow | Lệnh | Agent | Mục đích | +| ------------------------------------- | ------------------------------------------ | --------- | ----------------------------------------------- | +| **`bmad-help`** ⭐ | `bmad-help` | Bất kỳ | **Người dẫn đường thông minh của bạn — hỏi gì cũng được!** | +| `bmad-create-prd` | `bmad-create-prd` | PM | Tạo tài liệu yêu cầu sản phẩm | +| `bmad-create-architecture` | `bmad-create-architecture` | Architect | Tạo tài liệu kiến trúc | +| `bmad-generate-project-context` | `bmad-generate-project-context` | Analyst | Tạo file project context | +| `bmad-create-epics-and-stories` | `bmad-create-epics-and-stories` | PM | Phân rã PRD thành epics | +| `bmad-check-implementation-readiness` | `bmad-check-implementation-readiness` | Architect | Kiểm tra độ nhất quán của kế hoạch | +| `bmad-sprint-planning` | `bmad-sprint-planning` | SM | Khởi tạo theo dõi sprint | +| `bmad-create-story` | `bmad-create-story` | SM | Tạo file story | +| `bmad-dev-story` | `bmad-dev-story` | DEV | Triển khai một story | +| `bmad-code-review` | `bmad-code-review` | DEV | Review phần code đã triển khai | + +## Câu Hỏi Thường Gặp + +**Lúc nào cũng cần kiến trúc à?** +Chỉ với nhánh BMad Method và Enterprise. Quick Flow bỏ qua bước kiến trúc và chuyển thẳng từ spec sang implementation. + +**Tôi có thể đổi kế hoạch về sau không?** +Có. SM agent có workflow `bmad-correct-course` (`bmad-correct-course`) để xử lý thay đổi phạm vi. + +**Nếu tôi muốn brainstorming trước thì sao?** +Gọi Analyst agent (`bmad-agent-analyst`) và chạy `bmad-brainstorming` (`bmad-brainstorming`) trước khi bắt đầu PRD. + +**Tôi có cần tuân theo đúng thứ tự tuyệt đối không?** +Không hẳn. Khi đã quen flow, bạn có thể chạy workflow trực tiếp bằng bảng Tra Cứu Nhanh ở trên. + +## Nhận Hỗ Trợ + +:::tip[Điểm Dừng Đầu Tiên: BMad-Help] +**Hãy gọi `bmad-help` bất cứ lúc nào** — đây là cách nhanh nhất để gỡ vướng. Bạn có thể hỏi: +- "Tôi nên làm gì sau khi cài đặt?" +- "Tôi đang kẹt ở workflow X" +- "Tôi có những lựa chọn nào cho Y?" +- "Cho tôi xem đến giờ đã làm được gì" + +BMad-Help sẽ kiểm tra dự án, phát hiện những gì bạn đã hoàn thành và chỉ cho bạn chính xác bước cần làm tiếp theo. +::: + +- **Trong workflow** — Các agent sẽ hướng dẫn bạn bằng câu hỏi và giải thích +- **Cộng đồng** — [Discord](https://discord.gg/gk8jAdXWmj) (#bmad-method-help, #report-bugs-and-issues) + +## Những Điểm Cần Ghi Nhớ + +:::tip[Hãy Nhớ Các Điểm Này] +- **Bắt đầu với `bmad-help`** — Trợ lý thông minh hiểu dự án và các lựa chọn của bạn +- **Luôn dùng chat mới** — Mỗi workflow nên bắt đầu trong một chat riêng +- **Nhánh rất quan trọng** — Quick Flow dùng `bmad-quick-dev`; Method/Enterprise cần PRD và kiến trúc +- **BMad-Help chạy tự động** — Mỗi workflow đều kết thúc bằng hướng dẫn về bước tiếp theo +::: + +Sẵn sàng bắt đầu chưa? Hãy cài BMad, gọi `bmad-help`, và để người dẫn đường thông minh của bạn đưa bạn đi tiếp. diff --git a/website/astro.config.mjs b/website/astro.config.mjs index 1ec2cb310..a089a99a2 100644 --- a/website/astro.config.mjs +++ b/website/astro.config.mjs @@ -92,29 +92,29 @@ export default defineConfig({ // Sidebar configuration (Diataxis structure) sidebar: [ - { label: 'Welcome', translations: { 'zh-CN': '欢迎', 'fr-FR': 'Bienvenue' }, slug: 'index' }, - { label: 'Roadmap', translations: { 'zh-CN': '路线图', 'fr-FR': 'Feuille de route' }, slug: 'roadmap' }, + { label: 'Welcome', translations: { 'vi-VN': 'Chào mừng', 'zh-CN': '欢迎', 'fr-FR': 'Bienvenue' }, slug: 'index' }, + { label: 'Roadmap', translations: { 'vi-VN': 'Lộ trình', 'zh-CN': '路线图', 'fr-FR': 'Feuille de route' }, slug: 'roadmap' }, { label: 'Tutorials', - translations: { 'zh-CN': '教程', 'fr-FR': 'Tutoriels' }, + translations: { 'vi-VN': 'Hướng dẫn nhập môn', 'zh-CN': '教程', 'fr-FR': 'Tutoriels' }, collapsed: false, autogenerate: { directory: 'tutorials' }, }, { label: 'How-To Guides', - translations: { 'zh-CN': '操作指南', 'fr-FR': 'Guides pratiques' }, + translations: { 'vi-VN': 'Hướng dẫn tác vụ', 'zh-CN': '操作指南', 'fr-FR': 'Guides pratiques' }, collapsed: true, autogenerate: { directory: 'how-to' }, }, { label: 'Explanation', - translations: { 'zh-CN': '概念说明', 'fr-FR': 'Explications' }, + translations: { 'vi-VN': 'Giải thích', 'zh-CN': '概念说明', 'fr-FR': 'Explications' }, collapsed: true, autogenerate: { directory: 'explanation' }, }, { label: 'Reference', - translations: { 'zh-CN': '参考', 'fr-FR': 'Référence' }, + translations: { 'vi-VN': 'Tham chiếu', 'zh-CN': '参考', 'fr-FR': 'Référence' }, collapsed: true, autogenerate: { directory: 'reference' }, }, diff --git a/website/src/content/i18n/vi-VN.json b/website/src/content/i18n/vi-VN.json new file mode 100644 index 000000000..a395f2b83 --- /dev/null +++ b/website/src/content/i18n/vi-VN.json @@ -0,0 +1,28 @@ +{ + "skipLink.label": "Chuyển đến nội dung chính", + "search.label": "Tìm kiếm", + "search.ctrlKey": "Ctrl", + "search.cancelLabel": "Hủy", + "themeSelect.accessibleLabel": "Chọn giao diện", + "themeSelect.dark": "Tối", + "themeSelect.light": "Sáng", + "themeSelect.auto": "Tự động", + "languageSelect.accessibleLabel": "Chọn ngôn ngữ", + "menuButton.accessibleLabel": "Menu", + "sidebarNav.accessibleLabel": "Điều hướng chính", + "tableOfContents.onThisPage": "Trên trang này", + "tableOfContents.overview": "Tổng quan", + "i18n.untranslatedContent": "Nội dung này hiện chưa có bản tiếng Việt.", + "page.editLink": "Chỉnh sửa trang", + "page.lastUpdated": "Cập nhật lần cuối:", + "page.previousLink": "Trang trước", + "page.nextLink": "Trang tiếp theo", + "page.draft": "Nội dung này đang ở trạng thái nháp và sẽ không xuất hiện trong bản phát hành chính thức.", + "404.text": "Không tìm thấy trang. Hãy kiểm tra lại đường dẫn hoặc sử dụng tính năng tìm kiếm.", + "aside.note": "Ghi chú", + "aside.tip": "Mẹo", + "aside.caution": "Lưu ý", + "aside.danger": "Cảnh báo", + "fileTree.directory": "Thư mục", + "builtWithStarlight.label": "Được xây dựng với Starlight" +} diff --git a/website/src/lib/locales.mjs b/website/src/lib/locales.mjs index ef7e273e9..6b6d33512 100644 --- a/website/src/lib/locales.mjs +++ b/website/src/lib/locales.mjs @@ -15,6 +15,10 @@ export const locales = { label: 'English', lang: 'en', }, + 'vi-vn': { + label: 'Tiếng Việt', + lang: 'vi-VN', + }, 'zh-cn': { label: '简体中文', lang: 'zh-CN', From 0edcd0571fdbacafc3969872ded32b04806257b8 Mon Sep 17 00:00:00 2001 From: Alex Verkhovsky Date: Thu, 2 Apr 2026 20:46:44 -0700 Subject: [PATCH 26/26] fix(docs): correct translation fidelity issues in Vietnamese docs (#2192) Sync Vietnamese translations with current English source: - Update agent table to consolidated Developer agent architecture - Fix bmad-dev -> bmad-agent-dev skill ID references - Replace Quinn/QA agent framing with built-in QA workflow - Fix SM agent -> Developer agent in getting-started - Fix broken platform-codes.yaml URL - Add missing Validation Commands section to style guide - Fix malformed table row in style guide - Remove unsourced content additions in project-context - Fix roadmap section heading and index link format - Fix accountability softening in party-mode dialogue --- docs/vi-vn/_STYLE_GUIDE.md | 15 ++++++-- docs/vi-vn/explanation/party-mode.md | 2 +- docs/vi-vn/explanation/project-context.md | 4 +-- .../how-to/non-interactive-installation.md | 2 +- docs/vi-vn/index.md | 2 +- docs/vi-vn/reference/agents.md | 7 ++-- docs/vi-vn/reference/commands.md | 9 +++-- docs/vi-vn/reference/testing.md | 34 +++++++++---------- docs/vi-vn/roadmap.mdx | 2 +- docs/vi-vn/tutorials/getting-started.md | 12 +++---- 10 files changed, 48 insertions(+), 41 deletions(-) diff --git a/docs/vi-vn/_STYLE_GUIDE.md b/docs/vi-vn/_STYLE_GUIDE.md index 6f1976669..4cad7fda4 100644 --- a/docs/vi-vn/_STYLE_GUIDE.md +++ b/docs/vi-vn/_STYLE_GUIDE.md @@ -41,7 +41,7 @@ Chỉ dùng cho cảnh báo nghiêm trọng — mất dữ liệu, vấn đề b ### Cách dùng chuẩn -| 2 | Planning | Yêu cầu — PRD hoặc spec *(bắt buộc)* | +| Admonition | Dùng cho | | --- | --- | | `:::note[Điều kiện tiên quyết]` | Các phụ thuộc trước khi bắt đầu | | `:::tip[Lối đi nhanh]` | Tóm tắt TL;DR ở đầu tài liệu | @@ -353,7 +353,18 @@ Chỉ với nhánh BMad Method và Enterprise. Quick Flow bỏ qua để đi th ### Tôi có thể đổi kế hoạch về sau không? -Có. SM agent có workflow `bmad-correct-course` để xử lý thay đổi phạm vi. +Có. Workflow `bmad-correct-course` xử lý thay đổi phạm vi giữa chừng. **Có câu hỏi chưa được trả lời ở đây?** [Mở issue](...) hoặc hỏi trên [Discord](...). +``` + +## Các Lệnh Kiểm Tra + +Trước khi gửi thay đổi tài liệu: + +```bash +npm run docs:fix-links # Xem trước các sửa định dạng link +npm run docs:fix-links -- --write # Áp dụng các sửa +npm run docs:validate-links # Kiểm tra link tồn tại +npm run docs:build # Xác minh không có lỗi build ``` \ No newline at end of file diff --git a/docs/vi-vn/explanation/party-mode.md b/docs/vi-vn/explanation/party-mode.md index 4398a3420..cf0e07ecf 100644 --- a/docs/vi-vn/explanation/party-mode.md +++ b/docs/vi-vn/explanation/party-mode.md @@ -30,7 +30,7 @@ Cuộc trò chuyện tiếp tục lâu đến mức bạn muốn. Bạn có th **Dev:** "Tôi đã làm đúng theo tài liệu kiến trúc. Spec không tính đến race condition khi vô hiệu hóa session đồng thời." -**PM:** "Cả hai người đều bỏ sót vấn đề lớn hơn - chúng ta không xác thực đúng yêu cầu quản lý session trong PRD. Lỗi này một phần là của tôi." +**PM:** "Cả hai người đều bỏ sót vấn đề lớn hơn - chúng ta không xác thực đúng yêu cầu quản lý session trong PRD. **Lỗi này là do tôi** không bắt được sớm hơn." **TEA:** "Và tôi đáng ra phải bắt được nó trong integration test. Các kịch bản test đã không bao phủ trường hợp vô hiệu hóa đồng thời." diff --git a/docs/vi-vn/explanation/project-context.md b/docs/vi-vn/explanation/project-context.md index cfe1daca5..8763795ad 100644 --- a/docs/vi-vn/explanation/project-context.md +++ b/docs/vi-vn/explanation/project-context.md @@ -113,7 +113,7 @@ Chạy workflow `bmad-generate-project-context` sau khi bạn hoàn tất kiến bmad-generate-project-context ``` -Nó sẽ quét tài liệu kiến trúc và tệp dự án để tạo tệp `project-context.md` trong `output_folder` đã được cấu hình cho workflow. Trong nhiều dự án, đó sẽ là `_bmad-output/`, nhưng vị trí thực tế phụ thuộc vào cấu hình hiện tại của bạn. +Nó sẽ quét tài liệu kiến trúc và tệp dự án để tạo tệp context ghi lại các quyết định đã được đưa ra. ### Tạo cho dự án hiện có @@ -153,5 +153,5 @@ Tệp `project-context.md` là tài liệu sống. Hãy cập nhật khi: Bạn có thể sửa thủ công bất kỳ lúc nào, hoặc chạy lại `bmad-generate-project-context` để cập nhật sau các thay đổi lớn. :::note[Vị trí tệp] -Nếu bạn tạo thủ công, vị trí khuyến nghị là `_bmad-output/project-context.md`. Nếu bạn dùng `bmad-generate-project-context`, tệp sẽ được tạo tại `project-context.md` bên trong `output_folder` đã cấu hình. Các workflow triển khai cố ý tìm theo mẫu `**/project-context.md`, vì vậy tệp vẫn sẽ được nạp miễn là nó tồn tại ở một vị trí phù hợp trong dự án. +Vị trí mặc định là `_bmad-output/project-context.md`. Các workflow tìm tệp ở đó, đồng thời cũng kiểm tra `**/project-context.md` ở bất kỳ đâu trong dự án. ::: diff --git a/docs/vi-vn/how-to/non-interactive-installation.md b/docs/vi-vn/how-to/non-interactive-installation.md index a3cd40e1c..2ba75b7ec 100644 --- a/docs/vi-vn/how-to/non-interactive-installation.md +++ b/docs/vi-vn/how-to/non-interactive-installation.md @@ -73,7 +73,7 @@ Những ID công cụ có thể dùng với cờ `--tools`: **Khuyến dùng:** `claude-code`, `cursor` -Chạy `npx bmad-method install` một lần ở chế độ tương tác để xem danh sách đầy đủ hiện tại của các công cụ được hỗ trợ, hoặc xem [cấu hình platform codes](https://github.com/bmad-code-org/BMAD-METHOD/blob/main/tools/cli/installers/lib/ide/platform-codes.yaml). +Chạy `npx bmad-method install` một lần ở chế độ tương tác để xem danh sách đầy đủ hiện tại của các công cụ được hỗ trợ, hoặc xem [cấu hình platform codes](https://github.com/bmad-code-org/BMAD-METHOD/blob/main/tools/installer/ide/platform-codes.yaml). ## Các chế độ cài đặt diff --git a/docs/vi-vn/index.md b/docs/vi-vn/index.md index f4c483edb..97afa4d49 100644 --- a/docs/vi-vn/index.md +++ b/docs/vi-vn/index.md @@ -8,7 +8,7 @@ BMad Method (**B**uild **M**ore **A**rchitect **D**reams) là một framework ph Nếu bạn đã quen làm việc với các trợ lý AI cho lập trình như Claude, Cursor, hoặc GitHub Copilot, bạn có thể bắt đầu ngay. :::note[🚀 V6 đã ra mắt và chúng tôi mới chỉ bắt đầu!] -Kiến trúc Skills, BMad Builder v1, Dev Loop Automation, và nhiều thứ khác nữa đang được phát triển. **[Xem Roadmap →](./roadmap.mdx)** +Kiến trúc Skills, BMad Builder v1, Dev Loop Automation, và nhiều thứ khác nữa đang được phát triển. **[Xem Roadmap →](/vi-vn/roadmap/)** ::: ## Mới bắt đầu? Hãy xem một Tutorial trước diff --git a/docs/vi-vn/reference/agents.md b/docs/vi-vn/reference/agents.md index 2d5eac166..779ae9a30 100644 --- a/docs/vi-vn/reference/agents.md +++ b/docs/vi-vn/reference/agents.md @@ -13,17 +13,14 @@ Trang này liệt kê các agent mặc định của BMM (bộ Agile suite) đư - Mỗi agent đều có sẵn dưới dạng một skill do trình cài đặt tạo ra. Skill ID, ví dụ `bmad-dev`, được dùng để gọi agent. - Trigger là các mã menu ngắn, ví dụ `CP`, cùng với các fuzzy match hiển thị trong menu của từng agent. -- QA (Quinn) là agent tự động hóa kiểm thử gọn nhẹ trong BMM. Test Architect (TEA) đầy đủ nằm trong một module riêng. +- Việc tạo test QA do workflow skill `bmad-qa-generate-e2e-tests` đảm nhận, khả dụng thông qua Developer agent. Module Test Architect (TEA) đầy đủ nằm trong một module riêng. | Agent | Skill ID | Trigger | Workflow chính | | --------------------------- | -------------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------- | | Analyst (Mary) | `bmad-analyst` | `BP`, `RS`, `CB`, `WB`, `DP` | Brainstorm Project, Research, Create Brief, PRFAQ Challenge, Document Project | | Product Manager (John) | `bmad-pm` | `CP`, `VP`, `EP`, `CE`, `IR`, `CC` | Create/Validate/Edit PRD, Create Epics and Stories, Implementation Readiness, Correct Course | | Architect (Winston) | `bmad-architect` | `CA`, `IR` | Create Architecture, Implementation Readiness | -| Scrum Master (Bob) | `bmad-sm` | `SP`, `CS`, `ER`, `CC` | Sprint Planning, Create Story, Epic Retrospective, Correct Course | -| Developer (Amelia) | `bmad-dev` | `DS`, `CR` | Dev Story, Code Review | -| QA Engineer (Quinn) | `bmad-qa` | `QA` | Automate (tạo test cho tính năng hiện có) | -| Quick Flow Solo Dev (Barry) | `bmad-master` | `QD`, `CR` | Quick Dev, Code Review | +| Developer (Amelia) | `bmad-agent-dev` | `DS`, `QD`, `QA`, `CR`, `SP`, `CS`, `ER` | Dev Story, Quick Dev, QA Test Generation, Code Review, Sprint Planning, Create Story, Epic Retrospective | | UX Designer (Sally) | `bmad-ux-designer` | `CU` | Create UX Design | | Technical Writer (Paige) | `bmad-tech-writer` | `DP`, `WD`, `US`, `MG`, `VD`, `EC` | Document Project, Write Document, Update Standards, Mermaid Generate, Validate Doc, Explain Concept | diff --git a/docs/vi-vn/reference/commands.md b/docs/vi-vn/reference/commands.md index dd1d93a84..3a3a18d78 100644 --- a/docs/vi-vn/reference/commands.md +++ b/docs/vi-vn/reference/commands.md @@ -54,12 +54,12 @@ Mỗi skill là một thư mục chứa file `SKILL.md`. Ví dụ với Claude C │ └── SKILL.md ├── bmad-create-prd/ │ └── SKILL.md -├── bmad-dev/ +├── bmad-agent-dev/ │ └── SKILL.md └── ... ``` -Tên thư mục quyết định tên skill trong IDE. Ví dụ thư mục `bmad-dev/` sẽ đăng ký skill `bmad-dev`. +Tên thư mục quyết định tên skill trong IDE. Ví dụ thư mục `bmad-agent-dev/` sẽ đăng ký skill `bmad-agent-dev`. ## Cách Tìm Danh Sách Skill Của Bạn @@ -79,10 +79,9 @@ Agent skills nạp một persona AI chuyên biệt với vai trò, phong cách g | Ví dụ skill | Agent | Vai trò | | --- | --- | --- | -| `bmad-dev` | Amelia (Developer) | Triển khai story với mức tuân thủ đặc tả nghiêm ngặt | +| `bmad-agent-dev` | Amelia (Developer) | Triển khai story với mức tuân thủ đặc tả nghiêm ngặt | | `bmad-pm` | John (Product Manager) | Tạo và kiểm tra PRD | | `bmad-architect` | Winston (Architect) | Thiết kế kiến trúc hệ thống | -| `bmad-sm` | Bob (Scrum Master) | Quản lý sprint và story | Xem [Agents](./agents.md) để biết danh sách đầy đủ các agent mặc định và trigger của chúng. @@ -125,7 +124,7 @@ Module lõi có 11 công cụ tích hợp sẵn — review, nén tài liệu, br ## Quy Ước Đặt Tên -Mọi skill đều dùng tiền tố `bmad-` theo sau là tên mô tả, ví dụ `bmad-dev`, `bmad-create-prd`, `bmad-help`. Xem [Modules](./modules.md) để biết các module hiện có. +Mọi skill đều dùng tiền tố `bmad-` theo sau là tên mô tả, ví dụ `bmad-agent-dev`, `bmad-create-prd`, `bmad-help`. Xem [Modules](./modules.md) để biết các module hiện có. ## Khắc Phục Sự Cố diff --git a/docs/vi-vn/reference/testing.md b/docs/vi-vn/reference/testing.md index a48e9afcb..11b1acbb4 100644 --- a/docs/vi-vn/reference/testing.md +++ b/docs/vi-vn/reference/testing.md @@ -1,15 +1,15 @@ --- title: Các Tùy Chọn Kiểm Thử -description: So sánh QA agent tích hợp sẵn (Quinn) với module Test Architect (TEA) cho tự động hóa kiểm thử. +description: So sánh workflow QA tích hợp sẵn với module Test Architect (TEA) cho tự động hóa kiểm thử. sidebar: order: 5 --- -BMad cung cấp hai hướng kiểm thử: QA agent tích hợp sẵn để tạo test nhanh và module Test Architect có thể cài thêm cho chiến lược kiểm thử cấp doanh nghiệp. +BMad cung cấp hai hướng kiểm thử: workflow QA tích hợp sẵn để tạo test nhanh và module Test Architect có thể cài thêm cho chiến lược kiểm thử c��p doanh nghiệp. ## Nên Dùng Cái Nào? -| Yếu tố | Quinn (QA tích hợp sẵn) | Module TEA | +| Yếu tố | QA tích hợp sẵn | Module TEA | | --- | --- | --- | | **Phù hợp nhất với** | Dự án nhỏ-trung bình, cần bao phủ nhanh | Dự án lớn, miền nghiệp vụ bị ràng buộc hoặc phức tạp | | **Thiết lập** | Không cần cài thêm, đã có sẵn trong BMM | Cài riêng qua `npx bmad-method install` | @@ -18,19 +18,19 @@ BMad cung cấp hai hướng kiểm thử: QA agent tích hợp sẵn để tạ | **Chiến lược** | Happy path + edge case quan trọng | Ưu tiên theo rủi ro (P0-P3) | | **Số workflow** | 1 (Automate) | 9 (design, ATDD, automate, review, trace và các workflow khác) | -:::tip[Bắt đầu với Quinn] -Phần lớn dự án nên bắt đầu với Quinn. Nếu sau này bạn cần chiến lược kiểm thử, quality gate hoặc truy vết yêu cầu, hãy cài TEA song song. +:::tip[Bắt đầu với QA tích h��p sẵn] +Phần lớn dự án nên bắt đầu với workflow QA tích hợp sẵn. Nếu sau này bạn cần chiến lược kiểm thử, quality gate hoặc truy vết yêu cầu, hãy cài TEA song song. ::: -## QA Agent Tích Hợp Sẵn (Quinn) +## Workflow QA Tích Hợp Sẵn -Quinn là QA agent tích hợp sẵn trong module BMM (Agile suite). Nó tạo test chạy được rất nhanh bằng framework kiểm thử hiện có của dự án, không cần thêm cấu hình hay bước cài đặt bổ sung. +Workflow QA tích hợp sẵn (`bmad-qa-generate-e2e-tests`) nằm trong module BMM (Agile suite), khả dụng thông qua Developer agent. Nó tạo test chạy được rất nhanh bằng framework kiểm thử hiện có của dự án, không cần thêm cấu hình hay bước cài đặt bổ sung. -**Trigger:** `QA` hoặc `bmad-qa-generate-e2e-tests` +**Trigger:** `QA` (thông qua Developer agent) hoặc `bmad-qa-generate-e2e-tests` -### Quinn Làm Gì +### Workflow Làm Gì -Quinn chạy một workflow duy nhất là Automate, gồm năm bước: +Workflow QA (Automate) gồm năm bước: 1. **Phát hiện framework test** — quét `package.json` và các file test hiện có để nhận ra framework của bạn như Jest, Vitest, Playwright, Cypress hoặc bất kỳ runner tiêu chuẩn nào. Nếu chưa có gì, nó sẽ phân tích stack dự án và đề xuất một lựa chọn. 2. **Xác định tính năng** — hỏi cần kiểm thử phần nào hoặc tự khám phá các tính năng trong codebase. @@ -38,7 +38,7 @@ Quinn chạy một workflow duy nhất là Automate, gồm năm bước: 4. **Tạo E2E tests** — bao phủ workflow người dùng bằng semantic locator và assertion trên kết quả nhìn thấy được. 5. **Chạy và xác minh** — thực thi test vừa tạo và sửa lỗi hỏng ngay lập tức. -Quinn tạo một bản tóm tắt kiểm thử và lưu nó vào thư mục implementation artifacts của dự án. +Workflow tạo một bản tóm tắt kiểm thử và lưu nó vào thư mục implementation artifacts của dự án. ### Mẫu Kiểm Thử @@ -51,10 +51,10 @@ Các test được tạo theo triết lý “đơn giản và dễ bảo trì” - **Mô tả rõ ràng** để test cũng đóng vai trò tài liệu tính năng :::note[Phạm vi] -Quinn chỉ tạo test. Nếu bạn cần code review hoặc xác nhận story, hãy dùng workflow Code Review (`CR`) thay vì Quinn. +Workflow QA chỉ tạo test. Nếu bạn cần code review hoặc xác nhận story, hãy dùng workflow Code Review (`CR`). ::: -### Khi Nào Nên Dùng Quinn +### Khi Nào Nên Dùng QA Tích Hợp S���n - Cần bao phủ test nhanh cho một tính năng mới hoặc hiện có - Muốn tự động hóa kiểm thử thân thiện với người mới mà không cần thiết lập phức tạp @@ -91,16 +91,16 @@ TEA cũng hỗ trợ ưu tiên theo rủi ro P0-P3 và tích hợp tùy chọn v - Đội ngũ cần ưu tiên kiểm thử theo rủi ro trên nhiều tính năng - Môi trường doanh nghiệp có quality gate chính thức trước phát hành - Miền nghiệp vụ phức tạp, nơi chiến lược kiểm thử phải được lên trước khi viết test -- Dự án đã vượt quá mô hình một workflow của Quinn +- Dự án đã vượt quá mô hình một workflow của QA tích hợp sẵn ## Kiểm Thử Nằm Ở Đâu Trong Workflow -Workflow Automate của Quinn xuất hiện ở Phase 4 (Implementation) trong workflow map của BMad Method. Nó được thiết kế để chạy **sau khi hoàn tất trọn vẹn một epic** — tức là khi mọi story trong epic đó đã được triển khai và code review xong. Trình tự điển hình là: +Workflow QA Automate xuất hiện ở Phase 4 (Implementation) trong workflow map của BMad Method. Nó được thiết kế để chạy **sau khi hoàn tất trọn vẹn một epic** — tức là khi mọi story trong epic đó đã được triển khai và code review xong. Trình tự điển hình là: 1. Với mỗi story trong epic: triển khai bằng Dev (`DS`), sau đó xác nhận bằng Code Review (`CR`) -2. Sau khi epic hoàn tất: tạo test bằng Quinn (`QA`) hoặc workflow Automate của TEA +2. Sau khi epic hoàn tất: tạo test bằng `QA` (thông qua Developer agent) hoặc workflow Automate của TEA 3. Chạy retrospective (`bmad-retrospective`) để ghi nhận bài học rút ra -Quinn làm việc trực tiếp từ source code mà không cần nạp tài liệu lập kế hoạch như PRD hay architecture. Các workflow của TEA có thể tích hợp với artifact lập kế hoạch ở các bước trước để phục vụ truy vết. +Workflow QA tích hợp sẵn làm việc trực tiếp từ source code mà không cần nạp tài liệu lập kế hoạch như PRD hay architecture. Các workflow của TEA có thể tích hợp với artifact lập kế hoạch ở các bước trước để phục vụ truy vết. Để hiểu rõ hơn kiểm thử nằm ở đâu trong quy trình tổng thể, xem [Workflow Map](./workflow-map.md). diff --git a/docs/vi-vn/roadmap.mdx b/docs/vi-vn/roadmap.mdx index 5a394d0e3..1c7fd9059 100644 --- a/docs/vi-vn/roadmap.mdx +++ b/docs/vi-vn/roadmap.mdx @@ -44,7 +44,7 @@ BMad Method, BMad Method Module (BMM) và BMad Builder (BMB) đang tiếp tục

+ Mở sơ đồ trong tab mới ↗ +

-

Dành cho người mới bắt đầu

+

Mới bắt đầu

diff --git a/docs/vi-vn/tutorials/getting-started.md b/docs/vi-vn/tutorials/getting-started.md index 004a9eacf..cfd06a5d5 100644 --- a/docs/vi-vn/tutorials/getting-started.md +++ b/docs/vi-vn/tutorials/getting-started.md @@ -181,7 +181,7 @@ Sau khi lập kế hoạch xong, chuyển sang implementation. **Mỗi workflow ### Khởi Tạo Sprint Planning -Gọi **SM agent** (`bmad-agent-sm`) và chạy `bmad-sprint-planning` (`bmad-sprint-planning`). Workflow này sẽ tạo `sprint-status.yaml` để theo dõi toàn bộ epic và story. +Gọi **Developer agent** (`bmad-agent-dev`) và chạy `bmad-sprint-planning` (`bmad-sprint-planning`). Workflow này sẽ tạo `sprint-status.yaml` để theo dõi toàn bộ epic và story. ### Chu Trình Xây Dựng @@ -189,11 +189,11 @@ Với mỗi story, lặp lại chu trình này trong chat mới: | Bước | Agent | Workflow | Lệnh | Mục đích | | ---- | ----- | -------------- | -------------------------- | ---------------------------------- | -| 1 | SM | `bmad-create-story` | `bmad-create-story` | Tạo file story từ epic | +| 1 | DEV | `bmad-create-story` | `bmad-create-story` | Tạo file story từ epic | | 2 | DEV | `bmad-dev-story` | `bmad-dev-story` | Triển khai story | | 3 | DEV | `bmad-code-review` | `bmad-code-review` | Kiểm tra chất lượng *(khuyến nghị)* | -Sau khi hoàn tất tất cả story trong một epic, hãy gọi **SM agent** (`bmad-agent-sm`) và chạy `bmad-retrospective` (`bmad-retrospective`). +Sau khi hoàn tất tất cả story trong một epic, hãy gọi **Developer agent** (`bmad-agent-dev`) và chạy `bmad-retrospective` (`bmad-retrospective`). ## Bạn Đã Hoàn Thành Những Gì @@ -230,8 +230,8 @@ your-project/ | `bmad-generate-project-context` | `bmad-generate-project-context` | Analyst | Tạo file project context | | `bmad-create-epics-and-stories` | `bmad-create-epics-and-stories` | PM | Phân rã PRD thành epics | | `bmad-check-implementation-readiness` | `bmad-check-implementation-readiness` | Architect | Kiểm tra độ nhất quán của kế hoạch | -| `bmad-sprint-planning` | `bmad-sprint-planning` | SM | Khởi tạo theo dõi sprint | -| `bmad-create-story` | `bmad-create-story` | SM | Tạo file story | +| `bmad-sprint-planning` | `bmad-sprint-planning` | DEV | Khởi tạo theo dõi sprint | +| `bmad-create-story` | `bmad-create-story` | DEV | Tạo file story | | `bmad-dev-story` | `bmad-dev-story` | DEV | Triển khai một story | | `bmad-code-review` | `bmad-code-review` | DEV | Review phần code đã triển khai | @@ -241,7 +241,7 @@ your-project/ Chỉ với nhánh BMad Method và Enterprise. Quick Flow bỏ qua bước kiến trúc và chuyển thẳng từ spec sang implementation. **Tôi có thể đổi kế hoạch về sau không?** -Có. SM agent có workflow `bmad-correct-course` (`bmad-correct-course`) để xử lý thay đổi phạm vi. +Có. Workflow `bmad-correct-course` (`bmad-correct-course`) xử lý thay đổi phạm vi giữa chừng. **Nếu tôi muốn brainstorming trước thì sao?** Gọi Analyst agent (`bmad-agent-analyst`) và chạy `bmad-brainstorming` (`bmad-brainstorming`) trước khi bắt đầu PRD.