Commit Graph

14 Commits

Author SHA1 Message Date
Alex Verkhovsky 5aab72caba
feat(skills): migrate all remaining platforms to native skills format (#1841)
* feat(skills): migrate Roo Code installer to native skills format

Move Roo Code from legacy `.roo/commands/` flat files to native
`.roo/skills/{skill-name}/SKILL.md` directory output. Verified
skill discovery in Roo Code v3.51 with 43 skills installed.

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

* test(skills): add native skills tests for Claude Code, Codex, and Cursor

Add dedicated test suites covering config validation, fresh install,
legacy cleanup, and ancestor conflict detection for Claude Code, Codex
CLI, and Cursor. Updates migration checklist to reflect verified status.

84 assertions now pass (up from 50).

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

* test(skills): add Roo Code reinstall/upgrade test

Verify that running Roo setup over existing skills output succeeds
and preserves SKILL.md output. Checks off the last Roo checklist item.

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

* feat(skills): migrate GitHub Copilot to config-driven native skills

Replace 699-line custom installer with config-driven skill_format.
Output moves from .github/agents/ + .github/prompts/ to
.github/skills/{skill-name}/SKILL.md. Legacy cleanup strips BMAD
markers from copilot-instructions.md and removes old directories.

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

* docs: update migration checklist with Copilot and Roo verified results

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

* feat(skills): migrate Cline to config-driven native skills

Move Cline installer from .clinerules/workflows to .cline/skills with
SKILL.md directory output. Add legacy cleanup and 9 test assertions.

* feat(skills): migrate CodeBuddy to config-driven native skills

Move CodeBuddy installer from .codebuddy/commands to .codebuddy/skills
with SKILL.md directory output. Add legacy cleanup and 9 test assertions.

* feat(skills): migrate Crush to config-driven native skills

Move Crush installer from .crush/commands to .crush/skills with
SKILL.md directory output. Add legacy cleanup and 9 test assertions.

* feat(skills): migrate Trae to config-driven native skills

Move Trae installer from .trae/rules to .trae/skills with SKILL.md
directory output. Add legacy cleanup and 9 test assertions.

* feat(skills): migrate KiloCoder to config-driven native skills

Replace 269-line custom kilo.js installer with config-driven entry in
platform-codes.yaml targeting .kilocode/skills/ with skill_format: true.

- Add installer config: target_dir, skill_format, template_type, legacy_targets
- Add cleanupKiloModes() to strip BMAD modes from .kilocodemodes on cleanup
- Remove kilo.js from manager.js customFiles and Kilo-specific result handling
- Delete tools/cli/installers/lib/ide/kilo.js
- Add test Suite 22: 11 assertions (config, install, legacy cleanup, modes, reinstall)
- Update migration checklist with verified results

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

* feat(skills): migrate Gemini CLI to config-driven native skills

Replace TOML-based .gemini/commands output with native SKILL.md output
in .gemini/skills/. Gemini CLI confirms native skills support per
geminicli.com/docs/cli/skills/.

- Update platform-codes.yaml: target_dir, skill_format, legacy_targets
- Add test Suite 23: 9 assertions (config, install, legacy, reinstall)
- Add Gemini CLI section to migration checklist

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

* feat(skills): migrate iFlow, QwenCoder, and Rovo Dev to native skills

Complete the native skills migration for all remaining platforms:

- iFlow: .iflow/commands → .iflow/skills (config change)
- QwenCoder: .qwen/commands → .qwen/skills (config change)
- Rovo Dev: replace 257-line custom rovodev.js with config-driven
  .rovodev/skills, add cleanupRovoDevPrompts() for prompts.yml cleanup

All platforms now use config-driven native skills. No custom installer
files remain. Manager.js customFiles array is now empty.

- Add test suites 24-26: 20 new assertions (173 total)
- Update migration checklist: all summary gates passed
- Delete tools/cli/installers/lib/ide/rovodev.js

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

* fix(installer): preserve bmad-os-* skills during cleanup

The cleanupTarget method removed all entries starting with "bmad" from
IDE skills directories, which would also wipe version-controlled
bmad-os-* skills from the BMAD-METHOD repo. Add exclusion for the
bmad-os- prefix so those skills survive reinstalls.

* docs: flag all unverified platforms for manual IDE testing

Add NEEDS MANUAL IDE VERIFICATION to KiloCoder, Gemini CLI, iFlow,
QwenCoder, and Rovo Dev checklists. CodeBuddy, Crush, and Trae already
had the flag.

* fix(installer): suspend Kilo Code and add verified Gemini/Crush results

Kilo Code does not support the Agent Skills standard — the migration
from modes+workflows to skills was based on a false fork assumption.

- Add suspended field to platform-codes.yaml, hiding Kilo from the IDE
  picker and blocking setup with a clear message
- Fail the installer early (before writing _bmad/) if all selected IDEs
  are suspended, protecting existing installations from being corrupted
- Still clean up legacy Kilo artifacts (.kilocodemodes, .kilocode/workflows)
  when users switch to a different IDE
- Mark Crush and Gemini CLI as manually verified (both work end-to-end)
- Replace Suite 22 install tests with suspended-behavior tests (7 assertions)

* docs: update KiloCoder checklist to reflect suspended status

* fix(skills): add canonicalIds for BMM research and PRD workflows

Drop the bmm module prefix from 6 workflow skill names so they
install as bmad-create-prd, bmad-domain-research, etc. instead of
bmad-bmm-create-prd, bmad-bmm-domain-research, etc.

* fix(installer): address PR review findings from automated reviewers

Triage of 18 findings from Augment and CodeRabbit reviews on PR #1841:

Source code fixes:
- Exclude bmad-os-* from findAncestorConflict to match cleanupTarget
- Wrap cleanupCopilotInstructions in try/catch (best-effort, not fatal)
- Wrap suspended-platform cleanup in try/catch (failure boundary)
- Clean up temp backup dirs in catch block when install aborts
- Normalize IDE keys to lowercase before suspended lookup
- Delete dead loadCustomInstallerFiles method and stale references
- Rename "Roo Cline" to "Roo Code" in both platform-codes.yaml files
- Fix Gemini CLI package name (@google/gemini-cli, not @anthropic-ai)

Test improvements:
- Add name/frontmatter invariant check to 6 missing platform suites
- Assert stale bmad-architect skill is removed after cleanup

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 12:30:49 -07:00
Alex Verkhovsky 0d3b317598
refactor: all-is-skills - Convert BMAD to skills-based architecture (#1834)
* feat(skills): add canonical bmad- naming via skill manifests

Add bmad-skill-manifest.yaml sidecars to all 38 capabilities (tasks,
agents, workflows) declaring canonicalId as the single source of truth
for skill names. Update Claude Code and Codex installers to prefer
canonicalId over path-derived names, with graceful fallback.

- 24 manifest files covering 38 capabilities
- New shared skill-manifest.js utility for manifest loading
- resolveSkillName() in path-utils.js bridges manifest → installer
- All command generators propagate canonicalId through CSV manifests
- Drops bmm module prefix from all user-facing skill names

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

* feat(skills): claude-code installer outputs .claude/skills/<name>/SKILL.md

Refactor the config-driven installer to emit Agent Skills Open Standard
format for Claude Code: directory-per-skill with SKILL.md entrypoint,
unquoted YAML frontmatter, and full canonical names.

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

* refactor(installer): migrate codex to config-driven pipeline

Delete the custom codex.js installer (441 lines) and route Codex
through the config-driven pipeline via platform-codes.yaml. This
fixes 7 task/tool descriptions that were generic due to bypassing
manifests, and eliminates duplicate transformToSkillFormat code.

Key changes:
- Add codex entry to platform-codes.yaml with skill_format + legacy_targets
- Remove codex from custom installer list in manager.js
- Add installCustomAgentLauncher() to config-driven for custom agent support
- Add detect() override for skill_format platforms (bmad-prefix check)
- Set configDir from target_dir for base-class detect() compatibility

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

* fix(installer): guard codex skill installs in nested directories

* fix(installer): warn on stale global legacy skill dirs

* feat(installer): migrate cursor to native skills

* Migrate Windsurf installer to native skills

* Clarify Windsurf skill invocation in checklist

* feat(installer): migrate kiro to native skills

* docs: record kiro skill visibility verification

* Migrate Antigravity installer to native skills

* Document Antigravity ancestor skill verification

* Synchronize native skills migration checklist

* Migrate Auggie installer to native skills

* Migrate OpenCode installer to native skills

* Document live skill verification for Auggie and OpenCode

* fix(test): replace _bmad filesystem dependency with self-contained fixture

The installation component tests walked up the filesystem looking for a
pre-installed _bmad directory, which exists locally but not in CI. Replace
findInstalledBmadDir() with createTestBmadFixture() that creates a minimal
temp directory with fake compiled agents, making tests fully self-contained.

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Brian <bmadcode@gmail.com>
2026-03-06 21:39:19 -06:00
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
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
Brian Madison 1d49fe1802 feat(templates): remove disable-model-invocation to enable workflow skill calls
This change removes the disable-model-invocation flag from all IDE installer
templates. By allowing model invocation, bmad help can now properly invoke
suggested workflows as direct skill calls, improving the user experience by
enabling automatic workflow execution when desired.
2026-02-22 16:38:05 -06:00
Davor Racic 2d134314c9
feat(cli): add uninstall command with selective component removal (#1650)
* feat(cli): add uninstall command with selective component removal

Add `bmad uninstall` CLI command for clean removal of BMAD installations.
Interactive mode with directory router and component multiselect; non-interactive
`--yes` flag preserves user artifacts by default. Three-phase spinner UX,
manifest-scoped IDE cleanup, GitHub Copilot marker stripping, recursive empty
directory cleanup, and chalk-to-clack migration in copilot handler.

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

* fix(cli): address code review findings for uninstall command

- Add path traversal guard in uninstallOutputFolder (resolve + startsWith)
- Thread silent flag through to cleanupCopilotInstructions
- Trim text input before path.resolve in directory prompt
- DRY uninstall() by delegating to extracted helper methods
- Validate projectDir existence before probing for BMAD
- Use fs.rmdir instead of fs.remove in removeEmptyParents (race safety)

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

* feat(cli): add destructive action warning and confirm before uninstall

Move warning box after component selection and add a confirmation prompt
defaulting to No, so users see the irreversibility warning right before
the point of no return. Non-interactive --yes mode skips both.

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Brian <bmadcode@gmail.com>
2026-02-15 08:13:03 -06:00
Davor Racic b1bfce9aa7
refactor: Complete @clack/prompts Migration & Installer Output Consolidation (#1586)
* feat(cli): complete @clack/prompts migration

Full migration of BMAD CLI installer from legacy terminal libraries
(chalk, ora, boxen, figlet, wrap-ansi, cli-table3, readline) to unified
@clack/prompts v1.0.0 visual system.

Foundation (prompts.js + cli-utils.js):
  - Extended prompts.js wrapper with box, spinner, progress, taskLog,
    path, autocomplete, selectKey, stream, color re-export
  - Refactored cli-utils.js: displayLogo uses box(), sections use note(),
    steps use log.step(), removed boxen/figlet/wrap-ansi/cli-table3

UI orchestration (ui.js):
  - Replaced ~100 console.log+chalk calls with log.*, note(), box()
  - Replaced ora spinner with @clack spinner
  - Module selection: autocompleteMultiselect with locked core module,
    bulleted post-selection display, maxItems for no-scroll

Spinner migration (installer.js):
  - Replaced 40+ ora spinner calls with @clack spinner
  - All spinner.stop() calls include meaningful messages
  - Failure paths use spinner.error() (red cross) instead of stop()

Readline migration (agent/installer.js + config-collector.js):
  - Migrated readline prompts to @clack text/confirm/select
  - Fixed chalk.dim bug (chalk was never imported)
  - Removed chalk from config-collector.js

IDE handlers + modules (7 files):
  - Replaced chalk+ora across all IDE handlers and module manager
  - Fixed options.installer undefined bug in manager.js update()

Cleanup:
  - Removed ora, boxen, figlet, wrap-ansi, cli-table3 from dependencies
  - chalk stays (used outside tools/cli/ scope)
  - Replaced hand-drawn Unicode update box in bmad-cli.js with box()
  - Added process.stdin.setMaxListeners(25) for sequential prompts

Spinner wrapper adds isSpinning state tracking (not native to @clack).
Removed dead groupMultiselect and sortKey sort calls.

Ref: tech-spec-installer-clack-migration-ui-enhancement.md

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

* feat(cli): consolidate installer output to single spinner + summary

Replace ~40 lines of output from 15+ spinner start/stop cycles with a
single animated spinner during installation and a final note() summary
block showing checkmarks per step.

Key changes:
- Add results collector pattern in install() method
- Replace spinner.stop/start pairs with addResult + spinner.message
- Add renderInstallSummary() using prompts.note() with colored output
- Propagate silent flag through IDE handlers and module manager
- Add spinner race condition guards (start while spinning, stop while stopped)
- Add no-op spinner pattern for silent external module cloning
- Fix stdin listener limit to be defensive with Math.max
- Add GIT_TERMINAL_PROMPT=0 for non-interactive git operations
- Merge locked values into initialValue for autocomplete prompts

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

* fix(cli): resolve code review findings from @clack/prompts migration

Address 31 issues across 14 CLI files found during PR #1586 review
(Augment Code + CodeRabbit):

- Fix bmadDir ReferenceError by hoisting declaration before try block
- Wrap console.log monkey-patch in try/finally for safe restoration
- Fix transformWorkflowPath dead code and undefined return path
- Fix broken symlink crash in _config-driven.js and codex.js cleanup
- Pass installer instance through update() for agent recompilation
- Fix @clack/prompts API: defaultValue→default, initialValue→default
- Use nullish coalescing (??) instead of logical OR for falsy values
- Forward options in recursive promptToolSelection calls
- Remove no-op replaceAll('_bmad','_bmad') in manager and generator
- Remove unused confirm prompt in config-collector hasNoConfig branch
- Guard spinner.message() when spinner is not running
- Add missing methods to silent spinner stub (cancel, clear, isSpinning)
- Wrap install.js error handler with inner try/catch + console fallback
- Gate codex per-entry error log with silent flag
- Add return statements to all stream wrapper methods
- Remove dead variables (availableNames, hasCustomContentItems)
- Filter core module from update flow selection
- Replace borderColor ternary chain with object map
- Fix Kilo "agents" label to "modes" in IDE manager
- Normalize error return shape for unsupported IDEs
- Fix spinner message timing before dependency resolution
- Guard undefined moduleDir in dependency-resolver
- Fix workflowsInstalled counter inflation in custom handler
- Migrate console.warn calls to prompts.log.warn
- Replace console.log() with prompts.log.message('')
- Fix legacyBmadPath hardcoded to .bmad instead of entry.name
- Fix focusedValue never assigned breaking SPACE toggle and hints

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 00:40:13 -06:00
Davor Racic 5b80649d3a
fix(installer): Multiple installer fixes (#1492)
* fix: support CRLF line endings and add task/tool templates for all IDEs

* fix: preserve file extensions in IDE task/tool paths and update BMAD branding

* fix: double extension issue in wrapper filename generation

* fix: correct path handling and variable reference in task/tool command generator

* fix: change default BMAD folder name from 'bmad' to '_bmad' across all IDE components

* refactor: centralize BMAD_FOLDER_NAME constant in path-utils

* fix: Replace the rest of BMAD_FOLDER magic values

* fix: add safety checks for setBmadFolderName method calls in IdeManager

* fix: convert absolute paths to relative in task-tool-command-generator

* fix: support .xml task files in bmad-artifacts task discovery

* fix: skip internal tasks in manifest generation and IDE command discovery

* fix: skip empty artifact_types targets and remove unused vscode_settings target

* fix: skip internal tools in manifest generation and improve Windows path handling in command generator

* fix: use csv-parse library for proper CSV handling in manifest generation

* refactor: extract CSV text cleaning to reusable method in manifest generator

* fix: normalize path separators to forward slashes in agent file copying for cross-platform compatibility

---------

Co-authored-by: Alex Verkhovsky <alexey.verkhovsky@gmail.com>
Co-authored-by: Brian <bmadcode@gmail.com>
2026-02-03 17:36:54 -06:00
Alex Verkhovsky 53220420a5
fix: add disable-model-invocation to all generated slash commands (#1501)
Prevents Claude from auto-invoking BMad skills without explicit user
request. Adds disable-model-invocation: true frontmatter to all
command templates and inline generators for Claude Code and Codex.

Co-authored-by: Brian <bmadcode@gmail.com>
2026-01-31 17:25:31 -06:00
Brian Madison dd8c54cc9f no double agent files and .agent.md file extensions. 2026-01-27 23:08:26 -08:00
Davor Racic 181aeac04a
fix(ide): add support for Gemini CLI TOML format (#1431)
* fix(ide): add support for Gemini CLI TOML format

* fix(ide): Added normalization for config.extension, added .yml to the extension array

---------

Co-authored-by: Brian <bmadcode@gmail.com>
2026-01-27 21:56:12 -08:00
Brian Madison 27c18e0020 installer fix 2026-01-26 16:06:00 -06:00
Alex Verkhovsky 91f6c41be1
docs: radical reduction of documentation scope for v6 beta (#1406)
* docs: radical reduction of documentation scope for v6 beta

Archive and basement unreviewed content to ship a focused, minimal doc set.

Changes:
- Archive stale how-to workflow guides (will rewrite for v6)
- Archive outdated explanation and reference content
- Move unreviewed content to basement for later review
- Reorganize TEA docs into dedicated /tea/ section
- Add workflow-map visual reference page
- Simplify getting-started tutorial and sidebar navigation
- Add explanation pages: brainstorming, adversarial-review, party-mode,
  quick-flow, advanced-elicitation
- Fix base URL handling for subdirectory deployments (GitHub Pages forks)

The goal is a minimal, accurate doc set for beta rather than
comprehensive but potentially misleading content.

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

* refactor: restructure BMM and agents documentation by consolidating and flattening index files.

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 14:00:26 -06:00
Brian Madison 85339708e6 normalize commands 2026-01-25 03:56:40 -06:00