bmad-method 6.0.0-alpha.16 → 6.0.0-alpha.17
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 +7 -3
- package/.github/scripts/discord-helpers.sh +21 -2
- package/.github/workflows/discord.yaml +31 -7
- package/.github/workflows/manual-release.yaml +12 -42
- package/.markdownlint-cli2.yaml +2 -2
- package/.prettierignore +2 -2
- package/.vscode/settings.json +1 -1
- package/CHANGELOG.md +96 -2
- package/LICENSE +1 -1
- package/README.md +29 -2
- package/docs/agent-customization-guide.md +10 -10
- package/docs/custom-content-installation.md +100 -196
- package/docs/custom-content.md +122 -0
- package/docs/ide-info/crush.md +1 -1
- package/docs/ide-info/cursor.md +7 -7
- package/docs/ide-info/iflow.md +3 -3
- package/docs/ide-info/opencode.md +1 -1
- package/docs/ide-info/rovo-dev.md +1 -1
- package/docs/index.md +2 -2
- package/docs/installers-bundlers/ide-injections.md +2 -2
- package/docs/installers-bundlers/installers-modules-platforms-reference.md +13 -13
- package/docs/sample-custom-modules/README.md +11 -0
- package/docs/sample-custom-modules/sample-unitary-module/README.md +8 -0
- package/docs/sample-custom-modules/sample-unitary-module/agents/commit-poet/commit-poet.agent.yaml +129 -0
- package/docs/sample-custom-modules/sample-unitary-module/agents/toolsmith/toolsmith-sidecar/instructions.md +70 -0
- package/docs/sample-custom-modules/sample-unitary-module/agents/toolsmith/toolsmith-sidecar/knowledge/bundlers.md +111 -0
- package/docs/sample-custom-modules/sample-unitary-module/agents/toolsmith/toolsmith-sidecar/knowledge/deploy.md +70 -0
- package/docs/sample-custom-modules/sample-unitary-module/agents/toolsmith/toolsmith-sidecar/knowledge/docs.md +114 -0
- package/docs/sample-custom-modules/sample-unitary-module/agents/toolsmith/toolsmith-sidecar/knowledge/installers.md +134 -0
- package/docs/sample-custom-modules/sample-unitary-module/agents/toolsmith/toolsmith-sidecar/knowledge/modules.md +161 -0
- package/docs/sample-custom-modules/sample-unitary-module/agents/toolsmith/toolsmith-sidecar/knowledge/tests.md +103 -0
- package/docs/sample-custom-modules/sample-unitary-module/agents/toolsmith/toolsmith-sidecar/memories.md +17 -0
- package/docs/sample-custom-modules/sample-unitary-module/agents/toolsmith/toolsmith.agent.yaml +109 -0
- package/docs/sample-custom-modules/sample-unitary-module/module.yaml +8 -0
- package/docs/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-01-init.md +168 -0
- package/docs/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-02-q1.md +155 -0
- package/docs/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-03-q2.md +89 -0
- package/docs/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-04-q3.md +36 -0
- package/docs/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-05-q4.md +36 -0
- package/docs/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-06-q5.md +36 -0
- package/docs/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-07-q6.md +36 -0
- package/docs/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-08-q7.md +36 -0
- package/docs/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-09-q8.md +36 -0
- package/docs/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-10-q9.md +36 -0
- package/docs/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-11-q10.md +36 -0
- package/docs/sample-custom-modules/sample-unitary-module/workflows/quiz-master/steps/step-12-results.md +150 -0
- package/docs/sample-custom-modules/sample-unitary-module/workflows/quiz-master/templates/csv-headers.template +1 -0
- package/docs/sample-custom-modules/sample-unitary-module/workflows/quiz-master/workflow.md +54 -0
- package/docs/sample-custom-modules/sample-unitary-module/workflows/wassup/workflow.md +26 -0
- package/docs/sample-custom-modules/sample-wellness-module/README.md +6 -0
- package/docs/sample-custom-modules/sample-wellness-module/agents/meditation-guide.agent.yaml +136 -0
- package/docs/sample-custom-modules/sample-wellness-module/agents/wellness-companion/foo.md +3 -0
- package/docs/sample-custom-modules/sample-wellness-module/agents/wellness-companion/wellness-companion-sidecar/addition1.md +1 -0
- package/docs/sample-custom-modules/sample-wellness-module/agents/wellness-companion/wellness-companion-sidecar/insights.md +13 -0
- package/docs/sample-custom-modules/sample-wellness-module/agents/wellness-companion/wellness-companion-sidecar/instructions.md +30 -0
- package/docs/sample-custom-modules/sample-wellness-module/agents/wellness-companion/wellness-companion-sidecar/memories.md +13 -0
- package/docs/sample-custom-modules/sample-wellness-module/agents/wellness-companion/wellness-companion-sidecar/patterns.md +17 -0
- package/docs/sample-custom-modules/sample-wellness-module/agents/wellness-companion/wellness-companion.agent.yaml +120 -0
- package/docs/sample-custom-modules/sample-wellness-module/module.yaml +17 -0
- package/docs/sample-custom-modules/sample-wellness-module/workflows/daily-checkin/README.md +32 -0
- package/docs/sample-custom-modules/sample-wellness-module/workflows/daily-checkin/workflow.md +45 -0
- package/docs/sample-custom-modules/sample-wellness-module/workflows/guided-meditation/README.md +31 -0
- package/docs/sample-custom-modules/sample-wellness-module/workflows/guided-meditation/workflow.md +45 -0
- package/docs/sample-custom-modules/sample-wellness-module/workflows/wellness-journal/README.md +31 -0
- package/docs/sample-custom-modules/sample-wellness-module/workflows/wellness-journal/workflow.md +45 -0
- package/docs/v4-to-v6-upgrade.md +27 -27
- package/docs/web-bundles-gemini-gpt-guide.md +6 -458
- package/eslint.config.mjs +2 -2
- package/package.json +1 -1
- package/src/core/agents/bmad-master.agent.yaml +6 -11
- package/src/core/module.yaml +11 -18
- package/src/core/resources/excalidraw/README.md +6 -6
- package/src/core/tasks/advanced-elicitation.xml +3 -3
- package/src/core/tasks/index-docs.xml +1 -1
- package/src/core/tasks/validate-workflow.xml +1 -1
- package/src/core/tasks/workflow.xml +4 -4
- package/src/core/tools/shard-doc.xml +12 -12
- package/src/core/workflows/brainstorming/workflow.md +3 -3
- package/src/core/workflows/party-mode/steps/step-01-agent-loading.md +2 -2
- package/src/core/workflows/party-mode/workflow.md +4 -4
- package/src/modules/bmb/agents/bmad-builder.agent.yaml +15 -15
- package/src/modules/bmb/{README.md → docs/README.md} +15 -27
- package/src/modules/bmb/docs/agents/agent-compilation.md +3 -3
- package/src/modules/bmb/docs/agents/agent-menu-patterns.md +23 -24
- package/src/modules/bmb/docs/agents/expert-agent-architecture.md +20 -21
- package/src/modules/bmb/docs/agents/simple-agent-architecture.md +17 -52
- package/src/modules/bmb/docs/agents/understanding-agent-types.md +6 -6
- package/src/modules/bmb/docs/workflows/architecture.md +1 -1
- package/src/modules/bmb/docs/workflows/common-workflow-tools.csv +3 -3
- package/src/modules/bmb/docs/workflows/templates/step-01-init-continuable-template.md +1 -1
- package/src/modules/bmb/docs/workflows/templates/step-1b-template.md +1 -1
- package/src/modules/bmb/docs/workflows/templates/step-file.md +3 -3
- package/src/modules/bmb/docs/workflows/templates/step-template.md +3 -3
- package/src/modules/bmb/docs/workflows/templates/workflow-template.md +2 -2
- package/src/modules/bmb/docs/workflows/templates/workflow.md +1 -1
- package/src/modules/bmb/module.yaml +6 -15
- package/src/modules/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper.agent.yaml +7 -7
- package/src/modules/bmb/reference/agents/module-examples/README.md +3 -4
- package/src/modules/bmb/reference/agents/module-examples/security-engineer.agent.yaml +5 -5
- package/src/modules/bmb/reference/agents/module-examples/trend-analyst.agent.yaml +7 -7
- package/src/modules/bmb/reference/agents/simple-examples/README.md +1 -1
- package/src/modules/bmb/reference/agents/simple-examples/commit-poet.agent.yaml +1 -1
- package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-01-init.md +1 -1
- package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-01b-continue.md +1 -1
- package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-02-profile.md +3 -3
- package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-03-assessment.md +3 -3
- package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-04-strategy.md +5 -5
- package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-05-shopping.md +5 -5
- package/src/modules/bmb/reference/workflows/meal-prep-nutrition/steps/step-06-prep-schedule.md +5 -5
- package/src/modules/bmb/reference/workflows/meal-prep-nutrition/workflow.md +2 -2
- package/src/modules/bmb/workflows/create-agent/data/reference/agents/module-examples/README.md +1 -3
- package/src/modules/bmb/workflows/create-agent/data/reference/agents/module-examples/security-engineer.agent.yaml +6 -6
- package/src/modules/bmb/workflows/create-agent/data/reference/agents/module-examples/trend-analyst.agent.yaml +7 -7
- package/src/modules/bmb/workflows/create-agent/data/reference/agents/simple-examples/README.md +1 -1
- package/src/modules/bmb/workflows/create-agent/data/reference/agents/simple-examples/commit-poet.agent.yaml +1 -1
- package/src/modules/bmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-01-init.md +1 -1
- package/src/modules/bmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-01b-continue.md +1 -1
- package/src/modules/bmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-02-profile.md +3 -3
- package/src/modules/bmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-03-assessment.md +3 -3
- package/src/modules/bmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-04-strategy.md +5 -5
- package/src/modules/bmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-05-shopping.md +5 -5
- package/src/modules/bmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/steps/step-06-prep-schedule.md +5 -5
- package/src/modules/bmb/workflows/create-agent/data/reference/workflows/meal-prep-nutrition/workflow.md +2 -2
- 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 +4 -4
- package/src/modules/bmb/workflows/create-agent/steps/step-02-discover.md +6 -10
- package/src/modules/bmb/workflows/create-agent/steps/step-03-persona.md +6 -6
- package/src/modules/bmb/workflows/create-agent/steps/step-04-commands.md +9 -9
- package/src/modules/bmb/workflows/create-agent/steps/step-05-name.md +6 -5
- package/src/modules/bmb/workflows/create-agent/steps/step-06-build.md +19 -57
- package/src/modules/bmb/workflows/create-agent/steps/step-07-validate.md +5 -5
- package/src/modules/bmb/workflows/create-agent/steps/{step-11-celebrate.md → step-08-celebrate.md} +2 -6
- package/src/modules/bmb/workflows/create-agent/templates/agent-plan.template.md +3 -0
- package/src/modules/bmb/workflows/create-agent/templates/expert-agent.template.md +364 -0
- package/src/modules/bmb/workflows/create-agent/templates/simple-agent.template.md +257 -0
- package/src/modules/bmb/workflows/create-agent/workflow.md +2 -35
- package/src/modules/bmb/workflows/create-module/steps/step-01-init.md +4 -4
- package/src/modules/bmb/workflows/create-module/steps/step-01b-continue.md +2 -2
- package/src/modules/bmb/workflows/create-module/steps/step-02-concept.md +4 -4
- package/src/modules/bmb/workflows/create-module/steps/step-03-components.md +4 -4
- package/src/modules/bmb/workflows/create-module/steps/step-04-structure.md +6 -6
- package/src/modules/bmb/workflows/create-module/steps/step-05-config.md +5 -5
- package/src/modules/bmb/workflows/create-module/steps/step-06-agents.md +8 -8
- package/src/modules/bmb/workflows/create-module/steps/step-07-workflows.md +5 -5
- package/src/modules/bmb/workflows/create-module/steps/step-08-installer.md +8 -8
- package/src/modules/bmb/workflows/create-module/steps/step-09-documentation.md +7 -7
- package/src/modules/bmb/workflows/create-module/steps/step-10-roadmap.md +7 -7
- package/src/modules/bmb/workflows/create-module/steps/step-11-validate.md +6 -6
- package/src/modules/bmb/workflows/create-module/templates/agent.template.md +15 -19
- package/src/modules/bmb/workflows/create-module/templates/module.template.yaml +1 -1
- package/src/modules/bmb/workflows/create-module/workflow.md +3 -3
- package/src/modules/bmb/workflows/create-workflow/steps/step-01-init.md +4 -4
- package/src/modules/bmb/workflows/create-workflow/steps/step-02-gather.md +6 -6
- package/src/modules/bmb/workflows/create-workflow/steps/step-03-tools-configuration.md +5 -5
- package/src/modules/bmb/workflows/create-workflow/steps/step-04-plan-review.md +4 -4
- package/src/modules/bmb/workflows/create-workflow/steps/step-05-output-format-design.md +4 -4
- package/src/modules/bmb/workflows/create-workflow/steps/step-06-design.md +11 -11
- package/src/modules/bmb/workflows/create-workflow/steps/step-07-build.md +14 -14
- package/src/modules/bmb/workflows/create-workflow/steps/step-08-review.md +4 -4
- package/src/modules/bmb/workflows/create-workflow/steps/step-09-complete.md +2 -2
- 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 +12 -12
- 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 +4 -4
- package/src/modules/bmb/workflows/edit-workflow/steps/step-02-discover.md +3 -3
- package/src/modules/bmb/workflows/edit-workflow/steps/step-03-improve.md +6 -6
- package/src/modules/bmb/workflows/edit-workflow/steps/step-04-validate.md +3 -3
- package/src/modules/bmb/workflows/edit-workflow/steps/step-05-compliance-check.md +3 -3
- 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 +3 -3
- 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 +6 -6
- package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-04-file-validation.md +4 -4
- package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-05-intent-spectrum-validation.md +4 -4
- package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-06-web-subprocess-validation.md +4 -4
- package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-07-holistic-analysis.md +4 -4
- package/src/modules/bmb/workflows/workflow-compliance-check/steps/step-08-generate-report.md +3 -3
- package/src/modules/bmb/workflows/workflow-compliance-check/workflow.md +1 -1
- package/src/modules/bmb/workflows-legacy/edit-module/README.md +1 -17
- package/src/modules/bmb/workflows-legacy/edit-module/checklist.md +3 -4
- package/src/modules/bmb/workflows-legacy/edit-module/instructions.md +4 -5
- package/src/modules/bmb/workflows-legacy/edit-module/workflow.yaml +10 -10
- package/src/modules/bmb/workflows-legacy/module-brief/README.md +2 -2
- package/src/modules/bmb/workflows-legacy/module-brief/instructions.md +2 -2
- package/src/modules/bmb/workflows-legacy/module-brief/workflow.yaml +4 -4
- package/src/modules/bmgd/README.md +1 -1
- package/src/modules/bmgd/agents/game-architect.agent.yaml +6 -6
- package/src/modules/bmgd/agents/game-designer.agent.yaml +7 -7
- package/src/modules/bmgd/agents/game-dev.agent.yaml +10 -10
- package/src/modules/bmgd/agents/game-scrum-master.agent.yaml +21 -21
- package/src/modules/bmgd/module.yaml +2 -7
- package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/instructions.md +1 -1
- package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/workflow.yaml +9 -9
- package/src/modules/bmgd/workflows/1-preproduction/game-brief/instructions.md +1 -1
- package/src/modules/bmgd/workflows/1-preproduction/game-brief/workflow.yaml +8 -8
- package/src/modules/bmgd/workflows/2-design/gdd/instructions-gdd.md +4 -4
- package/src/modules/bmgd/workflows/2-design/gdd/workflow.yaml +30 -30
- package/src/modules/bmgd/workflows/2-design/narrative/instructions-narrative.md +1 -1
- package/src/modules/bmgd/workflows/2-design/narrative/workflow.yaml +5 -5
- package/src/modules/bmgd/workflows/3-technical/game-architecture/instructions.md +1 -1
- package/src/modules/bmgd/workflows/3-technical/game-architecture/workflow.yaml +2 -2
- package/src/modules/bmgd/workflows/4-production/code-review/instructions.md +4 -4
- package/src/modules/bmgd/workflows/4-production/code-review/workflow.yaml +2 -2
- package/src/modules/bmgd/workflows/4-production/correct-course/checklist.md +1 -1
- package/src/modules/bmgd/workflows/4-production/correct-course/instructions.md +2 -2
- package/src/modules/bmgd/workflows/4-production/correct-course/workflow.yaml +2 -2
- package/src/modules/bmgd/workflows/4-production/create-story/instructions.md +2 -2
- package/src/modules/bmgd/workflows/4-production/create-story/workflow.yaml +2 -2
- package/src/modules/bmgd/workflows/4-production/dev-story/instructions.md +2 -2
- package/src/modules/bmgd/workflows/4-production/dev-story/workflow.yaml +2 -2
- package/src/modules/bmgd/workflows/4-production/epic-tech-context/checklist.md +1 -1
- package/src/modules/bmgd/workflows/4-production/epic-tech-context/instructions.md +2 -2
- package/src/modules/bmgd/workflows/4-production/epic-tech-context/workflow.yaml +2 -2
- package/src/modules/bmgd/workflows/4-production/retrospective/instructions.md +2 -2
- package/src/modules/bmgd/workflows/4-production/retrospective/workflow.yaml +3 -3
- package/src/modules/bmgd/workflows/4-production/sprint-planning/instructions.md +2 -2
- package/src/modules/bmgd/workflows/4-production/sprint-planning/workflow.yaml +2 -2
- package/src/modules/bmgd/workflows/4-production/story-context/checklist.md +1 -1
- package/src/modules/bmgd/workflows/4-production/story-context/context-template.xml +2 -2
- package/src/modules/bmgd/workflows/4-production/story-context/instructions.md +2 -2
- package/src/modules/bmgd/workflows/4-production/story-context/workflow.yaml +2 -2
- package/src/modules/bmgd/workflows/4-production/story-done/instructions.md +1 -1
- package/src/modules/bmgd/workflows/4-production/story-done/workflow.yaml +2 -2
- package/src/modules/bmgd/workflows/4-production/story-ready/instructions.md +1 -1
- package/src/modules/bmgd/workflows/4-production/story-ready/workflow.yaml +2 -2
- package/src/modules/bmm/README.md +1 -1
- package/src/modules/bmm/agents/analyst.agent.yaml +9 -9
- package/src/modules/bmm/agents/architect.agent.yaml +8 -8
- package/src/modules/bmm/agents/dev.agent.yaml +5 -5
- package/src/modules/bmm/agents/pm.agent.yaml +8 -8
- package/src/modules/bmm/agents/quick-flow-solo-dev.agent.yaml +5 -5
- package/src/modules/bmm/agents/sm.agent.yaml +11 -11
- package/src/modules/bmm/agents/tea.agent.yaml +13 -13
- package/src/modules/bmm/agents/tech-writer.agent.yaml +9 -9
- package/src/modules/bmm/agents/ux-designer.agent.yaml +6 -6
- package/src/modules/bmm/docs/agents-guide.md +16 -14
- package/src/modules/bmm/docs/brownfield-guide.md +6 -6
- package/src/modules/bmm/docs/enterprise-agentic-development.md +3 -3
- package/src/modules/bmm/docs/faq.md +5 -18
- package/src/modules/bmm/docs/glossary.md +3 -4
- package/src/modules/bmm/docs/images/README.md +1 -1
- package/src/modules/bmm/docs/images/workflow-method-greenfield.excalidraw +8 -8
- package/src/modules/bmm/docs/party-mode.md +3 -3
- package/src/modules/bmm/docs/quick-flow-solo-dev.md +5 -5
- package/src/modules/bmm/docs/quick-spec-flow.md +2 -16
- package/src/modules/bmm/docs/quick-start.md +3 -3
- package/src/modules/bmm/docs/test-architecture.md +15 -23
- package/src/modules/bmm/docs/troubleshooting.md +6 -25
- package/src/modules/bmm/docs/workflow-document-project-reference.md +1 -1
- package/src/modules/bmm/docs/workflows-implementation.md +3 -4
- package/src/modules/bmm/module.yaml +25 -23
- package/src/modules/bmm/testarch/knowledge/overview.md +0 -1
- package/src/modules/bmm/workflows/1-analysis/{product-brief → create-product-brief}/steps/step-01-init.md +1 -1
- package/src/modules/bmm/workflows/1-analysis/{product-brief → create-product-brief}/steps/step-01b-continue.md +1 -1
- package/src/modules/bmm/workflows/1-analysis/{product-brief → create-product-brief}/steps/step-02-vision.md +3 -3
- package/src/modules/bmm/workflows/1-analysis/{product-brief → create-product-brief}/steps/step-03-users.md +3 -3
- package/src/modules/bmm/workflows/1-analysis/{product-brief → create-product-brief}/steps/step-04-metrics.md +3 -3
- package/src/modules/bmm/workflows/1-analysis/{product-brief → create-product-brief}/steps/step-05-scope.md +3 -3
- package/src/modules/bmm/workflows/1-analysis/{product-brief → create-product-brief}/steps/step-06-complete.md +1 -1
- package/src/modules/bmm/workflows/1-analysis/{product-brief → create-product-brief}/workflow.md +2 -2
- package/src/modules/bmm/workflows/1-analysis/research/workflow.md +2 -2
- package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-02-discovery.md +4 -4
- package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-03-core-experience.md +4 -4
- package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-04-emotional-response.md +4 -4
- package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-05-inspiration.md +4 -4
- package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-06-design-system.md +4 -4
- package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-07-defining-experience.md +4 -4
- package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-08-visual-foundation.md +4 -4
- package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-09-design-directions.md +4 -4
- package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-10-user-journeys.md +4 -4
- package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-11-component-strategy.md +4 -4
- package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-12-ux-patterns.md +4 -4
- package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-13-responsive-accessibility.md +4 -4
- package/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/workflow.md +2 -2
- package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-01-init.md +1 -1
- package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-01b-continue.md +1 -1
- package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-02-discovery.md +3 -3
- package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-03-success.md +7 -7
- package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-04-journeys.md +8 -8
- package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-05-domain.md +12 -12
- package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-06-innovation.md +12 -12
- package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-07-project-type.md +10 -10
- package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-08-scoping.md +7 -7
- package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-09-functional.md +9 -9
- package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-10-nonfunctional.md +9 -9
- package/src/modules/bmm/workflows/2-plan-workflows/prd/steps/step-11-complete.md +1 -1
- package/src/modules/bmm/workflows/2-plan-workflows/prd/workflow.md +2 -2
- package/src/modules/bmm/workflows/3-solutioning/{implementation-readiness → check-implementation-readiness}/steps/step-01-document-discovery.md +1 -1
- package/src/modules/bmm/workflows/3-solutioning/{implementation-readiness → check-implementation-readiness}/steps/step-02-prd-analysis.md +1 -1
- package/src/modules/bmm/workflows/3-solutioning/{implementation-readiness → check-implementation-readiness}/steps/step-03-epic-coverage-validation.md +1 -1
- package/src/modules/bmm/workflows/3-solutioning/{implementation-readiness → check-implementation-readiness}/steps/step-04-ux-alignment.md +1 -1
- package/src/modules/bmm/workflows/3-solutioning/{implementation-readiness → check-implementation-readiness}/steps/step-05-epic-quality-review.md +2 -2
- package/src/modules/bmm/workflows/3-solutioning/{implementation-readiness → check-implementation-readiness}/steps/step-06-final-assessment.md +1 -1
- package/src/modules/bmm/workflows/3-solutioning/{implementation-readiness → check-implementation-readiness}/workflow.md +1 -1
- package/src/modules/bmm/workflows/3-solutioning/{architecture → create-architecture}/steps/step-01-init.md +1 -1
- package/src/modules/bmm/workflows/3-solutioning/{architecture → create-architecture}/steps/step-02-context.md +4 -4
- package/src/modules/bmm/workflows/3-solutioning/{architecture → create-architecture}/steps/step-03-starter.md +4 -4
- package/src/modules/bmm/workflows/3-solutioning/{architecture → create-architecture}/steps/step-04-decisions.md +4 -4
- package/src/modules/bmm/workflows/3-solutioning/{architecture → create-architecture}/steps/step-05-patterns.md +4 -4
- package/src/modules/bmm/workflows/3-solutioning/{architecture → create-architecture}/steps/step-06-structure.md +4 -4
- package/src/modules/bmm/workflows/3-solutioning/{architecture → create-architecture}/steps/step-07-validation.md +4 -4
- package/src/modules/bmm/workflows/3-solutioning/{architecture → create-architecture}/steps/step-08-complete.md +3 -3
- package/src/modules/bmm/workflows/3-solutioning/{architecture → create-architecture}/workflow.md +2 -2
- package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-01-validate-prerequisites.md +3 -3
- package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-02-design-epics.md +3 -3
- package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-03-create-stories.md +3 -3
- package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-04-final-validation.md +3 -3
- package/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.md +3 -3
- package/src/modules/bmm/workflows/4-implementation/code-review/instructions.xml +4 -3
- package/src/modules/bmm/workflows/4-implementation/code-review/workflow.yaml +2 -2
- package/src/modules/bmm/workflows/4-implementation/correct-course/checklist.md +1 -1
- package/src/modules/bmm/workflows/4-implementation/correct-course/instructions.md +2 -2
- package/src/modules/bmm/workflows/4-implementation/correct-course/workflow.yaml +2 -2
- package/src/modules/bmm/workflows/4-implementation/create-story/checklist.md +2 -2
- package/src/modules/bmm/workflows/4-implementation/create-story/instructions.xml +5 -5
- package/src/modules/bmm/workflows/4-implementation/create-story/template.md +3 -5
- package/src/modules/bmm/workflows/4-implementation/create-story/workflow.yaml +2 -2
- package/src/modules/bmm/workflows/4-implementation/dev-story/checklist.md +2 -2
- package/src/modules/bmm/workflows/4-implementation/dev-story/instructions.xml +11 -8
- package/src/modules/bmm/workflows/4-implementation/dev-story/workflow.yaml +2 -2
- package/src/modules/bmm/workflows/4-implementation/retrospective/instructions.md +3 -3
- package/src/modules/bmm/workflows/4-implementation/retrospective/workflow.yaml +3 -3
- package/src/modules/bmm/workflows/4-implementation/sprint-planning/instructions.md +15 -22
- package/src/modules/bmm/workflows/4-implementation/sprint-planning/sprint-status-template.yaml +4 -5
- package/src/modules/bmm/workflows/4-implementation/sprint-planning/workflow.yaml +2 -2
- package/src/modules/bmm/workflows/4-implementation/sprint-status/instructions.md +90 -35
- package/src/modules/bmm/workflows/4-implementation/sprint-status/workflow.yaml +2 -2
- package/src/modules/bmm/workflows/bmad-quick-flow/create-tech-spec/workflow.yaml +5 -5
- package/src/modules/bmm/workflows/bmad-quick-flow/quick-dev/workflow.yaml +7 -7
- package/src/modules/bmm/workflows/document-project/instructions.md +5 -5
- package/src/modules/bmm/workflows/document-project/workflow.yaml +2 -2
- package/src/modules/bmm/workflows/document-project/workflows/deep-dive.yaml +5 -5
- package/src/modules/bmm/workflows/document-project/workflows/full-scan.yaml +5 -5
- package/src/modules/bmm/workflows/{diagrams → excalidraw-diagrams}/create-dataflow/instructions.md +1 -1
- package/src/modules/bmm/workflows/{diagrams → excalidraw-diagrams}/create-dataflow/workflow.yaml +6 -6
- package/src/modules/bmm/workflows/{diagrams → excalidraw-diagrams}/create-diagram/instructions.md +2 -2
- package/src/modules/bmm/workflows/{diagrams → excalidraw-diagrams}/create-diagram/workflow.yaml +6 -6
- package/src/modules/bmm/workflows/{diagrams → excalidraw-diagrams}/create-flowchart/instructions.md +2 -2
- package/src/modules/bmm/workflows/{diagrams → excalidraw-diagrams}/create-flowchart/workflow.yaml +6 -6
- package/src/modules/bmm/workflows/{diagrams → excalidraw-diagrams}/create-wireframe/instructions.md +1 -1
- package/src/modules/bmm/workflows/{diagrams → excalidraw-diagrams}/create-wireframe/workflow.yaml +6 -6
- package/src/modules/bmm/workflows/generate-project-context/steps/step-01-discover.md +2 -2
- package/src/modules/bmm/workflows/generate-project-context/steps/step-02-generate.md +3 -3
- package/src/modules/bmm/workflows/generate-project-context/steps/step-03-complete.md +2 -2
- package/src/modules/bmm/workflows/generate-project-context/workflow.md +5 -5
- package/src/modules/bmm/workflows/testarch/atdd/instructions.md +2 -2
- package/src/modules/bmm/workflows/testarch/atdd/workflow.yaml +2 -2
- package/src/modules/bmm/workflows/testarch/automate/instructions.md +2 -2
- package/src/modules/bmm/workflows/testarch/automate/workflow.yaml +2 -2
- package/src/modules/bmm/workflows/testarch/ci/instructions.md +1 -1
- package/src/modules/bmm/workflows/testarch/ci/workflow.yaml +2 -2
- package/src/modules/bmm/workflows/testarch/framework/instructions.md +3 -3
- package/src/modules/bmm/workflows/testarch/framework/workflow.yaml +2 -2
- package/src/modules/bmm/workflows/testarch/nfr-assess/instructions.md +1 -1
- package/src/modules/bmm/workflows/testarch/nfr-assess/workflow.yaml +2 -2
- package/src/modules/bmm/workflows/testarch/test-design/instructions.md +3 -3
- package/src/modules/bmm/workflows/testarch/test-design/test-design-template.md +1 -1
- package/src/modules/bmm/workflows/testarch/test-design/workflow.yaml +10 -4
- package/src/modules/bmm/workflows/testarch/test-review/instructions.md +1 -1
- package/src/modules/bmm/workflows/testarch/test-review/workflow.yaml +2 -2
- package/src/modules/bmm/workflows/testarch/trace/instructions.md +6 -6
- package/src/modules/bmm/workflows/testarch/trace/workflow.yaml +2 -2
- package/src/modules/bmm/workflows/workflow-status/init/instructions.md +1 -1
- package/src/modules/bmm/workflows/workflow-status/init/workflow.yaml +4 -4
- package/src/modules/bmm/workflows/workflow-status/instructions.md +3 -3
- package/src/modules/bmm/workflows/workflow-status/project-levels.yaml +1 -1
- package/src/modules/bmm/workflows/workflow-status/workflow.yaml +2 -2
- package/src/modules/cis/agents/brainstorming-coach.agent.yaml +4 -4
- package/src/modules/cis/agents/creative-problem-solver.agent.yaml +4 -4
- package/src/modules/cis/agents/design-thinking-coach.agent.yaml +4 -4
- package/src/modules/cis/agents/innovation-strategist.agent.yaml +4 -4
- package/src/modules/cis/agents/presentation-master.agent.yaml +3 -3
- package/src/modules/cis/agents/storyteller/storyteller-sidecar/stories-told.md +7 -0
- package/src/modules/cis/agents/storyteller/storyteller-sidecar/story-preferences.md +7 -0
- package/src/modules/cis/agents/{storyteller.agent.yaml → storyteller/storyteller.agent.yaml} +9 -4
- package/src/modules/cis/module.yaml +3 -7
- package/src/modules/cis/{README.md → readme.md} +1 -1
- package/src/modules/cis/workflows/README.md +1 -1
- package/src/modules/cis/workflows/design-thinking/instructions.md +2 -2
- package/src/modules/cis/workflows/design-thinking/workflow.yaml +7 -7
- package/src/modules/cis/workflows/innovation-strategy/instructions.md +2 -2
- package/src/modules/cis/workflows/innovation-strategy/workflow.yaml +7 -7
- package/src/modules/cis/workflows/problem-solving/instructions.md +2 -2
- package/src/modules/cis/workflows/problem-solving/workflow.yaml +7 -7
- package/src/modules/cis/workflows/storytelling/instructions.md +2 -2
- package/src/modules/cis/workflows/storytelling/workflow.yaml +7 -7
- package/src/utility/agent-components/activation-rules.txt +7 -0
- package/src/utility/agent-components/activation-steps.txt +13 -0
- package/src/utility/agent-components/agent-command-header.md +1 -0
- package/src/utility/{templates → agent-components}/agent.customize.template.yaml +0 -1
- package/src/utility/agent-components/handler-action.txt +4 -0
- package/src/utility/agent-components/handler-exec.txt +6 -0
- package/src/utility/agent-components/handler-multi.txt +14 -0
- package/src/utility/agent-components/handler-tmpl.txt +5 -0
- package/src/utility/agent-components/handler-validate-workflow.txt +7 -0
- package/src/utility/agent-components/handler-workflow.txt +10 -0
- package/src/utility/agent-components/menu-handlers.txt +6 -0
- package/test/README.md +1 -1
- package/test/test-agent-schema.js +2 -2
- package/tools/cli/README.md +1 -607
- package/tools/cli/commands/build.js +7 -7
- package/tools/cli/commands/install.js +9 -20
- package/tools/cli/commands/list.js +13 -1
- package/tools/cli/installers/lib/core/config-collector.js +224 -59
- package/tools/cli/installers/lib/core/custom-module-cache.js +18 -10
- package/tools/cli/installers/lib/core/dependency-resolver.js +2 -2
- package/tools/cli/installers/lib/core/detector.js +16 -16
- package/tools/cli/installers/lib/core/ide-config-manager.js +9 -7
- package/tools/cli/installers/lib/core/installer.js +540 -946
- package/tools/cli/installers/lib/core/manifest-generator.js +43 -40
- package/tools/cli/installers/lib/core/manifest.js +23 -20
- package/tools/cli/installers/lib/custom/handler.js +16 -46
- package/tools/cli/installers/lib/ide/_base-ide.js +26 -33
- package/tools/cli/installers/lib/ide/antigravity.js +3 -3
- package/tools/cli/installers/lib/ide/claude-code.js +3 -3
- package/tools/cli/installers/lib/ide/codex.js +2 -2
- package/tools/cli/installers/lib/ide/gemini.js +6 -6
- package/tools/cli/installers/lib/ide/kiro-cli.js +2 -2
- package/tools/cli/installers/lib/ide/opencode.js +2 -2
- package/tools/cli/installers/lib/ide/roo.js +15 -5
- package/tools/cli/installers/lib/ide/shared/agent-command-generator.js +2 -2
- package/tools/cli/installers/lib/ide/shared/module-injections.js +2 -2
- package/tools/cli/installers/lib/ide/shared/task-tool-command-generator.js +2 -2
- package/tools/cli/installers/lib/ide/shared/workflow-command-generator.js +4 -4
- package/tools/cli/installers/lib/ide/templates/agent-command-template.md +1 -1
- package/tools/cli/installers/lib/ide/templates/gemini-agent-command.toml +3 -3
- package/tools/cli/installers/lib/ide/templates/gemini-task-command.toml +3 -3
- package/tools/cli/installers/lib/ide/templates/workflow-command-template.md +1 -1
- package/tools/cli/installers/lib/modules/manager.js +304 -313
- package/tools/cli/lib/activation-builder.js +8 -13
- package/tools/cli/lib/agent/compiler.js +68 -168
- package/tools/cli/lib/agent/installer.js +8 -128
- package/tools/cli/lib/agent-analyzer.js +2 -2
- package/tools/cli/lib/agent-party-generator.js +5 -17
- package/tools/cli/lib/config.js +2 -2
- package/tools/cli/lib/platform-codes.js +2 -2
- package/tools/cli/lib/ui.js +631 -568
- package/tools/cli/lib/xml-handler.js +3 -55
- package/tools/cli/lib/yaml-format.js +4 -6
- package/tools/cli/lib/yaml-xml-builder.js +14 -26
- package/tools/flattener/ignoreRules.js +1 -1
- package/tools/flattener/xml.js +1 -7
- package/tools/lib/xml-utils.js +13 -0
- package/tools/migrate-custom-module-paths.js +2 -2
- package/tools/validate-agent-schema.js +2 -2
- package/docs/v6-open-items.md +0 -17
- package/src/core/agents/bmad-web-orchestrator.agent.xml +0 -113
- package/src/modules/bmb/_module-installer/installer.js +0 -76
- package/src/modules/bmb/docs/agents/module-agent-architecture.md +0 -366
- package/src/modules/bmb/workflows/create-agent/steps/step-08-setup.md +0 -179
- package/src/modules/bmb/workflows/create-agent/steps/step-09-customize.md +0 -197
- package/src/modules/bmb/workflows/create-agent/steps/step-10-build-tools.md +0 -180
- package/src/modules/bmb/workflows/create-agent/templates/agent_commands.md +0 -21
- package/src/modules/bmb/workflows/create-agent/templates/agent_persona.md +0 -25
- package/src/modules/bmb/workflows/create-agent/templates/agent_purpose_and_type.md +0 -23
- package/src/modules/bmm/tasks/daily-standup.xml +0 -85
- package/src/modules/cis/agents/README.md +0 -104
- package/src/utility/models/action-command-header.md +0 -0
- package/src/utility/models/agent-activation-ide.xml +0 -51
- package/src/utility/models/agent-activation-web.xml +0 -50
- package/src/utility/models/agent-command-header.md +0 -1
- package/src/utility/models/agent-config-template.md +0 -23
- package/src/utility/models/agent-in-team-activation.xml +0 -3
- package/src/utility/models/fragments/activation-rules.xml +0 -7
- package/src/utility/models/fragments/activation-steps.xml +0 -16
- package/src/utility/models/fragments/handler-action.xml +0 -4
- package/src/utility/models/fragments/handler-exec.xml +0 -6
- package/src/utility/models/fragments/handler-multi.xml +0 -14
- package/src/utility/models/fragments/handler-tmpl.xml +0 -5
- package/src/utility/models/fragments/handler-validate-workflow.xml +0 -7
- package/src/utility/models/fragments/handler-workflow.xml +0 -9
- package/src/utility/models/fragments/menu-handlers.xml +0 -6
- package/src/utility/models/fragments/web-bundle-activation-steps.xml +0 -32
- package/tools/cli/bundlers/bundle-web.js +0 -179
- package/tools/cli/bundlers/test-analyst.js +0 -28
- package/tools/cli/bundlers/test-bundler.js +0 -118
- package/tools/cli/bundlers/web-bundler.js +0 -1754
- package/tools/cli/installers/lib/core/post-install-sidecar-replacement.js +0 -79
- package/tools/cli/lib/replace-project-root.js +0 -239
- package/tools/cli/regenerate-manifests.js +0 -27
- package/tools/cli/test-yaml-builder.js +0 -43
- /package/src/modules/bmgd/workflows/4-production/code-review/{backlog_template.md → backlog-template.md} +0 -0
- /package/src/modules/bmm/workflows/1-analysis/{product-brief → create-product-brief}/product-brief.template.md +0 -0
- /package/src/modules/bmm/workflows/3-solutioning/{implementation-readiness → check-implementation-readiness}/templates/readiness-report-template.md +0 -0
- /package/src/modules/bmm/workflows/3-solutioning/{architecture → create-architecture}/architecture-decision-template.md +0 -0
- /package/src/modules/bmm/workflows/3-solutioning/{architecture → create-architecture}/data/domain-complexity.csv +0 -0
- /package/src/modules/bmm/workflows/3-solutioning/{architecture → create-architecture}/data/project-types.csv +0 -0
- /package/src/modules/bmm/workflows/3-solutioning/{architecture → create-architecture}/steps/step-01b-continue.md +0 -0
- /package/src/modules/bmm/workflows/{diagrams → excalidraw-diagrams}/_shared/excalidraw-library.json +0 -0
- /package/src/modules/bmm/workflows/{diagrams → excalidraw-diagrams}/_shared/excalidraw-templates.yaml +0 -0
- /package/src/modules/bmm/workflows/{diagrams → excalidraw-diagrams}/create-dataflow/checklist.md +0 -0
- /package/src/modules/bmm/workflows/{diagrams → excalidraw-diagrams}/create-diagram/checklist.md +0 -0
- /package/src/modules/bmm/workflows/{diagrams → excalidraw-diagrams}/create-flowchart/checklist.md +0 -0
- /package/src/modules/bmm/workflows/{diagrams → excalidraw-diagrams}/create-wireframe/checklist.md +0 -0
- /package/src/utility/{models/fragments/handler-data.xml → agent-components/handler-data.txt} +0 -0
|
@@ -7,13 +7,13 @@ const { getSourcePath } = require('./project-root');
|
|
|
7
7
|
*/
|
|
8
8
|
class ActivationBuilder {
|
|
9
9
|
constructor() {
|
|
10
|
-
this.
|
|
10
|
+
this.agentComponents = getSourcePath('utility', 'agent-components');
|
|
11
11
|
this.fragmentCache = new Map();
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Load a fragment file
|
|
16
|
-
* @param {string} fragmentName - Name of fragment file (e.g., 'activation-init.
|
|
16
|
+
* @param {string} fragmentName - Name of fragment file (e.g., 'activation-init.txt')
|
|
17
17
|
* @returns {string} Fragment content
|
|
18
18
|
*/
|
|
19
19
|
async loadFragment(fragmentName) {
|
|
@@ -22,7 +22,7 @@ class ActivationBuilder {
|
|
|
22
22
|
return this.fragmentCache.get(fragmentName);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
const fragmentPath = path.join(this.
|
|
25
|
+
const fragmentPath = path.join(this.agentComponents, fragmentName);
|
|
26
26
|
|
|
27
27
|
if (!(await fs.pathExists(fragmentPath))) {
|
|
28
28
|
throw new Error(`Fragment not found: ${fragmentName}`);
|
|
@@ -49,7 +49,7 @@ class ActivationBuilder {
|
|
|
49
49
|
activation += this.indent(steps, 2) + '\n';
|
|
50
50
|
|
|
51
51
|
// 2. Build menu handlers section with dynamic handlers
|
|
52
|
-
const menuHandlers = await this.loadFragment('menu-handlers.
|
|
52
|
+
const menuHandlers = await this.loadFragment('menu-handlers.txt');
|
|
53
53
|
|
|
54
54
|
// Build handlers (load only needed handlers)
|
|
55
55
|
const handlers = await this.buildHandlers(profile);
|
|
@@ -63,11 +63,8 @@ class ActivationBuilder {
|
|
|
63
63
|
|
|
64
64
|
activation += '\n' + this.indent(processedHandlers, 2) + '\n';
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
const rules = await this.loadFragment('activation-rules.xml');
|
|
69
|
-
activation += this.indent(rules, 2) + '\n';
|
|
70
|
-
}
|
|
66
|
+
const rules = await this.loadFragment('activation-rules.txt');
|
|
67
|
+
activation += this.indent(rules, 2) + '\n';
|
|
71
68
|
|
|
72
69
|
activation += '</activation>';
|
|
73
70
|
|
|
@@ -83,7 +80,7 @@ class ActivationBuilder {
|
|
|
83
80
|
const handlerFragments = [];
|
|
84
81
|
|
|
85
82
|
for (const attrType of profile.usedAttributes) {
|
|
86
|
-
const fragmentName = `handler-${attrType}.
|
|
83
|
+
const fragmentName = `handler-${attrType}.txt`;
|
|
87
84
|
try {
|
|
88
85
|
const handler = await this.loadFragment(fragmentName);
|
|
89
86
|
handlerFragments.push(handler);
|
|
@@ -103,9 +100,7 @@ class ActivationBuilder {
|
|
|
103
100
|
* @returns {string} Steps XML
|
|
104
101
|
*/
|
|
105
102
|
async buildSteps(metadata = {}, agentSpecificActions = [], forWebBundle = false) {
|
|
106
|
-
|
|
107
|
-
const fragmentName = forWebBundle ? 'web-bundle-activation-steps.xml' : 'activation-steps.xml';
|
|
108
|
-
const stepsTemplate = await this.loadFragment(fragmentName);
|
|
103
|
+
const stepsTemplate = await this.loadFragment('activation-steps.txt');
|
|
109
104
|
|
|
110
105
|
// Extract basename from agent ID (e.g., "bmad/bmm/agents/pm.md" → "pm")
|
|
111
106
|
const agentBasename = metadata.id ? metadata.id.split('/').pop().replace('.md', '') : metadata.name || 'agent';
|
|
@@ -8,22 +8,9 @@ const yaml = require('yaml');
|
|
|
8
8
|
const fs = require('node:fs');
|
|
9
9
|
const path = require('node:path');
|
|
10
10
|
const { processAgentYaml, extractInstallConfig, stripInstallConfig, getDefaultValues } = require('./template-engine');
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
try {
|
|
15
|
-
YamlXmlBuilder = require('../../lib/yaml-xml-builder').YamlXmlBuilder;
|
|
16
|
-
} catch {
|
|
17
|
-
YamlXmlBuilder = null;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Escape XML special characters
|
|
22
|
-
*/
|
|
23
|
-
function escapeXml(text) {
|
|
24
|
-
if (!text) return '';
|
|
25
|
-
return text.replaceAll('&', '&').replaceAll('<', '<').replaceAll('>', '>').replaceAll('"', '"').replaceAll("'", ''');
|
|
26
|
-
}
|
|
11
|
+
const { escapeXml } = require('../../../lib/xml-utils');
|
|
12
|
+
const { ActivationBuilder } = require('../activation-builder');
|
|
13
|
+
const { AgentAnalyzer } = require('../agent-analyzer');
|
|
27
14
|
|
|
28
15
|
/**
|
|
29
16
|
* Build frontmatter for agent
|
|
@@ -45,137 +32,7 @@ You must fully embody this agent's persona and follow all activation instruction
|
|
|
45
32
|
`;
|
|
46
33
|
}
|
|
47
34
|
|
|
48
|
-
|
|
49
|
-
* Build simple activation block for custom agents
|
|
50
|
-
* @param {Array} criticalActions - Agent-specific critical actions
|
|
51
|
-
* @param {Array} menuItems - Menu items to determine which handlers to include
|
|
52
|
-
* @param {string} deploymentType - 'ide' or 'web' - filters commands based on ide-only/web-only flags
|
|
53
|
-
* @returns {string} Activation XML
|
|
54
|
-
*/
|
|
55
|
-
function buildSimpleActivation(criticalActions = [], menuItems = [], deploymentType = 'ide') {
|
|
56
|
-
let activation = '<activation critical="MANDATORY">\n';
|
|
57
|
-
|
|
58
|
-
let stepNum = 1;
|
|
59
|
-
|
|
60
|
-
// Standard steps
|
|
61
|
-
activation += ` <step n="${stepNum++}">Load persona from this current agent file (already in context)</step>\n`;
|
|
62
|
-
activation += ` <step n="${stepNum++}">Load and read {project-root}/.bmad/core/config.yaml to get {user_name}, {communication_language}, {output_folder}</step>\n`;
|
|
63
|
-
activation += ` <step n="${stepNum++}">Remember: user's name is {user_name}</step>\n`;
|
|
64
|
-
|
|
65
|
-
// Agent-specific steps from critical_actions
|
|
66
|
-
for (const action of criticalActions) {
|
|
67
|
-
activation += ` <step n="${stepNum++}">${action}</step>\n`;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// Menu and interaction steps
|
|
71
|
-
activation += ` <step n="${stepNum++}">ALWAYS communicate in {communication_language}</step>\n`;
|
|
72
|
-
activation += ` <step n="${stepNum++}">Show greeting using {user_name} from config, communicate in {communication_language}, then display numbered list of
|
|
73
|
-
ALL menu items from menu section</step>\n`;
|
|
74
|
-
activation += ` <step n="${stepNum++}">STOP and WAIT for user input - do NOT execute menu items automatically - accept number or cmd trigger or fuzzy command
|
|
75
|
-
match</step>\n`;
|
|
76
|
-
activation += ` <step n="${stepNum++}">On user input: Number → execute menu item[n] | Text → case-insensitive substring match | Multiple matches → ask user
|
|
77
|
-
to clarify | No match → show "Not recognized"</step>\n`;
|
|
78
|
-
|
|
79
|
-
// Filter menu items based on deployment type
|
|
80
|
-
const filteredMenuItems = menuItems.filter((item) => {
|
|
81
|
-
// Skip web-only commands for IDE deployment
|
|
82
|
-
if (deploymentType === 'ide' && item['web-only'] === true) {
|
|
83
|
-
return false;
|
|
84
|
-
}
|
|
85
|
-
// Skip ide-only commands for web deployment
|
|
86
|
-
if (deploymentType === 'web' && item['ide-only'] === true) {
|
|
87
|
-
return false;
|
|
88
|
-
}
|
|
89
|
-
return true;
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
// Detect which handlers are actually used in the filtered menu
|
|
93
|
-
const usedHandlers = new Set();
|
|
94
|
-
for (const item of filteredMenuItems) {
|
|
95
|
-
if (item.action) usedHandlers.add('action');
|
|
96
|
-
if (item.workflow) usedHandlers.add('workflow');
|
|
97
|
-
if (item.exec) usedHandlers.add('exec');
|
|
98
|
-
if (item.tmpl) usedHandlers.add('tmpl');
|
|
99
|
-
if (item.data) usedHandlers.add('data');
|
|
100
|
-
if (item['validate-workflow']) usedHandlers.add('validate-workflow');
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// Only include menu-handlers section if handlers are used
|
|
104
|
-
if (usedHandlers.size > 0) {
|
|
105
|
-
activation += ` <step n="${stepNum++}">When executing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item and follow the corresponding handler instructions</step>\n`;
|
|
106
|
-
|
|
107
|
-
// Menu handlers - only include what's used
|
|
108
|
-
activation += `
|
|
109
|
-
<menu-handlers>
|
|
110
|
-
<handlers>\n`;
|
|
111
|
-
|
|
112
|
-
if (usedHandlers.has('action')) {
|
|
113
|
-
activation += ` <handler type="action">
|
|
114
|
-
When menu item has: action="#id" → Find prompt with id="id" in current agent XML, execute its content
|
|
115
|
-
When menu item has: action="text" → Execute the text directly as an inline instruction
|
|
116
|
-
</handler>\n`;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
if (usedHandlers.has('workflow')) {
|
|
120
|
-
activation += ` <handler type="workflow">
|
|
121
|
-
When menu item has: workflow="path/to/workflow.yaml"
|
|
122
|
-
1. CRITICAL: Always LOAD {project-root}/.bmad/core/tasks/workflow.xml
|
|
123
|
-
2. Read the complete file - this is the CORE OS for executing BMAD workflows
|
|
124
|
-
3. Pass the yaml path as 'workflow-config' parameter to those instructions
|
|
125
|
-
4. Execute workflow.xml instructions precisely following all steps
|
|
126
|
-
5. Save outputs after completing EACH workflow step (never batch multiple steps together)
|
|
127
|
-
6. If workflow.yaml path is "todo", inform user the workflow hasn't been implemented yet
|
|
128
|
-
</handler>\n`;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
if (usedHandlers.has('exec')) {
|
|
132
|
-
activation += ` <handler type="exec">
|
|
133
|
-
When menu item has: exec="command" → Execute the command directly
|
|
134
|
-
</handler>\n`;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
if (usedHandlers.has('tmpl')) {
|
|
138
|
-
activation += ` <handler type="tmpl">
|
|
139
|
-
When menu item has: tmpl="template-path" → Load and apply the template
|
|
140
|
-
</handler>\n`;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
if (usedHandlers.has('data')) {
|
|
144
|
-
activation += ` <handler type="data">
|
|
145
|
-
When menu item has: data="path/to/x.json|yaml|yml"
|
|
146
|
-
Load the file, parse as JSON/YAML, make available as {data} to subsequent operations
|
|
147
|
-
</handler>\n`;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
if (usedHandlers.has('validate-workflow')) {
|
|
151
|
-
activation += ` <handler type="validate-workflow">
|
|
152
|
-
When menu item has: validate-workflow="path/to/workflow.yaml"
|
|
153
|
-
1. CRITICAL: Always LOAD {project-root}/.bmad/core/tasks/validate-workflow.xml
|
|
154
|
-
2. Read the complete file - this is the CORE OS for validating BMAD workflows
|
|
155
|
-
3. Pass the workflow.yaml path as 'workflow' parameter to those instructions
|
|
156
|
-
4. Pass any checklist.md from the workflow location as 'checklist' parameter if available
|
|
157
|
-
5. Execute validate-workflow.xml instructions precisely following all steps
|
|
158
|
-
6. Generate validation report with thorough analysis
|
|
159
|
-
</handler>\n`;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
activation += ` </handlers>
|
|
163
|
-
</menu-handlers>\n`;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
activation += `
|
|
167
|
-
<rules>
|
|
168
|
-
- ALWAYS communicate in {communication_language} UNLESS contradicted by communication_style
|
|
169
|
-
- Stay in character until exit selected
|
|
170
|
-
- Menu triggers use asterisk (*) - NOT markdown, display exactly as shown
|
|
171
|
-
- Number all lists, use letters for sub-options
|
|
172
|
-
- Load files ONLY when executing menu items or a workflow or command requires it. EXCEPTION: Config file MUST be loaded at startup step 2
|
|
173
|
-
- CRITICAL: Written File Output in workflows will be +2sd your communication style and use professional {communication_language}.
|
|
174
|
-
</rules>
|
|
175
|
-
</activation>\n`;
|
|
176
|
-
|
|
177
|
-
return activation;
|
|
178
|
-
}
|
|
35
|
+
// buildSimpleActivation function removed - replaced by ActivationBuilder for proper fragment loading from src/utility/agent-components/
|
|
179
36
|
|
|
180
37
|
/**
|
|
181
38
|
* Build persona XML section
|
|
@@ -385,9 +242,9 @@ function processExecArray(execArray) {
|
|
|
385
242
|
* @param {Object} agentYaml - Parsed and processed agent YAML
|
|
386
243
|
* @param {string} agentName - Final agent name (for ID and frontmatter)
|
|
387
244
|
* @param {string} targetPath - Target path for agent ID
|
|
388
|
-
* @returns {string} Compiled XML string with frontmatter
|
|
245
|
+
* @returns {Promise<string>} Compiled XML string with frontmatter
|
|
389
246
|
*/
|
|
390
|
-
function compileToXml(agentYaml, agentName = '', targetPath = '') {
|
|
247
|
+
async function compileToXml(agentYaml, agentName = '', targetPath = '') {
|
|
391
248
|
const agent = agentYaml.agent;
|
|
392
249
|
const meta = agent.metadata;
|
|
393
250
|
|
|
@@ -409,8 +266,16 @@ function compileToXml(agentYaml, agentName = '', targetPath = '') {
|
|
|
409
266
|
|
|
410
267
|
xml += `<agent ${agentAttrs.join(' ')}>\n`;
|
|
411
268
|
|
|
412
|
-
// Activation block -
|
|
413
|
-
|
|
269
|
+
// Activation block - use ActivationBuilder for proper fragment loading
|
|
270
|
+
const activationBuilder = new ActivationBuilder();
|
|
271
|
+
const analyzer = new AgentAnalyzer();
|
|
272
|
+
const profile = analyzer.analyzeAgentObject(agentYaml);
|
|
273
|
+
xml += await activationBuilder.buildActivation(
|
|
274
|
+
profile,
|
|
275
|
+
meta,
|
|
276
|
+
agent.critical_actions || [],
|
|
277
|
+
false, // forWebBundle - set to false for IDE deployment
|
|
278
|
+
);
|
|
414
279
|
|
|
415
280
|
// Persona section
|
|
416
281
|
xml += buildPersonaXml(agent.persona);
|
|
@@ -439,15 +304,24 @@ function compileToXml(agentYaml, agentName = '', targetPath = '') {
|
|
|
439
304
|
* @param {string} agentName - Optional final agent name (user's custom persona name)
|
|
440
305
|
* @param {string} targetPath - Optional target path for agent ID
|
|
441
306
|
* @param {Object} options - Additional options including config
|
|
442
|
-
* @returns {Object} { xml: string, metadata: Object }
|
|
307
|
+
* @returns {Promise<Object>} { xml: string, metadata: Object }
|
|
443
308
|
*/
|
|
444
|
-
function compileAgent(yamlContent, answers = {}, agentName = '', targetPath = '', options = {}) {
|
|
309
|
+
async function compileAgent(yamlContent, answers = {}, agentName = '', targetPath = '', options = {}) {
|
|
445
310
|
// Parse YAML
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
//
|
|
449
|
-
//
|
|
450
|
-
|
|
311
|
+
let agentYaml = yaml.parse(yamlContent);
|
|
312
|
+
|
|
313
|
+
// Apply customization merges before template processing
|
|
314
|
+
// Handle metadata overrides (like name)
|
|
315
|
+
if (answers.metadata) {
|
|
316
|
+
// Filter out empty values from metadata
|
|
317
|
+
const filteredMetadata = filterCustomizationData(answers.metadata);
|
|
318
|
+
if (Object.keys(filteredMetadata).length > 0) {
|
|
319
|
+
agentYaml.agent.metadata = { ...agentYaml.agent.metadata, ...filteredMetadata };
|
|
320
|
+
}
|
|
321
|
+
// Remove from answers so it doesn't get processed as template variables
|
|
322
|
+
const { metadata, ...templateAnswers } = answers;
|
|
323
|
+
answers = templateAnswers;
|
|
324
|
+
}
|
|
451
325
|
|
|
452
326
|
// Extract install_config
|
|
453
327
|
const installConfig = extractInstallConfig(agentYaml);
|
|
@@ -459,21 +333,17 @@ function compileAgent(yamlContent, answers = {}, agentName = '', targetPath = ''
|
|
|
459
333
|
finalAnswers = { ...defaults, ...answers };
|
|
460
334
|
}
|
|
461
335
|
|
|
462
|
-
// Add agent_sidecar_folder to answers if provided in config
|
|
463
|
-
if (options.config && options.config.agent_sidecar_folder) {
|
|
464
|
-
finalAnswers.agent_sidecar_folder = options.config.agent_sidecar_folder;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
336
|
// Process templates with answers
|
|
468
337
|
const processedYaml = processAgentYaml(agentYaml, finalAnswers);
|
|
469
338
|
|
|
470
339
|
// Strip install_config from output
|
|
471
340
|
const cleanYaml = stripInstallConfig(processedYaml);
|
|
472
341
|
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
342
|
+
let xml = await compileToXml(cleanYaml, agentName, targetPath);
|
|
343
|
+
|
|
344
|
+
// Ensure xml is a string before attempting replaceAll
|
|
345
|
+
if (typeof xml !== 'string') {
|
|
346
|
+
throw new TypeError('compileToXml did not return a string');
|
|
477
347
|
}
|
|
478
348
|
|
|
479
349
|
return {
|
|
@@ -483,6 +353,36 @@ function compileAgent(yamlContent, answers = {}, agentName = '', targetPath = ''
|
|
|
483
353
|
};
|
|
484
354
|
}
|
|
485
355
|
|
|
356
|
+
/**
|
|
357
|
+
* Filter customization data to remove empty/null values
|
|
358
|
+
* @param {Object} data - Raw customization data
|
|
359
|
+
* @returns {Object} Filtered customization data
|
|
360
|
+
*/
|
|
361
|
+
function filterCustomizationData(data) {
|
|
362
|
+
const filtered = {};
|
|
363
|
+
|
|
364
|
+
for (const [key, value] of Object.entries(data)) {
|
|
365
|
+
if (value === null || value === undefined || value === '') {
|
|
366
|
+
continue; // Skip null/undefined/empty values
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
if (Array.isArray(value)) {
|
|
370
|
+
if (value.length > 0) {
|
|
371
|
+
filtered[key] = value;
|
|
372
|
+
}
|
|
373
|
+
} else if (typeof value === 'object') {
|
|
374
|
+
const nested = filterCustomizationData(value);
|
|
375
|
+
if (Object.keys(nested).length > 0) {
|
|
376
|
+
filtered[key] = nested;
|
|
377
|
+
}
|
|
378
|
+
} else {
|
|
379
|
+
filtered[key] = value;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
return filtered;
|
|
384
|
+
}
|
|
385
|
+
|
|
486
386
|
/**
|
|
487
387
|
* Process TTS injection markers in content
|
|
488
388
|
* @param {string} content - Content to process
|
|
@@ -558,8 +458,8 @@ module.exports = {
|
|
|
558
458
|
compileAgentFile,
|
|
559
459
|
escapeXml,
|
|
560
460
|
buildFrontmatter,
|
|
561
|
-
buildSimpleActivation,
|
|
562
461
|
buildPersonaXml,
|
|
563
462
|
buildPromptsXml,
|
|
564
463
|
buildMenuXml,
|
|
464
|
+
filterCustomizationData,
|
|
565
465
|
};
|
|
@@ -17,7 +17,7 @@ const { extractInstallConfig, getDefaultValues } = require('./template-engine');
|
|
|
17
17
|
*/
|
|
18
18
|
function findBmadConfig(startPath = process.cwd()) {
|
|
19
19
|
// Look for common BMAD folder names
|
|
20
|
-
const possibleNames = ['
|
|
20
|
+
const possibleNames = ['_bmad'];
|
|
21
21
|
|
|
22
22
|
for (const name of possibleNames) {
|
|
23
23
|
const configPath = path.join(startPath, name, 'bmb', 'config.yaml');
|
|
@@ -42,7 +42,7 @@ function findBmadConfig(startPath = process.cwd()) {
|
|
|
42
42
|
* @returns {string} Resolved path
|
|
43
43
|
*/
|
|
44
44
|
function resolvePath(pathStr, context) {
|
|
45
|
-
return pathStr.replaceAll('{project-root}', context.projectRoot).replaceAll('{bmad-folder}',
|
|
45
|
+
return pathStr.replaceAll('{project-root}', context.projectRoot).replaceAll('{bmad-folder}', context_bmadFolder);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
/**
|
|
@@ -262,129 +262,11 @@ function installAgent(agentInfo, answers, targetPath, options = {}) {
|
|
|
262
262
|
agentName: metadata.name || agentInfo.name,
|
|
263
263
|
targetDir: agentTargetDir,
|
|
264
264
|
compiledFile: compiledPath,
|
|
265
|
-
sidecarCopied: false,
|
|
266
265
|
};
|
|
267
266
|
|
|
268
|
-
// Handle sidecar files for agents with hasSidecar flag
|
|
269
|
-
if (agentInfo.hasSidecar === true && agentInfo.type === 'expert') {
|
|
270
|
-
// Get agent sidecar folder from config or use default
|
|
271
|
-
const agentSidecarFolder = options.config?.agent_sidecar_folder || '{project-root}/.myagent-data';
|
|
272
|
-
|
|
273
|
-
// Resolve path variables
|
|
274
|
-
const resolvedSidecarFolder = agentSidecarFolder
|
|
275
|
-
.replaceAll('{project-root}', options.projectRoot || process.cwd())
|
|
276
|
-
.replaceAll('.bmad', options.bmadFolder || '.bmad');
|
|
277
|
-
|
|
278
|
-
// Create sidecar directory for this agent
|
|
279
|
-
const agentSidecarDir = path.join(resolvedSidecarFolder, agentFolderName);
|
|
280
|
-
if (!fs.existsSync(agentSidecarDir)) {
|
|
281
|
-
fs.mkdirSync(agentSidecarDir, { recursive: true });
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
// Find and copy sidecar folder
|
|
285
|
-
const sidecarFiles = copyAgentSidecarFiles(agentInfo.path, agentSidecarDir, agentInfo.yamlFile);
|
|
286
|
-
result.sidecarCopied = true;
|
|
287
|
-
result.sidecarFiles = sidecarFiles;
|
|
288
|
-
result.sidecarDir = agentSidecarDir;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
267
|
return result;
|
|
292
268
|
}
|
|
293
269
|
|
|
294
|
-
/**
|
|
295
|
-
* Recursively copy sidecar files (everything except the .agent.yaml)
|
|
296
|
-
* @param {string} sourceDir - Source agent directory
|
|
297
|
-
* @param {string} targetDir - Target agent directory
|
|
298
|
-
* @param {string} excludeYaml - The .agent.yaml file to exclude
|
|
299
|
-
* @returns {Array} List of copied files
|
|
300
|
-
*/
|
|
301
|
-
function copySidecarFiles(sourceDir, targetDir, excludeYaml) {
|
|
302
|
-
const copied = [];
|
|
303
|
-
|
|
304
|
-
function copyDir(src, dest) {
|
|
305
|
-
if (!fs.existsSync(dest)) {
|
|
306
|
-
fs.mkdirSync(dest, { recursive: true });
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
const entries = fs.readdirSync(src, { withFileTypes: true });
|
|
310
|
-
for (const entry of entries) {
|
|
311
|
-
const srcPath = path.join(src, entry.name);
|
|
312
|
-
const destPath = path.join(dest, entry.name);
|
|
313
|
-
|
|
314
|
-
// Skip the source YAML file
|
|
315
|
-
if (srcPath === excludeYaml) {
|
|
316
|
-
continue;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
if (entry.isDirectory()) {
|
|
320
|
-
copyDir(srcPath, destPath);
|
|
321
|
-
} else {
|
|
322
|
-
fs.copyFileSync(srcPath, destPath);
|
|
323
|
-
copied.push(destPath);
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
copyDir(sourceDir, targetDir);
|
|
329
|
-
return copied;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
/**
|
|
333
|
-
* Find and copy agent sidecar folders
|
|
334
|
-
* @param {string} sourceDir - Source agent directory
|
|
335
|
-
* @param {string} targetSidecarDir - Target sidecar directory for the agent
|
|
336
|
-
* @param {string} excludeYaml - The .agent.yaml file to exclude
|
|
337
|
-
* @returns {Array} List of copied files
|
|
338
|
-
*/
|
|
339
|
-
function copyAgentSidecarFiles(sourceDir, targetSidecarDir, excludeYaml) {
|
|
340
|
-
const copied = [];
|
|
341
|
-
const preserved = [];
|
|
342
|
-
|
|
343
|
-
// Find folders with "sidecar" in the name
|
|
344
|
-
const entries = fs.readdirSync(sourceDir, { withFileTypes: true });
|
|
345
|
-
|
|
346
|
-
for (const entry of entries) {
|
|
347
|
-
if (entry.isDirectory() && entry.name.toLowerCase().includes('sidecar')) {
|
|
348
|
-
const sidecarSourcePath = path.join(sourceDir, entry.name);
|
|
349
|
-
|
|
350
|
-
// Recursively sync the sidecar folder contents (preserve existing, add new)
|
|
351
|
-
function syncSidecarDir(src, dest) {
|
|
352
|
-
if (!fs.existsSync(dest)) {
|
|
353
|
-
fs.mkdirSync(dest, { recursive: true });
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
// Get all files in source
|
|
357
|
-
const sourceEntries = fs.readdirSync(src, { withFileTypes: true });
|
|
358
|
-
|
|
359
|
-
for (const sourceEntry of sourceEntries) {
|
|
360
|
-
const srcPath = path.join(src, sourceEntry.name);
|
|
361
|
-
const destPath = path.join(dest, sourceEntry.name);
|
|
362
|
-
|
|
363
|
-
if (sourceEntry.isDirectory()) {
|
|
364
|
-
// Recursively sync subdirectories
|
|
365
|
-
syncSidecarDir(srcPath, destPath);
|
|
366
|
-
} else {
|
|
367
|
-
// Check if file already exists in destination
|
|
368
|
-
if (fs.existsSync(destPath)) {
|
|
369
|
-
// File exists - preserve it
|
|
370
|
-
preserved.push(destPath);
|
|
371
|
-
} else {
|
|
372
|
-
// File doesn't exist - copy it
|
|
373
|
-
fs.copyFileSync(srcPath, destPath);
|
|
374
|
-
copied.push(destPath);
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
syncSidecarDir(sidecarSourcePath, targetSidecarDir);
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
// Return info about what was preserved and what was copied
|
|
385
|
-
return { copied, preserved };
|
|
386
|
-
}
|
|
387
|
-
|
|
388
270
|
/**
|
|
389
271
|
* Update agent metadata ID to reflect installed location
|
|
390
272
|
* @param {string} compiledContent - Compiled XML content
|
|
@@ -407,10 +289,10 @@ function detectBmadProject(targetPath) {
|
|
|
407
289
|
|
|
408
290
|
// Walk up directory tree looking for BMAD installation
|
|
409
291
|
while (checkPath !== root) {
|
|
410
|
-
const possibleNames = ['
|
|
292
|
+
const possibleNames = ['_bmad'];
|
|
411
293
|
for (const name of possibleNames) {
|
|
412
294
|
const bmadFolder = path.join(checkPath, name);
|
|
413
|
-
const cfgFolder = path.join(bmadFolder, '
|
|
295
|
+
const cfgFolder = path.join(bmadFolder, '_config');
|
|
414
296
|
const manifestFile = path.join(cfgFolder, 'agent-manifest.csv');
|
|
415
297
|
|
|
416
298
|
if (fs.existsSync(manifestFile)) {
|
|
@@ -596,16 +478,16 @@ function addToManifest(manifestFile, agentData) {
|
|
|
596
478
|
}
|
|
597
479
|
|
|
598
480
|
/**
|
|
599
|
-
* Save agent source YAML to
|
|
481
|
+
* Save agent source YAML to _config/custom/agents/ for reinstallation
|
|
600
482
|
* Stores user answers in a top-level saved_answers section (cleaner than overwriting defaults)
|
|
601
483
|
* @param {Object} agentInfo - Agent info (path, type, etc.)
|
|
602
|
-
* @param {string} cfgFolder - Path to
|
|
484
|
+
* @param {string} cfgFolder - Path to _config folder
|
|
603
485
|
* @param {string} agentName - Final agent name (e.g., "fred-commit-poet")
|
|
604
486
|
* @param {Object} answers - User answers to save for reinstallation
|
|
605
487
|
* @returns {Object} Info about saved source
|
|
606
488
|
*/
|
|
607
489
|
function saveAgentSource(agentInfo, cfgFolder, agentName, answers = {}) {
|
|
608
|
-
// Save to
|
|
490
|
+
// Save to _config/custom/agents/ instead of _config/agents/
|
|
609
491
|
const customAgentsCfgDir = path.join(cfgFolder, 'custom', 'agents');
|
|
610
492
|
|
|
611
493
|
if (!fs.existsSync(customAgentsCfgDir)) {
|
|
@@ -689,7 +571,7 @@ function saveAgentSource(agentInfo, cfgFolder, agentName, answers = {}) {
|
|
|
689
571
|
*/
|
|
690
572
|
async function createIdeSlashCommands(projectRoot, agentName, agentPath, metadata) {
|
|
691
573
|
// Read manifest.yaml to get installed IDEs
|
|
692
|
-
const manifestPath = path.join(projectRoot, '
|
|
574
|
+
const manifestPath = path.join(projectRoot, '_bmad', '_config', 'manifest.yaml');
|
|
693
575
|
let installedIdes = ['claude-code']; // Default to Claude Code if no manifest
|
|
694
576
|
|
|
695
577
|
if (fs.existsSync(manifestPath)) {
|
|
@@ -820,8 +702,6 @@ module.exports = {
|
|
|
820
702
|
loadAgentConfig,
|
|
821
703
|
promptInstallQuestions,
|
|
822
704
|
installAgent,
|
|
823
|
-
copySidecarFiles,
|
|
824
|
-
copyAgentSidecarFiles,
|
|
825
705
|
updateAgentId,
|
|
826
706
|
detectBmadProject,
|
|
827
707
|
addToManifest,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const yaml = require('
|
|
1
|
+
const yaml = require('yaml');
|
|
2
2
|
const fs = require('fs-extra');
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -91,7 +91,7 @@ class AgentAnalyzer {
|
|
|
91
91
|
*/
|
|
92
92
|
async analyzeAgentFile(filePath) {
|
|
93
93
|
const content = await fs.readFile(filePath, 'utf8');
|
|
94
|
-
const agentYaml = yaml.
|
|
94
|
+
const agentYaml = yaml.parse(content);
|
|
95
95
|
return this.analyzeAgentObject(agentYaml);
|
|
96
96
|
}
|
|
97
97
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const path = require('node:path');
|
|
2
2
|
const fs = require('fs-extra');
|
|
3
|
+
const { escapeXml } = require('../../lib/xml-utils');
|
|
3
4
|
|
|
4
5
|
const AgentPartyGenerator = {
|
|
5
6
|
/**
|
|
@@ -28,7 +29,7 @@ const AgentPartyGenerator = {
|
|
|
28
29
|
let xmlContent = `<!-- Powered by BMAD-CORE™ -->
|
|
29
30
|
<!-- Agent Manifest - Generated during BMAD ${forWeb ? 'bundling' : 'installation'} -->
|
|
30
31
|
<!-- This file contains a summary of all ${forWeb ? 'bundled' : 'installed'} agents for quick reference -->
|
|
31
|
-
<manifest id="bmad/
|
|
32
|
+
<manifest id="bmad/_config/agent-manifest.csv" version="1.0" generated="${new Date().toISOString()}">
|
|
32
33
|
<description>
|
|
33
34
|
Complete roster of ${forWeb ? 'bundled' : 'installed'} BMAD agents with summarized personas for efficient multi-agent orchestration.
|
|
34
35
|
Used by party-mode and other multi-agent coordination features.
|
|
@@ -47,9 +48,9 @@ const AgentPartyGenerator = {
|
|
|
47
48
|
for (const agent of agents) {
|
|
48
49
|
xmlContent += ` <agent id="${agent.id}" name="${agent.name}" title="${agent.title || ''}" icon="${agent.icon || ''}">
|
|
49
50
|
<persona>
|
|
50
|
-
<role>${
|
|
51
|
-
<identity>${
|
|
52
|
-
<communication_style>${
|
|
51
|
+
<role>${escapeXml(agent.role || '')}</role>
|
|
52
|
+
<identity>${escapeXml(agent.identity || '')}</identity>
|
|
53
|
+
<communication_style>${escapeXml(agent.communicationStyle || '')}</communication_style>
|
|
53
54
|
<principles>${agent.principles || ''}</principles>
|
|
54
55
|
</persona>
|
|
55
56
|
</agent>\n`;
|
|
@@ -124,19 +125,6 @@ const AgentPartyGenerator = {
|
|
|
124
125
|
return match ? match[1] : '';
|
|
125
126
|
},
|
|
126
127
|
|
|
127
|
-
/**
|
|
128
|
-
* Escape XML special characters
|
|
129
|
-
*/
|
|
130
|
-
escapeXml(text) {
|
|
131
|
-
if (!text) return '';
|
|
132
|
-
return text
|
|
133
|
-
.replaceAll('&', '&')
|
|
134
|
-
.replaceAll('<', '<')
|
|
135
|
-
.replaceAll('>', '>')
|
|
136
|
-
.replaceAll('"', '"')
|
|
137
|
-
.replaceAll("'", ''');
|
|
138
|
-
},
|
|
139
|
-
|
|
140
128
|
/**
|
|
141
129
|
* Apply config overrides to agent details
|
|
142
130
|
* @param {Object} details - Original agent details
|
package/tools/cli/lib/config.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const fs = require('fs-extra');
|
|
2
|
-
const yaml = require('
|
|
2
|
+
const yaml = require('yaml');
|
|
3
3
|
const path = require('node:path');
|
|
4
4
|
const packageJson = require('../../../package.json');
|
|
5
5
|
|
|
@@ -18,7 +18,7 @@ class Config {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
const content = await fs.readFile(configPath, 'utf8');
|
|
21
|
-
return yaml.
|
|
21
|
+
return yaml.parse(content);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const fs = require('fs-extra');
|
|
2
2
|
const path = require('node:path');
|
|
3
|
-
const yaml = require('
|
|
3
|
+
const yaml = require('yaml');
|
|
4
4
|
const { getProjectRoot } = require('./project-root');
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -20,7 +20,7 @@ class PlatformCodes {
|
|
|
20
20
|
try {
|
|
21
21
|
if (fs.existsSync(this.configPath)) {
|
|
22
22
|
const content = fs.readFileSync(this.configPath, 'utf8');
|
|
23
|
-
this.config = yaml.
|
|
23
|
+
this.config = yaml.parse(content);
|
|
24
24
|
} else {
|
|
25
25
|
console.warn(`Platform codes config not found at ${this.configPath}`);
|
|
26
26
|
this.config = { platforms: {} };
|