bmad-method 6.0.3 → 6.0.5-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.augment/code_review_guidelines.yaml +2 -42
- package/.claude/skills/bmad-os-findings-triage/SKILL.md +6 -0
- package/.claude/skills/bmad-os-findings-triage/prompts/agent-prompt.md +104 -0
- package/.claude/skills/bmad-os-findings-triage/prompts/instructions.md +286 -0
- package/.claude/skills/bmad-os-review-pr/SKILL.md +1 -1
- package/.claude/skills/bmad-os-review-pr/prompts/instructions.md +63 -6
- package/.claude/skills/bmad-os-review-prompt/SKILL.md +177 -0
- package/.claude/skills/bmad-os-root-cause-analysis/SKILL.md +12 -0
- package/.claude/skills/bmad-os-root-cause-analysis/prompts/instructions.md +74 -0
- package/.github/ISSUE_TEMPLATE/config.yaml +1 -1
- package/.github/ISSUE_TEMPLATE/documentation.yaml +1 -1
- package/.github/workflows/publish.yaml +243 -0
- package/CHANGELOG.md +32 -0
- package/CONTRIBUTING.md +1 -1
- package/README.md +8 -8
- package/README_CN.md +121 -0
- package/docs/_STYLE_GUIDE.md +10 -10
- package/docs/explanation/brainstorming.md +1 -1
- package/docs/explanation/party-mode.md +1 -1
- package/docs/explanation/preventing-agent-conflicts.md +1 -1
- package/docs/explanation/project-context.md +15 -15
- package/docs/explanation/quick-flow.md +9 -9
- package/docs/how-to/established-projects.md +7 -7
- package/docs/how-to/get-answers-about-bmad.md +2 -2
- package/docs/how-to/install-bmad.md +16 -6
- package/docs/how-to/project-context.md +2 -2
- package/docs/how-to/quick-fixes.md +5 -5
- package/docs/how-to/shard-large-documents.md +1 -1
- package/docs/how-to/upgrade-to-v6.md +8 -5
- package/docs/index.md +2 -2
- package/docs/reference/agents.md +14 -14
- package/docs/reference/commands.md +64 -70
- package/docs/reference/testing.md +1 -1
- package/docs/reference/workflow-map.md +19 -19
- package/docs/tutorials/getting-started.md +34 -34
- package/docs/zh-cn/404.md +9 -0
- package/docs/zh-cn/_STYLE_GUIDE.md +370 -0
- package/docs/zh-cn/explanation/advanced-elicitation.md +62 -0
- package/docs/zh-cn/explanation/adversarial-review.md +71 -0
- package/docs/zh-cn/explanation/brainstorming.md +43 -0
- package/docs/zh-cn/explanation/established-projects-faq.md +60 -0
- package/docs/zh-cn/explanation/party-mode.md +79 -0
- package/docs/zh-cn/explanation/preventing-agent-conflicts.md +137 -0
- package/docs/zh-cn/explanation/project-context.md +176 -0
- package/docs/zh-cn/explanation/quick-flow.md +93 -0
- package/docs/zh-cn/explanation/why-solutioning-matters.md +90 -0
- package/docs/zh-cn/how-to/customize-bmad.md +182 -0
- package/docs/zh-cn/how-to/established-projects.md +134 -0
- package/docs/zh-cn/how-to/get-answers-about-bmad.md +144 -0
- package/docs/zh-cn/how-to/install-bmad.md +105 -0
- package/docs/zh-cn/how-to/non-interactive-installation.md +181 -0
- package/docs/zh-cn/how-to/project-context.md +152 -0
- package/docs/zh-cn/how-to/quick-fixes.md +140 -0
- package/docs/zh-cn/how-to/shard-large-documents.md +86 -0
- package/docs/zh-cn/how-to/upgrade-to-v6.md +120 -0
- package/docs/zh-cn/index.md +69 -0
- package/docs/zh-cn/reference/agents.md +41 -0
- package/docs/zh-cn/reference/commands.md +166 -0
- package/docs/zh-cn/reference/modules.md +94 -0
- package/docs/zh-cn/reference/testing.md +122 -0
- package/docs/zh-cn/reference/workflow-map.md +104 -0
- package/docs/zh-cn/roadmap.mdx +152 -0
- package/docs/zh-cn/tutorials/getting-started.md +300 -0
- package/package.json +1 -1
- package/src/bmm/agents/analyst.agent.yaml +1 -1
- package/src/bmm/agents/bmad-skill-manifest.yaml +39 -0
- package/src/bmm/agents/dev.agent.yaml +2 -2
- package/src/bmm/agents/pm.agent.yaml +1 -1
- package/src/bmm/agents/qa.agent.yaml +1 -1
- package/src/bmm/agents/quick-flow-solo-dev.agent.yaml +6 -2
- package/src/bmm/agents/sm.agent.yaml +4 -4
- package/src/bmm/agents/tech-writer/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/agents/tech-writer/tech-writer.agent.yaml +1 -1
- package/src/bmm/module-help.csv +11 -10
- package/src/bmm/workflows/1-analysis/create-product-brief/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-02-vision.md +1 -1
- package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-03-users.md +1 -1
- package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-04-metrics.md +1 -1
- package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-05-scope.md +1 -1
- package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-06-complete.md +1 -1
- package/src/bmm/workflows/1-analysis/research/bmad-skill-manifest.yaml +14 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/bmad-skill-manifest.yaml +14 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-02-discovery.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-02b-vision.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-02c-executive-summary.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-03-success.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-04-journeys.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-05-domain.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-06-innovation.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-07-project-type.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-08-scoping.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-09-functional.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-10-nonfunctional.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-11-polish.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-12-complete.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-e/step-e-01-discovery.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-e/step-e-02-review.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-01-discovery.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-10-smart-validation.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-11-holistic-quality-validation.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-13-report-complete.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-02-discovery.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-03-core-experience.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-04-emotional-response.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-05-inspiration.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-06-design-system.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-07-defining-experience.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-08-visual-foundation.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-09-design-directions.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-10-user-journeys.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-11-component-strategy.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-12-ux-patterns.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-13-responsive-accessibility.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-14-complete.md +1 -1
- package/src/bmm/workflows/3-solutioning/check-implementation-readiness/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-06-final-assessment.md +1 -1
- package/src/bmm/workflows/3-solutioning/create-architecture/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-02-context.md +2 -2
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-03-starter.md +2 -2
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-04-decisions.md +2 -2
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-05-patterns.md +2 -2
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-06-structure.md +2 -2
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-07-validation.md +2 -2
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-08-complete.md +1 -1
- package/src/bmm/workflows/3-solutioning/create-epics-and-stories/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-01-validate-prerequisites.md +1 -1
- package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-02-design-epics.md +1 -1
- package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-03-create-stories.md +1 -1
- package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-04-final-validation.md +2 -2
- package/src/bmm/workflows/4-implementation/code-review/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/4-implementation/code-review/discover-inputs.md +88 -0
- package/src/bmm/workflows/4-implementation/code-review/workflow.md +271 -0
- package/src/bmm/workflows/4-implementation/correct-course/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/4-implementation/correct-course/checklist.md +1 -1
- package/src/bmm/workflows/4-implementation/correct-course/{instructions.md → workflow.md} +79 -12
- package/src/bmm/workflows/4-implementation/create-story/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/4-implementation/create-story/checklist.md +9 -10
- package/src/bmm/workflows/4-implementation/create-story/discover-inputs.md +88 -0
- package/src/bmm/workflows/4-implementation/create-story/workflow.md +388 -0
- package/src/bmm/workflows/4-implementation/dev-story/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/4-implementation/dev-story/{instructions.xml → workflow.md} +49 -2
- package/src/bmm/workflows/4-implementation/retrospective/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/4-implementation/retrospective/{instructions.md → workflow.md} +64 -23
- package/src/bmm/workflows/4-implementation/sprint-planning/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/4-implementation/sprint-planning/sprint-status-template.yaml +1 -0
- package/src/bmm/workflows/4-implementation/sprint-planning/{instructions.md → workflow.md} +55 -10
- package/src/bmm/workflows/4-implementation/sprint-status/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/4-implementation/sprint-status/{instructions.md → workflow.md} +45 -8
- package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/SKILL.md +6 -0
- package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/bmad-skill-manifest.yaml +1 -0
- package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-01-clarify-and-route.md +54 -0
- package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-02-plan.md +39 -0
- package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-03-implement.md +35 -0
- package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-04-review.md +55 -0
- package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-05-present.md +19 -0
- package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/tech-spec-template.md +90 -0
- package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/workflow.md +84 -0
- package/src/bmm/workflows/bmad-quick-flow/quick-dev/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-05-adversarial-review.md +8 -14
- package/src/bmm/workflows/bmad-quick-flow/quick-dev/workflow.md +1 -1
- package/src/bmm/workflows/bmad-quick-flow/quick-spec/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-04-review.md +4 -6
- package/src/bmm/workflows/bmad-quick-flow/quick-spec/workflow.md +1 -1
- package/src/bmm/workflows/document-project/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/document-project/instructions.md +5 -7
- package/src/bmm/workflows/document-project/workflow.md +39 -0
- package/src/bmm/workflows/document-project/workflows/deep-dive-instructions.md +0 -1
- package/src/bmm/workflows/document-project/workflows/deep-dive-workflow.md +42 -0
- package/src/bmm/workflows/document-project/workflows/full-scan-instructions.md +0 -1
- package/src/bmm/workflows/document-project/workflows/full-scan-workflow.md +42 -0
- package/src/bmm/workflows/generate-project-context/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/generate-project-context/steps/step-02-generate.md +2 -2
- package/src/bmm/workflows/qa-generate-e2e-tests/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/qa-generate-e2e-tests/checklist.md +1 -1
- package/src/bmm/workflows/qa-generate-e2e-tests/{instructions.md → workflow.md} +40 -7
- package/src/core/agents/bmad-master.agent.yaml +1 -1
- package/src/core/agents/bmad-skill-manifest.yaml +3 -0
- package/src/core/module-help.csv +3 -2
- package/src/core/module.yaml +1 -1
- package/src/core/tasks/bmad-help/SKILL.md +6 -0
- package/src/core/tasks/bmad-help/bmad-skill-manifest.yaml +1 -0
- package/src/core/tasks/{help.md → bmad-help/workflow.md} +6 -4
- package/src/core/tasks/bmad-review-adversarial-general/SKILL.md +6 -0
- package/src/core/tasks/bmad-review-adversarial-general/bmad-skill-manifest.yaml +1 -0
- package/src/core/tasks/bmad-review-adversarial-general/workflow.md +32 -0
- package/src/core/tasks/bmad-review-edge-case-hunter/SKILL.md +6 -0
- package/src/core/tasks/bmad-review-edge-case-hunter/bmad-skill-manifest.yaml +1 -0
- package/src/core/tasks/bmad-review-edge-case-hunter/workflow.md +62 -0
- package/src/core/tasks/bmad-skill-manifest.yaml +19 -0
- package/src/core/workflows/advanced-elicitation/bmad-skill-manifest.yaml +3 -0
- package/src/core/workflows/advanced-elicitation/workflow.md +138 -0
- package/src/core/workflows/brainstorming/bmad-skill-manifest.yaml +3 -0
- package/src/core/workflows/brainstorming/steps/step-01-session-setup.md +31 -18
- package/src/core/workflows/brainstorming/steps/step-01b-continue.md +1 -1
- package/src/core/workflows/brainstorming/steps/step-03-technique-execution.md +3 -3
- package/src/core/workflows/brainstorming/steps/step-04-idea-organization.md +2 -2
- package/src/core/workflows/brainstorming/workflow.md +5 -3
- package/src/core/workflows/party-mode/bmad-skill-manifest.yaml +3 -0
- package/src/core/workflows/party-mode/workflow.md +1 -1
- package/src/utility/agent-components/activation-steps.txt +2 -2
- package/src/utility/agent-components/handler-multi.txt +1 -2
- package/test/adversarial-review-tests/README.md +3 -3
- package/test/adversarial-review-tests/test-cases.yaml +2 -2
- package/test/fixtures/agent-schema/valid/menu/multiple-menu-items.agent.yaml +1 -1
- package/test/fixtures/agent-schema/valid/menu-commands/all-command-types.agent.yaml +1 -1
- package/test/fixtures/agent-schema/valid/menu-commands/multiple-commands.agent.yaml +1 -2
- package/test/fixtures/file-refs-csv/valid/bmm-style.csv +1 -1
- package/test/test-file-refs-csv.js +1 -1
- package/test/test-install-to-bmad.js +154 -0
- package/test/test-installation-components.js +1586 -2
- package/test/test-workflow-path-regex.js +88 -0
- package/tools/cli/installers/install-messages.yaml +1 -1
- package/tools/cli/installers/lib/core/installer.js +34 -1
- package/tools/cli/installers/lib/core/manifest-generator.js +332 -41
- package/tools/cli/installers/lib/ide/_base-ide.js +24 -15
- package/tools/cli/installers/lib/ide/_config-driven.js +547 -53
- package/tools/cli/installers/lib/ide/manager.js +26 -62
- package/tools/cli/installers/lib/ide/platform-codes.yaml +116 -29
- package/tools/cli/installers/lib/ide/shared/agent-command-generator.js +1 -0
- package/tools/cli/installers/lib/ide/shared/bmad-artifacts.js +7 -0
- package/tools/cli/installers/lib/ide/shared/path-utils.js +68 -3
- package/tools/cli/installers/lib/ide/shared/skill-manifest.js +90 -0
- package/tools/cli/installers/lib/ide/shared/task-tool-command-generator.js +2 -0
- package/tools/cli/installers/lib/ide/shared/workflow-command-generator.js +6 -145
- package/tools/cli/installers/lib/ide/templates/agent-command-template.md +1 -1
- package/tools/cli/installers/lib/ide/templates/combined/default-workflow.md +1 -1
- package/tools/cli/installers/lib/ide/templates/combined/gemini-workflow-yaml.toml +1 -1
- package/tools/cli/installers/lib/ide/templates/combined/gemini-workflow.toml +1 -1
- package/tools/cli/installers/lib/ide/templates/combined/opencode-agent.md +1 -1
- package/tools/cli/installers/lib/ide/templates/combined/opencode-task.md +0 -1
- package/tools/cli/installers/lib/ide/templates/combined/opencode-tool.md +0 -1
- package/tools/cli/installers/lib/ide/templates/combined/opencode-workflow-yaml.md +0 -1
- package/tools/cli/installers/lib/ide/templates/combined/opencode-workflow.md +0 -1
- package/tools/cli/installers/lib/modules/manager.js +9 -132
- package/tools/cli/lib/agent/compiler.js +1 -10
- package/tools/cli/lib/agent-analyzer.js +2 -14
- package/tools/cli/lib/yaml-xml-builder.js +1 -18
- package/tools/docs/native-skills-migration-checklist.md +281 -0
- package/tools/platform-codes.yaml +1 -1
- package/tools/schema/agent.js +1 -3
- package/tools/validate-file-refs.js +2 -0
- package/website/astro.config.mjs +24 -3
- package/website/src/content/config.ts +2 -1
- package/website/src/content/i18n/zh-CN.json +28 -0
- package/src/bmm/workflows/4-implementation/code-review/instructions.xml +0 -227
- package/src/bmm/workflows/4-implementation/code-review/workflow.yaml +0 -43
- package/src/bmm/workflows/4-implementation/correct-course/workflow.yaml +0 -53
- package/src/bmm/workflows/4-implementation/create-story/instructions.xml +0 -346
- package/src/bmm/workflows/4-implementation/create-story/workflow.yaml +0 -52
- package/src/bmm/workflows/4-implementation/dev-story/workflow.yaml +0 -20
- package/src/bmm/workflows/4-implementation/retrospective/workflow.yaml +0 -52
- package/src/bmm/workflows/4-implementation/sprint-planning/workflow.yaml +0 -47
- package/src/bmm/workflows/4-implementation/sprint-status/workflow.yaml +0 -25
- package/src/bmm/workflows/document-project/workflow.yaml +0 -22
- package/src/bmm/workflows/document-project/workflows/deep-dive.yaml +0 -31
- package/src/bmm/workflows/document-project/workflows/full-scan.yaml +0 -31
- package/src/bmm/workflows/qa-generate-e2e-tests/workflow.yaml +0 -42
- package/src/core/tasks/review-adversarial-general.xml +0 -49
- package/src/core/tasks/workflow.xml +0 -235
- package/src/core/workflows/advanced-elicitation/workflow.xml +0 -118
- package/src/utility/agent-components/handler-validate-workflow.txt +0 -7
- package/src/utility/agent-components/handler-workflow.txt +0 -10
- package/tools/cli/installers/lib/ide/codex.js +0 -440
- package/tools/cli/installers/lib/ide/github-copilot.js +0 -699
- package/tools/cli/installers/lib/ide/kilo.js +0 -269
- package/tools/cli/installers/lib/ide/rovodev.js +0 -257
- package/tools/cli/installers/lib/ide/templates/combined/default-workflow-yaml.md +0 -14
- package/tools/cli/installers/lib/ide/templates/combined/kiro-workflow-yaml.md +0 -15
- package/tools/cli/installers/lib/ide/templates/workflow-command-template.md +0 -13
- package/tools/cli/installers/lib/ide/templates/workflow-commander.md +0 -5
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
const path = require('node:path');
|
|
2
|
-
const { BaseIdeSetup } = require('./_base-ide');
|
|
3
|
-
const yaml = require('yaml');
|
|
4
|
-
const prompts = require('../../../lib/prompts');
|
|
5
|
-
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
|
|
6
|
-
const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator');
|
|
7
|
-
const { TaskToolCommandGenerator } = require('./shared/task-tool-command-generator');
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* KiloCode IDE setup handler
|
|
11
|
-
* Creates custom modes in .kilocodemodes file (similar to Roo)
|
|
12
|
-
*/
|
|
13
|
-
class KiloSetup extends BaseIdeSetup {
|
|
14
|
-
constructor() {
|
|
15
|
-
super('kilo', 'Kilo Code');
|
|
16
|
-
this.configFile = '.kilocodemodes';
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Setup KiloCode IDE configuration
|
|
21
|
-
* @param {string} projectDir - Project directory
|
|
22
|
-
* @param {string} bmadDir - BMAD installation directory
|
|
23
|
-
* @param {Object} options - Setup options
|
|
24
|
-
*/
|
|
25
|
-
async setup(projectDir, bmadDir, options = {}) {
|
|
26
|
-
if (!options.silent) await prompts.log.info(`Setting up ${this.name}...`);
|
|
27
|
-
|
|
28
|
-
// Clean up any old BMAD installation first
|
|
29
|
-
await this.cleanup(projectDir, options);
|
|
30
|
-
|
|
31
|
-
// Load existing config (may contain non-BMAD modes and other settings)
|
|
32
|
-
const kiloModesPath = path.join(projectDir, this.configFile);
|
|
33
|
-
let config = {};
|
|
34
|
-
|
|
35
|
-
if (await this.pathExists(kiloModesPath)) {
|
|
36
|
-
const existingContent = await this.readFile(kiloModesPath);
|
|
37
|
-
try {
|
|
38
|
-
config = yaml.parse(existingContent) || {};
|
|
39
|
-
} catch {
|
|
40
|
-
// If parsing fails, start fresh but warn user
|
|
41
|
-
await prompts.log.warn('Warning: Could not parse existing .kilocodemodes, starting fresh');
|
|
42
|
-
config = {};
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// Ensure customModes array exists
|
|
47
|
-
if (!Array.isArray(config.customModes)) {
|
|
48
|
-
config.customModes = [];
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// Generate agent launchers
|
|
52
|
-
const agentGen = new AgentCommandGenerator(this.bmadFolderName);
|
|
53
|
-
const { artifacts: agentArtifacts } = await agentGen.collectAgentArtifacts(bmadDir, options.selectedModules || []);
|
|
54
|
-
|
|
55
|
-
// Create mode objects and add to config
|
|
56
|
-
let addedCount = 0;
|
|
57
|
-
|
|
58
|
-
for (const artifact of agentArtifacts) {
|
|
59
|
-
const modeObject = await this.createModeObject(artifact, projectDir);
|
|
60
|
-
config.customModes.push(modeObject);
|
|
61
|
-
addedCount++;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// Write .kilocodemodes file with proper YAML structure
|
|
65
|
-
const finalContent = yaml.stringify(config, { lineWidth: 0 });
|
|
66
|
-
await this.writeFile(kiloModesPath, finalContent);
|
|
67
|
-
|
|
68
|
-
// Generate workflow commands
|
|
69
|
-
const workflowGenerator = new WorkflowCommandGenerator(this.bmadFolderName);
|
|
70
|
-
const { artifacts: workflowArtifacts } = await workflowGenerator.collectWorkflowArtifacts(bmadDir);
|
|
71
|
-
|
|
72
|
-
// Write to .kilocode/workflows/ directory
|
|
73
|
-
const workflowsDir = path.join(projectDir, '.kilocode', 'workflows');
|
|
74
|
-
await this.ensureDir(workflowsDir);
|
|
75
|
-
|
|
76
|
-
// Clear old BMAD workflows before writing new ones
|
|
77
|
-
await this.clearBmadWorkflows(workflowsDir);
|
|
78
|
-
|
|
79
|
-
// Write workflow files
|
|
80
|
-
const workflowCount = await workflowGenerator.writeDashArtifacts(workflowsDir, workflowArtifacts);
|
|
81
|
-
|
|
82
|
-
// Generate task and tool commands
|
|
83
|
-
const taskToolGen = new TaskToolCommandGenerator(this.bmadFolderName);
|
|
84
|
-
const { artifacts: taskToolArtifacts, counts: taskToolCounts } = await taskToolGen.collectTaskToolArtifacts(bmadDir);
|
|
85
|
-
|
|
86
|
-
// Write task/tool files to workflows directory (same location as workflows)
|
|
87
|
-
await taskToolGen.writeDashArtifacts(workflowsDir, taskToolArtifacts);
|
|
88
|
-
const taskCount = taskToolCounts.tasks || 0;
|
|
89
|
-
const toolCount = taskToolCounts.tools || 0;
|
|
90
|
-
|
|
91
|
-
if (!options.silent) {
|
|
92
|
-
await prompts.log.success(
|
|
93
|
-
`${this.name} configured: ${addedCount} modes, ${workflowCount} workflows, ${taskCount} tasks, ${toolCount} tools → ${this.configFile}`,
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
return {
|
|
98
|
-
success: true,
|
|
99
|
-
modes: addedCount,
|
|
100
|
-
workflows: workflowCount,
|
|
101
|
-
tasks: taskCount,
|
|
102
|
-
tools: toolCount,
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Create a mode object for an agent
|
|
108
|
-
* @param {Object} artifact - Agent artifact
|
|
109
|
-
* @param {string} projectDir - Project directory
|
|
110
|
-
* @returns {Object} Mode object for YAML serialization
|
|
111
|
-
*/
|
|
112
|
-
async createModeObject(artifact, projectDir) {
|
|
113
|
-
// Extract metadata from launcher content
|
|
114
|
-
const titleMatch = artifact.content.match(/title="([^"]+)"/);
|
|
115
|
-
const title = titleMatch ? titleMatch[1] : this.formatTitle(artifact.name);
|
|
116
|
-
|
|
117
|
-
const iconMatch = artifact.content.match(/icon="([^"]+)"/);
|
|
118
|
-
const icon = iconMatch ? iconMatch[1] : '🤖';
|
|
119
|
-
|
|
120
|
-
const whenToUseMatch = artifact.content.match(/whenToUse="([^"]+)"/);
|
|
121
|
-
const whenToUse = whenToUseMatch ? whenToUseMatch[1] : `Use for ${title} tasks`;
|
|
122
|
-
|
|
123
|
-
// Get the activation header from central template (trim to avoid YAML formatting issues)
|
|
124
|
-
const activationHeader = (await this.getAgentCommandHeader()).trim();
|
|
125
|
-
|
|
126
|
-
const roleDefinitionMatch = artifact.content.match(/roleDefinition="([^"]+)"/);
|
|
127
|
-
const roleDefinition = roleDefinitionMatch
|
|
128
|
-
? roleDefinitionMatch[1]
|
|
129
|
-
: `You are a ${title} specializing in ${title.toLowerCase()} tasks.`;
|
|
130
|
-
|
|
131
|
-
// Get relative path
|
|
132
|
-
const relativePath = path.relative(projectDir, artifact.sourcePath).replaceAll('\\', '/');
|
|
133
|
-
|
|
134
|
-
// Build mode object (KiloCode uses same schema as Roo)
|
|
135
|
-
return {
|
|
136
|
-
slug: `bmad-${artifact.module}-${artifact.name}`,
|
|
137
|
-
name: `${icon} ${title}`,
|
|
138
|
-
roleDefinition: roleDefinition,
|
|
139
|
-
whenToUse: whenToUse,
|
|
140
|
-
customInstructions: `${activationHeader} Read the full YAML from ${relativePath} start activation to alter your state of being follow startup section instructions stay in this being until told to exit this mode\n`,
|
|
141
|
-
groups: ['read', 'edit', 'browser', 'command', 'mcp'],
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* Format name as title
|
|
147
|
-
*/
|
|
148
|
-
formatTitle(name) {
|
|
149
|
-
return name
|
|
150
|
-
.split('-')
|
|
151
|
-
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
|
|
152
|
-
.join(' ');
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* Clear old BMAD workflow files from workflows directory
|
|
157
|
-
* @param {string} workflowsDir - Workflows directory path
|
|
158
|
-
*/
|
|
159
|
-
async clearBmadWorkflows(workflowsDir) {
|
|
160
|
-
const fs = require('fs-extra');
|
|
161
|
-
if (!(await fs.pathExists(workflowsDir))) return;
|
|
162
|
-
|
|
163
|
-
const entries = await fs.readdir(workflowsDir);
|
|
164
|
-
for (const entry of entries) {
|
|
165
|
-
if (entry.startsWith('bmad-') && entry.endsWith('.md')) {
|
|
166
|
-
await fs.remove(path.join(workflowsDir, entry));
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* Cleanup KiloCode configuration
|
|
173
|
-
*/
|
|
174
|
-
async cleanup(projectDir, options = {}) {
|
|
175
|
-
const fs = require('fs-extra');
|
|
176
|
-
const kiloModesPath = path.join(projectDir, this.configFile);
|
|
177
|
-
|
|
178
|
-
if (await fs.pathExists(kiloModesPath)) {
|
|
179
|
-
const content = await fs.readFile(kiloModesPath, 'utf8');
|
|
180
|
-
|
|
181
|
-
try {
|
|
182
|
-
const config = yaml.parse(content) || {};
|
|
183
|
-
|
|
184
|
-
if (Array.isArray(config.customModes)) {
|
|
185
|
-
const originalCount = config.customModes.length;
|
|
186
|
-
// Remove BMAD modes only (keep non-BMAD modes)
|
|
187
|
-
config.customModes = config.customModes.filter((mode) => !mode.slug || !mode.slug.startsWith('bmad-'));
|
|
188
|
-
const removedCount = originalCount - config.customModes.length;
|
|
189
|
-
|
|
190
|
-
if (removedCount > 0) {
|
|
191
|
-
await fs.writeFile(kiloModesPath, yaml.stringify(config, { lineWidth: 0 }));
|
|
192
|
-
if (!options.silent) await prompts.log.message(`Removed ${removedCount} BMAD modes from .kilocodemodes`);
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
} catch {
|
|
196
|
-
// If parsing fails, leave file as-is
|
|
197
|
-
if (!options.silent) await prompts.log.warn('Warning: Could not parse .kilocodemodes for cleanup');
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
// Clean up workflow files
|
|
202
|
-
const workflowsDir = path.join(projectDir, '.kilocode', 'workflows');
|
|
203
|
-
await this.clearBmadWorkflows(workflowsDir);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* Install a custom agent launcher for Kilo
|
|
208
|
-
* @param {string} projectDir - Project directory
|
|
209
|
-
* @param {string} agentName - Agent name (e.g., "fred-commit-poet")
|
|
210
|
-
* @param {string} agentPath - Path to compiled agent (relative to project root)
|
|
211
|
-
* @param {Object} metadata - Agent metadata
|
|
212
|
-
* @returns {Object} Installation result
|
|
213
|
-
*/
|
|
214
|
-
async installCustomAgentLauncher(projectDir, agentName, agentPath, metadata) {
|
|
215
|
-
const kilocodemodesPath = path.join(projectDir, this.configFile);
|
|
216
|
-
let config = {};
|
|
217
|
-
|
|
218
|
-
// Read existing .kilocodemodes file
|
|
219
|
-
if (await this.pathExists(kilocodemodesPath)) {
|
|
220
|
-
const existingContent = await this.readFile(kilocodemodesPath);
|
|
221
|
-
try {
|
|
222
|
-
config = yaml.parse(existingContent) || {};
|
|
223
|
-
} catch {
|
|
224
|
-
config = {};
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
// Ensure customModes array exists
|
|
229
|
-
if (!Array.isArray(config.customModes)) {
|
|
230
|
-
config.customModes = [];
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
// Create custom agent mode object
|
|
234
|
-
const slug = `bmad-custom-${agentName.toLowerCase()}`;
|
|
235
|
-
|
|
236
|
-
// Check if mode already exists
|
|
237
|
-
if (config.customModes.some((mode) => mode.slug === slug)) {
|
|
238
|
-
return {
|
|
239
|
-
ide: 'kilo',
|
|
240
|
-
path: this.configFile,
|
|
241
|
-
command: agentName,
|
|
242
|
-
type: 'custom-agent-launcher',
|
|
243
|
-
alreadyExists: true,
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
// Add custom mode object
|
|
248
|
-
config.customModes.push({
|
|
249
|
-
slug: slug,
|
|
250
|
-
name: `BMAD Custom: ${agentName}`,
|
|
251
|
-
description: `Custom BMAD agent: ${agentName}\n\n**⚠️ IMPORTANT**: Run @${agentPath} first to load the complete agent!\n\nThis is a launcher for the custom BMAD agent "${agentName}". The agent will follow the persona and instructions from the main agent file.\n`,
|
|
252
|
-
prompt: `@${agentPath}\n`,
|
|
253
|
-
always: false,
|
|
254
|
-
permissions: 'all',
|
|
255
|
-
});
|
|
256
|
-
|
|
257
|
-
// Write .kilocodemodes file with proper YAML structure
|
|
258
|
-
await this.writeFile(kilocodemodesPath, yaml.stringify(config, { lineWidth: 0 }));
|
|
259
|
-
|
|
260
|
-
return {
|
|
261
|
-
ide: 'kilo',
|
|
262
|
-
path: this.configFile,
|
|
263
|
-
command: slug,
|
|
264
|
-
type: 'custom-agent-launcher',
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
module.exports = { KiloSetup };
|
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
const path = require('node:path');
|
|
2
|
-
const fs = require('fs-extra');
|
|
3
|
-
const yaml = require('yaml');
|
|
4
|
-
const { BaseIdeSetup } = require('./_base-ide');
|
|
5
|
-
const prompts = require('../../../lib/prompts');
|
|
6
|
-
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
|
|
7
|
-
const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator');
|
|
8
|
-
const { TaskToolCommandGenerator } = require('./shared/task-tool-command-generator');
|
|
9
|
-
const { toDashPath } = require('./shared/path-utils');
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Rovo Dev IDE setup handler
|
|
13
|
-
*
|
|
14
|
-
* Custom installer that writes .md workflow files to .rovodev/workflows/
|
|
15
|
-
* and generates .rovodev/prompts.yml to register them with Rovo Dev's /prompts feature.
|
|
16
|
-
*
|
|
17
|
-
* prompts.yml format (per Rovo Dev docs):
|
|
18
|
-
* prompts:
|
|
19
|
-
* - name: bmad-bmm-create-prd
|
|
20
|
-
* description: "PRD workflow..."
|
|
21
|
-
* content_file: workflows/bmad-bmm-create-prd.md
|
|
22
|
-
*/
|
|
23
|
-
class RovoDevSetup extends BaseIdeSetup {
|
|
24
|
-
constructor() {
|
|
25
|
-
super('rovo-dev', 'Rovo Dev', false);
|
|
26
|
-
this.rovoDir = '.rovodev';
|
|
27
|
-
this.workflowsDir = 'workflows';
|
|
28
|
-
this.promptsFile = 'prompts.yml';
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Setup Rovo Dev configuration
|
|
33
|
-
* @param {string} projectDir - Project directory
|
|
34
|
-
* @param {string} bmadDir - BMAD installation directory
|
|
35
|
-
* @param {Object} options - Setup options
|
|
36
|
-
* @returns {Promise<Object>} Setup result with { success, results: { agents, workflows, tasks, tools } }
|
|
37
|
-
*/
|
|
38
|
-
async setup(projectDir, bmadDir, options = {}) {
|
|
39
|
-
if (!options.silent) await prompts.log.info(`Setting up ${this.name}...`);
|
|
40
|
-
|
|
41
|
-
// Clean up any old BMAD installation first
|
|
42
|
-
await this.cleanup(projectDir, options);
|
|
43
|
-
|
|
44
|
-
const workflowsPath = path.join(projectDir, this.rovoDir, this.workflowsDir);
|
|
45
|
-
await this.ensureDir(workflowsPath);
|
|
46
|
-
|
|
47
|
-
const selectedModules = options.selectedModules || [];
|
|
48
|
-
const writtenFiles = [];
|
|
49
|
-
|
|
50
|
-
// Generate and write agent launchers
|
|
51
|
-
const agentGen = new AgentCommandGenerator(this.bmadFolderName);
|
|
52
|
-
const { artifacts: agentArtifacts } = await agentGen.collectAgentArtifacts(bmadDir, selectedModules);
|
|
53
|
-
const agentCount = await agentGen.writeDashArtifacts(workflowsPath, agentArtifacts);
|
|
54
|
-
this._collectPromptEntries(writtenFiles, agentArtifacts, ['agent-launcher'], 'agent');
|
|
55
|
-
|
|
56
|
-
// Generate and write workflow commands
|
|
57
|
-
const workflowGen = new WorkflowCommandGenerator(this.bmadFolderName);
|
|
58
|
-
const { artifacts: workflowArtifacts } = await workflowGen.collectWorkflowArtifacts(bmadDir);
|
|
59
|
-
const workflowCount = await workflowGen.writeDashArtifacts(workflowsPath, workflowArtifacts);
|
|
60
|
-
this._collectPromptEntries(writtenFiles, workflowArtifacts, ['workflow-command'], 'workflow');
|
|
61
|
-
|
|
62
|
-
// Generate and write task/tool commands
|
|
63
|
-
const taskToolGen = new TaskToolCommandGenerator(this.bmadFolderName);
|
|
64
|
-
const { artifacts: taskToolArtifacts, counts: taskToolCounts } = await taskToolGen.collectTaskToolArtifacts(bmadDir);
|
|
65
|
-
await taskToolGen.writeDashArtifacts(workflowsPath, taskToolArtifacts);
|
|
66
|
-
const taskCount = taskToolCounts.tasks || 0;
|
|
67
|
-
const toolCount = taskToolCounts.tools || 0;
|
|
68
|
-
this._collectPromptEntries(writtenFiles, taskToolArtifacts, ['task', 'tool']);
|
|
69
|
-
|
|
70
|
-
// Generate prompts.yml manifest (only if we have entries to write)
|
|
71
|
-
if (writtenFiles.length > 0) {
|
|
72
|
-
await this.generatePromptsYml(projectDir, writtenFiles);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
if (!options.silent) {
|
|
76
|
-
await prompts.log.success(
|
|
77
|
-
`${this.name} configured: ${agentCount} agents, ${workflowCount} workflows, ${taskCount} tasks, ${toolCount} tools`,
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
return {
|
|
82
|
-
success: true,
|
|
83
|
-
results: {
|
|
84
|
-
agents: agentCount,
|
|
85
|
-
workflows: workflowCount,
|
|
86
|
-
tasks: taskCount,
|
|
87
|
-
tools: toolCount,
|
|
88
|
-
},
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Collect prompt entries from artifacts into writtenFiles array
|
|
94
|
-
* @param {Array} writtenFiles - Target array to push entries into
|
|
95
|
-
* @param {Array} artifacts - Artifacts from a generator's collect method
|
|
96
|
-
* @param {string[]} acceptedTypes - Artifact types to include (e.g., ['agent-launcher'])
|
|
97
|
-
* @param {string} [fallbackSuffix] - Suffix for fallback description; defaults to artifact.type
|
|
98
|
-
*/
|
|
99
|
-
_collectPromptEntries(writtenFiles, artifacts, acceptedTypes, fallbackSuffix) {
|
|
100
|
-
for (const artifact of artifacts) {
|
|
101
|
-
if (!acceptedTypes.includes(artifact.type)) continue;
|
|
102
|
-
const flatName = toDashPath(artifact.relativePath);
|
|
103
|
-
writtenFiles.push({
|
|
104
|
-
name: path.basename(flatName, '.md'),
|
|
105
|
-
description: artifact.description || `${artifact.name} ${fallbackSuffix || artifact.type}`,
|
|
106
|
-
contentFile: `${this.workflowsDir}/${flatName}`,
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Generate .rovodev/prompts.yml manifest
|
|
113
|
-
* Merges with existing user entries -- strips entries with names starting 'bmad-',
|
|
114
|
-
* appends new BMAD entries, and writes back.
|
|
115
|
-
*
|
|
116
|
-
* @param {string} projectDir - Project directory
|
|
117
|
-
* @param {Array<Object>} writtenFiles - Array of { name, description, contentFile }
|
|
118
|
-
*/
|
|
119
|
-
async generatePromptsYml(projectDir, writtenFiles) {
|
|
120
|
-
const promptsPath = path.join(projectDir, this.rovoDir, this.promptsFile);
|
|
121
|
-
let existingPrompts = [];
|
|
122
|
-
|
|
123
|
-
// Read existing prompts.yml and preserve non-BMAD entries
|
|
124
|
-
if (await this.pathExists(promptsPath)) {
|
|
125
|
-
try {
|
|
126
|
-
const content = await this.readFile(promptsPath);
|
|
127
|
-
const parsed = yaml.parse(content);
|
|
128
|
-
if (parsed && Array.isArray(parsed.prompts)) {
|
|
129
|
-
// Keep only non-BMAD entries (entries whose name does NOT start with bmad-)
|
|
130
|
-
existingPrompts = parsed.prompts.filter((entry) => !entry.name || !entry.name.startsWith('bmad-'));
|
|
131
|
-
}
|
|
132
|
-
} catch {
|
|
133
|
-
// If parsing fails, start fresh but preserve file safety
|
|
134
|
-
existingPrompts = [];
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// Build new BMAD entries (prefix description with name so /prompts list is scannable)
|
|
139
|
-
const bmadEntries = writtenFiles.map((file) => ({
|
|
140
|
-
name: file.name,
|
|
141
|
-
description: `${file.name} - ${file.description}`,
|
|
142
|
-
content_file: file.contentFile,
|
|
143
|
-
}));
|
|
144
|
-
|
|
145
|
-
// Merge: user entries first, then BMAD entries
|
|
146
|
-
const allPrompts = [...existingPrompts, ...bmadEntries];
|
|
147
|
-
|
|
148
|
-
const config = { prompts: allPrompts };
|
|
149
|
-
const yamlContent = yaml.stringify(config, { lineWidth: 0 });
|
|
150
|
-
await this.writeFile(promptsPath, yamlContent);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Cleanup Rovo Dev configuration
|
|
155
|
-
* Removes bmad-* files from .rovodev/workflows/ and strips BMAD entries from prompts.yml
|
|
156
|
-
* @param {string} projectDir - Project directory
|
|
157
|
-
* @param {Object} options - Cleanup options
|
|
158
|
-
*/
|
|
159
|
-
async cleanup(projectDir, options = {}) {
|
|
160
|
-
const workflowsPath = path.join(projectDir, this.rovoDir, this.workflowsDir);
|
|
161
|
-
|
|
162
|
-
// Remove all bmad-* entries from workflows dir (aligned with detect() predicate)
|
|
163
|
-
if (await this.pathExists(workflowsPath)) {
|
|
164
|
-
const entries = await fs.readdir(workflowsPath);
|
|
165
|
-
for (const entry of entries) {
|
|
166
|
-
if (entry.startsWith('bmad-')) {
|
|
167
|
-
await fs.remove(path.join(workflowsPath, entry));
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
// Clean BMAD entries from prompts.yml (preserve user entries)
|
|
173
|
-
const promptsPath = path.join(projectDir, this.rovoDir, this.promptsFile);
|
|
174
|
-
if (await this.pathExists(promptsPath)) {
|
|
175
|
-
try {
|
|
176
|
-
const content = await this.readFile(promptsPath);
|
|
177
|
-
const parsed = yaml.parse(content) || {};
|
|
178
|
-
|
|
179
|
-
if (Array.isArray(parsed.prompts)) {
|
|
180
|
-
const originalCount = parsed.prompts.length;
|
|
181
|
-
parsed.prompts = parsed.prompts.filter((entry) => !entry.name || !entry.name.startsWith('bmad-'));
|
|
182
|
-
const removedCount = originalCount - parsed.prompts.length;
|
|
183
|
-
|
|
184
|
-
if (removedCount > 0) {
|
|
185
|
-
if (parsed.prompts.length === 0) {
|
|
186
|
-
// If no entries remain, remove the file entirely
|
|
187
|
-
await fs.remove(promptsPath);
|
|
188
|
-
} else {
|
|
189
|
-
await this.writeFile(promptsPath, yaml.stringify(parsed, { lineWidth: 0 }));
|
|
190
|
-
}
|
|
191
|
-
if (!options.silent) {
|
|
192
|
-
await prompts.log.message(`Removed ${removedCount} BMAD entries from ${this.promptsFile}`);
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
} catch {
|
|
197
|
-
// If parsing fails, leave file as-is
|
|
198
|
-
if (!options.silent) {
|
|
199
|
-
await prompts.log.warn(`Warning: Could not parse ${this.promptsFile} for cleanup`);
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
// Remove empty .rovodev directories
|
|
205
|
-
if (await this.pathExists(workflowsPath)) {
|
|
206
|
-
const remaining = await fs.readdir(workflowsPath);
|
|
207
|
-
if (remaining.length === 0) {
|
|
208
|
-
await fs.remove(workflowsPath);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
const rovoDirPath = path.join(projectDir, this.rovoDir);
|
|
213
|
-
if (await this.pathExists(rovoDirPath)) {
|
|
214
|
-
const remaining = await fs.readdir(rovoDirPath);
|
|
215
|
-
if (remaining.length === 0) {
|
|
216
|
-
await fs.remove(rovoDirPath);
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* Detect whether Rovo Dev configuration exists in the project
|
|
223
|
-
* Checks for .rovodev/ dir with bmad files or bmad entries in prompts.yml
|
|
224
|
-
* @param {string} projectDir - Project directory
|
|
225
|
-
* @returns {boolean}
|
|
226
|
-
*/
|
|
227
|
-
async detect(projectDir) {
|
|
228
|
-
const workflowsPath = path.join(projectDir, this.rovoDir, this.workflowsDir);
|
|
229
|
-
|
|
230
|
-
// Check for bmad files in workflows dir
|
|
231
|
-
if (await fs.pathExists(workflowsPath)) {
|
|
232
|
-
const entries = await fs.readdir(workflowsPath);
|
|
233
|
-
if (entries.some((entry) => entry.startsWith('bmad-'))) {
|
|
234
|
-
return true;
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
// Check for bmad entries in prompts.yml
|
|
239
|
-
const promptsPath = path.join(projectDir, this.rovoDir, this.promptsFile);
|
|
240
|
-
if (await fs.pathExists(promptsPath)) {
|
|
241
|
-
try {
|
|
242
|
-
const content = await fs.readFile(promptsPath, 'utf8');
|
|
243
|
-
const parsed = yaml.parse(content);
|
|
244
|
-
if (parsed && Array.isArray(parsed.prompts)) {
|
|
245
|
-
return parsed.prompts.some((entry) => entry.name && entry.name.startsWith('bmad-'));
|
|
246
|
-
}
|
|
247
|
-
} catch {
|
|
248
|
-
// If parsing fails, check raw content
|
|
249
|
-
return false;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
return false;
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
module.exports = { RovoDevSetup };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: '{{name}}'
|
|
3
|
-
description: '{{description}}'
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded:
|
|
7
|
-
|
|
8
|
-
<steps CRITICAL="TRUE">
|
|
9
|
-
1. Always LOAD the FULL @{project-root}/{{bmadFolderName}}/core/tasks/workflow.xml
|
|
10
|
-
2. READ its entire contents - this is the CORE OS for EXECUTING the specific workflow-config @{project-root}/{{bmadFolderName}}/{{path}}
|
|
11
|
-
3. Pass the yaml path @{project-root}/{{bmadFolderName}}/{{path}} as 'workflow-config' parameter to the workflow.xml instructions
|
|
12
|
-
4. Follow workflow.xml instructions EXACTLY as written to process and follow the specific workflow config and its instructions
|
|
13
|
-
5. Save outputs after EACH section when generating any documents from templates
|
|
14
|
-
</steps>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
inclusion: manual
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# {{name}}
|
|
6
|
-
|
|
7
|
-
IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded:
|
|
8
|
-
|
|
9
|
-
<steps CRITICAL="TRUE">
|
|
10
|
-
1. Always LOAD the FULL #[[file:{{bmadFolderName}}/core/tasks/workflow.xml]]
|
|
11
|
-
2. READ its entire contents - this is the CORE OS for EXECUTING the specific workflow-config #[[file:{{bmadFolderName}}/{{path}}]]
|
|
12
|
-
3. Pass the yaml path {{bmadFolderName}}/{{path}} as 'workflow-config' parameter to the workflow.xml instructions
|
|
13
|
-
4. Follow workflow.xml instructions EXACTLY as written to process and follow the specific workflow config and its instructions
|
|
14
|
-
5. Save outputs after EACH section when generating any documents from templates
|
|
15
|
-
</steps>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: '{{description}}'
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded:
|
|
6
|
-
|
|
7
|
-
<steps CRITICAL="TRUE">
|
|
8
|
-
1. Always LOAD the FULL @_bmad/core/tasks/workflow.xml
|
|
9
|
-
2. READ its entire contents - this is the CORE OS for EXECUTING the specific workflow-config @{{workflow_path}}
|
|
10
|
-
3. Pass the yaml path {{workflow_path}} as 'workflow-config' parameter to the workflow.xml instructions
|
|
11
|
-
4. Follow workflow.xml instructions EXACTLY as written to process and follow the specific workflow config and its instructions
|
|
12
|
-
5. Save outputs after EACH section when generating any documents from templates
|
|
13
|
-
</steps>
|