From d662aee4b2f7859e3a0237f65bd8accc6e9ed0d5 Mon Sep 17 00:00:00 2001 From: Sjoerd Bozon Date: Sun, 28 Dec 2025 23:33:34 +0100 Subject: [PATCH 1/7] feat: add VS Code workflow prompt recommendations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add chat.promptFilesRecommendations support for GitHub Copilot to show workflow shortcuts as new chat starters. - Add workflow-prompts-config.js with all BMM, BMGD, and core prompts - Add workflow-prompt-generator.js to create .github/prompts/*.prompt.md - Update github-copilot.js to generate prompts and configure VS Code - Add phase-based prompt toggling to implementation-readiness workflow - Add phase-based prompt toggling to sprint-planning workflow When implementation-readiness passes or sprint-planning completes, the workflows update VS Code settings to prioritize the 'keep going' cycle (create-story → dev-story → code-review) over setup phase prompts. --- .../steps/step-06-final-assessment.md | 23 +++ .../sprint-planning/instructions.md | 34 ++++ .../cli/installers/lib/ide/github-copilot.js | 50 ++++- .../ide/shared/workflow-prompt-generator.js | 61 ++++++ .../lib/ide/shared/workflow-prompts-config.js | 192 ++++++++++++++++++ 5 files changed, 354 insertions(+), 6 deletions(-) create mode 100644 tools/cli/installers/lib/ide/shared/workflow-prompt-generator.js create mode 100644 tools/cli/installers/lib/ide/shared/workflow-prompts-config.js diff --git a/src/modules/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-06-final-assessment.md b/src/modules/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-06-final-assessment.md index 204e6aeb..18ed6ffa 100644 --- a/src/modules/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-06-final-assessment.md +++ b/src/modules/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-06-final-assessment.md @@ -114,6 +114,29 @@ The assessment found [number] issues requiring attention. Review the detailed re The implementation readiness workflow is now complete. The report contains all findings and recommendations for the user to consider. +### 6. Update IDE Prompt Recommendations + +If the readiness status is **READY**, update `.vscode/settings.json` to prioritize the implementation cycle prompts: + +**Set these prompts to `true` (implementation cycle - "keep going" loop):** +- `bmd-create-story` +- `bmd-dev-story` +- `bmd-code-review` +- `bmd-retrospective` +- `bmd-correct-course` + +**Set these prompts to `false` (setup phase - already completed):** +- `bmd-workflow-init` +- `bmd-brainstorm` +- `bmd-prd` +- `bmd-ux-design` +- `bmd-create-architecture` +- `bmd-epics-stories` +- `bmd-implementation-readiness` +- `bmd-sprint-planning` + +Update the `chat.promptFilesRecommendations` object in `.vscode/settings.json` with these values. + --- ## 🚨 SYSTEM SUCCESS/FAILURE METRICS diff --git a/src/modules/bmm/workflows/4-implementation/sprint-planning/instructions.md b/src/modules/bmm/workflows/4-implementation/sprint-planning/instructions.md index c4f4bd42..d957212d 100644 --- a/src/modules/bmm/workflows/4-implementation/sprint-planning/instructions.md +++ b/src/modules/bmm/workflows/4-implementation/sprint-planning/instructions.md @@ -179,6 +179,40 @@ development_status: + +Update `.vscode/settings.json` to prioritize the implementation cycle prompts. + +**Set these prompts to `true` (implementation cycle - "keep going" loop):** +- `bmd-create-story` +- `bmd-dev-story` +- `bmd-code-review` +- `bmd-retrospective` +- `bmd-correct-course` + +**Set these prompts to `false` (setup phase - already completed):** +- `bmd-workflow-init` +- `bmd-brainstorm` +- `bmd-prd` +- `bmd-ux-design` +- `bmd-create-architecture` +- `bmd-epics-stories` +- `bmd-implementation-readiness` +- `bmd-sprint-planning` + +Update the `chat.promptFilesRecommendations` object in `.vscode/settings.json` with these values. + +Inform {user_name}: + +**IDE Updated for Implementation Phase** + +The "keep going" cycle prompts are now prioritized in VS Code: +- **New chat → @bmd-custom-bmm-sm → *create-story** (prepare a story) +- **New chat → @bmd-custom-bmm-dev → *dev-story** (implement it) +- **Same chat → *code-review** (review the code) +- **Repeat!** + + + ## Additional Documentation diff --git a/tools/cli/installers/lib/ide/github-copilot.js b/tools/cli/installers/lib/ide/github-copilot.js index 36d3eecb..3621f5ce 100644 --- a/tools/cli/installers/lib/ide/github-copilot.js +++ b/tools/cli/installers/lib/ide/github-copilot.js @@ -3,6 +3,7 @@ const { BaseIdeSetup } = require('./_base-ide'); const chalk = require('chalk'); const inquirer = require('inquirer').default || require('inquirer'); const { AgentCommandGenerator } = require('./shared/agent-command-generator'); +const { WorkflowPromptGenerator } = require('./shared/workflow-prompt-generator'); /** * GitHub Copilot setup handler @@ -13,6 +14,7 @@ class GitHubCopilotSetup extends BaseIdeSetup { super('github-copilot', 'GitHub Copilot', true); // preferred IDE this.configDir = '.github'; this.agentsDir = 'agents'; + this.promptsDir = 'prompts'; this.vscodeDir = '.vscode'; } @@ -94,14 +96,12 @@ class GitHubCopilotSetup extends BaseIdeSetup { async setup(projectDir, bmadDir, options = {}) { console.log(chalk.cyan(`Setting up ${this.name}...`)); - // Configure VS Code settings using pre-collected config if available - const config = options.preCollectedConfig || {}; - await this.configureVsCodeSettings(projectDir, { ...options, ...config }); - // Create .github/agents directory const githubDir = path.join(projectDir, this.configDir); const agentsDir = path.join(githubDir, this.agentsDir); + const promptsDir = path.join(githubDir, this.promptsDir); await this.ensureDir(agentsDir); + await this.ensureDir(promptsDir); // Clean up any existing BMAD files before reinstalling await this.cleanup(projectDir); @@ -117,22 +117,37 @@ class GitHubCopilotSetup extends BaseIdeSetup { const agentContent = await this.createAgentContent({ module: artifact.module, name: artifact.name }, content); // Use bmd- prefix: bmd-custom-{module}-{name}.agent.md - const targetPath = path.join(agentsDir, `bmd-custom-${artifact.module}-${artifact.name}.agent.md`); + const agentFileName = `bmd-custom-${artifact.module}-${artifact.name}`; + const targetPath = path.join(agentsDir, `${agentFileName}.agent.md`); await this.writeFile(targetPath, agentContent); agentCount++; - console.log(chalk.green(` ✓ Created agent: bmd-custom-${artifact.module}-${artifact.name}`)); + console.log(chalk.green(` ✓ Created agent: ${agentFileName}`)); } + // Generate workflow prompts from config (shared logic) + // Each prompt includes nextSteps guidance for the agent to suggest next workflows + const promptGen = new WorkflowPromptGenerator(); + const promptRecommendations = await promptGen.generatePromptFiles(promptsDir, options.selectedModules || []); + const promptCount = Object.keys(promptRecommendations).length; + + // Configure VS Code settings using pre-collected config if available + const config = options.preCollectedConfig || {}; + await this.configureVsCodeSettings(projectDir, { ...options, ...config, promptRecommendations }); + console.log(chalk.green(`✓ ${this.name} configured:`)); console.log(chalk.dim(` - ${agentCount} agents created`)); + console.log(chalk.dim(` - ${promptCount} workflow prompts configured`)); console.log(chalk.dim(` - Agents directory: ${path.relative(projectDir, agentsDir)}`)); + console.log(chalk.dim(` - Prompts directory: ${path.relative(projectDir, promptsDir)}`)); console.log(chalk.dim(` - VS Code settings configured`)); console.log(chalk.dim('\n Agents available in VS Code Chat view')); + console.log(chalk.dim(' Workflow prompts show as new chat starters')); return { success: true, agents: agentCount, + prompts: promptCount, settings: true, }; } @@ -199,6 +214,11 @@ class GitHubCopilotSetup extends BaseIdeSetup { }; } + // Add prompt file recommendations for new chat starters + if (options.promptRecommendations && Object.keys(options.promptRecommendations).length > 0) { + bmadSettings['chat.promptFilesRecommendations'] = options.promptRecommendations; + } + // Merge settings (existing take precedence) const mergedSettings = { ...bmadSettings, ...existingSettings }; @@ -307,6 +327,24 @@ ${cleanContent} console.log(chalk.dim(` Cleaned up ${removed} existing BMAD agents`)); } } + + // Clean up prompts directory + const promptsDir = path.join(projectDir, this.configDir, this.promptsDir); + if (await fs.pathExists(promptsDir)) { + const files = await fs.readdir(promptsDir); + let removed = 0; + + for (const file of files) { + if (file.startsWith('bmd-') && file.endsWith('.prompt.md')) { + await fs.remove(path.join(promptsDir, file)); + removed++; + } + } + + if (removed > 0) { + console.log(chalk.dim(` Cleaned up ${removed} existing BMAD prompt files`)); + } + } } /** diff --git a/tools/cli/installers/lib/ide/shared/workflow-prompt-generator.js b/tools/cli/installers/lib/ide/shared/workflow-prompt-generator.js new file mode 100644 index 00000000..cbc6f320 --- /dev/null +++ b/tools/cli/installers/lib/ide/shared/workflow-prompt-generator.js @@ -0,0 +1,61 @@ +const path = require('node:path'); +const fs = require('fs-extra'); +const { workflowPromptsConfig } = require('./workflow-prompts-config'); + +/** + * Generate workflow prompt recommendations for IDE new chat starters + * Uses static configuration from workflow-prompts-config.js which mirrors + * the workflows documented in quick-start.md + * + * The implementation-readiness and sprint-planning workflows update + * VS Code settings to toggle which prompts are shown based on project phase. + */ +class WorkflowPromptGenerator { + /** + * Get workflow prompts for selected modules + * @param {Array} selectedModules - Modules to include (e.g., ['bmm', 'bmgd']) + * @returns {Array} Array of workflow prompt configurations + */ + getWorkflowPrompts(selectedModules = []) { + const allPrompts = []; + + // Always include core prompts + if (workflowPromptsConfig.core) { + allPrompts.push(...workflowPromptsConfig.core); + } + + // Add prompts for each selected module + for (const moduleName of selectedModules) { + if (workflowPromptsConfig[moduleName]) { + allPrompts.push(...workflowPromptsConfig[moduleName]); + } + } + + return allPrompts; + } + + /** + * Generate prompt files for an IDE + * @param {string} promptsDir - Directory to write prompt files + * @param {Array} selectedModules - Modules to include + * @returns {Object} Map of prompt names to true for VS Code settings + */ + async generatePromptFiles(promptsDir, selectedModules = []) { + const prompts = this.getWorkflowPrompts(selectedModules); + const recommendations = {}; + + for (const prompt of prompts) { + const promptContent = ['---', `agent: ${prompt.agent}`, `description: "${prompt.description}"`, '---', '', prompt.prompt, ''].join( + '\n', + ); + + const promptFilePath = path.join(promptsDir, `bmd-${prompt.name}.prompt.md`); + await fs.writeFile(promptFilePath, promptContent); + recommendations[`bmd-${prompt.name}`] = true; + } + + return recommendations; + } +} + +module.exports = { WorkflowPromptGenerator }; diff --git a/tools/cli/installers/lib/ide/shared/workflow-prompts-config.js b/tools/cli/installers/lib/ide/shared/workflow-prompts-config.js new file mode 100644 index 00000000..0822b3f5 --- /dev/null +++ b/tools/cli/installers/lib/ide/shared/workflow-prompts-config.js @@ -0,0 +1,192 @@ +/** + * Workflow prompt configuration for IDE new chat starters + * + * This configuration defines the workflow prompts that appear as suggestions + * when starting a new chat in VS Code (via chat.promptFilesRecommendations). + * + * The implementation-readiness and sprint-planning workflows update the + * VS Code settings to toggle which prompts are shown based on project phase. + * + * Reference: docs/modules/bmm-bmad-method/quick-start.md + */ + +const workflowPromptsConfig = { + // BMad Method Module (bmm) - Standard development workflow + bmm: [ + // ═══════════════════════════════════════════════════════════════════════ + // Phase 1 - Analysis (Optional) + // ═══════════════════════════════════════════════════════════════════════ + { + name: 'workflow-init', + agent: 'bmd-custom-bmm-analyst', + shortcut: 'WI', + description: '[WI] Initialize workflow and choose planning track', + prompt: '*workflow-init', + }, + { + name: 'brainstorm', + agent: 'bmd-custom-bmm-analyst', + shortcut: 'BP', + description: '[BP] Brainstorm project ideas and concepts', + prompt: '*brainstorm-project', + }, + { + name: 'workflow-status', + agent: 'bmd-custom-bmm-pm', + shortcut: 'WS', + description: '[WS] Check current workflow status and next steps', + prompt: '*workflow-status', + }, + + // ═══════════════════════════════════════════════════════════════════════ + // Phase 2 - Planning (Required) + // ═══════════════════════════════════════════════════════════════════════ + { + name: 'prd', + agent: 'bmd-custom-bmm-pm', + shortcut: 'PR', + description: '[PR] Create Product Requirements Document (PRD)', + prompt: '*prd', + }, + { + name: 'ux-design', + agent: 'bmd-custom-bmm-ux-designer', + shortcut: 'UD', + description: '[UD] Create UX Design specification', + prompt: '*ux-design', + }, + + // ═══════════════════════════════════════════════════════════════════════ + // Phase 3 - Solutioning + // ═══════════════════════════════════════════════════════════════════════ + { + name: 'create-architecture', + agent: 'bmd-custom-bmm-architect', + shortcut: 'CA', + description: '[CA] Create system architecture document', + prompt: '*create-architecture', + }, + { + name: 'epics-stories', + agent: 'bmd-custom-bmm-pm', + shortcut: 'ES', + description: '[ES] Create Epics and User Stories from PRD', + prompt: '*epics-stories', + }, + { + name: 'implementation-readiness', + agent: 'bmd-custom-bmm-architect', + shortcut: 'IR', + description: '[IR] Check implementation readiness across all docs', + prompt: '*implementation-readiness', + }, + { + name: 'sprint-planning', + agent: 'bmd-custom-bmm-sm', + shortcut: 'SP', + description: '[SP] Initialize sprint planning from epics', + prompt: '*sprint-planning', + }, + + // ═══════════════════════════════════════════════════════════════════════ + // Phase 4 - Implementation: The "Keep Going" Cycle + // New chat → SM → create-story → New chat → DEV → dev-story → code-review + // ═══════════════════════════════════════════════════════════════════════ + { + name: 'create-story', + agent: 'bmd-custom-bmm-sm', + shortcut: 'CS', + description: '[CS] Create developer-ready story from epic', + prompt: '*create-story', + }, + { + name: 'dev-story', + agent: 'bmd-custom-bmm-dev', + shortcut: 'DS', + description: '[DS] Implement the current story', + prompt: '*dev-story', + }, + { + name: 'code-review', + agent: 'bmd-custom-bmm-dev', + shortcut: 'CR', + description: '[CR] Perform code review on implementation', + prompt: '*code-review', + }, + { + name: 'retrospective', + agent: 'bmd-custom-bmm-sm', + shortcut: 'ER', + description: '[ER] Run epic retrospective after completion', + prompt: '*epic-retrospective', + }, + { + name: 'correct-course', + agent: 'bmd-custom-bmm-sm', + shortcut: 'CC', + description: '[CC] Course correction when things go off track', + prompt: '*correct-course', + }, + ], + + // BMad Game Development Module (bmgd) + bmgd: [ + // Implementation cycle + { + name: 'game-implement', + agent: 'bmd-custom-bmgd-game-dev', + shortcut: 'GI', + description: '[GI] Implement game feature', + prompt: '*game-implement', + }, + { + name: 'game-qa', + agent: 'bmd-custom-bmgd-game-qa', + shortcut: 'GQ', + description: '[GQ] Test and QA game feature', + prompt: '*game-qa', + }, + // Planning & Design + { + name: 'game-design', + agent: 'bmd-custom-bmgd-game-designer', + shortcut: 'GD', + description: '[GD] Design game mechanics and systems', + prompt: '*game-design', + }, + { + name: 'game-architecture', + agent: 'bmd-custom-bmgd-game-architect', + shortcut: 'GA', + description: '[GA] Create game technical architecture', + prompt: '*game-architecture', + }, + { + name: 'game-sprint', + agent: 'bmd-custom-bmgd-game-scrum-master', + shortcut: 'GS', + description: '[GS] Plan game development sprint', + prompt: '*game-sprint', + }, + ], + + // Core agents (always available) + core: [ + { + name: 'list-tasks', + agent: 'bmd-custom-core-bmad-master', + shortcut: 'LT', + description: '[LT] List available tasks', + prompt: '*list-tasks', + }, + { + name: 'list-workflows', + agent: 'bmd-custom-core-bmad-master', + shortcut: 'LW', + description: '[LW] List available workflows', + prompt: '*list-workflows', + }, + ], +}; + +module.exports = { workflowPromptsConfig }; From 9317ef5a62195b4a821c7c5837d219d7fc491b62 Mon Sep 17 00:00:00 2001 From: Sjoerd Bozon Date: Mon, 29 Dec 2025 00:16:38 +0100 Subject: [PATCH 2/7] fix: address Copilot review feedback on PR #1205 - Move step 6 before WORKFLOW COMPLETE marker (fixes workflow structure) - Change PRD shortcut from PR to PD (avoids conflict with parallel-research) - Clarify instructions for reading/updating VS Code settings - Update phase 4 comment to match actual handoff flow --- .../steps/step-06-final-assessment.md | 16 ++++++++-------- .../sprint-planning/instructions.md | 12 +++++------- .../lib/ide/shared/workflow-prompts-config.js | 6 +++--- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/src/modules/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-06-final-assessment.md b/src/modules/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-06-final-assessment.md index 18ed6ffa..037134a5 100644 --- a/src/modules/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-06-final-assessment.md +++ b/src/modules/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-06-final-assessment.md @@ -110,22 +110,20 @@ Report generated: {outputFile} The assessment found [number] issues requiring attention. Review the detailed report for specific findings and recommendations." -## WORKFLOW COMPLETE - -The implementation readiness workflow is now complete. The report contains all findings and recommendations for the user to consider. - ### 6. Update IDE Prompt Recommendations -If the readiness status is **READY**, update `.vscode/settings.json` to prioritize the implementation cycle prompts: +If the readiness status is **READY**, update `.vscode/settings.json` to prioritize the implementation cycle prompts. -**Set these prompts to `true` (implementation cycle - "keep going" loop):** +Read the existing `chat.promptFilesRecommendations` object and modify these keys: + +**Set to `true` (implementation cycle - "keep going" loop):** - `bmd-create-story` - `bmd-dev-story` - `bmd-code-review` - `bmd-retrospective` - `bmd-correct-course` -**Set these prompts to `false` (setup phase - already completed):** +**Set to `false` (setup phase - already completed):** - `bmd-workflow-init` - `bmd-brainstorm` - `bmd-prd` @@ -135,7 +133,9 @@ If the readiness status is **READY**, update `.vscode/settings.json` to prioriti - `bmd-implementation-readiness` - `bmd-sprint-planning` -Update the `chat.promptFilesRecommendations` object in `.vscode/settings.json` with these values. +## WORKFLOW COMPLETE + +The implementation readiness workflow is now complete. The report contains all findings and recommendations for the user to consider. --- diff --git a/src/modules/bmm/workflows/4-implementation/sprint-planning/instructions.md b/src/modules/bmm/workflows/4-implementation/sprint-planning/instructions.md index d957212d..88addaab 100644 --- a/src/modules/bmm/workflows/4-implementation/sprint-planning/instructions.md +++ b/src/modules/bmm/workflows/4-implementation/sprint-planning/instructions.md @@ -180,16 +180,16 @@ development_status: -Update `.vscode/settings.json` to prioritize the implementation cycle prompts. +Read the existing `.vscode/settings.json` and update the `chat.promptFilesRecommendations` object. -**Set these prompts to `true` (implementation cycle - "keep going" loop):** +**Set to `true` (implementation cycle - "keep going" loop):** - `bmd-create-story` - `bmd-dev-story` - `bmd-code-review` - `bmd-retrospective` - `bmd-correct-course` -**Set these prompts to `false` (setup phase - already completed):** +**Set to `false` (setup phase - already completed):** - `bmd-workflow-init` - `bmd-brainstorm` - `bmd-prd` @@ -199,15 +199,13 @@ development_status: - `bmd-implementation-readiness` - `bmd-sprint-planning` -Update the `chat.promptFilesRecommendations` object in `.vscode/settings.json` with these values. - Inform {user_name}: **IDE Updated for Implementation Phase** The "keep going" cycle prompts are now prioritized in VS Code: -- **New chat → @bmd-custom-bmm-sm → *create-story** (prepare a story) -- **New chat → @bmd-custom-bmm-dev → *dev-story** (implement it) +- **@bmd-custom-bmm-sm → *create-story** (prepare a story) +- **@bmd-custom-bmm-dev → *dev-story** (implement it) - **Same chat → *code-review** (review the code) - **Repeat!** diff --git a/tools/cli/installers/lib/ide/shared/workflow-prompts-config.js b/tools/cli/installers/lib/ide/shared/workflow-prompts-config.js index 0822b3f5..f3a3e632 100644 --- a/tools/cli/installers/lib/ide/shared/workflow-prompts-config.js +++ b/tools/cli/installers/lib/ide/shared/workflow-prompts-config.js @@ -44,8 +44,8 @@ const workflowPromptsConfig = { { name: 'prd', agent: 'bmd-custom-bmm-pm', - shortcut: 'PR', - description: '[PR] Create Product Requirements Document (PRD)', + shortcut: 'PD', + description: '[PD] Create Product Requirements Document (PRD)', prompt: '*prd', }, { @@ -90,7 +90,7 @@ const workflowPromptsConfig = { // ═══════════════════════════════════════════════════════════════════════ // Phase 4 - Implementation: The "Keep Going" Cycle - // New chat → SM → create-story → New chat → DEV → dev-story → code-review + // SM → create-story → DEV → dev-story → code-review → (create-story | retrospective) // ═══════════════════════════════════════════════════════════════════════ { name: 'create-story', From bdb5e79bb2e924e7b6a7cd3301142a287b495d38 Mon Sep 17 00:00:00 2001 From: Sjoerd Bozon Date: Mon, 19 Jan 2026 11:00:32 +0100 Subject: [PATCH 3/7] feat: add model frontmatter to workflow prompts --- .../lib/ide/shared/workflow-prompt-generator.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/cli/installers/lib/ide/shared/workflow-prompt-generator.js b/tools/cli/installers/lib/ide/shared/workflow-prompt-generator.js index cbc6f320..79edc0e3 100644 --- a/tools/cli/installers/lib/ide/shared/workflow-prompt-generator.js +++ b/tools/cli/installers/lib/ide/shared/workflow-prompt-generator.js @@ -45,9 +45,13 @@ class WorkflowPromptGenerator { const recommendations = {}; for (const prompt of prompts) { - const promptContent = ['---', `agent: ${prompt.agent}`, `description: "${prompt.description}"`, '---', '', prompt.prompt, ''].join( - '\n', - ); + const frontmatter = ['---', `agent: ${prompt.agent}`, `description: "${prompt.description}"`]; + + if (prompt.model) { + frontmatter.push(`model: ${prompt.model}`); + } + + const promptContent = [...frontmatter, '---', '', prompt.prompt, ''].join('\n'); const promptFilePath = path.join(promptsDir, `bmd-${prompt.name}.prompt.md`); await fs.writeFile(promptFilePath, promptContent); From 28933486d4fc4364808f9e80b1132f4252ddebf3 Mon Sep 17 00:00:00 2001 From: Sjoerd Bozon Date: Mon, 19 Jan 2026 11:01:54 +0100 Subject: [PATCH 4/7] feat: assign models and new-chat notes --- .../lib/ide/shared/workflow-prompts-config.js | 45 ++++++++++++++----- 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/tools/cli/installers/lib/ide/shared/workflow-prompts-config.js b/tools/cli/installers/lib/ide/shared/workflow-prompts-config.js index f3a3e632..767a9ce1 100644 --- a/tools/cli/installers/lib/ide/shared/workflow-prompts-config.js +++ b/tools/cli/installers/lib/ide/shared/workflow-prompts-config.js @@ -21,6 +21,7 @@ const workflowPromptsConfig = { agent: 'bmd-custom-bmm-analyst', shortcut: 'WI', description: '[WI] Initialize workflow and choose planning track', + model: 'claude-opus-4.5', prompt: '*workflow-init', }, { @@ -28,13 +29,15 @@ const workflowPromptsConfig = { agent: 'bmd-custom-bmm-analyst', shortcut: 'BP', description: '[BP] Brainstorm project ideas and concepts', + model: 'claude-opus-4.5', prompt: '*brainstorm-project', }, { name: 'workflow-status', agent: 'bmd-custom-bmm-pm', shortcut: 'WS', - description: '[WS] Check current workflow status and next steps', + description: '[WS] Check current workflow status and next steps (open a new chat with Ctrl+Shift+Enter)', + model: 'claude-opus-4.5', prompt: '*workflow-status', }, @@ -46,13 +49,15 @@ const workflowPromptsConfig = { agent: 'bmd-custom-bmm-pm', shortcut: 'PD', description: '[PD] Create Product Requirements Document (PRD)', + model: 'claude-opus-4.5', prompt: '*prd', }, { name: 'ux-design', agent: 'bmd-custom-bmm-ux-designer', shortcut: 'UD', - description: '[UD] Create UX Design specification', + description: '[UD] Create UX Design specification (open a new chat with Ctrl+Shift+Enter)', + model: 'claude-opus-4.5', prompt: '*ux-design', }, @@ -63,28 +68,32 @@ const workflowPromptsConfig = { name: 'create-architecture', agent: 'bmd-custom-bmm-architect', shortcut: 'CA', - description: '[CA] Create system architecture document', + description: '[CA] Create system architecture document (open a new chat with Ctrl+Shift+Enter)', + model: 'claude-opus-4.5', prompt: '*create-architecture', }, { name: 'epics-stories', agent: 'bmd-custom-bmm-pm', shortcut: 'ES', - description: '[ES] Create Epics and User Stories from PRD', + description: '[ES] Create Epics and User Stories from PRD (open a new chat with Ctrl+Shift+Enter)', + model: 'claude-opus-4.5', prompt: '*epics-stories', }, { name: 'implementation-readiness', agent: 'bmd-custom-bmm-architect', shortcut: 'IR', - description: '[IR] Check implementation readiness across all docs', + description: '[IR] Check implementation readiness across all docs (open a new chat with Ctrl+Shift+Enter)', + model: 'claude-opus-4.5', prompt: '*implementation-readiness', }, { name: 'sprint-planning', agent: 'bmd-custom-bmm-sm', shortcut: 'SP', - description: '[SP] Initialize sprint planning from epics', + description: '[SP] Initialize sprint planning from epics (open a new chat with Ctrl+Shift+Enter)', + model: 'claude-opus-4.5', prompt: '*sprint-planning', }, @@ -97,13 +106,15 @@ const workflowPromptsConfig = { agent: 'bmd-custom-bmm-sm', shortcut: 'CS', description: '[CS] Create developer-ready story from epic', + model: 'gpt-5.2-codex', prompt: '*create-story', }, { name: 'dev-story', agent: 'bmd-custom-bmm-dev', shortcut: 'DS', - description: '[DS] Implement the current story', + description: '[DS] Implement the current story (open a new chat with Ctrl+Shift+Enter)', + model: 'gpt-5.2-codex', prompt: '*dev-story', }, { @@ -111,13 +122,15 @@ const workflowPromptsConfig = { agent: 'bmd-custom-bmm-dev', shortcut: 'CR', description: '[CR] Perform code review on implementation', + model: 'gpt-5.2-codex', prompt: '*code-review', }, { name: 'retrospective', agent: 'bmd-custom-bmm-sm', shortcut: 'ER', - description: '[ER] Run epic retrospective after completion', + description: '[ER] Run epic retrospective after completion (open a new chat with Ctrl+Shift+Enter)', + model: 'claude-opus-4.5', prompt: '*epic-retrospective', }, { @@ -125,6 +138,7 @@ const workflowPromptsConfig = { agent: 'bmd-custom-bmm-sm', shortcut: 'CC', description: '[CC] Course correction when things go off track', + model: 'claude-opus-4.5', prompt: '*correct-course', }, ], @@ -137,13 +151,15 @@ const workflowPromptsConfig = { agent: 'bmd-custom-bmgd-game-dev', shortcut: 'GI', description: '[GI] Implement game feature', + model: 'gpt-5.2-codex', prompt: '*game-implement', }, { name: 'game-qa', agent: 'bmd-custom-bmgd-game-qa', shortcut: 'GQ', - description: '[GQ] Test and QA game feature', + description: '[GQ] Test and QA game feature (open a new chat with Ctrl+Shift+Enter)', + model: 'gpt-5.2', prompt: '*game-qa', }, // Planning & Design @@ -151,21 +167,24 @@ const workflowPromptsConfig = { name: 'game-design', agent: 'bmd-custom-bmgd-game-designer', shortcut: 'GD', - description: '[GD] Design game mechanics and systems', + description: '[GD] Design game mechanics and systems (open a new chat with Ctrl+Shift+Enter)', + model: 'claude-opus-4.5', prompt: '*game-design', }, { name: 'game-architecture', agent: 'bmd-custom-bmgd-game-architect', shortcut: 'GA', - description: '[GA] Create game technical architecture', + description: '[GA] Create game technical architecture (open a new chat with Ctrl+Shift+Enter)', + model: 'claude-opus-4.5', prompt: '*game-architecture', }, { name: 'game-sprint', agent: 'bmd-custom-bmgd-game-scrum-master', shortcut: 'GS', - description: '[GS] Plan game development sprint', + description: '[GS] Plan game development sprint (open a new chat with Ctrl+Shift+Enter)', + model: 'claude-opus-4.5', prompt: '*game-sprint', }, ], @@ -177,6 +196,7 @@ const workflowPromptsConfig = { agent: 'bmd-custom-core-bmad-master', shortcut: 'LT', description: '[LT] List available tasks', + model: 'gpt-5-mini', prompt: '*list-tasks', }, { @@ -184,6 +204,7 @@ const workflowPromptsConfig = { agent: 'bmd-custom-core-bmad-master', shortcut: 'LW', description: '[LW] List available workflows', + model: 'gpt-5-mini', prompt: '*list-workflows', }, ], From 25793c33d74c66cce4e21481de4d14aadd99fd13 Mon Sep 17 00:00:00 2001 From: Sjoerd Bozon Date: Mon, 19 Jan 2026 11:16:21 +0100 Subject: [PATCH 5/7] feat: generate workflow prompts from path files --- .../cli/installers/lib/ide/github-copilot.js | 5 +- .../ide/shared/workflow-prompt-generator.js | 236 +++++++++++++++++- .../lib/ide/shared/workflow-prompts-config.js | 102 +------- 3 files changed, 240 insertions(+), 103 deletions(-) diff --git a/tools/cli/installers/lib/ide/github-copilot.js b/tools/cli/installers/lib/ide/github-copilot.js index 3621f5ce..fb03e764 100644 --- a/tools/cli/installers/lib/ide/github-copilot.js +++ b/tools/cli/installers/lib/ide/github-copilot.js @@ -128,7 +128,10 @@ class GitHubCopilotSetup extends BaseIdeSetup { // Generate workflow prompts from config (shared logic) // Each prompt includes nextSteps guidance for the agent to suggest next workflows const promptGen = new WorkflowPromptGenerator(); - const promptRecommendations = await promptGen.generatePromptFiles(promptsDir, options.selectedModules || []); + const promptRecommendations = await promptGen.generatePromptFiles(promptsDir, options.selectedModules || [], { + projectDir, + bmadDir, + }); const promptCount = Object.keys(promptRecommendations).length; // Configure VS Code settings using pre-collected config if available diff --git a/tools/cli/installers/lib/ide/shared/workflow-prompt-generator.js b/tools/cli/installers/lib/ide/shared/workflow-prompt-generator.js index 79edc0e3..193b4e51 100644 --- a/tools/cli/installers/lib/ide/shared/workflow-prompt-generator.js +++ b/tools/cli/installers/lib/ide/shared/workflow-prompt-generator.js @@ -1,5 +1,6 @@ const path = require('node:path'); const fs = require('fs-extra'); +const yaml = require('yaml'); const { workflowPromptsConfig } = require('./workflow-prompts-config'); /** @@ -40,11 +41,17 @@ class WorkflowPromptGenerator { * @param {Array} selectedModules - Modules to include * @returns {Object} Map of prompt names to true for VS Code settings */ - async generatePromptFiles(promptsDir, selectedModules = []) { + async generatePromptFiles(promptsDir, selectedModules = [], options = {}) { const prompts = this.getWorkflowPrompts(selectedModules); + const pathPrompts = await this.getWorkflowPathPrompts({ + bmadDir: options.bmadDir, + projectDir: options.projectDir, + selectedModules, + }); + const mergedPrompts = this.mergePrompts(prompts, pathPrompts); const recommendations = {}; - for (const prompt of prompts) { + for (const prompt of mergedPrompts) { const frontmatter = ['---', `agent: ${prompt.agent}`, `description: "${prompt.description}"`]; if (prompt.model) { @@ -60,6 +67,231 @@ class WorkflowPromptGenerator { return recommendations; } + + mergePrompts(staticPrompts, dynamicPrompts) { + const merged = []; + const seen = new Set(); + + for (const prompt of [...staticPrompts, ...dynamicPrompts]) { + if (seen.has(prompt.name)) { + continue; + } + seen.add(prompt.name); + merged.push(prompt); + } + + return merged; + } + + async getWorkflowPathPrompts({ bmadDir, projectDir, selectedModules = [] }) { + if (!bmadDir) { + return []; + } + + const prompts = []; + const promptKeys = new Map(); + + for (const moduleName of selectedModules) { + const pathFilesDir = await this.resolvePathFilesDir({ moduleName, bmadDir, projectDir }); + if (!pathFilesDir) { + continue; + } + + let pathFiles = []; + try { + pathFiles = await fs.readdir(pathFilesDir); + } catch { + continue; + } + + const yamlFiles = pathFiles.filter((file) => file.endsWith('.yaml') || file.endsWith('.yml')); + + for (const file of yamlFiles) { + const filePath = path.join(pathFilesDir, file); + let pathData; + + try { + pathData = yaml.parse(await fs.readFile(filePath, 'utf8')); + } catch { + continue; + } + + const phases = Array.isArray(pathData?.phases) ? pathData.phases : []; + let lastAgent = null; + + for (const phase of phases) { + const phaseName = phase?.name || ''; + const workflows = Array.isArray(phase?.workflows) ? phase.workflows : []; + + for (const workflow of workflows) { + const agentKey = workflow?.agent || ''; + const command = workflow?.command || ''; + const workflowId = workflow?.id || ''; + + if (!command && !workflowId) { + continue; + } + + const promptName = this.buildPromptName({ moduleName, workflowId, command }); + const prompt = this.buildPromptText({ moduleName, workflowId, command }); + const agent = this.buildAgentName({ moduleName, agentKey }); + const requiresNewChat = !!lastAgent && !!agentKey && agentKey !== lastAgent; + const description = this.buildPromptDescription({ + workflow, + promptName, + requiresNewChat, + }); + const model = this.resolveModel({ phaseName, workflow, agentKey }); + + lastAgent = agentKey || lastAgent; + + const promptKey = `${moduleName}:${promptName}`; + const existing = promptKeys.get(promptKey); + + if (!existing) { + const promptEntry = { + name: promptName, + agent, + description, + model, + prompt, + }; + + promptKeys.set(promptKey, promptEntry); + prompts.push(promptEntry); + } else if (requiresNewChat && !existing.description.includes('Ctrl+Shift+Enter')) { + existing.description = this.appendNewChatHint(existing.description); + } + } + } + } + } + + return prompts; + } + + async resolvePathFilesDir({ moduleName, bmadDir, projectDir }) { + const workflowStatusPath = path.join(bmadDir, moduleName, 'workflows', 'workflow-status', 'workflow.yaml'); + + if (!(await fs.pathExists(workflowStatusPath))) { + return null; + } + + let workflowStatus; + try { + workflowStatus = yaml.parse(await fs.readFile(workflowStatusPath, 'utf8')); + } catch { + return null; + } + + const pathFilesRaw = workflowStatus?.path_files; + if (!pathFilesRaw || typeof pathFilesRaw !== 'string') { + return null; + } + + const workflowDir = path.dirname(workflowStatusPath).replaceAll('\\', '/'); + let resolved = pathFilesRaw.replace('{installed_path}', workflowDir); + + if (projectDir) { + const normalizedProjectDir = projectDir.replaceAll('\\', '/'); + resolved = resolved.replace('{project-root}', normalizedProjectDir); + + const relativeBmadDir = path.relative(projectDir, bmadDir).replaceAll('\\', '/'); + if (relativeBmadDir && relativeBmadDir !== '_bmad') { + resolved = resolved.replace('/_bmad/', `/${relativeBmadDir}/`); + } + } + + resolved = resolved.replaceAll('\\', '/'); + + return path.resolve(resolved); + } + + buildPromptName({ moduleName, workflowId, command }) { + let baseName = workflowId || command || 'workflow'; + + if (command && command.startsWith('/')) { + baseName = command.split(':').pop() || baseName; + } else if (command) { + baseName = command; + } + + baseName = baseName.replace(/^\/+/, ''); + + return `${moduleName}-${baseName}`; + } + + buildPromptText({ moduleName, workflowId, command }) { + if (command) { + if (command.startsWith('/')) { + return command; + } + + return `/bmad:${moduleName}:workflows:${command}`; + } + + if (workflowId) { + return `/bmad:${moduleName}:workflows:${workflowId}`; + } + + return '*workflow-status'; + } + + buildAgentName({ moduleName, agentKey }) { + if (!agentKey) { + return `bmd-custom-${moduleName}-pm`; + } + + return `bmd-custom-${moduleName}-${agentKey}`; + } + + buildPromptDescription({ workflow, promptName, requiresNewChat }) { + const title = this.toTitle(promptName.replace(/^[^-]+-/, '')); + const detail = workflow?.note || workflow?.output || workflow?.description || ''; + const baseDescription = detail ? `${title} — ${detail}` : title; + + return requiresNewChat ? this.appendNewChatHint(baseDescription) : baseDescription; + } + + appendNewChatHint(description) { + return `${description} (open a new chat with Ctrl+Shift+Enter)`; + } + + resolveModel({ phaseName, workflow, agentKey }) { + const phase = (phaseName || '').toLowerCase(); + const id = (workflow?.id || '').toLowerCase(); + const command = (workflow?.command || '').toLowerCase(); + const agent = (agentKey || '').toLowerCase(); + + if (id.includes('code-review') || command.includes('code-review') || agent.endsWith('dev') || agent.includes('game-dev')) { + return 'gpt-5.2-codex'; + } + + if (id.includes('dev-story') || command.includes('dev-story') || id.includes('implement') || command.includes('implement')) { + return 'gpt-5.2-codex'; + } + + if (id.includes('sprint-planning') || command.includes('sprint-planning')) { + return 'claude-opus-4.5'; + } + + if ( + phase.includes('analysis') || + phase.includes('planning') || + phase.includes('solution') || + phase.includes('design') || + phase.includes('technical') || + phase.includes('pre-production') + ) { + return 'claude-opus-4.5'; + } + + return 'gpt-5.2'; + } + + toTitle(value) { + return value.replaceAll(/[-_]/g, ' ').replaceAll(/\b\w/g, (match) => match.toUpperCase()); + } } module.exports = { WorkflowPromptGenerator }; diff --git a/tools/cli/installers/lib/ide/shared/workflow-prompts-config.js b/tools/cli/installers/lib/ide/shared/workflow-prompts-config.js index 767a9ce1..ffe472e8 100644 --- a/tools/cli/installers/lib/ide/shared/workflow-prompts-config.js +++ b/tools/cli/installers/lib/ide/shared/workflow-prompts-config.js @@ -11,11 +11,8 @@ */ const workflowPromptsConfig = { - // BMad Method Module (bmm) - Standard development workflow + // BMad Method Module (bmm) - Static prompts not covered by path files bmm: [ - // ═══════════════════════════════════════════════════════════════════════ - // Phase 1 - Analysis (Optional) - // ═══════════════════════════════════════════════════════════════════════ { name: 'workflow-init', agent: 'bmd-custom-bmm-analyst', @@ -24,14 +21,6 @@ const workflowPromptsConfig = { model: 'claude-opus-4.5', prompt: '*workflow-init', }, - { - name: 'brainstorm', - agent: 'bmd-custom-bmm-analyst', - shortcut: 'BP', - description: '[BP] Brainstorm project ideas and concepts', - model: 'claude-opus-4.5', - prompt: '*brainstorm-project', - }, { name: 'workflow-status', agent: 'bmd-custom-bmm-pm', @@ -40,67 +29,6 @@ const workflowPromptsConfig = { model: 'claude-opus-4.5', prompt: '*workflow-status', }, - - // ═══════════════════════════════════════════════════════════════════════ - // Phase 2 - Planning (Required) - // ═══════════════════════════════════════════════════════════════════════ - { - name: 'prd', - agent: 'bmd-custom-bmm-pm', - shortcut: 'PD', - description: '[PD] Create Product Requirements Document (PRD)', - model: 'claude-opus-4.5', - prompt: '*prd', - }, - { - name: 'ux-design', - agent: 'bmd-custom-bmm-ux-designer', - shortcut: 'UD', - description: '[UD] Create UX Design specification (open a new chat with Ctrl+Shift+Enter)', - model: 'claude-opus-4.5', - prompt: '*ux-design', - }, - - // ═══════════════════════════════════════════════════════════════════════ - // Phase 3 - Solutioning - // ═══════════════════════════════════════════════════════════════════════ - { - name: 'create-architecture', - agent: 'bmd-custom-bmm-architect', - shortcut: 'CA', - description: '[CA] Create system architecture document (open a new chat with Ctrl+Shift+Enter)', - model: 'claude-opus-4.5', - prompt: '*create-architecture', - }, - { - name: 'epics-stories', - agent: 'bmd-custom-bmm-pm', - shortcut: 'ES', - description: '[ES] Create Epics and User Stories from PRD (open a new chat with Ctrl+Shift+Enter)', - model: 'claude-opus-4.5', - prompt: '*epics-stories', - }, - { - name: 'implementation-readiness', - agent: 'bmd-custom-bmm-architect', - shortcut: 'IR', - description: '[IR] Check implementation readiness across all docs (open a new chat with Ctrl+Shift+Enter)', - model: 'claude-opus-4.5', - prompt: '*implementation-readiness', - }, - { - name: 'sprint-planning', - agent: 'bmd-custom-bmm-sm', - shortcut: 'SP', - description: '[SP] Initialize sprint planning from epics (open a new chat with Ctrl+Shift+Enter)', - model: 'claude-opus-4.5', - prompt: '*sprint-planning', - }, - - // ═══════════════════════════════════════════════════════════════════════ - // Phase 4 - Implementation: The "Keep Going" Cycle - // SM → create-story → DEV → dev-story → code-review → (create-story | retrospective) - // ═══════════════════════════════════════════════════════════════════════ { name: 'create-story', agent: 'bmd-custom-bmm-sm', @@ -143,9 +71,8 @@ const workflowPromptsConfig = { }, ], - // BMad Game Development Module (bmgd) + // BMad Game Development Module (bmgd) - Static prompts not covered by path files bmgd: [ - // Implementation cycle { name: 'game-implement', agent: 'bmd-custom-bmgd-game-dev', @@ -162,31 +89,6 @@ const workflowPromptsConfig = { model: 'gpt-5.2', prompt: '*game-qa', }, - // Planning & Design - { - name: 'game-design', - agent: 'bmd-custom-bmgd-game-designer', - shortcut: 'GD', - description: '[GD] Design game mechanics and systems (open a new chat with Ctrl+Shift+Enter)', - model: 'claude-opus-4.5', - prompt: '*game-design', - }, - { - name: 'game-architecture', - agent: 'bmd-custom-bmgd-game-architect', - shortcut: 'GA', - description: '[GA] Create game technical architecture (open a new chat with Ctrl+Shift+Enter)', - model: 'claude-opus-4.5', - prompt: '*game-architecture', - }, - { - name: 'game-sprint', - agent: 'bmd-custom-bmgd-game-scrum-master', - shortcut: 'GS', - description: '[GS] Plan game development sprint (open a new chat with Ctrl+Shift+Enter)', - model: 'claude-opus-4.5', - prompt: '*game-sprint', - }, ], // Core agents (always available) From 7652ed092db71bbfdef6181ebcea8e4d2bcd3437 Mon Sep 17 00:00:00 2001 From: Sjoerd Bozon Date: Mon, 19 Jan 2026 11:28:15 +0100 Subject: [PATCH 6/7] refactor: remove hardcoded IDE prompt recommendations from workflows --- .../steps/step-06-final-assessment.md | 23 ------------- .../sprint-planning/instructions.md | 32 ------------------- 2 files changed, 55 deletions(-) diff --git a/src/modules/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-06-final-assessment.md b/src/modules/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-06-final-assessment.md index f19d077b..aa78c14f 100644 --- a/src/modules/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-06-final-assessment.md +++ b/src/modules/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-06-final-assessment.md @@ -111,29 +111,6 @@ Report generated: {outputFile} The assessment found [number] issues requiring attention. Review the detailed report for specific findings and recommendations." -### 6. Update IDE Prompt Recommendations - -If the readiness status is **READY**, update `.vscode/settings.json` to prioritize the implementation cycle prompts. - -Read the existing `chat.promptFilesRecommendations` object and modify these keys: - -**Set to `true` (implementation cycle - "keep going" loop):** -- `bmd-create-story` -- `bmd-dev-story` -- `bmd-code-review` -- `bmd-retrospective` -- `bmd-correct-course` - -**Set to `false` (setup phase - already completed):** -- `bmd-workflow-init` -- `bmd-brainstorm` -- `bmd-prd` -- `bmd-ux-design` -- `bmd-create-architecture` -- `bmd-epics-stories` -- `bmd-implementation-readiness` -- `bmd-sprint-planning` - ## WORKFLOW COMPLETE The implementation readiness workflow is now complete. The report contains all findings and recommendations for the user to consider. diff --git a/src/modules/bmm/workflows/4-implementation/sprint-planning/instructions.md b/src/modules/bmm/workflows/4-implementation/sprint-planning/instructions.md index 88addaab..c4f4bd42 100644 --- a/src/modules/bmm/workflows/4-implementation/sprint-planning/instructions.md +++ b/src/modules/bmm/workflows/4-implementation/sprint-planning/instructions.md @@ -179,38 +179,6 @@ development_status: - -Read the existing `.vscode/settings.json` and update the `chat.promptFilesRecommendations` object. - -**Set to `true` (implementation cycle - "keep going" loop):** -- `bmd-create-story` -- `bmd-dev-story` -- `bmd-code-review` -- `bmd-retrospective` -- `bmd-correct-course` - -**Set to `false` (setup phase - already completed):** -- `bmd-workflow-init` -- `bmd-brainstorm` -- `bmd-prd` -- `bmd-ux-design` -- `bmd-create-architecture` -- `bmd-epics-stories` -- `bmd-implementation-readiness` -- `bmd-sprint-planning` - -Inform {user_name}: - -**IDE Updated for Implementation Phase** - -The "keep going" cycle prompts are now prioritized in VS Code: -- **@bmd-custom-bmm-sm → *create-story** (prepare a story) -- **@bmd-custom-bmm-dev → *dev-story** (implement it) -- **Same chat → *code-review** (review the code) -- **Repeat!** - - - ## Additional Documentation From 647f4560ed3ee30e725fdb7d62a830b1aa8ab853 Mon Sep 17 00:00:00 2001 From: Sjoerd Bozon Date: Mon, 19 Jan 2026 11:43:50 +0100 Subject: [PATCH 7/7] fix: deep-merge prompt recommendations to preserve existing settings --- tools/cli/installers/lib/ide/github-copilot.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/cli/installers/lib/ide/github-copilot.js b/tools/cli/installers/lib/ide/github-copilot.js index 0eff3034..07dd0925 100644 --- a/tools/cli/installers/lib/ide/github-copilot.js +++ b/tools/cli/installers/lib/ide/github-copilot.js @@ -218,9 +218,17 @@ class GitHubCopilotSetup extends BaseIdeSetup { bmadSettings['chat.promptFilesRecommendations'] = options.promptRecommendations; } - // Merge settings (existing take precedence) + // Merge settings (existing take precedence, except for prompt recommendations) const mergedSettings = { ...bmadSettings, ...existingSettings }; + // Deep-merge prompt recommendations (new prompts added, existing preserved) + if (options.promptRecommendations && Object.keys(options.promptRecommendations).length > 0) { + mergedSettings['chat.promptFilesRecommendations'] = { + ...existingSettings['chat.promptFilesRecommendations'], + ...options.promptRecommendations, + }; + } + // Write settings await fs.writeFile(settingsPath, JSON.stringify(mergedSettings, null, 2)); console.log(chalk.green(' ✓ VS Code settings configured'));