BMAD-METHOD/tools
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
..
cli fix(installer): refuse install when ancestor dir has BMAD commands (#1735) 2026-02-25 21:01:04 -06:00
docs chore: remove broken manual-release workflow and related artifacts (#1576) 2026-02-06 23:21:55 -06:00
lib feat: add documentation website with Docusaurus build pipeline (#1177) 2025-12-23 23:01:36 +08:00
schema feat: custom GitHub Copilot installer handler (#1606) 2026-02-09 13:41:11 -06:00
bmad-npx-wrapper.js fix: preserve user's cwd when running via npx 2025-10-29 09:31:38 -05:00
build-docs.mjs fix(docs): comprehensive documentation site review fixes (#1578) 2026-02-08 11:58:22 -06:00
fix-doc-links.js fix(docs): comprehensive documentation site review fixes (#1578) 2026-02-08 11:58:22 -06:00
format-workflow-md.js check alignment 2025-10-22 12:36:39 -05:00
migrate-custom-module-paths.js _cfg -> _config 2025-12-13 19:41:09 +08:00
platform-codes.yaml feat: add CodeBuddy platform support (#1483) 2026-02-20 20:39:52 -06:00
validate-agent-schema.js fix agent scan and help csv files 2026-01-31 21:58:55 -06:00
validate-doc-links.js feat(docs): add public roadmap and improve site navigation 2026-02-22 19:41:57 -06:00
validate-file-refs.js refactor: replace module installer scripts with declarative directories config 2026-02-08 19:21:48 -06:00
validate-svg-changes.sh Project Cleanup of Agents Menus, BMB module removal to other repo 2026-01-19 02:04:14 -06:00