BMAD-METHOD/tools/cli/installers/lib/ide
Alex Verkhovsky 2d2f4855b1
fix(installer): refuse install when ancestor dir has BMAD commands (#1735)
* fix(installer): refuse install when ancestor dir has BMAD commands

Claude Code inherits slash commands from parent directories, so
installing into a nested project when a parent already has .claude/commands
with bmad-* files causes duplicate entries in the autocomplete.

Add ancestor_conflict_check flag (enabled for claude-code) that walks
up the directory tree before install. If BMAD files are found in an
ancestor target_dir, the installer refuses with an actionable error.

Also fix IdeManager.setup() to propagate handler success status instead
of unconditionally returning success: true.

* Address code review feedback from CodeRabbit and Augment

- Move "Setting up..." log after conflict check so it only shows when
  install will proceed
- Fix rm command: add -rf flags and correct quoting for glob outside quotes
- Improve error wording: "ancestor installation" instead of misleading
  "ancestor directory"
- Use case-insensitive startsWith for bmad file detection (macOS/Windows)
- Document ancestor_conflict_check in the installer config schema

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(installer): resolve symlinks before ancestor conflict walk

Use fs.realpath() instead of path.resolve() so the ancestor directory
walk follows the physical filesystem path, not the logical symlink path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 21:01:04 -06:00
..
shared feat(templates): remove disable-model-invocation to enable workflow skill calls 2026-02-22 16:38:05 -06:00
templates fix(installer): OpenCode integration: replace `name` frontmatter with `mode: all` and update directory names (#1764) 2026-02-25 11:12:05 -06:00
_base-ide.js refactor: Complete @clack/prompts Migration & Installer Output Consolidation (#1586) 2026-02-08 00:40:13 -06:00
_config-driven.js fix(installer): refuse install when ancestor dir has BMAD commands (#1735) 2026-02-25 21:01:04 -06:00
codex.js feat: migrate Codex installer from .codex/prompts to .agents/skills format (#1729) 2026-02-22 10:47:05 -06:00
github-copilot.js feat(templates): remove disable-model-invocation to enable workflow skill calls 2026-02-22 16:38:05 -06:00
kilo.js refactor: Complete @clack/prompts Migration & Installer Output Consolidation (#1586) 2026-02-08 00:40:13 -06:00
manager.js fix(installer): refuse install when ancestor dir has BMAD commands (#1735) 2026-02-25 21:01:04 -06:00
platform-codes.js installer fix 2026-01-26 16:06:00 -06:00
platform-codes.yaml fix(installer): refuse install when ancestor dir has BMAD commands (#1735) 2026-02-25 21:01:04 -06:00
rovodev.js fix(installer): add custom Rovo Dev installer with prompts.yml generation (#1701) 2026-02-20 20:31:45 -06:00