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
|
@@ -34,10 +34,18 @@ class ManifestGenerator {
|
|
|
34
34
|
|
|
35
35
|
// Store modules list (all modules including preserved ones)
|
|
36
36
|
const preservedModules = options.preservedModules || [];
|
|
37
|
+
|
|
38
|
+
// Scan the bmad directory to find all actually installed modules
|
|
39
|
+
const installedModules = await this.scanInstalledModules(bmadDir);
|
|
40
|
+
|
|
37
41
|
// Deduplicate modules list to prevent duplicates
|
|
38
|
-
this.modules = [...new Set(['core', ...selectedModules, ...preservedModules])];
|
|
39
|
-
this.updatedModules = [...new Set(['core', ...selectedModules])]; //
|
|
40
|
-
|
|
42
|
+
this.modules = [...new Set(['core', ...selectedModules, ...preservedModules, ...installedModules])];
|
|
43
|
+
this.updatedModules = [...new Set(['core', ...selectedModules, ...installedModules])]; // All installed modules get rescanned
|
|
44
|
+
|
|
45
|
+
// For CSV manifests, we need to include ALL modules that are installed
|
|
46
|
+
// preservedModules controls which modules stay as-is in the CSV (don't get rescanned)
|
|
47
|
+
// But all modules should be included in the final manifest
|
|
48
|
+
this.preservedModules = [...new Set([...preservedModules, ...selectedModules, ...installedModules])]; // Include all installed modules
|
|
41
49
|
this.bmadDir = bmadDir;
|
|
42
50
|
this.bmadFolderName = path.basename(bmadDir); // Get the actual folder name (e.g., '.bmad' or 'bmad')
|
|
43
51
|
this.allInstalledFiles = installedFiles;
|
|
@@ -57,14 +65,14 @@ class ManifestGenerator {
|
|
|
57
65
|
// Collect workflow data
|
|
58
66
|
await this.collectWorkflows(selectedModules);
|
|
59
67
|
|
|
60
|
-
// Collect agent data
|
|
61
|
-
await this.collectAgents(
|
|
68
|
+
// Collect agent data - use updatedModules which includes all installed modules
|
|
69
|
+
await this.collectAgents(this.updatedModules);
|
|
62
70
|
|
|
63
71
|
// Collect task data
|
|
64
|
-
await this.collectTasks(
|
|
72
|
+
await this.collectTasks(this.updatedModules);
|
|
65
73
|
|
|
66
74
|
// Collect tool data
|
|
67
|
-
await this.collectTools(
|
|
75
|
+
await this.collectTools(this.updatedModules);
|
|
68
76
|
|
|
69
77
|
// Write manifest files and collect their paths
|
|
70
78
|
const manifestFiles = [
|
|
@@ -105,7 +113,7 @@ class ManifestGenerator {
|
|
|
105
113
|
}
|
|
106
114
|
|
|
107
115
|
/**
|
|
108
|
-
* Recursively find and parse workflow.yaml files
|
|
116
|
+
* Recursively find and parse workflow.yaml and workflow.md files
|
|
109
117
|
*/
|
|
110
118
|
async getWorkflowsFromPath(basePath, moduleName) {
|
|
111
119
|
const workflows = [];
|
|
@@ -126,11 +134,23 @@ class ManifestGenerator {
|
|
|
126
134
|
// Recurse into subdirectories
|
|
127
135
|
const newRelativePath = relativePath ? `${relativePath}/${entry.name}` : entry.name;
|
|
128
136
|
await findWorkflows(fullPath, newRelativePath);
|
|
129
|
-
} else if (entry.name === 'workflow.yaml') {
|
|
130
|
-
// Parse workflow file
|
|
137
|
+
} else if (entry.name === 'workflow.yaml' || entry.name === 'workflow.md') {
|
|
138
|
+
// Parse workflow file (both YAML and MD formats)
|
|
131
139
|
try {
|
|
132
140
|
const content = await fs.readFile(fullPath, 'utf8');
|
|
133
|
-
|
|
141
|
+
|
|
142
|
+
let workflow;
|
|
143
|
+
if (entry.name === 'workflow.yaml') {
|
|
144
|
+
// Parse YAML workflow
|
|
145
|
+
workflow = yaml.load(content);
|
|
146
|
+
} else {
|
|
147
|
+
// Parse MD workflow with YAML frontmatter
|
|
148
|
+
const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
|
|
149
|
+
if (!frontmatterMatch) {
|
|
150
|
+
continue; // Skip MD files without frontmatter
|
|
151
|
+
}
|
|
152
|
+
workflow = yaml.load(frontmatterMatch[1]);
|
|
153
|
+
}
|
|
134
154
|
|
|
135
155
|
// Skip template workflows (those with placeholder values)
|
|
136
156
|
if (workflow.name && workflow.name.includes('{') && workflow.name.includes('}')) {
|
|
@@ -141,18 +161,15 @@ class ManifestGenerator {
|
|
|
141
161
|
// Build relative path for installation
|
|
142
162
|
const installPath =
|
|
143
163
|
moduleName === 'core'
|
|
144
|
-
? `${this.bmadFolderName}/core/workflows/${relativePath}
|
|
145
|
-
: `${this.bmadFolderName}/${moduleName}/workflows/${relativePath}
|
|
146
|
-
|
|
147
|
-
// Check for standalone property (default: false)
|
|
148
|
-
const standalone = workflow.standalone === true;
|
|
164
|
+
? `${this.bmadFolderName}/core/workflows/${relativePath}/${entry.name}`
|
|
165
|
+
: `${this.bmadFolderName}/${moduleName}/workflows/${relativePath}/${entry.name}`;
|
|
149
166
|
|
|
167
|
+
// ALL workflows now generate commands - no standalone property needed
|
|
150
168
|
workflows.push({
|
|
151
169
|
name: workflow.name,
|
|
152
170
|
description: workflow.description.replaceAll('"', '""'), // Escape quotes for CSV
|
|
153
171
|
module: moduleName,
|
|
154
172
|
path: installPath,
|
|
155
|
-
standalone: standalone,
|
|
156
173
|
});
|
|
157
174
|
|
|
158
175
|
// Add to files list
|
|
@@ -207,18 +224,23 @@ class ManifestGenerator {
|
|
|
207
224
|
}
|
|
208
225
|
|
|
209
226
|
/**
|
|
210
|
-
* Get agents from a directory
|
|
227
|
+
* Get agents from a directory recursively
|
|
211
228
|
* Only includes compiled .md files (not .agent.yaml source files)
|
|
212
229
|
*/
|
|
213
|
-
async getAgentsFromDir(dirPath, moduleName) {
|
|
230
|
+
async getAgentsFromDir(dirPath, moduleName, relativePath = '') {
|
|
214
231
|
const agents = [];
|
|
215
|
-
const
|
|
232
|
+
const entries = await fs.readdir(dirPath, { withFileTypes: true });
|
|
216
233
|
|
|
217
|
-
for (const
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
234
|
+
for (const entry of entries) {
|
|
235
|
+
const fullPath = path.join(dirPath, entry.name);
|
|
236
|
+
|
|
237
|
+
if (entry.isDirectory()) {
|
|
238
|
+
// Recurse into subdirectories
|
|
239
|
+
const newRelativePath = relativePath ? `${relativePath}/${entry.name}` : entry.name;
|
|
240
|
+
const subDirAgents = await this.getAgentsFromDir(fullPath, moduleName, newRelativePath);
|
|
241
|
+
agents.push(...subDirAgents);
|
|
242
|
+
} else if (entry.name.endsWith('.md') && !entry.name.endsWith('.agent.yaml') && entry.name.toLowerCase() !== 'readme.md') {
|
|
243
|
+
const content = await fs.readFile(fullPath, 'utf8');
|
|
222
244
|
|
|
223
245
|
// Skip files that don't contain <agent> tag (e.g., README files)
|
|
224
246
|
if (!content.includes('<agent')) {
|
|
@@ -242,10 +264,13 @@ class ManifestGenerator {
|
|
|
242
264
|
const principlesMatch = content.match(/<principles>([\s\S]*?)<\/principles>/);
|
|
243
265
|
|
|
244
266
|
// Build relative path for installation
|
|
267
|
+
const fileRelativePath = relativePath ? `${relativePath}/${entry.name}` : entry.name;
|
|
245
268
|
const installPath =
|
|
246
|
-
moduleName === 'core'
|
|
269
|
+
moduleName === 'core'
|
|
270
|
+
? `${this.bmadFolderName}/core/agents/${fileRelativePath}`
|
|
271
|
+
: `${this.bmadFolderName}/${moduleName}/agents/${fileRelativePath}`;
|
|
247
272
|
|
|
248
|
-
const agentName =
|
|
273
|
+
const agentName = entry.name.replace('.md', '');
|
|
249
274
|
|
|
250
275
|
// Helper function to clean and escape CSV content
|
|
251
276
|
const cleanForCSV = (text) => {
|
|
@@ -429,6 +454,21 @@ class ManifestGenerator {
|
|
|
429
454
|
async writeMainManifest(cfgDir) {
|
|
430
455
|
const manifestPath = path.join(cfgDir, 'manifest.yaml');
|
|
431
456
|
|
|
457
|
+
// Read existing manifest to preserve custom modules
|
|
458
|
+
let existingCustomModules = [];
|
|
459
|
+
if (await fs.pathExists(manifestPath)) {
|
|
460
|
+
try {
|
|
461
|
+
const existingContent = await fs.readFile(manifestPath, 'utf8');
|
|
462
|
+
const existingManifest = yaml.load(existingContent);
|
|
463
|
+
if (existingManifest && existingManifest.customModules) {
|
|
464
|
+
existingCustomModules = existingManifest.customModules;
|
|
465
|
+
}
|
|
466
|
+
} catch {
|
|
467
|
+
// If we can't read the existing manifest, continue without preserving custom modules
|
|
468
|
+
console.warn('Warning: Could not read existing manifest to preserve custom modules');
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
|
|
432
472
|
const manifest = {
|
|
433
473
|
installation: {
|
|
434
474
|
version: packageJson.version,
|
|
@@ -436,6 +476,7 @@ class ManifestGenerator {
|
|
|
436
476
|
lastUpdated: new Date().toISOString(),
|
|
437
477
|
},
|
|
438
478
|
modules: this.modules,
|
|
479
|
+
customModules: existingCustomModules, // Preserve custom modules
|
|
439
480
|
ides: this.selectedIdes,
|
|
440
481
|
};
|
|
441
482
|
|
|
@@ -541,12 +582,47 @@ class ManifestGenerator {
|
|
|
541
582
|
async writeWorkflowManifest(cfgDir) {
|
|
542
583
|
const csvPath = path.join(cfgDir, 'workflow-manifest.csv');
|
|
543
584
|
|
|
544
|
-
//
|
|
545
|
-
|
|
585
|
+
// Read existing manifest to preserve entries
|
|
586
|
+
const existingEntries = new Map();
|
|
587
|
+
if (await fs.pathExists(csvPath)) {
|
|
588
|
+
const content = await fs.readFile(csvPath, 'utf8');
|
|
589
|
+
const lines = content.split('\n').filter((line) => line.trim());
|
|
590
|
+
|
|
591
|
+
// Skip header
|
|
592
|
+
for (let i = 1; i < lines.length; i++) {
|
|
593
|
+
const line = lines[i];
|
|
594
|
+
if (line) {
|
|
595
|
+
// Parse CSV (simple parsing assuming no commas in quoted fields)
|
|
596
|
+
const parts = line.split('","');
|
|
597
|
+
if (parts.length >= 4) {
|
|
598
|
+
const name = parts[0].replace(/^"/, '');
|
|
599
|
+
const module = parts[2];
|
|
600
|
+
existingEntries.set(`${module}:${name}`, line);
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
// Create CSV header - removed standalone column as ALL workflows now generate commands
|
|
607
|
+
let csv = 'name,description,module,path\n';
|
|
608
|
+
|
|
609
|
+
// Combine existing and new workflows
|
|
610
|
+
const allWorkflows = new Map();
|
|
611
|
+
|
|
612
|
+
// Add existing entries
|
|
613
|
+
for (const [key, value] of existingEntries) {
|
|
614
|
+
allWorkflows.set(key, value);
|
|
615
|
+
}
|
|
546
616
|
|
|
547
|
-
// Add
|
|
617
|
+
// Add/update new workflows
|
|
548
618
|
for (const workflow of this.workflows) {
|
|
549
|
-
|
|
619
|
+
const key = `${workflow.module}:${workflow.name}`;
|
|
620
|
+
allWorkflows.set(key, `"${workflow.name}","${workflow.description}","${workflow.module}","${workflow.path}"`);
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
// Write all workflows
|
|
624
|
+
for (const [, value] of allWorkflows) {
|
|
625
|
+
csv += value + '\n';
|
|
550
626
|
}
|
|
551
627
|
|
|
552
628
|
await fs.writeFile(csvPath, csv);
|
|
@@ -560,12 +636,50 @@ class ManifestGenerator {
|
|
|
560
636
|
async writeAgentManifest(cfgDir) {
|
|
561
637
|
const csvPath = path.join(cfgDir, 'agent-manifest.csv');
|
|
562
638
|
|
|
639
|
+
// Read existing manifest to preserve entries
|
|
640
|
+
const existingEntries = new Map();
|
|
641
|
+
if (await fs.pathExists(csvPath)) {
|
|
642
|
+
const content = await fs.readFile(csvPath, 'utf8');
|
|
643
|
+
const lines = content.split('\n').filter((line) => line.trim());
|
|
644
|
+
|
|
645
|
+
// Skip header
|
|
646
|
+
for (let i = 1; i < lines.length; i++) {
|
|
647
|
+
const line = lines[i];
|
|
648
|
+
if (line) {
|
|
649
|
+
// Parse CSV (simple parsing assuming no commas in quoted fields)
|
|
650
|
+
const parts = line.split('","');
|
|
651
|
+
if (parts.length >= 11) {
|
|
652
|
+
const name = parts[0].replace(/^"/, '');
|
|
653
|
+
const module = parts[8];
|
|
654
|
+
existingEntries.set(`${module}:${name}`, line);
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
|
|
563
660
|
// Create CSV header with persona fields
|
|
564
661
|
let csv = 'name,displayName,title,icon,role,identity,communicationStyle,principles,module,path\n';
|
|
565
662
|
|
|
566
|
-
//
|
|
663
|
+
// Combine existing and new agents, preferring new data for duplicates
|
|
664
|
+
const allAgents = new Map();
|
|
665
|
+
|
|
666
|
+
// Add existing entries
|
|
667
|
+
for (const [key, value] of existingEntries) {
|
|
668
|
+
allAgents.set(key, value);
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
// Add/update new agents
|
|
567
672
|
for (const agent of this.agents) {
|
|
568
|
-
|
|
673
|
+
const key = `${agent.module}:${agent.name}`;
|
|
674
|
+
allAgents.set(
|
|
675
|
+
key,
|
|
676
|
+
`"${agent.name}","${agent.displayName}","${agent.title}","${agent.icon}","${agent.role}","${agent.identity}","${agent.communicationStyle}","${agent.principles}","${agent.module}","${agent.path}"`,
|
|
677
|
+
);
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
// Write all agents
|
|
681
|
+
for (const [, value] of allAgents) {
|
|
682
|
+
csv += value + '\n';
|
|
569
683
|
}
|
|
570
684
|
|
|
571
685
|
await fs.writeFile(csvPath, csv);
|
|
@@ -579,12 +693,47 @@ class ManifestGenerator {
|
|
|
579
693
|
async writeTaskManifest(cfgDir) {
|
|
580
694
|
const csvPath = path.join(cfgDir, 'task-manifest.csv');
|
|
581
695
|
|
|
696
|
+
// Read existing manifest to preserve entries
|
|
697
|
+
const existingEntries = new Map();
|
|
698
|
+
if (await fs.pathExists(csvPath)) {
|
|
699
|
+
const content = await fs.readFile(csvPath, 'utf8');
|
|
700
|
+
const lines = content.split('\n').filter((line) => line.trim());
|
|
701
|
+
|
|
702
|
+
// Skip header
|
|
703
|
+
for (let i = 1; i < lines.length; i++) {
|
|
704
|
+
const line = lines[i];
|
|
705
|
+
if (line) {
|
|
706
|
+
// Parse CSV (simple parsing assuming no commas in quoted fields)
|
|
707
|
+
const parts = line.split('","');
|
|
708
|
+
if (parts.length >= 6) {
|
|
709
|
+
const name = parts[0].replace(/^"/, '');
|
|
710
|
+
const module = parts[3];
|
|
711
|
+
existingEntries.set(`${module}:${name}`, line);
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
|
|
582
717
|
// Create CSV header with standalone column
|
|
583
718
|
let csv = 'name,displayName,description,module,path,standalone\n';
|
|
584
719
|
|
|
585
|
-
//
|
|
720
|
+
// Combine existing and new tasks
|
|
721
|
+
const allTasks = new Map();
|
|
722
|
+
|
|
723
|
+
// Add existing entries
|
|
724
|
+
for (const [key, value] of existingEntries) {
|
|
725
|
+
allTasks.set(key, value);
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
// Add/update new tasks
|
|
586
729
|
for (const task of this.tasks) {
|
|
587
|
-
|
|
730
|
+
const key = `${task.module}:${task.name}`;
|
|
731
|
+
allTasks.set(key, `"${task.name}","${task.displayName}","${task.description}","${task.module}","${task.path}","${task.standalone}"`);
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
// Write all tasks
|
|
735
|
+
for (const [, value] of allTasks) {
|
|
736
|
+
csv += value + '\n';
|
|
588
737
|
}
|
|
589
738
|
|
|
590
739
|
await fs.writeFile(csvPath, csv);
|
|
@@ -598,12 +747,47 @@ class ManifestGenerator {
|
|
|
598
747
|
async writeToolManifest(cfgDir) {
|
|
599
748
|
const csvPath = path.join(cfgDir, 'tool-manifest.csv');
|
|
600
749
|
|
|
750
|
+
// Read existing manifest to preserve entries
|
|
751
|
+
const existingEntries = new Map();
|
|
752
|
+
if (await fs.pathExists(csvPath)) {
|
|
753
|
+
const content = await fs.readFile(csvPath, 'utf8');
|
|
754
|
+
const lines = content.split('\n').filter((line) => line.trim());
|
|
755
|
+
|
|
756
|
+
// Skip header
|
|
757
|
+
for (let i = 1; i < lines.length; i++) {
|
|
758
|
+
const line = lines[i];
|
|
759
|
+
if (line) {
|
|
760
|
+
// Parse CSV (simple parsing assuming no commas in quoted fields)
|
|
761
|
+
const parts = line.split('","');
|
|
762
|
+
if (parts.length >= 6) {
|
|
763
|
+
const name = parts[0].replace(/^"/, '');
|
|
764
|
+
const module = parts[3];
|
|
765
|
+
existingEntries.set(`${module}:${name}`, line);
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
|
|
601
771
|
// Create CSV header with standalone column
|
|
602
772
|
let csv = 'name,displayName,description,module,path,standalone\n';
|
|
603
773
|
|
|
604
|
-
//
|
|
774
|
+
// Combine existing and new tools
|
|
775
|
+
const allTools = new Map();
|
|
776
|
+
|
|
777
|
+
// Add existing entries
|
|
778
|
+
for (const [key, value] of existingEntries) {
|
|
779
|
+
allTools.set(key, value);
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
// Add/update new tools
|
|
605
783
|
for (const tool of this.tools) {
|
|
606
|
-
|
|
784
|
+
const key = `${tool.module}:${tool.name}`;
|
|
785
|
+
allTools.set(key, `"${tool.name}","${tool.displayName}","${tool.description}","${tool.module}","${tool.path}","${tool.standalone}"`);
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
// Write all tools
|
|
789
|
+
for (const [, value] of allTools) {
|
|
790
|
+
csv += value + '\n';
|
|
607
791
|
}
|
|
608
792
|
|
|
609
793
|
await fs.writeFile(csvPath, csv);
|
|
@@ -641,13 +825,14 @@ class ManifestGenerator {
|
|
|
641
825
|
if (this.allInstalledFiles && this.allInstalledFiles.length > 0) {
|
|
642
826
|
// Process all installed files
|
|
643
827
|
for (const filePath of this.allInstalledFiles) {
|
|
644
|
-
|
|
828
|
+
// Store paths relative to bmadDir (no folder prefix)
|
|
829
|
+
const relativePath = filePath.replace(this.bmadDir, '').replaceAll('\\', '/').replace(/^\//, '');
|
|
645
830
|
const ext = path.extname(filePath).toLowerCase();
|
|
646
831
|
const fileName = path.basename(filePath, ext);
|
|
647
832
|
|
|
648
|
-
// Determine module from path
|
|
833
|
+
// Determine module from path (first directory component)
|
|
649
834
|
const pathParts = relativePath.split('/');
|
|
650
|
-
const module = pathParts.length >
|
|
835
|
+
const module = pathParts.length > 0 ? pathParts[0] : 'unknown';
|
|
651
836
|
|
|
652
837
|
// Calculate hash
|
|
653
838
|
const hash = await this.calculateFileHash(filePath);
|
|
@@ -663,10 +848,13 @@ class ManifestGenerator {
|
|
|
663
848
|
} else {
|
|
664
849
|
// Fallback: use the collected workflows/agents/tasks
|
|
665
850
|
for (const file of this.files) {
|
|
666
|
-
|
|
851
|
+
// Strip the folder prefix if present (for consistency)
|
|
852
|
+
const relPath = file.path.replace(this.bmadFolderName + '/', '');
|
|
853
|
+
const filePath = path.join(this.bmadDir, relPath);
|
|
667
854
|
const hash = await this.calculateFileHash(filePath);
|
|
668
855
|
allFiles.push({
|
|
669
856
|
...file,
|
|
857
|
+
path: relPath,
|
|
670
858
|
hash: hash,
|
|
671
859
|
});
|
|
672
860
|
}
|
|
@@ -687,6 +875,42 @@ class ManifestGenerator {
|
|
|
687
875
|
await fs.writeFile(csvPath, csv);
|
|
688
876
|
return csvPath;
|
|
689
877
|
}
|
|
878
|
+
|
|
879
|
+
/**
|
|
880
|
+
* Scan the bmad directory to find all installed modules
|
|
881
|
+
* @param {string} bmadDir - Path to bmad directory
|
|
882
|
+
* @returns {Array} List of module names
|
|
883
|
+
*/
|
|
884
|
+
async scanInstalledModules(bmadDir) {
|
|
885
|
+
const modules = [];
|
|
886
|
+
|
|
887
|
+
try {
|
|
888
|
+
const entries = await fs.readdir(bmadDir, { withFileTypes: true });
|
|
889
|
+
|
|
890
|
+
for (const entry of entries) {
|
|
891
|
+
// Skip if not a directory or is a special directory
|
|
892
|
+
if (!entry.isDirectory() || entry.name.startsWith('.') || entry.name === '_cfg') {
|
|
893
|
+
continue;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
// Check if this looks like a module (has agents, workflows, or tasks directory)
|
|
897
|
+
const modulePath = path.join(bmadDir, entry.name);
|
|
898
|
+
const hasAgents = await fs.pathExists(path.join(modulePath, 'agents'));
|
|
899
|
+
const hasWorkflows = await fs.pathExists(path.join(modulePath, 'workflows'));
|
|
900
|
+
const hasTasks = await fs.pathExists(path.join(modulePath, 'tasks'));
|
|
901
|
+
const hasTools = await fs.pathExists(path.join(modulePath, 'tools'));
|
|
902
|
+
|
|
903
|
+
// If it has any of these directories, it's likely a module
|
|
904
|
+
if (hasAgents || hasWorkflows || hasTasks || hasTools) {
|
|
905
|
+
modules.push(entry.name);
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
} catch (error) {
|
|
909
|
+
console.warn(`Warning: Could not scan for installed modules: ${error.message}`);
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
return modules;
|
|
913
|
+
}
|
|
690
914
|
}
|
|
691
915
|
|
|
692
916
|
module.exports = { ManifestGenerator };
|
|
@@ -61,6 +61,7 @@ class Manifest {
|
|
|
61
61
|
installDate: manifestData.installation?.installDate,
|
|
62
62
|
lastUpdated: manifestData.installation?.lastUpdated,
|
|
63
63
|
modules: manifestData.modules || [],
|
|
64
|
+
customModules: manifestData.customModules || [],
|
|
64
65
|
ides: manifestData.ides || [],
|
|
65
66
|
};
|
|
66
67
|
} catch (error) {
|
|
@@ -93,6 +94,7 @@ class Manifest {
|
|
|
93
94
|
lastUpdated: manifest.lastUpdated,
|
|
94
95
|
},
|
|
95
96
|
modules: manifest.modules || [],
|
|
97
|
+
customModules: manifest.customModules || [],
|
|
96
98
|
ides: manifest.ides || [],
|
|
97
99
|
};
|
|
98
100
|
|
|
@@ -535,6 +537,51 @@ class Manifest {
|
|
|
535
537
|
|
|
536
538
|
return configs;
|
|
537
539
|
}
|
|
540
|
+
/**
|
|
541
|
+
* Add a custom module to the manifest with its source path
|
|
542
|
+
* @param {string} bmadDir - Path to bmad directory
|
|
543
|
+
* @param {Object} customModule - Custom module info
|
|
544
|
+
*/
|
|
545
|
+
async addCustomModule(bmadDir, customModule) {
|
|
546
|
+
const manifest = await this.read(bmadDir);
|
|
547
|
+
if (!manifest) {
|
|
548
|
+
throw new Error('No manifest found');
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
if (!manifest.customModules) {
|
|
552
|
+
manifest.customModules = [];
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
// Check if custom module already exists
|
|
556
|
+
const existingIndex = manifest.customModules.findIndex((m) => m.id === customModule.id);
|
|
557
|
+
if (existingIndex === -1) {
|
|
558
|
+
// Add new entry
|
|
559
|
+
manifest.customModules.push(customModule);
|
|
560
|
+
} else {
|
|
561
|
+
// Update existing entry
|
|
562
|
+
manifest.customModules[existingIndex] = customModule;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
await this.update(bmadDir, { customModules: manifest.customModules });
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* Remove a custom module from the manifest
|
|
570
|
+
* @param {string} bmadDir - Path to bmad directory
|
|
571
|
+
* @param {string} moduleId - Module ID to remove
|
|
572
|
+
*/
|
|
573
|
+
async removeCustomModule(bmadDir, moduleId) {
|
|
574
|
+
const manifest = await this.read(bmadDir);
|
|
575
|
+
if (!manifest || !manifest.customModules) {
|
|
576
|
+
return;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
const index = manifest.customModules.findIndex((m) => m.id === moduleId);
|
|
580
|
+
if (index !== -1) {
|
|
581
|
+
manifest.customModules.splice(index, 1);
|
|
582
|
+
await this.update(bmadDir, { customModules: manifest.customModules });
|
|
583
|
+
}
|
|
584
|
+
}
|
|
538
585
|
}
|
|
539
586
|
|
|
540
587
|
module.exports = { Manifest };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Post-installation sidecar folder replacement utility
|
|
3
|
+
* Replaces {agent_sidecar_folder} placeholders in all installed agents
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
const fs = require('fs-extra');
|
|
7
|
+
const path = require('node:path');
|
|
8
|
+
const yaml = require('yaml');
|
|
9
|
+
const glob = require('glob');
|
|
10
|
+
const chalk = require('chalk');
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Replace {agent_sidecar_folder} placeholders in all agent files
|
|
14
|
+
* @param {string} bmadDir - Path to .bmad directory
|
|
15
|
+
* @returns {Object} Statistics about replacements made
|
|
16
|
+
*/
|
|
17
|
+
async function replaceAgentSidecarFolders(bmadDir) {
|
|
18
|
+
const results = {
|
|
19
|
+
filesScanned: 0,
|
|
20
|
+
filesReplaced: 0,
|
|
21
|
+
totalReplacements: 0,
|
|
22
|
+
errors: [],
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
try {
|
|
26
|
+
// Load core config to get agent_sidecar_folder value
|
|
27
|
+
const coreConfigPath = path.join(bmadDir, 'bmb', 'config.yaml');
|
|
28
|
+
|
|
29
|
+
if (!(await fs.pathExists(coreConfigPath))) {
|
|
30
|
+
throw new Error(`Core config not found at ${coreConfigPath}`);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const coreConfigContent = await fs.readFile(coreConfigPath, 'utf8');
|
|
34
|
+
const coreConfig = yaml.parse(coreConfigContent);
|
|
35
|
+
const agentSidecarFolder = coreConfig.agent_sidecar_folder;
|
|
36
|
+
|
|
37
|
+
// Use the literal value from config, don't resolve the placeholders
|
|
38
|
+
console.log(chalk.dim(`\n Replacing {agent_sidecar_folder} with: ${agentSidecarFolder}`));
|
|
39
|
+
|
|
40
|
+
// Find all agent .md files
|
|
41
|
+
const agentPattern = path.join(bmadDir, '**/*.md');
|
|
42
|
+
const agentFiles = glob.sync(agentPattern);
|
|
43
|
+
|
|
44
|
+
for (const agentFile of agentFiles) {
|
|
45
|
+
results.filesScanned++;
|
|
46
|
+
|
|
47
|
+
try {
|
|
48
|
+
let content = await fs.readFile(agentFile, 'utf8');
|
|
49
|
+
|
|
50
|
+
// Check if file contains {agent_sidecar_folder}
|
|
51
|
+
if (content.includes('{agent_sidecar_folder}')) {
|
|
52
|
+
// Replace all occurrences
|
|
53
|
+
const originalContent = content;
|
|
54
|
+
content = content.replaceAll('{agent_sidecar_folder}', agentSidecarFolder);
|
|
55
|
+
|
|
56
|
+
// Only write if content changed
|
|
57
|
+
if (content !== originalContent) {
|
|
58
|
+
await fs.writeFile(agentFile, content, 'utf8');
|
|
59
|
+
|
|
60
|
+
const replacementCount = (originalContent.match(/{agent_sidecar_folder}/g) || []).length;
|
|
61
|
+
results.filesReplaced++;
|
|
62
|
+
results.totalReplacements += replacementCount;
|
|
63
|
+
|
|
64
|
+
console.log(chalk.dim(` ✓ Replaced ${replacementCount} occurrence(s) in ${path.relative(bmadDir, agentFile)}`));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
} catch (error) {
|
|
68
|
+
results.errors.push(`Error processing ${agentFile}: ${error.message}`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return results;
|
|
73
|
+
} catch (error) {
|
|
74
|
+
results.errors.push(`Fatal error: ${error.message}`);
|
|
75
|
+
return results;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
module.exports = { replaceAgentSidecarFolders };
|