fix: preserve file extensions in IDE task/tool paths and update BMAD branding

This commit is contained in:
Davor Racić 2026-01-31 21:43:42 +01:00 committed by Davor Racic
parent 91b2d84ff8
commit c0f51350c2
3 changed files with 8 additions and 6 deletions

View File

@ -42,6 +42,7 @@ class TaskToolCommandGenerator {
taskPath = taskPath.slice(6); // Remove '_bmad/' taskPath = taskPath.slice(6); // Remove '_bmad/'
} }
const taskExt = path.extname(taskPath) || '.md';
artifacts.push({ artifacts.push({
type: 'task', type: 'task',
name: task.name, name: task.name,
@ -49,7 +50,7 @@ class TaskToolCommandGenerator {
description: task.description || `Execute ${task.displayName || task.name}`, description: task.description || `Execute ${task.displayName || task.name}`,
module: task.module, module: task.module,
// Use forward slashes for cross-platform consistency (not path.join which uses backslashes on Windows) // Use forward slashes for cross-platform consistency (not path.join which uses backslashes on Windows)
relativePath: `${task.module}/tasks/${task.name}.md`, relativePath: `${task.module}/tasks/${task.name}${taskExt}`,
path: taskPath, path: taskPath,
}); });
} }
@ -62,6 +63,7 @@ class TaskToolCommandGenerator {
toolPath = toolPath.slice(6); // Remove '_bmad/' toolPath = toolPath.slice(6); // Remove '_bmad/'
} }
const toolExt = path.extname(toolPath) || '.md';
artifacts.push({ artifacts.push({
type: 'tool', type: 'tool',
name: tool.name, name: tool.name,
@ -69,7 +71,7 @@ class TaskToolCommandGenerator {
description: tool.description || `Execute ${tool.displayName || tool.name}`, description: tool.description || `Execute ${tool.displayName || tool.name}`,
module: tool.module, module: tool.module,
// Use forward slashes for cross-platform consistency (not path.join which uses backslashes on Windows) // Use forward slashes for cross-platform consistency (not path.join which uses backslashes on Windows)
relativePath: `${tool.module}/tools/${tool.name}.md`, relativePath: `${tool.module}/tools/${tool.name}${toolExt}`,
path: toolPath, path: toolPath,
}); });
} }
@ -261,7 +263,7 @@ Follow all instructions in the ${type} file exactly as written.
// Generate command files for tasks // Generate command files for tasks
for (const task of standaloneTasks) { for (const task of standaloneTasks) {
const commandContent = this.generateCommandContent(task, 'task'); const commandContent = this.generateCommandContent(task, 'task');
// Use underscore format: bmad_bmm_name.md // Use dash format: bmad-bmm-name.md
const flatName = toDashPath(`${task.module}/tasks/${task.name}.md`); const flatName = toDashPath(`${task.module}/tasks/${task.name}.md`);
const commandPath = path.join(baseCommandsDir, flatName); const commandPath = path.join(baseCommandsDir, flatName);
await fs.ensureDir(path.dirname(commandPath)); await fs.ensureDir(path.dirname(commandPath));
@ -272,7 +274,7 @@ Follow all instructions in the ${type} file exactly as written.
// Generate command files for tools // Generate command files for tools
for (const tool of standaloneTools) { for (const tool of standaloneTools) {
const commandContent = this.generateCommandContent(tool, 'tool'); const commandContent = this.generateCommandContent(tool, 'tool');
// Use underscore format: bmad_bmm_name.md // Use dash format: bmad-bmm-name.md
const flatName = toDashPath(`${tool.module}/tools/${tool.name}.md`); const flatName = toDashPath(`${tool.module}/tools/${tool.name}.md`);
const commandPath = path.join(baseCommandsDir, flatName); const commandPath = path.join(baseCommandsDir, flatName);
await fs.ensureDir(path.dirname(commandPath)); await fs.ensureDir(path.dirname(commandPath));

View File

@ -1,4 +1,4 @@
description = "Executes the {{name}} task from the BMad Method." description = "Executes the {{name}} task from the BMAD Method."
prompt = """ prompt = """
Execute the BMAD '{{name}}' task. Execute the BMAD '{{name}}' task.

View File

@ -1,4 +1,4 @@
description = "Executes the {{name}} tool from the BMad Method." description = "Executes the {{name}} tool from the BMAD Method."
prompt = """ prompt = """
Execute the BMAD '{{name}}' tool. Execute the BMAD '{{name}}' tool.