BMAD-METHOD/tools
Davor Racic 6bfc937bd3
fix(installer): OpenCode integration: replace `name` frontmatter with `mode: all` and update directory names (#1764)
* fix(opencode): use mode: all in agent template, remove name frontmatter, fix directory names

- Replace name: '{{name}}' with mode: all in opencode-agent.md
  mode: all enables both Tab-key agent switching in the TUI and @subagent
  invocation via the Task tool (mode: primary blocked subagent use)
- Remove name: '{{name}}' from opencode-task/tool/workflow/workflow-yaml templates
  OpenCode derives command name from filename, not from a name frontmatter field;
  the bare {{name}} value was overriding the bmad- prefixed filename causing
  name collisions with built-in OpenCode commands (fixes #1762)
- Fix deprecated singular directory names in platform-codes.yaml:
  .opencode/agent -> .opencode/agents, .opencode/command -> .opencode/commands
- Add legacy_targets migration: cleanup() now removes stale bmad-* files from
  old singular directories on reinstall so existing users don't get duplicates
- Fix removeEmptyParents to continue walking up to parent when starting dir is
  already absent instead of breaking early

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

* fix(opencode): address code review findings for cleanup and schema docs

- Add project boundary guard to removeEmptyParents() using path.resolve
  and startsWith check to prevent traversal outside projectDir (Augment)
- Fix JSDoc: "Recursively remove" -> "Walk up ancestor directories"
- Add user-visible migration log message when processing legacy_targets
- Document legacy_targets field in Installer Config Schema comment block
  in platform-codes.yaml (CodeRabbit + Augment)

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

* fix(opencode): improve removeEmptyParents error handling and loop clarity

- Distinguish recoverable errors (ENOTEMPTY, ENOENT) from fatal errors in
  removeEmptyParents() catch block — skip level and continue upward on
  TOCTOU races or concurrent removal, break only on fatal errors (EACCES)
- Add comment clarifying loop invariant for missing-path continue branch

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Brian <bmadcode@gmail.com>
2026-02-25 11:12:05 -06:00
..
cli fix(installer): OpenCode integration: replace `name` frontmatter with `mode: all` and update directory names (#1764) 2026-02-25 11:12:05 -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