Skip to content

Commit f86d185

Browse files
alexeyvclaude
authored andcommitted
fix: remove empty tasks directories from Claude Code installer (bmad-code-org#776)
Previously, the installer created empty tasks/ directories under .claude/commands/bmad/{module}/ and attempted to copy task files. Since getTasksFromDir() filters for .md files only and all actual tasks are .xml files, these directories remained empty. Tasks are utility files referenced by agents via exec attributes (e.g., exec="{project-root}/bmad/core/tasks/workflow.xml") and should remain in the bmad/ directory - they are not slash commands. Changes: - Removed tasks directory creation in module setup - Removed tasks copying logic (15 lines) - Removed taskCount from console output - Removed tasks property from return value - Removed unused getTasksFromBmad and getTasksFromDir imports - Updated comment to clarify agents-only installation Verified: No tasks/ directories created in .claude/commands/bmad/ while task files remain accessible in bmad/core/tasks/ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
1 parent 8bd4893 commit f86d185

File tree

1 file changed

+3
-22
lines changed

1 file changed

+3
-22
lines changed

tools/cli/installers/lib/ide/claude-code.js

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const {
99
filterAgentInstructions,
1010
resolveSubagentFiles,
1111
} = require('./shared/module-injections');
12-
const { getAgentsFromBmad, getTasksFromBmad, getAgentsFromDir, getTasksFromDir } = require('./shared/bmad-artifacts');
12+
const { getAgentsFromBmad, getAgentsFromDir } = require('./shared/bmad-artifacts');
1313

1414
/**
1515
* Claude Code IDE setup handler
@@ -99,19 +99,17 @@ class ClaudeCodeSetup extends BaseIdeSetup {
9999

100100
await this.ensureDir(bmadCommandsDir);
101101

102-
// Get agents and tasks from INSTALLED bmad/ directory
102+
// Get agents from INSTALLED bmad/ directory
103103
// Base installer has already built .md files from .agent.yaml sources
104104
const agents = await getAgentsFromBmad(bmadDir, options.selectedModules || []);
105-
const tasks = await getTasksFromBmad(bmadDir, options.selectedModules || []);
106105

107106
// Create directories for each module (including standalone)
108107
const modules = new Set();
109-
for (const item of [...agents, ...tasks]) modules.add(item.module);
108+
for (const item of agents) modules.add(item.module);
110109

111110
for (const module of modules) {
112111
await this.ensureDir(path.join(bmadCommandsDir, module));
113112
await this.ensureDir(path.join(bmadCommandsDir, module, 'agents'));
114-
await this.ensureDir(path.join(bmadCommandsDir, module, 'tasks'));
115113
}
116114

117115
// Copy agents from bmad/ to .claude/commands/
@@ -129,21 +127,6 @@ class ClaudeCodeSetup extends BaseIdeSetup {
129127
agentCount++;
130128
}
131129

132-
// Copy tasks from bmad/ to .claude/commands/
133-
let taskCount = 0;
134-
for (const task of tasks) {
135-
const sourcePath = task.path;
136-
const targetPath = path.join(bmadCommandsDir, task.module, 'tasks', `${task.name}.md`);
137-
138-
const content = await this.readAndProcess(sourcePath, {
139-
module: task.module,
140-
name: task.name,
141-
});
142-
143-
await this.writeFile(targetPath, content);
144-
taskCount++;
145-
}
146-
147130
// Process Claude Code specific injections for installed modules
148131
// Use pre-collected configuration if available
149132
if (options.preCollectedConfig) {
@@ -161,7 +144,6 @@ class ClaudeCodeSetup extends BaseIdeSetup {
161144

162145
console.log(chalk.green(`✓ ${this.name} configured:`));
163146
console.log(chalk.dim(` - ${agentCount} agents installed`));
164-
console.log(chalk.dim(` - ${taskCount} tasks installed`));
165147
if (workflowResult.generated > 0) {
166148
console.log(chalk.dim(` - ${workflowResult.generated} workflow commands generated`));
167149
}
@@ -170,7 +152,6 @@ class ClaudeCodeSetup extends BaseIdeSetup {
170152
return {
171153
success: true,
172154
agents: agentCount,
173-
tasks: taskCount,
174155
};
175156
}
176157

0 commit comments

Comments
 (0)