bmad-method 6.0.4 → 6.0.5-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.augment/code_review_guidelines.yaml +2 -42
- package/.claude/skills/bmad-os-findings-triage/SKILL.md +6 -0
- package/.claude/skills/bmad-os-findings-triage/prompts/agent-prompt.md +104 -0
- package/.claude/skills/bmad-os-findings-triage/prompts/instructions.md +286 -0
- package/.claude/skills/bmad-os-review-pr/SKILL.md +1 -1
- package/.claude/skills/bmad-os-review-pr/prompts/instructions.md +63 -6
- package/.claude/skills/bmad-os-review-prompt/SKILL.md +177 -0
- package/.github/workflows/publish.yaml +243 -0
- package/CONTRIBUTING.md +1 -1
- package/README_CN.md +121 -0
- package/docs/_STYLE_GUIDE.md +10 -10
- package/docs/explanation/brainstorming.md +1 -1
- package/docs/explanation/party-mode.md +1 -1
- package/docs/explanation/preventing-agent-conflicts.md +1 -1
- package/docs/explanation/project-context.md +15 -15
- package/docs/explanation/quick-flow.md +9 -9
- package/docs/how-to/established-projects.md +7 -7
- package/docs/how-to/get-answers-about-bmad.md +2 -2
- package/docs/how-to/install-bmad.md +16 -6
- package/docs/how-to/project-context.md +2 -2
- package/docs/how-to/quick-fixes.md +5 -5
- package/docs/how-to/shard-large-documents.md +1 -1
- package/docs/how-to/upgrade-to-v6.md +8 -5
- package/docs/index.md +1 -1
- package/docs/reference/agents.md +14 -14
- package/docs/reference/commands.md +64 -70
- package/docs/reference/testing.md +1 -1
- package/docs/reference/workflow-map.md +19 -19
- package/docs/tutorials/getting-started.md +34 -34
- package/docs/zh-cn/404.md +9 -0
- package/docs/zh-cn/_STYLE_GUIDE.md +370 -0
- package/docs/zh-cn/explanation/advanced-elicitation.md +62 -0
- package/docs/zh-cn/explanation/adversarial-review.md +71 -0
- package/docs/zh-cn/explanation/brainstorming.md +43 -0
- package/docs/zh-cn/explanation/established-projects-faq.md +60 -0
- package/docs/zh-cn/explanation/party-mode.md +79 -0
- package/docs/zh-cn/explanation/preventing-agent-conflicts.md +137 -0
- package/docs/zh-cn/explanation/project-context.md +176 -0
- package/docs/zh-cn/explanation/quick-flow.md +93 -0
- package/docs/zh-cn/explanation/why-solutioning-matters.md +90 -0
- package/docs/zh-cn/how-to/customize-bmad.md +182 -0
- package/docs/zh-cn/how-to/established-projects.md +134 -0
- package/docs/zh-cn/how-to/get-answers-about-bmad.md +144 -0
- package/docs/zh-cn/how-to/install-bmad.md +105 -0
- package/docs/zh-cn/how-to/non-interactive-installation.md +181 -0
- package/docs/zh-cn/how-to/project-context.md +152 -0
- package/docs/zh-cn/how-to/quick-fixes.md +140 -0
- package/docs/zh-cn/how-to/shard-large-documents.md +86 -0
- package/docs/zh-cn/how-to/upgrade-to-v6.md +120 -0
- package/docs/zh-cn/index.md +69 -0
- package/docs/zh-cn/reference/agents.md +41 -0
- package/docs/zh-cn/reference/commands.md +166 -0
- package/docs/zh-cn/reference/modules.md +94 -0
- package/docs/zh-cn/reference/testing.md +122 -0
- package/docs/zh-cn/reference/workflow-map.md +104 -0
- package/docs/zh-cn/roadmap.mdx +152 -0
- package/docs/zh-cn/tutorials/getting-started.md +300 -0
- package/package.json +1 -1
- package/src/bmm/agents/analyst.agent.yaml +1 -1
- package/src/bmm/agents/bmad-skill-manifest.yaml +39 -0
- package/src/bmm/agents/dev.agent.yaml +2 -2
- package/src/bmm/agents/pm.agent.yaml +1 -1
- package/src/bmm/agents/qa.agent.yaml +1 -1
- package/src/bmm/agents/quick-flow-solo-dev.agent.yaml +6 -2
- package/src/bmm/agents/sm.agent.yaml +4 -4
- package/src/bmm/agents/tech-writer/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/agents/tech-writer/tech-writer.agent.yaml +1 -1
- package/src/bmm/module-help.csv +11 -10
- package/src/bmm/workflows/1-analysis/create-product-brief/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-02-vision.md +1 -1
- package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-03-users.md +1 -1
- package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-04-metrics.md +1 -1
- package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-05-scope.md +1 -1
- package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-06-complete.md +1 -1
- package/src/bmm/workflows/1-analysis/research/bmad-skill-manifest.yaml +14 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/bmad-skill-manifest.yaml +14 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-02-discovery.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-02b-vision.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-02c-executive-summary.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-03-success.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-04-journeys.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-05-domain.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-06-innovation.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-07-project-type.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-08-scoping.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-09-functional.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-10-nonfunctional.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-11-polish.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-12-complete.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-e/step-e-01-discovery.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-e/step-e-02-review.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-01-discovery.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-10-smart-validation.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-11-holistic-quality-validation.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-13-report-complete.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-02-discovery.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-03-core-experience.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-04-emotional-response.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-05-inspiration.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-06-design-system.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-07-defining-experience.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-08-visual-foundation.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-09-design-directions.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-10-user-journeys.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-11-component-strategy.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-12-ux-patterns.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-13-responsive-accessibility.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-14-complete.md +1 -1
- package/src/bmm/workflows/3-solutioning/check-implementation-readiness/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-06-final-assessment.md +1 -1
- package/src/bmm/workflows/3-solutioning/create-architecture/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-02-context.md +2 -2
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-03-starter.md +2 -2
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-04-decisions.md +2 -2
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-05-patterns.md +2 -2
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-06-structure.md +2 -2
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-07-validation.md +2 -2
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-08-complete.md +1 -1
- package/src/bmm/workflows/3-solutioning/create-epics-and-stories/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-01-validate-prerequisites.md +1 -1
- package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-02-design-epics.md +1 -1
- package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-03-create-stories.md +1 -1
- package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-04-final-validation.md +2 -2
- package/src/bmm/workflows/4-implementation/code-review/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/4-implementation/code-review/discover-inputs.md +88 -0
- package/src/bmm/workflows/4-implementation/code-review/workflow.md +271 -0
- package/src/bmm/workflows/4-implementation/correct-course/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/4-implementation/correct-course/checklist.md +1 -1
- package/src/bmm/workflows/4-implementation/correct-course/{instructions.md → workflow.md} +79 -12
- package/src/bmm/workflows/4-implementation/create-story/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/4-implementation/create-story/checklist.md +9 -10
- package/src/bmm/workflows/4-implementation/create-story/discover-inputs.md +88 -0
- package/src/bmm/workflows/4-implementation/create-story/workflow.md +388 -0
- package/src/bmm/workflows/4-implementation/dev-story/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/4-implementation/dev-story/{instructions.xml → workflow.md} +49 -2
- package/src/bmm/workflows/4-implementation/retrospective/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/4-implementation/retrospective/{instructions.md → workflow.md} +64 -23
- package/src/bmm/workflows/4-implementation/sprint-planning/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/4-implementation/sprint-planning/sprint-status-template.yaml +1 -0
- package/src/bmm/workflows/4-implementation/sprint-planning/{instructions.md → workflow.md} +55 -10
- package/src/bmm/workflows/4-implementation/sprint-status/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/4-implementation/sprint-status/{instructions.md → workflow.md} +45 -8
- package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/SKILL.md +6 -0
- package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/bmad-skill-manifest.yaml +1 -0
- package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-01-clarify-and-route.md +54 -0
- package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-02-plan.md +39 -0
- package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-03-implement.md +35 -0
- package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-04-review.md +55 -0
- package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-05-present.md +19 -0
- package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/tech-spec-template.md +90 -0
- package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/workflow.md +84 -0
- package/src/bmm/workflows/bmad-quick-flow/quick-dev/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-05-adversarial-review.md +8 -14
- package/src/bmm/workflows/bmad-quick-flow/quick-dev/workflow.md +1 -1
- package/src/bmm/workflows/bmad-quick-flow/quick-spec/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-04-review.md +4 -6
- package/src/bmm/workflows/bmad-quick-flow/quick-spec/workflow.md +1 -1
- package/src/bmm/workflows/document-project/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/document-project/instructions.md +5 -7
- package/src/bmm/workflows/document-project/workflow.md +39 -0
- package/src/bmm/workflows/document-project/workflows/deep-dive-instructions.md +0 -1
- package/src/bmm/workflows/document-project/workflows/deep-dive-workflow.md +42 -0
- package/src/bmm/workflows/document-project/workflows/full-scan-instructions.md +0 -1
- package/src/bmm/workflows/document-project/workflows/full-scan-workflow.md +42 -0
- package/src/bmm/workflows/generate-project-context/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/generate-project-context/steps/step-02-generate.md +2 -2
- package/src/bmm/workflows/qa-generate-e2e-tests/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/qa-generate-e2e-tests/checklist.md +1 -1
- package/src/bmm/workflows/qa-generate-e2e-tests/{instructions.md → workflow.md} +40 -7
- package/src/core/agents/bmad-master.agent.yaml +1 -1
- package/src/core/agents/bmad-skill-manifest.yaml +3 -0
- package/src/core/module-help.csv +3 -3
- package/src/core/module.yaml +1 -1
- package/src/core/tasks/bmad-help/SKILL.md +6 -0
- package/src/core/tasks/bmad-help/bmad-skill-manifest.yaml +1 -0
- package/src/core/tasks/{help.md → bmad-help/workflow.md} +6 -4
- package/src/core/tasks/bmad-review-adversarial-general/SKILL.md +6 -0
- package/src/core/tasks/bmad-review-adversarial-general/bmad-skill-manifest.yaml +1 -0
- package/src/core/tasks/bmad-review-adversarial-general/workflow.md +32 -0
- package/src/core/tasks/bmad-review-edge-case-hunter/SKILL.md +6 -0
- package/src/core/tasks/bmad-review-edge-case-hunter/bmad-skill-manifest.yaml +1 -0
- package/src/core/tasks/bmad-review-edge-case-hunter/workflow.md +62 -0
- package/src/core/tasks/bmad-skill-manifest.yaml +19 -0
- package/src/core/workflows/advanced-elicitation/bmad-skill-manifest.yaml +3 -0
- package/src/core/workflows/advanced-elicitation/workflow.md +138 -0
- package/src/core/workflows/brainstorming/bmad-skill-manifest.yaml +3 -0
- package/src/core/workflows/brainstorming/steps/step-03-technique-execution.md +1 -1
- package/src/core/workflows/brainstorming/workflow.md +1 -1
- package/src/core/workflows/party-mode/bmad-skill-manifest.yaml +3 -0
- package/src/utility/agent-components/activation-steps.txt +2 -2
- package/src/utility/agent-components/handler-multi.txt +1 -2
- package/test/adversarial-review-tests/README.md +3 -3
- package/test/adversarial-review-tests/test-cases.yaml +2 -2
- package/test/fixtures/agent-schema/valid/menu/multiple-menu-items.agent.yaml +1 -1
- package/test/fixtures/agent-schema/valid/menu-commands/all-command-types.agent.yaml +1 -1
- package/test/fixtures/agent-schema/valid/menu-commands/multiple-commands.agent.yaml +1 -2
- package/test/fixtures/file-refs-csv/valid/bmm-style.csv +1 -1
- package/test/test-file-refs-csv.js +1 -1
- package/test/test-install-to-bmad.js +154 -0
- package/test/test-installation-components.js +1586 -2
- package/test/test-workflow-path-regex.js +88 -0
- package/tools/cli/installers/lib/core/installer.js +34 -1
- package/tools/cli/installers/lib/core/manifest-generator.js +328 -35
- package/tools/cli/installers/lib/ide/_base-ide.js +24 -15
- package/tools/cli/installers/lib/ide/_config-driven.js +472 -53
- package/tools/cli/installers/lib/ide/manager.js +23 -61
- package/tools/cli/installers/lib/ide/platform-codes.yaml +108 -30
- package/tools/cli/installers/lib/ide/shared/agent-command-generator.js +1 -0
- package/tools/cli/installers/lib/ide/shared/bmad-artifacts.js +7 -0
- package/tools/cli/installers/lib/ide/shared/path-utils.js +68 -3
- package/tools/cli/installers/lib/ide/shared/skill-manifest.js +90 -0
- package/tools/cli/installers/lib/ide/shared/task-tool-command-generator.js +2 -0
- package/tools/cli/installers/lib/ide/shared/workflow-command-generator.js +6 -145
- package/tools/cli/installers/lib/modules/manager.js +9 -132
- package/tools/cli/lib/agent/compiler.js +1 -10
- package/tools/cli/lib/agent-analyzer.js +2 -14
- package/tools/cli/lib/yaml-xml-builder.js +1 -18
- package/tools/docs/native-skills-migration-checklist.md +281 -0
- package/tools/platform-codes.yaml +1 -1
- package/tools/schema/agent.js +1 -3
- package/tools/validate-file-refs.js +2 -0
- package/website/astro.config.mjs +24 -3
- package/website/src/content/config.ts +2 -1
- package/website/src/content/i18n/zh-CN.json +28 -0
- package/src/bmm/workflows/4-implementation/code-review/instructions.xml +0 -227
- package/src/bmm/workflows/4-implementation/code-review/workflow.yaml +0 -43
- package/src/bmm/workflows/4-implementation/correct-course/workflow.yaml +0 -53
- package/src/bmm/workflows/4-implementation/create-story/instructions.xml +0 -346
- package/src/bmm/workflows/4-implementation/create-story/workflow.yaml +0 -52
- package/src/bmm/workflows/4-implementation/dev-story/workflow.yaml +0 -20
- package/src/bmm/workflows/4-implementation/retrospective/workflow.yaml +0 -52
- package/src/bmm/workflows/4-implementation/sprint-planning/workflow.yaml +0 -47
- package/src/bmm/workflows/4-implementation/sprint-status/workflow.yaml +0 -25
- package/src/bmm/workflows/document-project/workflow.yaml +0 -22
- package/src/bmm/workflows/document-project/workflows/deep-dive.yaml +0 -31
- package/src/bmm/workflows/document-project/workflows/full-scan.yaml +0 -31
- package/src/bmm/workflows/qa-generate-e2e-tests/workflow.yaml +0 -42
- package/src/core/tasks/review-adversarial-general.xml +0 -49
- package/src/core/tasks/review-edge-case-hunter.xml +0 -63
- package/src/core/tasks/workflow.xml +0 -235
- package/src/core/workflows/advanced-elicitation/workflow.xml +0 -118
- package/src/utility/agent-components/handler-validate-workflow.txt +0 -7
- package/src/utility/agent-components/handler-workflow.txt +0 -10
- package/tools/cli/installers/lib/ide/codex.js +0 -440
- package/tools/cli/installers/lib/ide/github-copilot.js +0 -699
- package/tools/cli/installers/lib/ide/kilo.js +0 -269
- package/tools/cli/installers/lib/ide/rovodev.js +0 -257
- package/tools/cli/installers/lib/ide/templates/combined/default-workflow-yaml.md +0 -14
- package/tools/cli/installers/lib/ide/templates/combined/kiro-workflow-yaml.md +0 -15
- package/tools/cli/installers/lib/ide/templates/workflow-command-template.md +0 -13
- package/tools/cli/installers/lib/ide/templates/workflow-commander.md +0 -5
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: help
|
|
3
|
-
description: 'Analyzes what is done and the users query and offers advice on what to do next. Use if user says what should I do next or what do I do now'
|
|
4
|
-
---
|
|
5
1
|
|
|
6
2
|
# Task: BMAD Help
|
|
7
3
|
|
|
@@ -21,6 +17,12 @@ description: 'Analyzes what is done and the users query and offers advice on wha
|
|
|
21
17
|
When `command` field has a value:
|
|
22
18
|
- Show the command prefixed with `/` (e.g., `/bmad-bmm-create-prd`)
|
|
23
19
|
|
|
20
|
+
### Skill-Referenced Workflows
|
|
21
|
+
When `workflow-file` starts with `skill:`:
|
|
22
|
+
- The value is a skill reference (e.g., `skill:bmad-quick-dev-new-preview`), NOT a file path
|
|
23
|
+
- Do NOT attempt to resolve or load it as a file path
|
|
24
|
+
- Display using the `command` column value prefixed with `/` (same as command-based workflows)
|
|
25
|
+
|
|
24
26
|
### Agent-Based Workflows
|
|
25
27
|
When `command` field is empty:
|
|
26
28
|
- User loads agent first via `/agent-command`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
type: skill
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Adversarial Review (General)
|
|
2
|
+
|
|
3
|
+
**Goal:** Cynically review content and produce findings.
|
|
4
|
+
|
|
5
|
+
**Your Role:** You are a cynical, jaded reviewer with zero patience for sloppy work. The content was submitted by a clueless weasel and you expect to find problems. Be skeptical of everything. Look for what's missing, not just what's wrong. Use a precise, professional tone — no profanity or personal attacks.
|
|
6
|
+
|
|
7
|
+
**Inputs:**
|
|
8
|
+
- **content** — Content to review: diff, spec, story, doc, or any artifact
|
|
9
|
+
- **also_consider** (optional) — Areas to keep in mind during review alongside normal adversarial analysis
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## EXECUTION
|
|
13
|
+
|
|
14
|
+
### Step 1: Receive Content
|
|
15
|
+
|
|
16
|
+
- Load the content to review from provided input or context
|
|
17
|
+
- If content to review is empty, ask for clarification and abort
|
|
18
|
+
- Identify content type (diff, branch, uncommitted changes, document, etc.)
|
|
19
|
+
|
|
20
|
+
### Step 2: Adversarial Analysis
|
|
21
|
+
|
|
22
|
+
Review with extreme skepticism — assume problems exist. Find at least ten issues to fix or improve in the provided content.
|
|
23
|
+
|
|
24
|
+
### Step 3: Present Findings
|
|
25
|
+
|
|
26
|
+
Output findings as a Markdown list (descriptions only).
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## HALT CONDITIONS
|
|
30
|
+
|
|
31
|
+
- HALT if zero findings — this is suspicious, re-analyze or ask for guidance
|
|
32
|
+
- HALT if content is empty or unreadable
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bmad-review-edge-case-hunter
|
|
3
|
+
description: 'Walk every branching path and boundary condition in content, report only unhandled edge cases. Orthogonal to adversarial review - method-driven not attitude-driven.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Follow the instructions in [workflow.md](workflow.md).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
type: skill
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Edge Case Hunter Review
|
|
2
|
+
|
|
3
|
+
**Goal:** You are a pure path tracer. Never comment on whether code is good or bad; only list missing handling.
|
|
4
|
+
When a diff is provided, scan only the diff hunks and list boundaries that are directly reachable from the changed lines and lack an explicit guard in the diff.
|
|
5
|
+
When no diff is provided (full file or function), treat the entire provided content as the scope.
|
|
6
|
+
Ignore the rest of the codebase unless the provided content explicitly references external functions.
|
|
7
|
+
|
|
8
|
+
**Inputs:**
|
|
9
|
+
- **content** — Content to review: diff, full file, or function
|
|
10
|
+
- **also_consider** (optional) — Areas to keep in mind during review alongside normal edge-case analysis
|
|
11
|
+
|
|
12
|
+
**MANDATORY: Execute steps in the Execution section IN EXACT ORDER. DO NOT skip steps or change the sequence. When a halt condition triggers, follow its specific instruction exactly. Each action within a step is a REQUIRED action to complete that step.**
|
|
13
|
+
|
|
14
|
+
**Your method is exhaustive path enumeration — mechanically walk every branch, not hunt by intuition. Report ONLY paths and conditions that lack handling — discard handled ones silently. Do NOT editorialize or add filler — findings only.**
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## EXECUTION
|
|
18
|
+
|
|
19
|
+
### Step 1: Receive Content
|
|
20
|
+
|
|
21
|
+
- Load the content to review strictly from provided input
|
|
22
|
+
- If content is empty, or cannot be decoded as text, return `[{"location":"N/A","trigger_condition":"Input empty or undecodable","guard_snippet":"Provide valid content to review","potential_consequence":"Review skipped — no analysis performed"}]` and stop
|
|
23
|
+
- Identify content type (diff, full file, or function) to determine scope rules
|
|
24
|
+
|
|
25
|
+
### Step 2: Exhaustive Path Analysis
|
|
26
|
+
|
|
27
|
+
**Walk every branching path and boundary condition within scope — report only unhandled ones.**
|
|
28
|
+
|
|
29
|
+
- If `also_consider` input was provided, incorporate those areas into the analysis
|
|
30
|
+
- Walk all branching paths: control flow (conditionals, loops, error handlers, early returns) and domain boundaries (where values, states, or conditions transition). Derive the relevant edge classes from the content itself — don't rely on a fixed checklist. Examples: missing else/default, unguarded inputs, off-by-one loops, arithmetic overflow, implicit type coercion, race conditions, timeout gaps
|
|
31
|
+
- For each path: determine whether the content handles it
|
|
32
|
+
- Collect only the unhandled paths as findings — discard handled ones silently
|
|
33
|
+
|
|
34
|
+
### Step 3: Validate Completeness
|
|
35
|
+
|
|
36
|
+
- Revisit every edge class from Step 2 — e.g., missing else/default, null/empty inputs, off-by-one loops, arithmetic overflow, implicit type coercion, race conditions, timeout gaps
|
|
37
|
+
- Add any newly found unhandled paths to findings; discard confirmed-handled ones
|
|
38
|
+
|
|
39
|
+
### Step 4: Present Findings
|
|
40
|
+
|
|
41
|
+
Output findings as a JSON array following the Output Format specification exactly.
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
## OUTPUT FORMAT
|
|
45
|
+
|
|
46
|
+
Return ONLY a valid JSON array of objects. Each object must contain exactly these four fields and nothing else:
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
[{
|
|
50
|
+
"location": "file:start-end (or file:line when single line, or file:hunk when exact line unavailable)",
|
|
51
|
+
"trigger_condition": "one-line description (max 15 words)",
|
|
52
|
+
"guard_snippet": "minimal code sketch that closes the gap (single-line escaped string, no raw newlines or unescaped quotes)",
|
|
53
|
+
"potential_consequence": "what could actually go wrong (max 15 words)"
|
|
54
|
+
}]
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
No extra text, no explanations, no markdown wrapping. An empty array `[]` is valid when no unhandled paths are found.
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
## HALT CONDITIONS
|
|
61
|
+
|
|
62
|
+
- If content is empty or cannot be decoded as text, return `[{"location":"N/A","trigger_condition":"Input empty or undecodable","guard_snippet":"Provide valid content to review","potential_consequence":"Review skipped — no analysis performed"}]` and stop
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
editorial-review-prose.xml:
|
|
2
|
+
canonicalId: bmad-editorial-review-prose
|
|
3
|
+
type: task
|
|
4
|
+
description: "Clinical copy-editor that reviews text for communication issues"
|
|
5
|
+
|
|
6
|
+
editorial-review-structure.xml:
|
|
7
|
+
canonicalId: bmad-editorial-review-structure
|
|
8
|
+
type: task
|
|
9
|
+
description: "Structural editor that proposes cuts, reorganization, and simplification while preserving comprehension"
|
|
10
|
+
|
|
11
|
+
index-docs.xml:
|
|
12
|
+
canonicalId: bmad-index-docs
|
|
13
|
+
type: task
|
|
14
|
+
description: "Generates or updates an index.md to reference all docs in the folder"
|
|
15
|
+
|
|
16
|
+
shard-doc.xml:
|
|
17
|
+
canonicalId: bmad-shard-doc
|
|
18
|
+
type: task
|
|
19
|
+
description: "Splits large markdown documents into smaller, organized files based on sections"
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: advanced-elicitation
|
|
3
|
+
description: 'Push the LLM to reconsider refine and improve its recent output. Use when the user asks for advanced elicitation.'
|
|
4
|
+
methods: '{project-root}/_bmad/core/workflows/advanced-elicitation/methods.csv'
|
|
5
|
+
agent_party: '{project-root}/_bmad/_config/agent-manifest.csv'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Advanced Elicitation Workflow
|
|
9
|
+
|
|
10
|
+
**Goal:** Push the LLM to reconsider, refine, and improve its recent output. Use when the user asks for advanced elicitation.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## CRITICAL LLM INSTRUCTIONS
|
|
15
|
+
|
|
16
|
+
- **MANDATORY:** Execute ALL steps in the flow section IN EXACT ORDER
|
|
17
|
+
- DO NOT skip steps or change the sequence
|
|
18
|
+
- HALT immediately when halt-conditions are met
|
|
19
|
+
- Each action within a step is a REQUIRED action to complete that step
|
|
20
|
+
- Sections outside flow (validation, output, critical-context) provide essential context - review and apply throughout execution
|
|
21
|
+
- **YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the `communication_language`**
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## INTEGRATION (When Called from Workflow)
|
|
26
|
+
|
|
27
|
+
When called during template workflow processing:
|
|
28
|
+
|
|
29
|
+
1. Receive or review the current section content that was just generated
|
|
30
|
+
2. Apply elicitation methods iteratively to enhance that specific content
|
|
31
|
+
3. Return the enhanced version back when user selects 'x' to proceed and return back
|
|
32
|
+
4. The enhanced content replaces the original section content in the output document
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## FLOW
|
|
37
|
+
|
|
38
|
+
### Step 1: Method Registry Loading
|
|
39
|
+
|
|
40
|
+
**Action:** Load and read `{methods}` and `{agent_party}`
|
|
41
|
+
|
|
42
|
+
#### CSV Structure
|
|
43
|
+
|
|
44
|
+
- **category:** Method grouping (core, structural, risk, etc.)
|
|
45
|
+
- **method_name:** Display name for the method
|
|
46
|
+
- **description:** Rich explanation of what the method does, when to use it, and why it's valuable
|
|
47
|
+
- **output_pattern:** Flexible flow guide using arrows (e.g., "analysis -> insights -> action")
|
|
48
|
+
|
|
49
|
+
#### Context Analysis
|
|
50
|
+
|
|
51
|
+
- Use conversation history
|
|
52
|
+
- Analyze: content type, complexity, stakeholder needs, risk level, and creative potential
|
|
53
|
+
|
|
54
|
+
#### Smart Selection
|
|
55
|
+
|
|
56
|
+
1. Analyze context: Content type, complexity, stakeholder needs, risk level, creative potential
|
|
57
|
+
2. Parse descriptions: Understand each method's purpose from the rich descriptions in CSV
|
|
58
|
+
3. Select 5 methods: Choose methods that best match the context based on their descriptions
|
|
59
|
+
4. Balance approach: Include mix of foundational and specialized techniques as appropriate
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
### Step 2: Present Options and Handle Responses
|
|
64
|
+
|
|
65
|
+
#### Display Format
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
**Advanced Elicitation Options**
|
|
69
|
+
_If party mode is active, agents will join in._
|
|
70
|
+
Choose a number (1-5), [r] to Reshuffle, [a] List All, or [x] to Proceed:
|
|
71
|
+
|
|
72
|
+
1. [Method Name]
|
|
73
|
+
2. [Method Name]
|
|
74
|
+
3. [Method Name]
|
|
75
|
+
4. [Method Name]
|
|
76
|
+
5. [Method Name]
|
|
77
|
+
r. Reshuffle the list with 5 new options
|
|
78
|
+
a. List all methods with descriptions
|
|
79
|
+
x. Proceed / No Further Actions
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
#### Response Handling
|
|
83
|
+
|
|
84
|
+
**Case 1-5 (User selects a numbered method):**
|
|
85
|
+
|
|
86
|
+
- Execute the selected method using its description from the CSV
|
|
87
|
+
- Adapt the method's complexity and output format based on the current context
|
|
88
|
+
- Apply the method creatively to the current section content being enhanced
|
|
89
|
+
- Display the enhanced version showing what the method revealed or improved
|
|
90
|
+
- **CRITICAL:** Ask the user if they would like to apply the changes to the doc (y/n/other) and HALT to await response.
|
|
91
|
+
- **CRITICAL:** ONLY if Yes, apply the changes. IF No, discard your memory of the proposed changes. If any other reply, try best to follow the instructions given by the user.
|
|
92
|
+
- **CRITICAL:** Re-present the same 1-5,r,x prompt to allow additional elicitations
|
|
93
|
+
|
|
94
|
+
**Case r (Reshuffle):**
|
|
95
|
+
|
|
96
|
+
- Select 5 random methods from methods.csv, present new list with same prompt format
|
|
97
|
+
- When selecting, try to think and pick a diverse set of methods covering different categories and approaches, with 1 and 2 being potentially the most useful for the document or section being discovered
|
|
98
|
+
|
|
99
|
+
**Case x (Proceed):**
|
|
100
|
+
|
|
101
|
+
- Complete elicitation and proceed
|
|
102
|
+
- Return the fully enhanced content back to create-doc.md
|
|
103
|
+
- The enhanced content becomes the final version for that section
|
|
104
|
+
- Signal completion back to create-doc.md to continue with next section
|
|
105
|
+
|
|
106
|
+
**Case a (List All):**
|
|
107
|
+
|
|
108
|
+
- List all methods with their descriptions from the CSV in a compact table
|
|
109
|
+
- Allow user to select any method by name or number from the full list
|
|
110
|
+
- After selection, execute the method as described in the Case 1-5 above
|
|
111
|
+
|
|
112
|
+
**Case: Direct Feedback:**
|
|
113
|
+
|
|
114
|
+
- Apply changes to current section content and re-present choices
|
|
115
|
+
|
|
116
|
+
**Case: Multiple Numbers:**
|
|
117
|
+
|
|
118
|
+
- Execute methods in sequence on the content, then re-offer choices
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
### Step 3: Execution Guidelines
|
|
123
|
+
|
|
124
|
+
- **Method execution:** Use the description from CSV to understand and apply each method
|
|
125
|
+
- **Output pattern:** Use the pattern as a flexible guide (e.g., "paths -> evaluation -> selection")
|
|
126
|
+
- **Dynamic adaptation:** Adjust complexity based on content needs (simple to sophisticated)
|
|
127
|
+
- **Creative application:** Interpret methods flexibly based on context while maintaining pattern consistency
|
|
128
|
+
- Focus on actionable insights
|
|
129
|
+
- **Stay relevant:** Tie elicitation to specific content being analyzed (the current section from the document being created unless user indicates otherwise)
|
|
130
|
+
- **Identify personas:** For single or multi-persona methods, clearly identify viewpoints, and use party members if available in memory already
|
|
131
|
+
- **Critical loop behavior:** Always re-offer the 1-5,r,a,x choices after each method execution
|
|
132
|
+
- Continue until user selects 'x' to proceed with enhanced content, confirm or ask the user what should be accepted from the session
|
|
133
|
+
- Each method application builds upon previous enhancements
|
|
134
|
+
- **Content preservation:** Track all enhancements made during elicitation
|
|
135
|
+
- **Iterative enhancement:** Each selected method (1-5) should:
|
|
136
|
+
1. Apply to the current enhanced version of the content
|
|
137
|
+
2. Show the improvements made
|
|
138
|
+
3. Return to the prompt for additional elicitations or completion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Step 3: Interactive Technique Execution and Facilitation
|
|
2
2
|
|
|
3
3
|
---
|
|
4
|
-
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.
|
|
4
|
+
advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.md'
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
@@ -49,7 +49,7 @@ Load config from `{project-root}/_bmad/core/config.yaml` and resolve:
|
|
|
49
49
|
|
|
50
50
|
All steps MUST reference `{brainstorming_session_output_file}` instead of the full path pattern.
|
|
51
51
|
- `context_file` = Optional context file path from workflow invocation for project-specific guidance
|
|
52
|
-
- `advancedElicitationTask` = `{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.
|
|
52
|
+
- `advancedElicitationTask` = `{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.md`
|
|
53
53
|
|
|
54
54
|
---
|
|
55
55
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<step n="3">Remember: user's name is {user_name}</step>
|
|
9
9
|
{AGENT_SPECIFIC_STEPS}
|
|
10
10
|
<step n="{MENU_STEP}">Show greeting using {user_name} from config, communicate in {communication_language}, then display numbered list of ALL menu items from menu section</step>
|
|
11
|
-
<step n="{HELP_STEP}">Let {user_name} know they can
|
|
11
|
+
<step n="{HELP_STEP}">Let {user_name} know they can invoke the `bmad-help` skill at any time to get advice on what to do next, and that they can combine it with what they need help with <example>Invoke the `bmad-help` skill with a question like "where should I start with an idea I have that does XYZ?"</example></step>
|
|
12
12
|
<step n="{HALT_STEP}">STOP and WAIT for user input - do NOT execute menu items automatically - accept number or cmd trigger or fuzzy command match</step>
|
|
13
13
|
<step n="{INPUT_STEP}">On user input: Number → process menu item[n] | Text → case-insensitive substring match | Multiple matches → ask user to clarify | No match → show "Not recognized"</step>
|
|
14
|
-
<step n="{EXECUTE_STEP}">When processing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item (
|
|
14
|
+
<step n="{EXECUTE_STEP}">When processing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item (exec, tmpl, data, action, multi) and follow the corresponding handler instructions</step>
|
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
2. Parse all nested handlers within the multi item
|
|
5
5
|
3. For each nested handler:
|
|
6
6
|
- Use the 'match' attribute for fuzzy matching user input (or Exact Match of character code in brackets [])
|
|
7
|
-
- Process based on handler attributes (exec,
|
|
7
|
+
- Process based on handler attributes (exec, action)
|
|
8
8
|
4. When user input matches a handler's 'match' pattern:
|
|
9
9
|
- For exec="path/to/file.md": follow the `handler type="exec"` instructions
|
|
10
|
-
- For workflow="path/to/workflow.yaml": follow the `handler type="workflow"` instructions
|
|
11
10
|
- For action="...": Perform the specified action directly
|
|
12
11
|
5. Support both exact matches and fuzzy matching based on the match attribute
|
|
13
12
|
6. If no handler matches, prompt user to choose from available options
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Adversarial Review Test Suite
|
|
2
2
|
|
|
3
|
-
Tests for the `also_consider` optional input in `review-adversarial-general.
|
|
3
|
+
Tests for the `also_consider` optional input in the `bmad-review-adversarial-general` skill.
|
|
4
4
|
|
|
5
5
|
## Purpose
|
|
6
6
|
|
|
@@ -19,12 +19,12 @@ All tests use `sample-content.md` - a deliberately imperfect User Authentication
|
|
|
19
19
|
|
|
20
20
|
## Running Tests
|
|
21
21
|
|
|
22
|
-
For each test case in `test-cases.yaml`, invoke the adversarial review
|
|
22
|
+
For each test case in `test-cases.yaml`, invoke the adversarial review skill.
|
|
23
23
|
|
|
24
24
|
### Manual Test Invocation
|
|
25
25
|
|
|
26
26
|
```
|
|
27
|
-
Review this content using the adversarial review
|
|
27
|
+
Review this content using the adversarial review skill:
|
|
28
28
|
|
|
29
29
|
<content>
|
|
30
30
|
[paste sample-content.md]
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
# Test Cases for review-adversarial-general
|
|
1
|
+
# Test Cases for bmad-review-adversarial-general skill with also_consider input
|
|
2
2
|
#
|
|
3
3
|
# Purpose: Evaluate how the optional also_consider input influences review findings
|
|
4
4
|
# Content: All tests use sample-content.md (User Authentication API docs)
|
|
5
5
|
#
|
|
6
|
-
# To run: Manually invoke the
|
|
6
|
+
# To run: Manually invoke the skill with each configuration and compare outputs
|
|
7
7
|
|
|
8
8
|
test_cases:
|
|
9
9
|
# BASELINE - No also_consider
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
module,phase,name,code,sequence,workflow-file,command,required,agent,options,description,output-location,outputs,
|
|
2
|
-
bmm,anytime,Document Project,DP,,_bmad/bmm/workflows/document-project/workflow.
|
|
2
|
+
bmm,anytime,Document Project,DP,,_bmad/bmm/workflows/document-project/workflow.md,bmad-bmm-document-project,false,analyst,Create Mode,"Analyze project",project-knowledge,*,
|
|
3
3
|
bmm,1-analysis,Brainstorm Project,BP,10,_bmad/core/workflows/brainstorming/workflow.md,bmad-brainstorming,false,analyst,data=template.md,"Brainstorming",planning_artifacts,"session",
|
|
@@ -58,7 +58,7 @@ test('bmm-style.csv: extracts workflow-file refs with trailing commas', () => {
|
|
|
58
58
|
const { fullPath, content } = loadFixture('valid/bmm-style.csv');
|
|
59
59
|
const refs = extractCsvRefs(fullPath, content);
|
|
60
60
|
assert(refs.length === 2, `Expected 2 refs, got ${refs.length}`);
|
|
61
|
-
assert(refs[0].raw === '_bmad/bmm/workflows/document-project/workflow.
|
|
61
|
+
assert(refs[0].raw === '_bmad/bmm/workflows/document-project/workflow.md', `Wrong raw[0]: ${refs[0].raw}`);
|
|
62
62
|
assert(refs[1].raw === '_bmad/core/workflows/brainstorming/workflow.md', `Wrong raw[1]: ${refs[1].raw}`);
|
|
63
63
|
assert(refs[0].type === 'project-root', `Wrong type: ${refs[0].type}`);
|
|
64
64
|
assert(refs[0].line === 2, `Wrong line for row 0: ${refs[0].line}`);
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* install_to_bmad Flag — Design Contract Tests
|
|
3
|
+
*
|
|
4
|
+
* Unit tests against the functions that implement the install_to_bmad flag.
|
|
5
|
+
* These nail down the 4 core design decisions:
|
|
6
|
+
*
|
|
7
|
+
* 1. true/omitted → skill stays in _bmad/ (default behavior)
|
|
8
|
+
* 2. false → skill removed from _bmad/ after IDE install
|
|
9
|
+
* 3. No platform → no cleanup runs (cleanup lives in installVerbatimSkills)
|
|
10
|
+
* 4. Mixed flags → each skill evaluated independently
|
|
11
|
+
*
|
|
12
|
+
* Usage: node test/test-install-to-bmad.js
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
const path = require('node:path');
|
|
16
|
+
const os = require('node:os');
|
|
17
|
+
const fs = require('fs-extra');
|
|
18
|
+
const { loadSkillManifest, getInstallToBmad } = require('../tools/cli/installers/lib/ide/shared/skill-manifest');
|
|
19
|
+
|
|
20
|
+
// ANSI colors
|
|
21
|
+
const colors = {
|
|
22
|
+
reset: '\u001B[0m',
|
|
23
|
+
green: '\u001B[32m',
|
|
24
|
+
red: '\u001B[31m',
|
|
25
|
+
yellow: '\u001B[33m',
|
|
26
|
+
cyan: '\u001B[36m',
|
|
27
|
+
dim: '\u001B[2m',
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
let passed = 0;
|
|
31
|
+
let failed = 0;
|
|
32
|
+
|
|
33
|
+
function assert(condition, testName, errorMessage = '') {
|
|
34
|
+
if (condition) {
|
|
35
|
+
console.log(`${colors.green}✓${colors.reset} ${testName}`);
|
|
36
|
+
passed++;
|
|
37
|
+
} else {
|
|
38
|
+
console.log(`${colors.red}✗${colors.reset} ${testName}`);
|
|
39
|
+
if (errorMessage) {
|
|
40
|
+
console.log(` ${colors.dim}${errorMessage}${colors.reset}`);
|
|
41
|
+
}
|
|
42
|
+
failed++;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
async function runTests() {
|
|
47
|
+
console.log(`${colors.cyan}========================================`);
|
|
48
|
+
console.log('install_to_bmad — Design Contract Tests');
|
|
49
|
+
console.log(`========================================${colors.reset}\n`);
|
|
50
|
+
|
|
51
|
+
// ============================================================
|
|
52
|
+
// 1. true/omitted → getInstallToBmad returns true (keep in _bmad/)
|
|
53
|
+
// ============================================================
|
|
54
|
+
console.log(`${colors.yellow}Design decision 1: true or omitted → skill stays in _bmad/${colors.reset}\n`);
|
|
55
|
+
|
|
56
|
+
// Null manifest (no bmad-skill-manifest.yaml) → true
|
|
57
|
+
assert(getInstallToBmad(null, 'workflow.md') === true, 'null manifest defaults to true');
|
|
58
|
+
|
|
59
|
+
// Single-entry, flag omitted → true
|
|
60
|
+
assert(
|
|
61
|
+
getInstallToBmad({ __single: { type: 'skill' } }, 'workflow.md') === true,
|
|
62
|
+
'single-entry manifest with flag omitted defaults to true',
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
// Single-entry, explicit true → true
|
|
66
|
+
assert(
|
|
67
|
+
getInstallToBmad({ __single: { type: 'skill', install_to_bmad: true } }, 'workflow.md') === true,
|
|
68
|
+
'single-entry manifest with explicit true returns true',
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
console.log('');
|
|
72
|
+
|
|
73
|
+
// ============================================================
|
|
74
|
+
// 2. false → getInstallToBmad returns false (remove from _bmad/)
|
|
75
|
+
// ============================================================
|
|
76
|
+
console.log(`${colors.yellow}Design decision 2: false → skill removed from _bmad/${colors.reset}\n`);
|
|
77
|
+
|
|
78
|
+
// Single-entry, explicit false → false
|
|
79
|
+
assert(
|
|
80
|
+
getInstallToBmad({ __single: { type: 'skill', install_to_bmad: false } }, 'workflow.md') === false,
|
|
81
|
+
'single-entry manifest with explicit false returns false',
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
// loadSkillManifest round-trip: YAML with false is preserved through load
|
|
85
|
+
{
|
|
86
|
+
const tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), 'bmad-itb-'));
|
|
87
|
+
await fs.writeFile(path.join(tmpDir, 'bmad-skill-manifest.yaml'), 'type: skill\ninstall_to_bmad: false\n');
|
|
88
|
+
const loaded = await loadSkillManifest(tmpDir);
|
|
89
|
+
assert(getInstallToBmad(loaded, 'workflow.md') === false, 'loadSkillManifest preserves install_to_bmad: false through round-trip');
|
|
90
|
+
await fs.remove(tmpDir);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
console.log('');
|
|
94
|
+
|
|
95
|
+
// ============================================================
|
|
96
|
+
// 3. No platform → cleanup only runs inside installVerbatimSkills
|
|
97
|
+
// (This is a design invariant: getInstallToBmad is only consulted
|
|
98
|
+
// during IDE install. Without a platform, the flag has no effect.)
|
|
99
|
+
// ============================================================
|
|
100
|
+
console.log(`${colors.yellow}Design decision 3: flag is a per-skill property, not a pipeline gate${colors.reset}\n`);
|
|
101
|
+
|
|
102
|
+
// The flag value is stored but doesn't trigger any side effects by itself.
|
|
103
|
+
// Cleanup is driven by reading the CSV column inside installVerbatimSkills.
|
|
104
|
+
// We verify the flag is just data — getInstallToBmad doesn't touch the filesystem.
|
|
105
|
+
{
|
|
106
|
+
const manifest = { __single: { type: 'skill', install_to_bmad: false } };
|
|
107
|
+
const result = getInstallToBmad(manifest, 'workflow.md');
|
|
108
|
+
assert(typeof result === 'boolean', 'getInstallToBmad returns a boolean (pure data, no side effects)');
|
|
109
|
+
assert(result === false, 'false value is faithfully returned for consumer to act on');
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
console.log('');
|
|
113
|
+
|
|
114
|
+
// ============================================================
|
|
115
|
+
// 4. Mixed flags → each skill evaluated independently
|
|
116
|
+
// ============================================================
|
|
117
|
+
console.log(`${colors.yellow}Design decision 4: mixed flags — each skill independent${colors.reset}\n`);
|
|
118
|
+
|
|
119
|
+
// Multi-entry manifest: different files can have different flags
|
|
120
|
+
{
|
|
121
|
+
const manifest = {
|
|
122
|
+
'workflow.md': { type: 'skill', install_to_bmad: false },
|
|
123
|
+
'other.md': { type: 'skill', install_to_bmad: true },
|
|
124
|
+
};
|
|
125
|
+
assert(getInstallToBmad(manifest, 'workflow.md') === false, 'multi-entry: workflow.md with false returns false');
|
|
126
|
+
assert(getInstallToBmad(manifest, 'other.md') === true, 'multi-entry: other.md with true returns true');
|
|
127
|
+
assert(getInstallToBmad(manifest, 'unknown.md') === true, 'multi-entry: unknown file defaults to true');
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
console.log('');
|
|
131
|
+
|
|
132
|
+
// ============================================================
|
|
133
|
+
// Summary
|
|
134
|
+
// ============================================================
|
|
135
|
+
console.log(`${colors.cyan}========================================`);
|
|
136
|
+
console.log('Results:');
|
|
137
|
+
console.log(` Passed: ${colors.green}${passed}${colors.reset}`);
|
|
138
|
+
console.log(` Failed: ${colors.red}${failed}${colors.reset}`);
|
|
139
|
+
console.log(`========================================${colors.reset}\n`);
|
|
140
|
+
|
|
141
|
+
if (failed === 0) {
|
|
142
|
+
console.log(`${colors.green}All install_to_bmad contract tests passed!${colors.reset}\n`);
|
|
143
|
+
process.exit(0);
|
|
144
|
+
} else {
|
|
145
|
+
console.log(`${colors.red}Some install_to_bmad contract tests failed${colors.reset}\n`);
|
|
146
|
+
process.exit(1);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
runTests().catch((error) => {
|
|
151
|
+
console.error(`${colors.red}Test runner failed:${colors.reset}`, error.message);
|
|
152
|
+
console.error(error.stack);
|
|
153
|
+
process.exit(1);
|
|
154
|
+
});
|