From aa1cf76f884fecbf03e82076a7d4bc4da94a57e1 Mon Sep 17 00:00:00 2001 From: Brian Madison Date: Wed, 3 Dec 2025 21:35:44 -0600 Subject: [PATCH] new workflow types generate slash commands --- src/core/workflows/brainstorming/workflow.md | 2 +- src/core/workflows/party-mode/workflow.md | 2 +- .../bmb/workflows/create-agent/workflow.md | 2 +- .../bmb/workflows/create-workflow/workflow.md | 2 +- .../bmb/workflows/edit-agent/workflow.md | 2 +- .../bmb/workflows/edit-workflow/workflow.md | 2 +- .../workflow-compliance-check/workflow.md | 2 +- .../1-analysis/product-brief/workflow.md | 2 +- .../workflows/1-analysis/research/workflow.md | 3 +- .../create-ux-design/workflow.md | 6 +++ .../2-plan-workflows/prd/workflow.md | 2 +- .../3-solutioning/architecture/workflow.md | 3 +- .../create-epics-and-stories/workflow.md | 2 +- .../implementation-readiness/workflow.md | 2 +- .../generate-project-context/workflow.md | 2 +- .../installers/lib/core/manifest-generator.js | 37 ++++++++++++------- .../ide/shared/workflow-command-generator.js | 33 +++++++++-------- .../lib/ide/templates/workflow-commander.md | 5 +++ 18 files changed, 68 insertions(+), 43 deletions(-) create mode 100644 tools/cli/installers/lib/ide/templates/workflow-commander.md diff --git a/src/core/workflows/brainstorming/workflow.md b/src/core/workflows/brainstorming/workflow.md index f2793fe7..156a9bb5 100644 --- a/src/core/workflows/brainstorming/workflow.md +++ b/src/core/workflows/brainstorming/workflow.md @@ -1,5 +1,5 @@ --- -name: Brainstorming Session +name: brainstorming-session description: Facilitate interactive brainstorming sessions using diverse creative techniques and ideation methods context_file: '' # Optional context file path for project-specific guidance --- diff --git a/src/core/workflows/party-mode/workflow.md b/src/core/workflows/party-mode/workflow.md index 26d7a507..b3147ad0 100644 --- a/src/core/workflows/party-mode/workflow.md +++ b/src/core/workflows/party-mode/workflow.md @@ -1,5 +1,5 @@ --- -name: Party Mode +name: party-mode description: Orchestrates group discussions between all installed BMAD agents, enabling natural multi-agent conversations --- diff --git a/src/modules/bmb/workflows/create-agent/workflow.md b/src/modules/bmb/workflows/create-agent/workflow.md index 0893ff68..503df318 100644 --- a/src/modules/bmb/workflows/create-agent/workflow.md +++ b/src/modules/bmb/workflows/create-agent/workflow.md @@ -1,5 +1,5 @@ --- -name: Create Agent +name: create-agent description: Interactive workflow to build BMAD Core compliant agents with optional brainstorming, persona development, and command structure web_bundle: true --- diff --git a/src/modules/bmb/workflows/create-workflow/workflow.md b/src/modules/bmb/workflows/create-workflow/workflow.md index 55d80e94..6b4140d5 100644 --- a/src/modules/bmb/workflows/create-workflow/workflow.md +++ b/src/modules/bmb/workflows/create-workflow/workflow.md @@ -1,5 +1,5 @@ --- -name: Create Workflow +name: create-workflow description: Create structured standalone workflows using markdown-based step architecture web_bundle: true --- diff --git a/src/modules/bmb/workflows/edit-agent/workflow.md b/src/modules/bmb/workflows/edit-agent/workflow.md index 0c7927fd..81462cbb 100644 --- a/src/modules/bmb/workflows/edit-agent/workflow.md +++ b/src/modules/bmb/workflows/edit-agent/workflow.md @@ -1,5 +1,5 @@ --- -name: Edit Agent +name: edit-agent description: Edit existing BMAD agents while following all best practices and conventions web_bundle: false --- diff --git a/src/modules/bmb/workflows/edit-workflow/workflow.md b/src/modules/bmb/workflows/edit-workflow/workflow.md index 9a275bc3..d4d62f96 100644 --- a/src/modules/bmb/workflows/edit-workflow/workflow.md +++ b/src/modules/bmb/workflows/edit-workflow/workflow.md @@ -1,5 +1,5 @@ --- -name: Edit Workflow +name: edit-workflow description: Intelligent workflow editor that helps modify existing workflows while following best practices web_bundle: true --- diff --git a/src/modules/bmb/workflows/workflow-compliance-check/workflow.md b/src/modules/bmb/workflows/workflow-compliance-check/workflow.md index 049366b4..2fb39bd2 100644 --- a/src/modules/bmb/workflows/workflow-compliance-check/workflow.md +++ b/src/modules/bmb/workflows/workflow-compliance-check/workflow.md @@ -1,5 +1,5 @@ --- -name: Workflow Compliance Check +name: workflow-compliance-check description: Systematic validation of workflows against BMAD standards with adversarial analysis and detailed reporting web_bundle: false --- diff --git a/src/modules/bmm/workflows/1-analysis/product-brief/workflow.md b/src/modules/bmm/workflows/1-analysis/product-brief/workflow.md index d2a7ab71..a070d3ce 100644 --- a/src/modules/bmm/workflows/1-analysis/product-brief/workflow.md +++ b/src/modules/bmm/workflows/1-analysis/product-brief/workflow.md @@ -1,5 +1,5 @@ --- -name: Product Brief Workflow +name: create-product-brief description: Create comprehensive product briefs through collaborative step-by-step discovery as creative Business Analyst working with the user as peers. web_bundle: true --- diff --git a/src/modules/bmm/workflows/1-analysis/research/workflow.md b/src/modules/bmm/workflows/1-analysis/research/workflow.md index 8ca1ea3e..cbbacfd9 100644 --- a/src/modules/bmm/workflows/1-analysis/research/workflow.md +++ b/src/modules/bmm/workflows/1-analysis/research/workflow.md @@ -1,6 +1,7 @@ --- -name: Research Workflow +name: research description: Conduct comprehensive research across multiple domains using current web data and verified sources - Market, Technical, Domain and other research types. +web_bundle: true --- # Research Workflow diff --git a/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/workflow.md b/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/workflow.md index 03514f8d..1810e94d 100644 --- a/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/workflow.md +++ b/src/modules/bmm/workflows/2-plan-workflows/create-ux-design/workflow.md @@ -1,3 +1,9 @@ +--- +name: create-ux-design +description: Work with a peer UX Design expert to plan your applications UX patterns, look and feel. +web_bundle: true +--- + # Create UX Design Workflow **Goal:** Create comprehensive UX design specifications through collaborative visual exploration and informed decision-making where you act as a UX facilitator working with a product stakeholder. diff --git a/src/modules/bmm/workflows/2-plan-workflows/prd/workflow.md b/src/modules/bmm/workflows/2-plan-workflows/prd/workflow.md index 6cee6a80..b9d738d6 100644 --- a/src/modules/bmm/workflows/2-plan-workflows/prd/workflow.md +++ b/src/modules/bmm/workflows/2-plan-workflows/prd/workflow.md @@ -1,5 +1,5 @@ --- -name: PRD Workflow +name: create-prd description: Creates a comprehensive PRDs through collaborative step-by-step discovery between two product managers working as peers. main_config: `{project-root}/{bmad_folder}/bmm/config.yaml` web_bundle: true diff --git a/src/modules/bmm/workflows/3-solutioning/architecture/workflow.md b/src/modules/bmm/workflows/3-solutioning/architecture/workflow.md index b59b48e2..7d5deeb7 100644 --- a/src/modules/bmm/workflows/3-solutioning/architecture/workflow.md +++ b/src/modules/bmm/workflows/3-solutioning/architecture/workflow.md @@ -1,6 +1,7 @@ --- -name: Architecture Workflow +name: create-architecture description: Collaborative architectural decision facilitation for AI-agent consistency. Replaces template-driven architecture with intelligent, adaptive conversation that produces a decision-focused architecture document optimized for preventing agent conflicts. +web_bundle: true --- # Architecture Workflow diff --git a/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.md b/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.md index 2590627a..2975980a 100644 --- a/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.md +++ b/src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.md @@ -1,5 +1,5 @@ --- -name: 'Create Epics and Stories' +name: create-epics-stories description: 'Transform PRD requirements and Architecture decisions into comprehensive stories organized by user value. This workflow requires completed PRD + Architecture documents (UX recommended if UI exists) and breaks down requirements into implementation-ready epics and user stories that incorporate all available technical and design context. Creates detailed, actionable stories with complete acceptance criteria for development teams.' web_bundle: true --- diff --git a/src/modules/bmm/workflows/3-solutioning/implementation-readiness/workflow.md b/src/modules/bmm/workflows/3-solutioning/implementation-readiness/workflow.md index 989b659d..2483cde8 100644 --- a/src/modules/bmm/workflows/3-solutioning/implementation-readiness/workflow.md +++ b/src/modules/bmm/workflows/3-solutioning/implementation-readiness/workflow.md @@ -1,5 +1,5 @@ --- -name: 'Implementation Readiness' +name: check-implementation-readiness description: 'Critical validation workflow that assesses PRD, Architecture, and Epics & Stories for completeness and alignment before implementation. Uses adversarial review approach to find gaps and issues.' web_bundle: false --- diff --git a/src/modules/bmm/workflows/generate-project-context/workflow.md b/src/modules/bmm/workflows/generate-project-context/workflow.md index a9c463e9..934ebff9 100644 --- a/src/modules/bmm/workflows/generate-project-context/workflow.md +++ b/src/modules/bmm/workflows/generate-project-context/workflow.md @@ -1,5 +1,5 @@ --- -name: Generate Project Context +name: generate-project-context description: Creates a concise project_context.md file with critical rules and patterns that AI agents must follow when implementing code. Optimized for LLM context efficiency. --- diff --git a/tools/cli/installers/lib/core/manifest-generator.js b/tools/cli/installers/lib/core/manifest-generator.js index 1dbb8ea6..644fd494 100644 --- a/tools/cli/installers/lib/core/manifest-generator.js +++ b/tools/cli/installers/lib/core/manifest-generator.js @@ -105,7 +105,7 @@ class ManifestGenerator { } /** - * Recursively find and parse workflow.yaml files + * Recursively find and parse workflow.yaml and workflow.md files */ async getWorkflowsFromPath(basePath, moduleName) { const workflows = []; @@ -126,11 +126,23 @@ class ManifestGenerator { // Recurse into subdirectories const newRelativePath = relativePath ? `${relativePath}/${entry.name}` : entry.name; await findWorkflows(fullPath, newRelativePath); - } else if (entry.name === 'workflow.yaml') { - // Parse workflow file + } else if (entry.name === 'workflow.yaml' || entry.name === 'workflow.md') { + // Parse workflow file (both YAML and MD formats) try { const content = await fs.readFile(fullPath, 'utf8'); - const workflow = yaml.load(content); + + let workflow; + if (entry.name === 'workflow.yaml') { + // Parse YAML workflow + workflow = yaml.load(content); + } else { + // Parse MD workflow with YAML frontmatter + const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/); + if (!frontmatterMatch) { + continue; // Skip MD files without frontmatter + } + workflow = yaml.load(frontmatterMatch[1]); + } // Skip template workflows (those with placeholder values) if (workflow.name && workflow.name.includes('{') && workflow.name.includes('}')) { @@ -141,18 +153,15 @@ class ManifestGenerator { // Build relative path for installation const installPath = moduleName === 'core' - ? `${this.bmadFolderName}/core/workflows/${relativePath}/workflow.yaml` - : `${this.bmadFolderName}/${moduleName}/workflows/${relativePath}/workflow.yaml`; - - // Check for standalone property (default: false) - const standalone = workflow.standalone === true; + ? `${this.bmadFolderName}/core/workflows/${relativePath}/${entry.name}` + : `${this.bmadFolderName}/${moduleName}/workflows/${relativePath}/${entry.name}`; + // ALL workflows now generate commands - no standalone property needed workflows.push({ name: workflow.name, description: workflow.description.replaceAll('"', '""'), // Escape quotes for CSV module: moduleName, path: installPath, - standalone: standalone, }); // Add to files list @@ -541,12 +550,12 @@ class ManifestGenerator { async writeWorkflowManifest(cfgDir) { const csvPath = path.join(cfgDir, 'workflow-manifest.csv'); - // Create CSV header with standalone column - let csv = 'name,description,module,path,standalone\n'; + // Create CSV header - removed standalone column as ALL workflows now generate commands + let csv = 'name,description,module,path\n'; - // Add all workflows + // Add all workflows - no standalone property needed anymore for (const workflow of this.workflows) { - csv += `"${workflow.name}","${workflow.description}","${workflow.module}","${workflow.path}","${workflow.standalone}"\n`; + csv += `"${workflow.name}","${workflow.description}","${workflow.module}","${workflow.path}"\n`; } await fs.writeFile(csvPath, csv); diff --git a/tools/cli/installers/lib/ide/shared/workflow-command-generator.js b/tools/cli/installers/lib/ide/shared/workflow-command-generator.js index e7a2fe9a..e3280e8c 100644 --- a/tools/cli/installers/lib/ide/shared/workflow-command-generator.js +++ b/tools/cli/installers/lib/ide/shared/workflow-command-generator.js @@ -25,16 +25,16 @@ class WorkflowCommandGenerator { return { generated: 0 }; } - // Filter to only standalone workflows - const standaloneWorkflows = workflows.filter((w) => w.standalone === 'true' || w.standalone === true); + // ALL workflows now generate commands - no standalone filtering + const allWorkflows = workflows; // Base commands directory const baseCommandsDir = path.join(projectDir, '.claude', 'commands', 'bmad'); let generatedCount = 0; - // Generate a command file for each standalone workflow, organized by module - for (const workflow of standaloneWorkflows) { + // Generate a command file for each workflow, organized by module + for (const workflow of allWorkflows) { const moduleWorkflowsDir = path.join(baseCommandsDir, workflow.module, 'workflows'); await fs.ensureDir(moduleWorkflowsDir); @@ -46,7 +46,7 @@ class WorkflowCommandGenerator { } // Also create a workflow launcher README in each module - const groupedWorkflows = this.groupWorkflowsByModule(standaloneWorkflows); + const groupedWorkflows = this.groupWorkflowsByModule(allWorkflows); await this.createModuleWorkflowLaunchers(baseCommandsDir, groupedWorkflows); return { generated: generatedCount }; @@ -59,12 +59,12 @@ class WorkflowCommandGenerator { return { artifacts: [], counts: { commands: 0, launchers: 0 } }; } - // Filter to only standalone workflows - const standaloneWorkflows = workflows.filter((w) => w.standalone === 'true' || w.standalone === true); + // ALL workflows now generate commands - no standalone filtering + const allWorkflows = workflows; const artifacts = []; - for (const workflow of standaloneWorkflows) { + for (const workflow of allWorkflows) { const commandContent = await this.generateCommandContent(workflow, bmadDir); artifacts.push({ type: 'workflow-command', @@ -75,7 +75,7 @@ class WorkflowCommandGenerator { }); } - const groupedWorkflows = this.groupWorkflowsByModule(standaloneWorkflows); + const groupedWorkflows = this.groupWorkflowsByModule(allWorkflows); for (const [module, launcherContent] of Object.entries(this.buildModuleWorkflowLaunchers(groupedWorkflows))) { artifacts.push({ type: 'workflow-launcher', @@ -89,7 +89,7 @@ class WorkflowCommandGenerator { return { artifacts, counts: { - commands: standaloneWorkflows.length, + commands: allWorkflows.length, launchers: Object.keys(groupedWorkflows).length, }, }; @@ -99,8 +99,13 @@ class WorkflowCommandGenerator { * Generate command content for a workflow */ async generateCommandContent(workflow, bmadDir) { - // Load the template - const template = await fs.readFile(this.templatePath, 'utf8'); + // Determine template based on workflow file type + const isMarkdownWorkflow = workflow.path.endsWith('workflow.md'); + const templateName = isMarkdownWorkflow ? 'workflow-commander.md' : 'workflow-command-template.md'; + const templatePath = path.join(path.dirname(this.templatePath), templateName); + + // Load the appropriate template + const template = await fs.readFile(templatePath, 'utf8'); // Convert source path to installed path // From: /Users/.../src/modules/bmm/workflows/.../workflow.yaml @@ -127,9 +132,7 @@ class WorkflowCommandGenerator { .replaceAll('{{description}}', workflow.description) .replaceAll('{{workflow_path}}', workflowPath) .replaceAll('{bmad_folder}', this.bmadFolderName) - .replaceAll('{*bmad_folder*}', '{bmad_folder}') - .replaceAll('{{interactive}}', workflow.interactive) - .replaceAll('{{author}}', workflow.author || 'BMAD'); + .replaceAll('{*bmad_folder*}', '{bmad_folder}'); } /** diff --git a/tools/cli/installers/lib/ide/templates/workflow-commander.md b/tools/cli/installers/lib/ide/templates/workflow-commander.md new file mode 100644 index 00000000..3645c1a2 --- /dev/null +++ b/tools/cli/installers/lib/ide/templates/workflow-commander.md @@ -0,0 +1,5 @@ +--- +description: '{{description}}' +--- + +IT IS CRITICAL THAT YOU FOLLOW THIS COMMAND: LOAD the FULL @{{workflow_path}}, READ its entire contents and follow its directions exactly!