From d563266b9738b5d3c5ec1e31ab683aad517e2604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Kl=C3=BCmpers?= <102544568+stefankluempers@users.noreply.github.com> Date: Fri, 15 Aug 2025 05:23:44 +0200 Subject: [PATCH] feat: install Cursor rules to subdirectory (#438) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: install Cursor rules to subdirectory Implement feature request #376 to avoid filename collisions and confusion between repo-specific and BMAD-specific rules. Changes: - Move Cursor rules from .cursor/rules/ to .cursor/rules/bmad/ - Update installer configuration to use new subdirectory structure - Update upgrader to reflect new rule directory path This keeps BMAD Method files separate from existing project rules, reducing chance of conflicts and improving organization. Fixes #376 * chore: correct formatting in cursor rules directory path --------- Co-authored-by: Stefan Klümpers --- tools/installer/config/install.config.yaml | 2 +- tools/installer/lib/ide-setup.js | 2 +- tools/upgraders/v3-to-v4-upgrader.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/installer/config/install.config.yaml b/tools/installer/config/install.config.yaml index 96e86aea..1da2e005 100644 --- a/tools/installer/config/install.config.yaml +++ b/tools/installer/config/install.config.yaml @@ -11,7 +11,7 @@ installation-options: ide-configurations: cursor: name: Cursor - rule-dir: .cursor/rules/ + rule-dir: .cursor/rules/bmad/ format: multi-file command-suffix: .mdc instructions: | diff --git a/tools/installer/lib/ide-setup.js b/tools/installer/lib/ide-setup.js index 4768a931..4dbc8e57 100644 --- a/tools/installer/lib/ide-setup.js +++ b/tools/installer/lib/ide-setup.js @@ -68,7 +68,7 @@ class IdeSetup extends BaseIdeSetup { } async setupCursor(installDir, selectedAgent) { - const cursorRulesDir = path.join(installDir, ".cursor", "rules"); + const cursorRulesDir = path.join(installDir, ".cursor", "rules", "bmad"); const agents = selectedAgent ? [selectedAgent] : await this.getAllAgentIds(installDir); await fileManager.ensureDirectory(cursorRulesDir); diff --git a/tools/upgraders/v3-to-v4-upgrader.js b/tools/upgraders/v3-to-v4-upgrader.js index cc535706..2a14b244 100644 --- a/tools/upgraders/v3-to-v4-upgrader.js +++ b/tools/upgraders/v3-to-v4-upgrader.js @@ -557,7 +557,7 @@ class V3ToV4Upgrader { try { const ideMessages = { - cursor: "Rules created in .cursor/rules/", + cursor: "Rules created in .cursor/rules/bmad/", "claude-code": "Commands created in .claude/commands/BMad/", windsurf: "Rules created in .windsurf/rules/", trae: "Rules created in.trae/rules/",