bmad-method 6.0.0-alpha.13 → 6.0.0-alpha.15
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/.coderabbit.yaml +36 -0
- package/.github/CODE_OF_CONDUCT.md +128 -0
- package/.github/ISSUE_TEMPLATE/idea_submission.md +1 -1
- package/.github/scripts/discord-helpers.sh +15 -0
- package/.github/workflows/discord.yaml +278 -8
- package/.github/workflows/quality.yaml +19 -0
- package/.markdownlint-cli2.yaml +42 -0
- package/.prettierignore +3 -0
- package/CHANGELOG.md +183 -360
- package/README.md +4 -1
- package/docs/agent-customization-guide.md +2 -2
- package/docs/custom-content-installation.md +245 -0
- package/docs/document-sharding-guide.md +1 -1
- package/docs/index.md +2 -2
- package/docs/installers-bundlers/installers-modules-platforms-reference.md +6 -5
- package/docs/web-bundles-gemini-gpt-guide.md +1 -1
- package/eslint.config.mjs +14 -0
- package/example-custom-content/README.md +8 -0
- package/{custom/src → example-custom-content}/agents/commit-poet/commit-poet.agent.yaml +1 -1
- package/{custom/src → example-custom-content}/agents/toolsmith/toolsmith-sidecar/instructions.md +5 -5
- package/{custom/src → example-custom-content}/agents/toolsmith/toolsmith-sidecar/knowledge/docs.md +1 -1
- package/{custom/src → example-custom-content}/agents/toolsmith/toolsmith-sidecar/knowledge/installers.md +1 -1
- package/{custom/src → example-custom-content}/agents/toolsmith/toolsmith-sidecar/knowledge/modules.md +2 -2
- package/{custom/src → example-custom-content}/agents/toolsmith/toolsmith-sidecar/memories.md +1 -1
- package/{custom/src → example-custom-content}/agents/toolsmith/toolsmith.agent.yaml +18 -17
- package/example-custom-content/module.yaml +4 -0
- package/example-custom-content/workflows/quiz-master/steps/step-01-init.md +168 -0
- package/example-custom-content/workflows/quiz-master/steps/step-02-q1.md +155 -0
- package/example-custom-content/workflows/quiz-master/steps/step-03-q2.md +89 -0
- package/example-custom-content/workflows/quiz-master/steps/step-04-q3.md +36 -0
- package/example-custom-content/workflows/quiz-master/steps/step-05-q4.md +36 -0
- package/example-custom-content/workflows/quiz-master/steps/step-06-q5.md +36 -0
- package/example-custom-content/workflows/quiz-master/steps/step-07-q6.md +36 -0
- package/example-custom-content/workflows/quiz-master/steps/step-08-q7.md +36 -0
- package/example-custom-content/workflows/quiz-master/steps/step-09-q8.md +36 -0
- package/example-custom-content/workflows/quiz-master/steps/step-10-q9.md +36 -0
- package/example-custom-content/workflows/quiz-master/steps/step-11-q10.md +36 -0
- package/example-custom-content/workflows/quiz-master/steps/step-12-results.md +150 -0
- package/example-custom-content/workflows/quiz-master/templates/csv-headers.template +1 -0
- package/example-custom-content/workflows/quiz-master/workflow.md +54 -0
- package/example-custom-content/workflows/wassup/workflow.md +26 -0
- package/example-custom-module/mwm/README.md +9 -0
- package/example-custom-module/mwm/agents/cbt-coach/cbt-coach-sidecar/cognitive-distortions.md +47 -0
- package/example-custom-module/mwm/agents/cbt-coach/cbt-coach-sidecar/thought-records.md +17 -0
- package/example-custom-module/mwm/agents/cbt-coach/cbt-coach.agent.yaml +151 -0
- package/example-custom-module/mwm/agents/crisis-navigator.agent.yaml +138 -0
- package/example-custom-module/mwm/agents/meditation-guide.agent.yaml +138 -0
- package/example-custom-module/mwm/agents/wellness-companion/wellness-companion-sidecar/insights.md +13 -0
- package/example-custom-module/mwm/agents/wellness-companion/wellness-companion-sidecar/instructions.md +30 -0
- package/example-custom-module/mwm/agents/wellness-companion/wellness-companion-sidecar/memories.md +13 -0
- package/example-custom-module/mwm/agents/wellness-companion/wellness-companion-sidecar/patterns.md +17 -0
- package/example-custom-module/mwm/agents/wellness-companion/wellness-companion.agent.yaml +125 -0
- package/example-custom-module/mwm/module.yaml +28 -0
- package/example-custom-module/mwm/workflows/cbt-thought-record/README.md +31 -0
- package/example-custom-module/mwm/workflows/cbt-thought-record/workflow.md +45 -0
- package/example-custom-module/mwm/workflows/crisis-support/README.md +31 -0
- package/example-custom-module/mwm/workflows/crisis-support/workflow.md +45 -0
- package/example-custom-module/mwm/workflows/daily-checkin/README.md +32 -0
- package/example-custom-module/mwm/workflows/daily-checkin/workflow.md +45 -0
- package/example-custom-module/mwm/workflows/guided-meditation/README.md +31 -0
- package/example-custom-module/mwm/workflows/guided-meditation/workflow.md +45 -0
- package/example-custom-module/mwm/workflows/wellness-journal/README.md +31 -0
- package/example-custom-module/mwm/workflows/wellness-journal/workflow.md +45 -0
- package/package.json +9 -4
- package/src/core/_module-installer/installer.js +1 -1
- package/src/core/{_module-installer/install-config.yaml → module.yaml} +5 -1
- package/src/core/resources/excalidraw/library-loader.md +2 -2
- package/src/core/workflows/brainstorming/steps/step-01-session-setup.md +1 -1
- package/src/core/workflows/brainstorming/workflow.md +1 -1
- package/src/core/workflows/party-mode/steps/step-03-graceful-exit.md +0 -1
- package/src/core/workflows/party-mode/workflow.md +2 -3
- package/src/modules/bmb/README.md +1 -1
- package/src/modules/bmb/_module-installer/installer.js +76 -0
- package/src/modules/bmb/agents/bmad-builder.agent.yaml +32 -9
- package/src/modules/bmb/docs/agents/agent-menu-patterns.md +5 -5
- package/src/modules/bmb/docs/agents/expert-agent-architecture.md +20 -20
- package/src/modules/bmb/docs/agents/index.md +1 -1
- package/src/modules/bmb/docs/agents/module-agent-architecture.md +45 -45
- package/src/modules/bmb/docs/agents/simple-agent-architecture.md +7 -3
- package/src/modules/bmb/docs/workflows/architecture.md +1 -1
- package/src/modules/bmb/docs/workflows/templates/step-01-init-continuable-template.md +241 -0
- package/src/modules/bmb/docs/workflows/templates/step-1b-template.md +223 -0
- package/src/modules/bmb/{workflows/create-workflow → docs/workflows}/templates/step-file.md +4 -4
- package/src/modules/bmb/docs/workflows/{step-template.md → templates/step-template.md} +40 -33
- package/src/modules/bmb/docs/workflows/templates/workflow-template.md +104 -0
- package/src/modules/bmb/{workflows/create-workflow → docs/workflows}/templates/workflow.md +1 -1
- package/src/modules/bmb/{_module-installer/install-config.yaml → module.yaml} +4 -9
- package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/README.md +4 -4
- package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper.agent.yaml +8 -8
- package/src/modules/bmb/reference/agents/module-examples/security-engineer.agent.yaml +6 -6
- package/src/modules/bmb/reference/agents/module-examples/trend-analyst.agent.yaml +7 -7
- package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-01-init.md +2 -3
- package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-01b-continue.md +10 -40
- package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-02-profile.md +1 -1
- package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-03-assessment.md +1 -0
- package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-04-strategy.md +2 -2
- package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-05-shopping.md +2 -2
- package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-06-prep-schedule.md +2 -2
- package/src/modules/bmb/reference/workflows/meal-prep-nutrition/workflow.md +2 -2
- package/src/modules/bmb/workflows/create-agent/data/info-and-installation-guide.md +16 -4
- package/src/modules/bmb/workflows/create-agent/data/reference/agents/expert-examples/journal-keeper/README.md +4 -4
- package/src/modules/bmb/workflows/create-agent/data/reference/agents/expert-examples/journal-keeper/journal-keeper.agent.yaml +7 -7
- package/src/modules/bmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-05-shopping.md +1 -1
- package/src/modules/bmb/workflows/create-agent/data/validation-complete.md +3 -3
- package/src/modules/bmb/workflows/create-agent/steps/step-01-brainstorm.md +3 -3
- package/src/modules/bmb/workflows/create-agent/steps/step-02-discover.md +3 -3
- package/src/modules/bmb/workflows/create-agent/steps/step-03-persona.md +3 -3
- package/src/modules/bmb/workflows/create-agent/steps/step-04-commands.md +6 -6
- package/src/modules/bmb/workflows/create-agent/steps/step-05-name.md +2 -2
- package/src/modules/bmb/workflows/create-agent/steps/step-06-build.md +3 -3
- package/src/modules/bmb/workflows/create-agent/steps/step-07-validate.md +3 -3
- package/src/modules/bmb/workflows/create-agent/steps/step-08-setup.md +2 -2
- package/src/modules/bmb/workflows/create-agent/steps/step-09-customize.md +3 -3
- package/src/modules/bmb/workflows/create-agent/steps/step-10-build-tools.md +2 -2
- package/src/modules/bmb/workflows/create-agent/steps/step-11-celebrate.md +2 -2
- package/src/modules/bmb/workflows/create-agent/workflow.md +11 -11
- package/src/modules/bmb/workflows/create-module/steps/step-01-init.md +155 -0
- package/src/modules/bmb/workflows/create-module/steps/step-01b-continue.md +169 -0
- package/src/modules/bmb/workflows/create-module/steps/step-02-concept.md +217 -0
- package/src/modules/bmb/workflows/create-module/steps/step-03-components.md +267 -0
- package/src/modules/bmb/workflows/create-module/steps/step-04-structure.md +228 -0
- package/src/modules/bmb/workflows/create-module/steps/step-05-config.md +233 -0
- package/src/modules/bmb/workflows/create-module/steps/step-06-agents.md +296 -0
- package/src/modules/bmb/workflows/create-module/steps/step-07-workflows.md +228 -0
- package/src/modules/bmb/workflows/create-module/steps/step-08-installer.md +186 -0
- package/src/modules/bmb/workflows/create-module/steps/step-09-documentation.md +309 -0
- package/src/modules/bmb/workflows/create-module/steps/step-10-roadmap.md +337 -0
- package/src/modules/bmb/workflows/create-module/steps/step-11-validate.md +335 -0
- package/src/modules/bmb/workflows/create-module/templates/agent.template.md +317 -0
- package/src/modules/bmb/workflows/create-module/templates/installer.template.js +47 -0
- package/src/modules/bmb/workflows/create-module/templates/module-plan.template.md +5 -0
- package/src/modules/bmb/workflows/create-module/templates/module.template.yaml +53 -0
- package/src/modules/bmb/workflows/create-module/templates/workflow-plan-template.md +23 -0
- package/src/modules/bmb/workflows/create-module/validation.md +126 -0
- package/src/modules/bmb/workflows/create-module/workflow.md +55 -0
- package/src/modules/bmb/workflows/create-workflow/steps/step-01-init.md +45 -56
- package/src/modules/bmb/workflows/create-workflow/steps/step-02-gather.md +9 -31
- package/src/modules/bmb/workflows/create-workflow/steps/step-03-tools-configuration.md +250 -0
- package/src/modules/bmb/workflows/create-workflow/steps/step-04-plan-review.md +216 -0
- package/src/modules/bmb/workflows/create-workflow/steps/step-05-output-format-design.md +289 -0
- package/src/modules/bmb/workflows/create-workflow/steps/{step-09-design.md → step-06-design.md} +76 -44
- package/src/modules/bmb/workflows/create-workflow/steps/{step-11-build.md → step-07-build.md} +71 -25
- package/src/modules/bmb/workflows/create-workflow/steps/{step-12-review.md → step-08-review.md} +30 -16
- package/src/modules/bmb/workflows/create-workflow/steps/step-09-complete.md +187 -0
- package/src/modules/bmb/workflows/create-workflow/workflow.md +2 -2
- package/src/modules/bmb/workflows/edit-agent/steps/step-01-discover-intent.md +2 -2
- package/src/modules/bmb/workflows/edit-agent/steps/step-02-analyze-agent.md +14 -14
- package/src/modules/bmb/workflows/edit-agent/steps/step-03-propose-changes.md +4 -4
- package/src/modules/bmb/workflows/edit-agent/steps/step-04-apply-changes.md +2 -2
- package/src/modules/bmb/workflows/edit-agent/steps/step-05-validate.md +4 -4
- package/src/modules/bmb/workflows/edit-agent/workflow.md +1 -1
- package/src/modules/bmb/workflows/edit-workflow/steps/step-01-analyze.md +2 -6
- package/src/modules/bmb/workflows/edit-workflow/steps/step-03-improve.md +2 -2
- package/src/modules/bmb/workflows/edit-workflow/steps/step-04-validate.md +1 -1
- package/src/modules/bmb/workflows/edit-workflow/workflow.md +1 -1
- package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-01-validate-goal.md +2 -2
- package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-02-workflow-validation.md +5 -5
- package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-03-step-validation.md +7 -7
- package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-04-file-validation.md +3 -3
- package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-05-intent-spectrum-validation.md +3 -3
- package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-06-web-subprocess-validation.md +3 -3
- package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-07-holistic-analysis.md +3 -3
- package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-08-generate-report.md +2 -2
- package/src/modules/bmb/workflows/workflow-compliance-check/workflow.md +1 -1
- package/src/modules/bmb/workflows-legacy/edit-module/checklist.md +0 -1
- package/src/modules/bmgd/README.md +2 -1
- package/src/modules/bmgd/workflows/3-technical/game-architecture/instructions.md +8 -8
- package/src/modules/bmm/_module-installer/installer.js +1 -1
- package/src/modules/bmm/_module-installer/platform-specifics/claude-code.js +1 -1
- package/src/modules/bmm/_module-installer/platform-specifics/windsurf.js +1 -1
- package/src/modules/bmm/agents/analyst.agent.yaml +11 -8
- package/src/modules/bmm/agents/architect.agent.yaml +1 -5
- package/src/modules/bmm/agents/pm.agent.yaml +5 -5
- package/src/modules/bmm/docs/README.md +23 -1
- package/src/modules/bmm/docs/agents-guide.md +16 -35
- package/src/modules/bmm/docs/brownfield-guide.md +17 -30
- package/src/modules/bmm/docs/enterprise-agentic-development.md +2 -2
- package/src/modules/bmm/docs/faq.md +6 -39
- package/src/modules/bmm/docs/glossary.md +11 -24
- package/src/modules/bmm/docs/images/README.md +37 -0
- package/src/modules/bmm/docs/images/workflow-method-greenfield.excalidraw +62 -202
- package/src/modules/bmm/docs/images/workflow-method-greenfield.svg +3 -1
- package/src/modules/bmm/docs/quick-spec-flow.md +652 -0
- package/src/modules/bmm/docs/quick-start.md +9 -25
- package/src/modules/bmm/docs/test-architecture.md +6 -6
- package/src/modules/bmm/docs/troubleshooting.md +680 -0
- package/src/modules/bmm/docs/workflow-document-project-reference.md +1 -1
- package/src/modules/bmm/docs/workflows-implementation.md +143 -3
- package/src/modules/bmm/docs/workflows-solutioning.md +2 -2
- package/src/modules/bmm/{_module-installer/install-config.yaml → module.yaml} +1 -1
- package/src/modules/bmm/tasks/daily-standup.xml +85 -0
- package/src/modules/bmm/testarch/knowledge/ci-burn-in.md +1 -1
- package/src/modules/bmm/testarch/knowledge/overview.md +1 -1
- package/src/modules/bmm/workflows/1-analysis/product-brief/steps/step-02-vision.md +2 -2
- package/src/modules/bmm/workflows/1-analysis/product-brief/steps/step-03-users.md +2 -2
- package/src/modules/bmm/workflows/1-analysis/product-brief/steps/step-04-metrics.md +2 -2
- package/src/modules/bmm/workflows/1-analysis/product-brief/steps/step-05-scope.md +2 -2
- package/src/modules/bmm/workflows/1-analysis/product-brief/workflow.md +1 -1
- package/src/modules/bmm/workflows/1-analysis/research/domain-steps/step-01-init.md +8 -8
- package/src/modules/bmm/workflows/1-analysis/research/domain-steps/step-02-domain-analysis.md +18 -18
- package/src/modules/bmm/workflows/1-analysis/research/domain-steps/step-03-competitive-landscape.md +18 -18
- package/src/modules/bmm/workflows/1-analysis/research/domain-steps/step-04-regulatory-focus.md +18 -18
- package/src/modules/bmm/workflows/1-analysis/research/domain-steps/step-05-technical-trends.md +17 -17
- package/src/modules/bmm/workflows/1-analysis/research/domain-steps/step-06-research-synthesis.md +35 -36
- package/src/modules/bmm/workflows/1-analysis/research/market-steps/step-01-init.md +5 -6
- package/src/modules/bmm/workflows/1-analysis/research/market-steps/step-02-customer-behavior.md +20 -19
- package/src/modules/bmm/workflows/1-analysis/research/market-steps/step-02-customer-insights.md +21 -20
- package/src/modules/bmm/workflows/1-analysis/research/market-steps/step-03-customer-pain-points.md +20 -19
- package/src/modules/bmm/workflows/1-analysis/research/market-steps/step-04-customer-decisions.md +21 -20
- package/src/modules/bmm/workflows/1-analysis/research/market-steps/step-05-competitive-analysis.md +16 -15
- package/src/modules/bmm/workflows/1-analysis/research/market-steps/step-06-research-completion.md +36 -37
- package/src/modules/bmm/workflows/1-analysis/research/research.template.md +0 -1
- package/src/modules/bmm/workflows/1-analysis/research/technical-steps/step-01-init.md +8 -8
- package/src/modules/bmm/workflows/1-analysis/research/technical-steps/step-02-technical-overview.md +19 -18
- package/src/modules/bmm/workflows/1-analysis/research/technical-steps/step-03-integration-patterns.md +20 -19
- package/src/modules/bmm/workflows/1-analysis/research/technical-steps/step-04-architectural-patterns.md +21 -20
- package/src/modules/bmm/workflows/1-analysis/research/technical-steps/step-05-implementation-research.md +19 -18
- package/src/modules/bmm/workflows/1-analysis/research/technical-steps/step-06-research-synthesis.md +38 -39
- package/src/modules/bmm/workflows/1-analysis/research/workflow.md +14 -8
- package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/workflow.md +6 -0
- package/src/modules/bmm/workflows/2-plan-workflows/prd/prd-template.md +7 -0
- package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-01-init.md +138 -56
- package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-01b-continue.md +93 -51
- package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-02-discovery.md +223 -78
- package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-03-success.md +20 -2
- package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-04-journeys.md +18 -0
- package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-05-domain.md +21 -0
- package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-06-innovation.md +21 -0
- package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-07-project-type.md +21 -0
- package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-08-scoping.md +18 -0
- package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-09-functional.md +18 -0
- package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-10-nonfunctional.md +18 -0
- package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-11-complete.md +13 -0
- package/src/modules/bmm/workflows/2-plan-workflows/prd/workflow.md +2 -2
- package/src/modules/bmm/workflows/3-solutioning/architecture/steps/step-03-starter.md +14 -14
- package/src/modules/bmm/workflows/3-solutioning/architecture/steps/step-04-decisions.md +7 -7
- package/src/modules/bmm/workflows/3-solutioning/architecture/workflow.md +2 -1
- package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-01-validate-prerequisites.md +258 -0
- package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-02-design-epics.md +232 -0
- package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-03-create-stories.md +271 -0
- package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-04-final-validation.md +144 -0
- package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/templates/epics-template.md +57 -0
- package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.md +58 -0
- package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/steps/step-01-document-discovery.md +189 -0
- package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/steps/step-02-prd-analysis.md +177 -0
- package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/steps/step-03-epic-coverage-validation.md +178 -0
- package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/steps/step-04-ux-alignment.md +138 -0
- package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/steps/step-05-epic-quality-review.md +251 -0
- package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/steps/step-06-final-assessment.md +132 -0
- package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/templates/readiness-report-template.md +4 -0
- package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/workflow.md +54 -0
- package/src/modules/{bmgd/workflows/4-production → bmm/workflows/4-implementation}/code-review/checklist.md +2 -1
- package/src/modules/bmm/workflows/4-implementation/code-review/instructions.xml +51 -3
- package/src/modules/bmm/workflows/4-implementation/code-review/workflow.yaml +1 -1
- package/src/modules/bmm/workflows/4-implementation/create-story/instructions.xml +32 -2
- package/src/modules/bmm/workflows/4-implementation/retrospective/instructions.md +3 -3
- package/src/modules/bmm/workflows/4-implementation/sprint-planning/instructions.md +19 -21
- package/src/modules/bmm/workflows/4-implementation/sprint-planning/sprint-status-template.yaml +10 -10
- package/src/modules/bmm/workflows/4-implementation/sprint-status/instructions.md +174 -0
- package/src/modules/bmm/workflows/4-implementation/sprint-status/workflow.yaml +35 -0
- package/src/modules/bmm/workflows/bmad-quick-flow/quick-dev/instructions.md +104 -7
- package/src/modules/bmm/workflows/bmad-quick-flow/quick-dev/workflow.yaml +4 -0
- package/src/modules/bmm/workflows/document-project/instructions.md +1 -1
- package/src/modules/bmm/workflows/document-project/workflows/deep-dive-instructions.md +2 -2
- package/src/modules/bmm/workflows/generate-project-context/workflow.md +1 -1
- package/src/modules/bmm/workflows/testarch/atdd/atdd-checklist-template.md +1 -1
- package/src/modules/bmm/workflows/testarch/ci/checklist.md +1 -1
- package/src/modules/bmm/workflows/testarch/ci/github-actions-template.yaml +36 -3
- package/src/modules/bmm/workflows/testarch/ci/gitlab-ci-template.yaml +25 -4
- package/src/modules/bmm/workflows/testarch/ci/instructions.md +2 -2
- package/src/modules/bmm/workflows/testarch/test-review/instructions.md +1 -1
- package/src/modules/bmm/workflows/workflow-status/paths/enterprise-brownfield.yaml +1 -6
- package/src/modules/bmm/workflows/workflow-status/paths/enterprise-greenfield.yaml +1 -6
- package/src/modules/bmm/workflows/workflow-status/paths/method-brownfield.yaml +1 -6
- package/src/modules/bmm/workflows/workflow-status/paths/method-greenfield.yaml +1 -7
- package/src/modules/cis/_module-installer/installer.js +1 -1
- package/tools/cli/README.md +7 -7
- package/tools/cli/commands/build.js +9 -184
- package/tools/cli/commands/install.js +1 -6
- package/tools/cli/installers/lib/core/config-collector.js +80 -12
- package/tools/cli/installers/lib/core/custom-module-cache.js +239 -0
- package/tools/cli/installers/lib/core/detector.js +8 -4
- package/tools/cli/installers/lib/core/installer.js +933 -376
- package/tools/cli/installers/lib/core/manifest-generator.js +265 -41
- package/tools/cli/installers/lib/core/manifest.js +47 -0
- package/tools/cli/installers/lib/core/post-install-sidecar-replacement.js +79 -0
- package/tools/cli/installers/lib/custom/handler.js +396 -0
- package/tools/cli/installers/lib/ide/_base-ide.js +10 -0
- package/tools/cli/installers/lib/ide/auggie.js +19 -7
- package/tools/cli/installers/lib/ide/crush.js +19 -6
- package/tools/cli/installers/lib/ide/cursor.js +29 -13
- package/tools/cli/installers/lib/ide/gemini.js +49 -1
- package/tools/cli/installers/lib/ide/iflow.js +20 -1
- package/tools/cli/installers/lib/ide/kiro-cli.js +327 -0
- package/tools/cli/installers/lib/ide/opencode.js +3 -3
- package/tools/cli/installers/lib/ide/roo.js +120 -184
- package/tools/cli/installers/lib/ide/rovo-dev.js +1 -1
- package/tools/cli/installers/lib/ide/shared/agent-command-generator.js +8 -2
- package/tools/cli/installers/lib/ide/shared/bmad-artifacts.js +34 -19
- package/tools/cli/installers/lib/ide/shared/workflow-command-generator.js +18 -14
- package/tools/cli/installers/lib/ide/templates/agent-command-template.md +1 -1
- package/tools/cli/installers/lib/ide/templates/workflow-commander.md +5 -0
- package/tools/cli/installers/lib/modules/manager.js +535 -56
- package/tools/cli/lib/agent/compiler.js +57 -16
- package/tools/cli/lib/agent/installer.js +129 -28
- package/tools/cli/lib/cli-utils.js +21 -4
- package/tools/cli/lib/config.js +2 -1
- package/tools/cli/lib/ui.js +561 -12
- package/tools/cli/lib/yaml-xml-builder.js +0 -15
- package/tools/maintainer/review-pr-README.md +55 -0
- package/tools/maintainer/review-pr.md +242 -0
- package/tools/migrate-custom-module-paths.js +124 -0
- package/tools/schema/agent.js +149 -89
- package/tools/validate-svg-changes.sh +356 -0
- package/custom/src/agents/commit-poet/installation-guide.md +0 -36
- package/custom/src/agents/toolsmith/installation-guide.md +0 -36
- package/docs/custom-agent-installation.md +0 -183
- package/src/modules/bmb/docs/workflows/workflow-template.md +0 -152
- package/src/modules/bmb/workflows/create-workflow/steps/step-03-tools-overview.md +0 -127
- package/src/modules/bmb/workflows/create-workflow/steps/step-04-core-tools.md +0 -145
- package/src/modules/bmb/workflows/create-workflow/steps/step-05-memory-requirements.md +0 -136
- package/src/modules/bmb/workflows/create-workflow/steps/step-06-external-tools.md +0 -154
- package/src/modules/bmb/workflows/create-workflow/steps/step-07-installation-guidance.md +0 -159
- package/src/modules/bmb/workflows/create-workflow/steps/step-08-tools-summary.md +0 -167
- package/src/modules/bmb/workflows/create-workflow/steps/step-10-plan-review.md +0 -215
- package/src/modules/bmb/workflows/create-workflow/templates/build-summary.md +0 -36
- package/src/modules/bmb/workflows/create-workflow/templates/completion-section.md +0 -39
- package/src/modules/bmb/workflows/create-workflow/templates/content-template.md +0 -21
- package/src/modules/bmb/workflows/create-workflow/templates/design-section.md +0 -53
- package/src/modules/bmb/workflows/create-workflow/templates/project-info.md +0 -18
- package/src/modules/bmb/workflows/create-workflow/templates/requirements-section.md +0 -47
- package/src/modules/bmb/workflows/create-workflow/templates/review-section.md +0 -56
- package/src/modules/bmb/workflows/create-workflow/templates/workflow-plan.md +0 -54
- package/src/modules/bmb/workflows-legacy/create-module/README.md +0 -229
- package/src/modules/bmb/workflows-legacy/create-module/brainstorm-context.md +0 -137
- package/src/modules/bmb/workflows-legacy/create-module/checklist.md +0 -235
- package/src/modules/bmb/workflows-legacy/create-module/installer-templates/install-config.yaml +0 -92
- package/src/modules/bmb/workflows-legacy/create-module/installer-templates/installer.js +0 -231
- package/src/modules/bmb/workflows-legacy/create-module/instructions.md +0 -577
- package/src/modules/bmb/workflows-legacy/create-module/module-structure.md +0 -400
- package/src/modules/bmb/workflows-legacy/create-module/workflow.yaml +0 -52
- package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/epics-template.md +0 -80
- package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/instructions.md +0 -387
- package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.yaml +0 -53
- package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/checklist.md +0 -169
- package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/instructions.md +0 -332
- package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/template.md +0 -146
- package/src/modules/bmm/workflows/3-solutioning/implementation-readiness/workflow.yaml +0 -64
- package/tools/cli/commands/agent-install.js +0 -409
- package/tools/cli/commands/cleanup.js +0 -141
- /package/{custom/src → example-custom-content}/agents/toolsmith/toolsmith-sidecar/knowledge/bundlers.md +0 -0
- /package/{custom/src → example-custom-content}/agents/toolsmith/toolsmith-sidecar/knowledge/deploy.md +0 -0
- /package/{custom/src → example-custom-content}/agents/toolsmith/toolsmith-sidecar/knowledge/tests.md +0 -0
- /package/src/modules/bmgd/{_module-installer/install-config.yaml → module.yaml} +0 -0
- /package/src/modules/cis/{_module-installer/install-config.yaml → module.yaml} +0 -0
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
const path = require('node:path');
|
|
2
|
+
const fs = require('fs-extra');
|
|
3
|
+
const chalk = require('chalk');
|
|
4
|
+
const yaml = require('js-yaml');
|
|
5
|
+
const { FileOps } = require('../../../lib/file-ops');
|
|
6
|
+
const { XmlHandler } = require('../../../lib/xml-handler');
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Handler for custom content (custom.yaml)
|
|
10
|
+
* Installs custom agents and workflows without requiring a full module structure
|
|
11
|
+
*/
|
|
12
|
+
class CustomHandler {
|
|
13
|
+
constructor() {
|
|
14
|
+
this.fileOps = new FileOps();
|
|
15
|
+
this.xmlHandler = new XmlHandler();
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Find all custom.yaml files in the project
|
|
20
|
+
* @param {string} projectRoot - Project root directory
|
|
21
|
+
* @returns {Array} List of custom content paths
|
|
22
|
+
*/
|
|
23
|
+
async findCustomContent(projectRoot) {
|
|
24
|
+
const customPaths = [];
|
|
25
|
+
|
|
26
|
+
// Helper function to recursively scan directories
|
|
27
|
+
async function scanDirectory(dir, excludePaths = []) {
|
|
28
|
+
try {
|
|
29
|
+
const entries = await fs.readdir(dir, { withFileTypes: true });
|
|
30
|
+
|
|
31
|
+
for (const entry of entries) {
|
|
32
|
+
const fullPath = path.join(dir, entry.name);
|
|
33
|
+
|
|
34
|
+
// Skip hidden directories and common exclusions
|
|
35
|
+
if (
|
|
36
|
+
entry.name.startsWith('.') ||
|
|
37
|
+
entry.name === 'node_modules' ||
|
|
38
|
+
entry.name === 'dist' ||
|
|
39
|
+
entry.name === 'build' ||
|
|
40
|
+
entry.name === '.git' ||
|
|
41
|
+
entry.name === 'bmad'
|
|
42
|
+
) {
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Skip excluded paths
|
|
47
|
+
if (excludePaths.some((exclude) => fullPath.startsWith(exclude))) {
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (entry.isDirectory()) {
|
|
52
|
+
// Recursively scan subdirectories
|
|
53
|
+
await scanDirectory(fullPath, excludePaths);
|
|
54
|
+
} else if (entry.name === 'custom.yaml') {
|
|
55
|
+
// Found a custom.yaml file
|
|
56
|
+
customPaths.push(fullPath);
|
|
57
|
+
} else if (
|
|
58
|
+
entry.name === 'module.yaml' && // Check if this is a custom module (either in _module-installer or in root directory)
|
|
59
|
+
// Skip if it's in src/modules (those are standard modules)
|
|
60
|
+
!fullPath.includes(path.join('src', 'modules'))
|
|
61
|
+
) {
|
|
62
|
+
customPaths.push(fullPath);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
} catch {
|
|
66
|
+
// Ignore errors (e.g., permission denied)
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Scan the entire project, but exclude source directories
|
|
71
|
+
await scanDirectory(projectRoot, [path.join(projectRoot, 'src'), path.join(projectRoot, 'tools'), path.join(projectRoot, 'test')]);
|
|
72
|
+
|
|
73
|
+
return customPaths;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Get custom content info from a custom.yaml or module.yaml file
|
|
78
|
+
* @param {string} configPath - Path to config file
|
|
79
|
+
* @param {string} projectRoot - Project root directory for calculating relative paths
|
|
80
|
+
* @returns {Object|null} Custom content info
|
|
81
|
+
*/
|
|
82
|
+
async getCustomInfo(configPath, projectRoot = null) {
|
|
83
|
+
try {
|
|
84
|
+
const configContent = await fs.readFile(configPath, 'utf8');
|
|
85
|
+
|
|
86
|
+
// Try to parse YAML with error handling
|
|
87
|
+
let config;
|
|
88
|
+
try {
|
|
89
|
+
config = yaml.load(configContent);
|
|
90
|
+
} catch (parseError) {
|
|
91
|
+
console.warn(chalk.yellow(`Warning: YAML parse error in ${configPath}:`, parseError.message));
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Check if this is an module.yaml (module) or custom.yaml (custom content)
|
|
96
|
+
const isInstallConfig = configPath.endsWith('module.yaml');
|
|
97
|
+
const configDir = path.dirname(configPath);
|
|
98
|
+
|
|
99
|
+
// Use provided projectRoot or fall back to process.cwd()
|
|
100
|
+
const basePath = projectRoot || process.cwd();
|
|
101
|
+
const relativePath = path.relative(basePath, configDir);
|
|
102
|
+
|
|
103
|
+
return {
|
|
104
|
+
id: config.code || 'unknown-code',
|
|
105
|
+
name: config.name,
|
|
106
|
+
description: config.description || '',
|
|
107
|
+
path: configDir,
|
|
108
|
+
relativePath: relativePath,
|
|
109
|
+
defaultSelected: config.default_selected === true,
|
|
110
|
+
config: config,
|
|
111
|
+
isInstallConfig: isInstallConfig, // Track which type this is
|
|
112
|
+
};
|
|
113
|
+
} catch (error) {
|
|
114
|
+
console.warn(chalk.yellow(`Warning: Failed to read ${configPath}:`, error.message));
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Install custom content
|
|
121
|
+
* @param {string} customPath - Path to custom content directory
|
|
122
|
+
* @param {string} bmadDir - Target bmad directory
|
|
123
|
+
* @param {Object} config - Configuration from custom.yaml
|
|
124
|
+
* @param {Function} fileTrackingCallback - Optional callback to track installed files
|
|
125
|
+
* @returns {Object} Installation result
|
|
126
|
+
*/
|
|
127
|
+
async install(customPath, bmadDir, config, fileTrackingCallback = null) {
|
|
128
|
+
const results = {
|
|
129
|
+
agentsInstalled: 0,
|
|
130
|
+
workflowsInstalled: 0,
|
|
131
|
+
filesCopied: 0,
|
|
132
|
+
preserved: 0,
|
|
133
|
+
errors: [],
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
try {
|
|
137
|
+
// Create custom directories in bmad
|
|
138
|
+
const bmadCustomDir = path.join(bmadDir, 'custom');
|
|
139
|
+
const bmadAgentsDir = path.join(bmadCustomDir, 'agents');
|
|
140
|
+
const bmadWorkflowsDir = path.join(bmadCustomDir, 'workflows');
|
|
141
|
+
|
|
142
|
+
await fs.ensureDir(bmadCustomDir);
|
|
143
|
+
await fs.ensureDir(bmadAgentsDir);
|
|
144
|
+
await fs.ensureDir(bmadWorkflowsDir);
|
|
145
|
+
|
|
146
|
+
// Process agents - compile and copy agents
|
|
147
|
+
const agentsDir = path.join(customPath, 'agents');
|
|
148
|
+
if (await fs.pathExists(agentsDir)) {
|
|
149
|
+
await this.compileAndCopyAgents(agentsDir, bmadAgentsDir, bmadDir, config, fileTrackingCallback, results);
|
|
150
|
+
|
|
151
|
+
// Count agent files
|
|
152
|
+
const agentFiles = await this.findFilesRecursively(agentsDir, ['.agent.yaml', '.md']);
|
|
153
|
+
results.agentsInstalled = agentFiles.length;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Process workflows - copy entire workflows directory structure
|
|
157
|
+
const workflowsDir = path.join(customPath, 'workflows');
|
|
158
|
+
if (await fs.pathExists(workflowsDir)) {
|
|
159
|
+
await this.copyDirectory(workflowsDir, bmadWorkflowsDir, results, fileTrackingCallback, config);
|
|
160
|
+
|
|
161
|
+
// Count workflow files
|
|
162
|
+
const workflowFiles = await this.findFilesRecursively(workflowsDir, ['.md']);
|
|
163
|
+
results.workflowsInstalled = workflowFiles.length;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// Process any additional files at root
|
|
167
|
+
const entries = await fs.readdir(customPath, { withFileTypes: true });
|
|
168
|
+
for (const entry of entries) {
|
|
169
|
+
if (entry.isFile() && entry.name !== 'custom.yaml' && !entry.name.startsWith('.') && !entry.name.endsWith('.md')) {
|
|
170
|
+
// Skip .md files at root as they're likely docs
|
|
171
|
+
const sourcePath = path.join(customPath, entry.name);
|
|
172
|
+
const targetPath = path.join(bmadCustomDir, entry.name);
|
|
173
|
+
|
|
174
|
+
try {
|
|
175
|
+
// Check if file already exists
|
|
176
|
+
if (await fs.pathExists(targetPath)) {
|
|
177
|
+
// File already exists, preserve it
|
|
178
|
+
results.preserved = (results.preserved || 0) + 1;
|
|
179
|
+
} else {
|
|
180
|
+
await fs.copy(sourcePath, targetPath);
|
|
181
|
+
results.filesCopied++;
|
|
182
|
+
|
|
183
|
+
if (fileTrackingCallback) {
|
|
184
|
+
fileTrackingCallback(targetPath);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
} catch (error) {
|
|
188
|
+
results.errors.push(`Failed to copy file ${entry.name}: ${error.message}`);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
} catch (error) {
|
|
193
|
+
results.errors.push(`Installation failed: ${error.message}`);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
return results;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Find all files with specific extensions recursively
|
|
201
|
+
* @param {string} dir - Directory to search
|
|
202
|
+
* @param {Array} extensions - File extensions to match
|
|
203
|
+
* @returns {Array} List of matching files
|
|
204
|
+
*/
|
|
205
|
+
async findFilesRecursively(dir, extensions) {
|
|
206
|
+
const files = [];
|
|
207
|
+
|
|
208
|
+
async function search(currentDir) {
|
|
209
|
+
const entries = await fs.readdir(currentDir, { withFileTypes: true });
|
|
210
|
+
|
|
211
|
+
for (const entry of entries) {
|
|
212
|
+
const fullPath = path.join(currentDir, entry.name);
|
|
213
|
+
|
|
214
|
+
if (entry.isDirectory()) {
|
|
215
|
+
await search(fullPath);
|
|
216
|
+
} else if (extensions.some((ext) => entry.name.endsWith(ext))) {
|
|
217
|
+
files.push(fullPath);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
await search(dir);
|
|
223
|
+
return files;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Recursively copy a directory
|
|
228
|
+
* @param {string} sourceDir - Source directory
|
|
229
|
+
* @param {string} targetDir - Target directory
|
|
230
|
+
* @param {Object} results - Results object to update
|
|
231
|
+
* @param {Function} fileTrackingCallback - Optional callback
|
|
232
|
+
* @param {Object} config - Configuration for placeholder replacement
|
|
233
|
+
*/
|
|
234
|
+
async copyDirectory(sourceDir, targetDir, results, fileTrackingCallback, config) {
|
|
235
|
+
await fs.ensureDir(targetDir);
|
|
236
|
+
const entries = await fs.readdir(sourceDir, { withFileTypes: true });
|
|
237
|
+
|
|
238
|
+
for (const entry of entries) {
|
|
239
|
+
const sourcePath = path.join(sourceDir, entry.name);
|
|
240
|
+
const targetPath = path.join(targetDir, entry.name);
|
|
241
|
+
|
|
242
|
+
if (entry.isDirectory()) {
|
|
243
|
+
await this.copyDirectory(sourcePath, targetPath, results, fileTrackingCallback, config);
|
|
244
|
+
} else {
|
|
245
|
+
try {
|
|
246
|
+
// Check if file already exists
|
|
247
|
+
if (await fs.pathExists(targetPath)) {
|
|
248
|
+
// File already exists, preserve it
|
|
249
|
+
results.preserved = (results.preserved || 0) + 1;
|
|
250
|
+
} else {
|
|
251
|
+
// Copy with placeholder replacement for text files
|
|
252
|
+
const textExtensions = ['.md', '.yaml', '.yml', '.txt', '.json'];
|
|
253
|
+
if (textExtensions.some((ext) => entry.name.endsWith(ext))) {
|
|
254
|
+
// Read source content
|
|
255
|
+
let content = await fs.readFile(sourcePath, 'utf8');
|
|
256
|
+
|
|
257
|
+
// Replace placeholders
|
|
258
|
+
content = content.replaceAll('{bmad_folder}', config.bmad_folder || 'bmad');
|
|
259
|
+
content = content.replaceAll('{user_name}', config.user_name || 'User');
|
|
260
|
+
content = content.replaceAll('{communication_language}', config.communication_language || 'English');
|
|
261
|
+
content = content.replaceAll('{output_folder}', config.output_folder || 'docs');
|
|
262
|
+
|
|
263
|
+
// Write to target
|
|
264
|
+
await fs.ensureDir(path.dirname(targetPath));
|
|
265
|
+
await fs.writeFile(targetPath, content, 'utf8');
|
|
266
|
+
} else {
|
|
267
|
+
// Copy binary files as-is
|
|
268
|
+
await fs.copy(sourcePath, targetPath);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
results.filesCopied++;
|
|
272
|
+
if (fileTrackingCallback) {
|
|
273
|
+
fileTrackingCallback(targetPath);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
if (entry.name.endsWith('.md')) {
|
|
278
|
+
results.workflowsInstalled++;
|
|
279
|
+
}
|
|
280
|
+
} catch (error) {
|
|
281
|
+
results.errors.push(`Failed to copy ${entry.name}: ${error.message}`);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Compile .agent.yaml files to .md format and handle sidecars
|
|
289
|
+
* @param {string} sourceAgentsPath - Source agents directory
|
|
290
|
+
* @param {string} targetAgentsPath - Target agents directory
|
|
291
|
+
* @param {string} bmadDir - BMAD installation directory
|
|
292
|
+
* @param {Object} config - Configuration for placeholder replacement
|
|
293
|
+
* @param {Function} fileTrackingCallback - Optional callback to track installed files
|
|
294
|
+
* @param {Object} results - Results object to update
|
|
295
|
+
*/
|
|
296
|
+
async compileAndCopyAgents(sourceAgentsPath, targetAgentsPath, bmadDir, config, fileTrackingCallback, results) {
|
|
297
|
+
// Get all .agent.yaml files recursively
|
|
298
|
+
const agentFiles = await this.findFilesRecursively(sourceAgentsPath, ['.agent.yaml']);
|
|
299
|
+
|
|
300
|
+
for (const agentFile of agentFiles) {
|
|
301
|
+
const relativePath = path.relative(sourceAgentsPath, agentFile);
|
|
302
|
+
const targetDir = path.join(targetAgentsPath, path.dirname(relativePath));
|
|
303
|
+
|
|
304
|
+
await fs.ensureDir(targetDir);
|
|
305
|
+
|
|
306
|
+
const agentName = path.basename(agentFile, '.agent.yaml');
|
|
307
|
+
const targetMdPath = path.join(targetDir, `${agentName}.md`);
|
|
308
|
+
// Use the actual bmadDir if available (for when installing to temp dir)
|
|
309
|
+
const actualBmadDir = config._bmadDir || bmadDir;
|
|
310
|
+
const customizePath = path.join(actualBmadDir, '_cfg', 'agents', `custom-${agentName}.customize.yaml`);
|
|
311
|
+
|
|
312
|
+
// Read and compile the YAML
|
|
313
|
+
try {
|
|
314
|
+
const yamlContent = await fs.readFile(agentFile, 'utf8');
|
|
315
|
+
const { compileAgent } = require('../../../lib/agent/compiler');
|
|
316
|
+
|
|
317
|
+
// Create customize template if it doesn't exist
|
|
318
|
+
if (!(await fs.pathExists(customizePath))) {
|
|
319
|
+
const { getSourcePath } = require('../../../lib/project-root');
|
|
320
|
+
const genericTemplatePath = getSourcePath('utility', 'templates', 'agent.customize.template.yaml');
|
|
321
|
+
if (await fs.pathExists(genericTemplatePath)) {
|
|
322
|
+
// Copy with placeholder replacement
|
|
323
|
+
let templateContent = await fs.readFile(genericTemplatePath, 'utf8');
|
|
324
|
+
templateContent = templateContent.replaceAll('{bmad_folder}', config.bmad_folder || 'bmad');
|
|
325
|
+
await fs.writeFile(customizePath, templateContent, 'utf8');
|
|
326
|
+
console.log(chalk.dim(` Created customize: custom-${agentName}.customize.yaml`));
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
// Compile the agent
|
|
331
|
+
const { xml } = compileAgent(yamlContent, {}, agentName, relativePath, { config });
|
|
332
|
+
|
|
333
|
+
// Replace placeholders in the compiled content
|
|
334
|
+
let processedXml = xml;
|
|
335
|
+
processedXml = processedXml.replaceAll('{bmad_folder}', config.bmad_folder || 'bmad');
|
|
336
|
+
processedXml = processedXml.replaceAll('{user_name}', config.user_name || 'User');
|
|
337
|
+
processedXml = processedXml.replaceAll('{communication_language}', config.communication_language || 'English');
|
|
338
|
+
processedXml = processedXml.replaceAll('{output_folder}', config.output_folder || 'docs');
|
|
339
|
+
|
|
340
|
+
// Write the compiled MD file
|
|
341
|
+
await fs.writeFile(targetMdPath, processedXml, 'utf8');
|
|
342
|
+
|
|
343
|
+
// Check if agent has sidecar
|
|
344
|
+
let hasSidecar = false;
|
|
345
|
+
try {
|
|
346
|
+
const yamlLib = require('yaml');
|
|
347
|
+
const agentYaml = yamlLib.parse(yamlContent);
|
|
348
|
+
hasSidecar = agentYaml?.agent?.metadata?.hasSidecar === true;
|
|
349
|
+
} catch {
|
|
350
|
+
// Continue without sidecar processing
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
// Copy sidecar files if agent has hasSidecar flag
|
|
354
|
+
if (hasSidecar && config.agent_sidecar_folder) {
|
|
355
|
+
const { copyAgentSidecarFiles } = require('../../../lib/agent/installer');
|
|
356
|
+
|
|
357
|
+
// Resolve agent sidecar folder path
|
|
358
|
+
const projectDir = path.dirname(bmadDir);
|
|
359
|
+
const resolvedSidecarFolder = config.agent_sidecar_folder
|
|
360
|
+
.replaceAll('{project-root}', projectDir)
|
|
361
|
+
.replaceAll('{bmad_folder}', path.basename(bmadDir));
|
|
362
|
+
|
|
363
|
+
// Create sidecar directory for this agent
|
|
364
|
+
const agentSidecarDir = path.join(resolvedSidecarFolder, agentName);
|
|
365
|
+
await fs.ensureDir(agentSidecarDir);
|
|
366
|
+
|
|
367
|
+
// Copy sidecar files
|
|
368
|
+
const sidecarResult = copyAgentSidecarFiles(path.dirname(agentFile), agentSidecarDir, agentFile);
|
|
369
|
+
|
|
370
|
+
if (sidecarResult.copied.length > 0) {
|
|
371
|
+
console.log(chalk.dim(` Copied ${sidecarResult.copied.length} sidecar file(s) to: ${agentSidecarDir}`));
|
|
372
|
+
}
|
|
373
|
+
if (sidecarResult.preserved.length > 0) {
|
|
374
|
+
console.log(chalk.dim(` Preserved ${sidecarResult.preserved.length} existing sidecar file(s)`));
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
// Track the file
|
|
379
|
+
if (fileTrackingCallback) {
|
|
380
|
+
fileTrackingCallback(targetMdPath);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
console.log(
|
|
384
|
+
chalk.dim(
|
|
385
|
+
` Compiled agent: ${agentName} -> ${path.relative(targetAgentsPath, targetMdPath)}${hasSidecar ? ' (with sidecar)' : ''}`,
|
|
386
|
+
),
|
|
387
|
+
);
|
|
388
|
+
} catch (error) {
|
|
389
|
+
console.warn(chalk.yellow(` Failed to compile agent ${agentName}:`, error.message));
|
|
390
|
+
results.errors.push(`Failed to compile agent ${agentName}: ${error.message}`);
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
module.exports = { CustomHandler };
|
|
@@ -536,6 +536,11 @@ class BaseIdeSetup {
|
|
|
536
536
|
if (typeof content === 'string' && content.includes('{bmad_folder}')) {
|
|
537
537
|
content = content.replaceAll('{bmad_folder}', this.bmadFolderName);
|
|
538
538
|
}
|
|
539
|
+
|
|
540
|
+
// Replace escape sequence {*bmad_folder*} with literal {bmad_folder}
|
|
541
|
+
if (typeof content === 'string' && content.includes('{*bmad_folder*}')) {
|
|
542
|
+
content = content.replaceAll('{*bmad_folder*}', '{bmad_folder}');
|
|
543
|
+
}
|
|
539
544
|
await this.ensureDir(path.dirname(filePath));
|
|
540
545
|
await fs.writeFile(filePath, content, 'utf8');
|
|
541
546
|
}
|
|
@@ -563,6 +568,11 @@ class BaseIdeSetup {
|
|
|
563
568
|
content = content.replaceAll('{bmad_folder}', this.bmadFolderName);
|
|
564
569
|
}
|
|
565
570
|
|
|
571
|
+
// Replace escape sequence {*bmad_folder*} with literal {bmad_folder}
|
|
572
|
+
if (content.includes('{*bmad_folder*}')) {
|
|
573
|
+
content = content.replaceAll('{*bmad_folder*}', '{bmad_folder}');
|
|
574
|
+
}
|
|
575
|
+
|
|
566
576
|
// Write to dest with replaced content
|
|
567
577
|
await fs.writeFile(dest, content, 'utf8');
|
|
568
578
|
} catch {
|
|
@@ -3,6 +3,7 @@ const fs = require('fs-extra');
|
|
|
3
3
|
const { BaseIdeSetup } = require('./_base-ide');
|
|
4
4
|
const chalk = require('chalk');
|
|
5
5
|
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
|
|
6
|
+
const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator');
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Auggie CLI setup handler
|
|
@@ -33,10 +34,23 @@ class AuggieSetup extends BaseIdeSetup {
|
|
|
33
34
|
const agentGen = new AgentCommandGenerator(this.bmadFolderName);
|
|
34
35
|
const { artifacts: agentArtifacts } = await agentGen.collectAgentArtifacts(bmadDir, options.selectedModules || []);
|
|
35
36
|
|
|
36
|
-
// Get tasks, tools, and workflows (
|
|
37
|
+
// Get tasks, tools, and workflows (ALL workflows now generate commands)
|
|
37
38
|
const tasks = await this.getTasks(bmadDir, true);
|
|
38
39
|
const tools = await this.getTools(bmadDir, true);
|
|
39
|
-
|
|
40
|
+
|
|
41
|
+
// Get ALL workflows using the new workflow command generator
|
|
42
|
+
const workflowGenerator = new WorkflowCommandGenerator(this.bmadFolderName);
|
|
43
|
+
const { artifacts: workflowArtifacts, counts: workflowCounts } = await workflowGenerator.collectWorkflowArtifacts(bmadDir);
|
|
44
|
+
|
|
45
|
+
// Convert workflow artifacts to expected format
|
|
46
|
+
const workflows = workflowArtifacts
|
|
47
|
+
.filter((artifact) => artifact.type === 'workflow-command')
|
|
48
|
+
.map((artifact) => ({
|
|
49
|
+
module: artifact.module,
|
|
50
|
+
name: path.basename(artifact.relativePath, '.md'),
|
|
51
|
+
path: artifact.sourcePath,
|
|
52
|
+
content: artifact.content,
|
|
53
|
+
}));
|
|
40
54
|
|
|
41
55
|
const bmadCommandsDir = path.join(location, 'bmad');
|
|
42
56
|
const agentsDir = path.join(bmadCommandsDir, 'agents');
|
|
@@ -73,13 +87,11 @@ class AuggieSetup extends BaseIdeSetup {
|
|
|
73
87
|
await this.writeFile(targetPath, commandContent);
|
|
74
88
|
}
|
|
75
89
|
|
|
76
|
-
// Install workflows
|
|
90
|
+
// Install workflows (already generated commands)
|
|
77
91
|
for (const workflow of workflows) {
|
|
78
|
-
|
|
79
|
-
const commandContent = this.createWorkflowCommand(workflow, content);
|
|
80
|
-
|
|
92
|
+
// Use the pre-generated workflow command content
|
|
81
93
|
const targetPath = path.join(workflowsDir, `${workflow.module}-${workflow.name}.md`);
|
|
82
|
-
await this.writeFile(targetPath,
|
|
94
|
+
await this.writeFile(targetPath, workflow.content);
|
|
83
95
|
}
|
|
84
96
|
|
|
85
97
|
const totalInstalled = agentArtifacts.length + tasks.length + tools.length + workflows.length;
|
|
@@ -3,6 +3,7 @@ const fs = require('fs-extra');
|
|
|
3
3
|
const { BaseIdeSetup } = require('./_base-ide');
|
|
4
4
|
const chalk = require('chalk');
|
|
5
5
|
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
|
|
6
|
+
const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator');
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Crush IDE setup handler
|
|
@@ -34,10 +35,23 @@ class CrushSetup extends BaseIdeSetup {
|
|
|
34
35
|
const agentGen = new AgentCommandGenerator(this.bmadFolderName);
|
|
35
36
|
const { artifacts: agentArtifacts } = await agentGen.collectAgentArtifacts(bmadDir, options.selectedModules || []);
|
|
36
37
|
|
|
37
|
-
// Get tasks, tools, and workflows (
|
|
38
|
+
// Get tasks, tools, and workflows (ALL workflows now generate commands)
|
|
38
39
|
const tasks = await this.getTasks(bmadDir, true);
|
|
39
40
|
const tools = await this.getTools(bmadDir, true);
|
|
40
|
-
|
|
41
|
+
|
|
42
|
+
// Get ALL workflows using the new workflow command generator
|
|
43
|
+
const workflowGenerator = new WorkflowCommandGenerator(this.bmadFolderName);
|
|
44
|
+
const { artifacts: workflowArtifacts, counts: workflowCounts } = await workflowGenerator.collectWorkflowArtifacts(bmadDir);
|
|
45
|
+
|
|
46
|
+
// Convert workflow artifacts to expected format for organizeByModule
|
|
47
|
+
const workflows = workflowArtifacts
|
|
48
|
+
.filter((artifact) => artifact.type === 'workflow-command')
|
|
49
|
+
.map((artifact) => ({
|
|
50
|
+
module: artifact.module,
|
|
51
|
+
name: path.basename(artifact.relativePath, '.md'),
|
|
52
|
+
path: artifact.sourcePath,
|
|
53
|
+
content: artifact.content,
|
|
54
|
+
}));
|
|
41
55
|
|
|
42
56
|
// Organize by module
|
|
43
57
|
const agentCount = await this.organizeByModule(commandsDir, agentArtifacts, tasks, tools, workflows, projectDir);
|
|
@@ -113,13 +127,12 @@ class CrushSetup extends BaseIdeSetup {
|
|
|
113
127
|
toolCount++;
|
|
114
128
|
}
|
|
115
129
|
|
|
116
|
-
// Copy module-specific
|
|
130
|
+
// Copy module-specific workflow commands (already generated)
|
|
117
131
|
const moduleWorkflows = workflows.filter((w) => w.module === module);
|
|
118
132
|
for (const workflow of moduleWorkflows) {
|
|
119
|
-
|
|
120
|
-
const commandContent = this.createWorkflowCommand(workflow, content);
|
|
133
|
+
// Use the pre-generated workflow command content
|
|
121
134
|
const targetPath = path.join(moduleWorkflowsDir, `${workflow.name}.md`);
|
|
122
|
-
await this.writeFile(targetPath,
|
|
135
|
+
await this.writeFile(targetPath, workflow.content);
|
|
123
136
|
workflowCount++;
|
|
124
137
|
}
|
|
125
138
|
}
|
|
@@ -2,6 +2,7 @@ const path = require('node:path');
|
|
|
2
2
|
const { BaseIdeSetup } = require('./_base-ide');
|
|
3
3
|
const chalk = require('chalk');
|
|
4
4
|
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
|
|
5
|
+
const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator');
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Cursor IDE setup handler
|
|
@@ -53,10 +54,22 @@ class CursorSetup extends BaseIdeSetup {
|
|
|
53
54
|
// Convert artifacts to agent format for index creation
|
|
54
55
|
const agents = agentArtifacts.map((a) => ({ module: a.module, name: a.name }));
|
|
55
56
|
|
|
56
|
-
// Get tasks, tools, and workflows (
|
|
57
|
+
// Get tasks, tools, and workflows (ALL workflows now generate commands)
|
|
57
58
|
const tasks = await this.getTasks(bmadDir, true);
|
|
58
59
|
const tools = await this.getTools(bmadDir, true);
|
|
59
|
-
|
|
60
|
+
|
|
61
|
+
// Get ALL workflows using the new workflow command generator
|
|
62
|
+
const workflowGenerator = new WorkflowCommandGenerator(this.bmadFolderName);
|
|
63
|
+
const { artifacts: workflowArtifacts, counts: workflowCounts } = await workflowGenerator.collectWorkflowArtifacts(bmadDir);
|
|
64
|
+
|
|
65
|
+
// Convert artifacts to workflow objects for directory creation
|
|
66
|
+
const workflows = workflowArtifacts
|
|
67
|
+
.filter((artifact) => artifact.type === 'workflow-command')
|
|
68
|
+
.map((artifact) => ({
|
|
69
|
+
module: artifact.module,
|
|
70
|
+
name: path.basename(artifact.relativePath, '.md'),
|
|
71
|
+
path: artifact.sourcePath,
|
|
72
|
+
}));
|
|
60
73
|
|
|
61
74
|
// Create directories for each module
|
|
62
75
|
const modules = new Set();
|
|
@@ -113,18 +126,21 @@ class CursorSetup extends BaseIdeSetup {
|
|
|
113
126
|
toolCount++;
|
|
114
127
|
}
|
|
115
128
|
|
|
116
|
-
// Process and copy workflows
|
|
129
|
+
// Process and copy workflow commands (generated, not raw workflows)
|
|
117
130
|
let workflowCount = 0;
|
|
118
|
-
for (const
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
131
|
+
for (const artifact of workflowArtifacts) {
|
|
132
|
+
if (artifact.type === 'workflow-command') {
|
|
133
|
+
// Add MDC metadata header to workflow command
|
|
134
|
+
const content = this.wrapLauncherWithMDC(artifact.content, {
|
|
135
|
+
module: artifact.module,
|
|
136
|
+
name: path.basename(artifact.relativePath, '.md'),
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
const targetPath = path.join(bmadRulesDir, artifact.module, 'workflows', `${path.basename(artifact.relativePath, '.md')}.mdc`);
|
|
140
|
+
|
|
141
|
+
await this.writeFile(targetPath, content);
|
|
142
|
+
workflowCount++;
|
|
143
|
+
}
|
|
128
144
|
}
|
|
129
145
|
|
|
130
146
|
// Create BMAD index file (but NOT .cursorrules - user manages that)
|