new workflow types generate slash commands
This commit is contained in:
parent
b8b4b65c10
commit
aa1cf76f88
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
name: Brainstorming Session
|
name: brainstorming-session
|
||||||
description: Facilitate interactive brainstorming sessions using diverse creative techniques and ideation methods
|
description: Facilitate interactive brainstorming sessions using diverse creative techniques and ideation methods
|
||||||
context_file: '' # Optional context file path for project-specific guidance
|
context_file: '' # Optional context file path for project-specific guidance
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
name: Party Mode
|
name: party-mode
|
||||||
description: Orchestrates group discussions between all installed BMAD agents, enabling natural multi-agent conversations
|
description: Orchestrates group discussions between all installed BMAD agents, enabling natural multi-agent conversations
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
description: Interactive workflow to build BMAD Core compliant agents with optional brainstorming, persona development, and command structure
|
||||||
web_bundle: true
|
web_bundle: true
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
name: Create Workflow
|
name: create-workflow
|
||||||
description: Create structured standalone workflows using markdown-based step architecture
|
description: Create structured standalone workflows using markdown-based step architecture
|
||||||
web_bundle: true
|
web_bundle: true
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
name: Edit Agent
|
name: edit-agent
|
||||||
description: Edit existing BMAD agents while following all best practices and conventions
|
description: Edit existing BMAD agents while following all best practices and conventions
|
||||||
web_bundle: false
|
web_bundle: false
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
name: Edit Workflow
|
name: edit-workflow
|
||||||
description: Intelligent workflow editor that helps modify existing workflows while following best practices
|
description: Intelligent workflow editor that helps modify existing workflows while following best practices
|
||||||
web_bundle: true
|
web_bundle: true
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -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
|
description: Systematic validation of workflows against BMAD standards with adversarial analysis and detailed reporting
|
||||||
web_bundle: false
|
web_bundle: false
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -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.
|
description: Create comprehensive product briefs through collaborative step-by-step discovery as creative Business Analyst working with the user as peers.
|
||||||
web_bundle: true
|
web_bundle: true
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -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.
|
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
|
# Research Workflow
|
||||||
|
|
|
||||||
|
|
@ -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
|
# 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.
|
**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.
|
||||||
|
|
|
||||||
|
|
@ -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.
|
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`
|
main_config: `{project-root}/{bmad_folder}/bmm/config.yaml`
|
||||||
web_bundle: true
|
web_bundle: true
|
||||||
|
|
|
||||||
|
|
@ -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.
|
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
|
# Architecture Workflow
|
||||||
|
|
|
||||||
|
|
@ -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.'
|
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
|
web_bundle: true
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -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.'
|
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
|
web_bundle: false
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -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.
|
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.
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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) {
|
async getWorkflowsFromPath(basePath, moduleName) {
|
||||||
const workflows = [];
|
const workflows = [];
|
||||||
|
|
@ -126,11 +126,23 @@ class ManifestGenerator {
|
||||||
// Recurse into subdirectories
|
// Recurse into subdirectories
|
||||||
const newRelativePath = relativePath ? `${relativePath}/${entry.name}` : entry.name;
|
const newRelativePath = relativePath ? `${relativePath}/${entry.name}` : entry.name;
|
||||||
await findWorkflows(fullPath, newRelativePath);
|
await findWorkflows(fullPath, newRelativePath);
|
||||||
} else if (entry.name === 'workflow.yaml') {
|
} else if (entry.name === 'workflow.yaml' || entry.name === 'workflow.md') {
|
||||||
// Parse workflow file
|
// Parse workflow file (both YAML and MD formats)
|
||||||
try {
|
try {
|
||||||
const content = await fs.readFile(fullPath, 'utf8');
|
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)
|
// Skip template workflows (those with placeholder values)
|
||||||
if (workflow.name && workflow.name.includes('{') && workflow.name.includes('}')) {
|
if (workflow.name && workflow.name.includes('{') && workflow.name.includes('}')) {
|
||||||
|
|
@ -141,18 +153,15 @@ class ManifestGenerator {
|
||||||
// Build relative path for installation
|
// Build relative path for installation
|
||||||
const installPath =
|
const installPath =
|
||||||
moduleName === 'core'
|
moduleName === 'core'
|
||||||
? `${this.bmadFolderName}/core/workflows/${relativePath}/workflow.yaml`
|
? `${this.bmadFolderName}/core/workflows/${relativePath}/${entry.name}`
|
||||||
: `${this.bmadFolderName}/${moduleName}/workflows/${relativePath}/workflow.yaml`;
|
: `${this.bmadFolderName}/${moduleName}/workflows/${relativePath}/${entry.name}`;
|
||||||
|
|
||||||
// Check for standalone property (default: false)
|
|
||||||
const standalone = workflow.standalone === true;
|
|
||||||
|
|
||||||
|
// ALL workflows now generate commands - no standalone property needed
|
||||||
workflows.push({
|
workflows.push({
|
||||||
name: workflow.name,
|
name: workflow.name,
|
||||||
description: workflow.description.replaceAll('"', '""'), // Escape quotes for CSV
|
description: workflow.description.replaceAll('"', '""'), // Escape quotes for CSV
|
||||||
module: moduleName,
|
module: moduleName,
|
||||||
path: installPath,
|
path: installPath,
|
||||||
standalone: standalone,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add to files list
|
// Add to files list
|
||||||
|
|
@ -541,12 +550,12 @@ class ManifestGenerator {
|
||||||
async writeWorkflowManifest(cfgDir) {
|
async writeWorkflowManifest(cfgDir) {
|
||||||
const csvPath = path.join(cfgDir, 'workflow-manifest.csv');
|
const csvPath = path.join(cfgDir, 'workflow-manifest.csv');
|
||||||
|
|
||||||
// Create CSV header with standalone column
|
// Create CSV header - removed standalone column as ALL workflows now generate commands
|
||||||
let csv = 'name,description,module,path,standalone\n';
|
let csv = 'name,description,module,path\n';
|
||||||
|
|
||||||
// Add all workflows
|
// Add all workflows - no standalone property needed anymore
|
||||||
for (const workflow of this.workflows) {
|
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);
|
await fs.writeFile(csvPath, csv);
|
||||||
|
|
|
||||||
|
|
@ -25,16 +25,16 @@ class WorkflowCommandGenerator {
|
||||||
return { generated: 0 };
|
return { generated: 0 };
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filter to only standalone workflows
|
// ALL workflows now generate commands - no standalone filtering
|
||||||
const standaloneWorkflows = workflows.filter((w) => w.standalone === 'true' || w.standalone === true);
|
const allWorkflows = workflows;
|
||||||
|
|
||||||
// Base commands directory
|
// Base commands directory
|
||||||
const baseCommandsDir = path.join(projectDir, '.claude', 'commands', 'bmad');
|
const baseCommandsDir = path.join(projectDir, '.claude', 'commands', 'bmad');
|
||||||
|
|
||||||
let generatedCount = 0;
|
let generatedCount = 0;
|
||||||
|
|
||||||
// Generate a command file for each standalone workflow, organized by module
|
// Generate a command file for each workflow, organized by module
|
||||||
for (const workflow of standaloneWorkflows) {
|
for (const workflow of allWorkflows) {
|
||||||
const moduleWorkflowsDir = path.join(baseCommandsDir, workflow.module, 'workflows');
|
const moduleWorkflowsDir = path.join(baseCommandsDir, workflow.module, 'workflows');
|
||||||
await fs.ensureDir(moduleWorkflowsDir);
|
await fs.ensureDir(moduleWorkflowsDir);
|
||||||
|
|
||||||
|
|
@ -46,7 +46,7 @@ class WorkflowCommandGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Also create a workflow launcher README in each module
|
// Also create a workflow launcher README in each module
|
||||||
const groupedWorkflows = this.groupWorkflowsByModule(standaloneWorkflows);
|
const groupedWorkflows = this.groupWorkflowsByModule(allWorkflows);
|
||||||
await this.createModuleWorkflowLaunchers(baseCommandsDir, groupedWorkflows);
|
await this.createModuleWorkflowLaunchers(baseCommandsDir, groupedWorkflows);
|
||||||
|
|
||||||
return { generated: generatedCount };
|
return { generated: generatedCount };
|
||||||
|
|
@ -59,12 +59,12 @@ class WorkflowCommandGenerator {
|
||||||
return { artifacts: [], counts: { commands: 0, launchers: 0 } };
|
return { artifacts: [], counts: { commands: 0, launchers: 0 } };
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filter to only standalone workflows
|
// ALL workflows now generate commands - no standalone filtering
|
||||||
const standaloneWorkflows = workflows.filter((w) => w.standalone === 'true' || w.standalone === true);
|
const allWorkflows = workflows;
|
||||||
|
|
||||||
const artifacts = [];
|
const artifacts = [];
|
||||||
|
|
||||||
for (const workflow of standaloneWorkflows) {
|
for (const workflow of allWorkflows) {
|
||||||
const commandContent = await this.generateCommandContent(workflow, bmadDir);
|
const commandContent = await this.generateCommandContent(workflow, bmadDir);
|
||||||
artifacts.push({
|
artifacts.push({
|
||||||
type: 'workflow-command',
|
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))) {
|
for (const [module, launcherContent] of Object.entries(this.buildModuleWorkflowLaunchers(groupedWorkflows))) {
|
||||||
artifacts.push({
|
artifacts.push({
|
||||||
type: 'workflow-launcher',
|
type: 'workflow-launcher',
|
||||||
|
|
@ -89,7 +89,7 @@ class WorkflowCommandGenerator {
|
||||||
return {
|
return {
|
||||||
artifacts,
|
artifacts,
|
||||||
counts: {
|
counts: {
|
||||||
commands: standaloneWorkflows.length,
|
commands: allWorkflows.length,
|
||||||
launchers: Object.keys(groupedWorkflows).length,
|
launchers: Object.keys(groupedWorkflows).length,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
@ -99,8 +99,13 @@ class WorkflowCommandGenerator {
|
||||||
* Generate command content for a workflow
|
* Generate command content for a workflow
|
||||||
*/
|
*/
|
||||||
async generateCommandContent(workflow, bmadDir) {
|
async generateCommandContent(workflow, bmadDir) {
|
||||||
// Load the template
|
// Determine template based on workflow file type
|
||||||
const template = await fs.readFile(this.templatePath, 'utf8');
|
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
|
// Convert source path to installed path
|
||||||
// From: /Users/.../src/modules/bmm/workflows/.../workflow.yaml
|
// From: /Users/.../src/modules/bmm/workflows/.../workflow.yaml
|
||||||
|
|
@ -127,9 +132,7 @@ class WorkflowCommandGenerator {
|
||||||
.replaceAll('{{description}}', workflow.description)
|
.replaceAll('{{description}}', workflow.description)
|
||||||
.replaceAll('{{workflow_path}}', workflowPath)
|
.replaceAll('{{workflow_path}}', workflowPath)
|
||||||
.replaceAll('{bmad_folder}', this.bmadFolderName)
|
.replaceAll('{bmad_folder}', this.bmadFolderName)
|
||||||
.replaceAll('{*bmad_folder*}', '{bmad_folder}')
|
.replaceAll('{*bmad_folder*}', '{bmad_folder}');
|
||||||
.replaceAll('{{interactive}}', workflow.interactive)
|
|
||||||
.replaceAll('{{author}}', workflow.author || 'BMAD');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -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!
|
||||||
Loading…
Reference in New Issue