From 97f01f69312f1d5173bac57549327f865c517588 Mon Sep 17 00:00:00 2001 From: Gabriel Lemire <43624515+Gabbo7474@users.noreply.github.com> Date: Sat, 12 Jul 2025 11:02:46 -0400 Subject: [PATCH] refactor: nest Claude Code commands under BMad subdirectory (#307) - Update installer config to use .claude/commands/BMad/ path - Modify setupClaudeCode function to create nested directory structure - Update documentation and upgrader to reflect new command location - Improves organization by grouping all BMad commands together --- docs/agentic-tools/claude-code-guide.md | 2 +- tools/installer/config/install.config.yaml | 2 +- tools/installer/lib/ide-setup.js | 2 +- tools/upgraders/v3-to-v4-upgrader.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/agentic-tools/claude-code-guide.md b/docs/agentic-tools/claude-code-guide.md index fbf293a6..f50c1d8f 100644 --- a/docs/agentic-tools/claude-code-guide.md +++ b/docs/agentic-tools/claude-code-guide.md @@ -7,7 +7,7 @@ For the complete workflow, see the [BMad Workflow Guide](../bmad-workflow-guide. When running `npx bmad-method install`, select **Claude Code** as your IDE. This creates: - `.bmad-core/` folder with all agents -- `.claude/commands/` folder with agent command files (`.md`) +- `.claude/commands/BMad` folder with agent command files (`.md`) ## Using BMad Agents in Claude Code diff --git a/tools/installer/config/install.config.yaml b/tools/installer/config/install.config.yaml index f3b8831d..a170ade8 100644 --- a/tools/installer/config/install.config.yaml +++ b/tools/installer/config/install.config.yaml @@ -21,7 +21,7 @@ ide-configurations: # 3. The agent will adopt that persona for the conversation claude-code: name: Claude Code - rule-dir: .claude/commands/ + rule-dir: .claude/commands/BMad/ format: multi-file command-suffix: .md instructions: | diff --git a/tools/installer/lib/ide-setup.js b/tools/installer/lib/ide-setup.js index b6a29598..fdcd1893 100644 --- a/tools/installer/lib/ide-setup.js +++ b/tools/installer/lib/ide-setup.js @@ -131,7 +131,7 @@ class IdeSetup { } async setupClaudeCode(installDir, selectedAgent) { - const commandsDir = path.join(installDir, ".claude", "commands"); + const commandsDir = path.join(installDir, ".claude", "commands", "BMad"); const agents = selectedAgent ? [selectedAgent] : await this.getAllAgentIds(installDir); await fileManager.ensureDirectory(commandsDir); diff --git a/tools/upgraders/v3-to-v4-upgrader.js b/tools/upgraders/v3-to-v4-upgrader.js index 3182ba96..cc535706 100644 --- a/tools/upgraders/v3-to-v4-upgrader.js +++ b/tools/upgraders/v3-to-v4-upgrader.js @@ -558,7 +558,7 @@ class V3ToV4Upgrader { try { const ideMessages = { cursor: "Rules created in .cursor/rules/", - "claude-code": "Commands created in .claude/commands/", + "claude-code": "Commands created in .claude/commands/BMad/", windsurf: "Rules created in .windsurf/rules/", trae: "Rules created in.trae/rules/", roo: "Custom modes created in .roomodes",