Commit Graph

101 Commits

Author SHA1 Message Date
Davor Racić 58f34c2c92 fix: consolidate directory creation output across all modules
Move directory creation logging from ModuleManager.createModuleDirectories
into the installer caller. The method now returns created directory info
instead of logging directly, allowing the installer to batch all module
directories into a single log message under one spinner. Also adds spacing
before the final "Installation complete" status line.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 08:16:14 +01:00
Davor Racić a5c1bb52ee fix: remove deselected IDE configurations during installer update
When updating an existing installation, IDEs that were previously
configured but unchecked in the new selection are now detected and
cleaned up after user confirmation, mirroring the existing module
removal flow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 07:47:21 +01:00
Brian Madison c563cef0c2 refactor: replace module installer scripts with declarative directories config
Removes the security-risky _module-installer pattern (code execution at
install time) in favor of a declarative `directories` key in module.yaml.
The main installer now handles directory creation centrally based on this
config, eliminating per-module installer.js scripts and their CJS/ESM issues.

Changes:
- Delete src/bmm/_module-installer/installer.js
- Delete src/core/_module-installer/installer.js
- Add `directories` key to src/bmm/module.yaml
- Rename runModuleInstaller() -> createModuleDirectories()
- Remove _module-installer from ESLint overrides
- Remove _module-installer from file-ref validator skip dirs
2026-02-08 19:21:48 -06:00
Davor Racic 90ea3cbed7
Minor installer fixes (#1590)
* fix: remove redundant "None" skip option from module selection

The "None - Skip module installation" option was unnecessary since
core is always locked/selected, satisfying the required constraint.
Users can simply press Enter with only core selected to skip modules.
Also removes dead code: selectModules(), getExternalModuleChoices(),
and selectExternalModules() methods that were never called.

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

* fix: support ESM and .cjs module installers in ModuleManager

Module installer loading now handles three cases:
- .cjs files loaded via require() (always CommonJS regardless of package type)
- .js files loaded via dynamic import() (works for both CJS and ESM)
- CJS default export unwrapped automatically for consistent API

This fixes errors when external modules set "type":"module" in their
package.json. Those modules must still rename installer.js to
installer.cjs if it uses require() internally.

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

* fix: address code review findings from PR #1590

- Filter 'core' from CLI --modules in update path for consistency
- Update selectAllModules() JSDoc to reflect core exclusion
- Fix ESM default-export unwrap to handle function/class exports

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

* fix: clarify module post-install script errors as non-fatal warnings

Change error display from log.error to log.warn and explain that the
module was installed successfully — only the optional post-install
script could not run. Prevents users from thinking the module
installation itself failed.

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

* fix: suppress non-fatal module post-install script errors

Post-install scripts fail due to CJS/ESM incompatibility but module
files are already copied successfully. Silently catch the error instead
of showing a warning that alarms users into thinking installation failed.

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

* fix: remove redundant modules and tools lines from install summary

The checkmark list already shows each installed module and IDE tool.
Keep only the install path and file-warning lines in the summary footer.

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-08 15:41:51 -06:00
Alex Verkhovsky fc5ef57a5a
feat: add Kiro IDE support via config-driven installer (#1589)
Replace broken kiro-cli.js custom installer with config-driven approach
using platform-codes.yaml. Creates Kiro-specific templates with
inclusion: manual frontmatter and #[[file:...]] reference syntax.
2026-02-08 09:18:28 -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
Vladimir Hrusovsky 22601f8198
feat: add non-interactive installation support (#1520)
* feat: add non-interactive installation support

Add command-line flags to support non-interactive installation for CI/CD
pipelines and automated deployments:

- --directory: Installation directory
- --modules: Comma-separated module IDs
- --tools: Tool/IDE IDs (use "none" to skip)
- --custom-content: Custom module paths
- --action: Action type for existing installations
- --user-name, --communication-language, --document-output-language, --output-folder: Core config
- -y, --yes: Accept all defaults

When flags are provided, prompts are skipped. Missing values gracefully
fall back to interactive prompts.

* fix: complete non-interactive installation support

- Fix validation checks using truthy instead of !== true
- Add skipPrompts flag to skip module config prompts with --yes
- Add getDefaultModules() for automatic module selection with --yes
- Fix IDE selection to use array check instead of length check

Co-Authored-By: AiderDesk <https://github.com/hotovo/aider-desk>

---------

Co-authored-by: Brian <bmadcode@gmail.com>
2026-02-05 19:13:11 -06:00
Davor Racic 2d9ebcaf2f
feat: Update @clack/prompts to v1.0.0 and Add autocompleteMultiselect prompt (#1514)
* feat: Update @clack/prompts to v1.0.0 and Add autocompleteMultiselect prompt

* fix(cli): flexible tool selection (skip recommended or additional) + fix spacing

* feat(cli): improve tool selection UX with autocomplete and upgrade path

* feat(cli): display selected tools after IDE selection with preferred markers

* fix: formatting

* fix: make selection message more clear

* fix: formatting

* fix: Remove redundant colon

---------

Co-authored-by: Brian <bmadcode@gmail.com>
2026-02-03 17:39:05 -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
Brian Madison 6a282f86b4 allow updates from any beta, warn on alpha and v4 2026-01-26 17:33:02 -06: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 e7a34a2b61 installer updates 2026-01-25 03:56:40 -06:00
Brian Madison 9b9f43fcb9 fix: reorder mergeModuleHelpCatalogs after generateManifests
The mergeModuleHelpCatalogs function depends on agent-manifest.csv
being populated, but was being called before generateManifests.
This caused new modules' agent info to be empty in the help catalog.

Fixes issue where game-dev-studio workflows weren't appearing
in bmad-help.csv and IDE commands weren't being generated.
2026-01-22 00:39:00 -06:00
Brian Madison c9c3d31d3a add the phase four items to the workflow csv for bmm. compile all csv to a install file. improve the bmad-help to know how to work with the csv that contains the workflows from all installed modules 2026-01-21 20:47:43 -06:00
Brian Madison 7cd4926adb project-root stutter fix 2026-01-15 23:03:02 -06:00
Brian Madison b952d28fb3 Modify installation now will remove modules that get unselected, with an option to confirm the deletion 2026-01-15 22:20:56 -06:00
Brian Madison 577c1aa218 remove modules moved to new repos and update installer to support the remote module isntallation and updates. this is a temporary imlemtation machanism 2026-01-15 22:20:56 -06:00
Brian Madison 3360666c2a remove hard inclusion of AV from installer, to replace with module soon 2026-01-14 23:04:19 -06:00
Davor Racic 5cb5606ba3
fix(cli): replace inquirer with @clack/prompts for Windows compatibility (#1316)
* fix(cli): replace inquirer with @clack/prompts for Windows compatibility

- Add new prompts.js wrapper around @clack/prompts to fix Windows arrow
  key navigation issues (libuv #852)
- Fix validation logic in github-copilot.js that always returned true
- Add support for primitive choice values (string/number) in select/multiselect
- Add 'when' property support for conditional questions in prompt()
- Update all IDE installers to use new prompts module

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

* fix(cli): address code review feedback for prompts migration

- Move @clack/prompts from devDependencies to dependencies (critical)
- Remove unused inquirer dependency
- Fix potential crash in multiselect when initialValues is undefined
- Add async validator detection with explicit error message
- Extract validateCustomContentPathSync method in ui.js
- Extract promptInstallLocation methods in claude-code.js and antigravity.js
- Fix moduleId -> missing.id in installer.js remove flow
- Update multiselect to support native clack API (options/initialValues)

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

* chore: update comments to reference @clack/prompts instead of inquirer

- Update bmad-cli.js comment about CLI prompts
- Update config-collector.js JSDoc comments
- Rename inquirer variable to choiceUtils in ui.js
- Update JSDoc returns and calls documentation

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

* fix(cli): add spacing between prompts and installation progress

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

* fix(cli): add multiselect usage hints for inexperienced users

Add inline navigation hints to all multiselect prompts showing
(↑/↓ navigate, SPACE select, ENTER confirm) to help users
unfamiliar with terminal multiselect controls.

Also restore detailed warning when no tools are selected,
explaining that SPACE must be pressed to select items.

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

* feat(cli): restore IDE grouping using groupMultiselect

Replace flat multiselect with native @clack/prompts groupMultiselect
component to restore visual grouping of IDE/tool options:
- "Previously Configured" - pre-selected IDEs from existing install
- "Recommended Tools" - starred preferred options
- "Additional Tools" - other available options

This restores the grouped UX that was lost during the Inquirer.js
to @clack/prompts migration.

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

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 16:25:35 -06:00
Q00 d19cca79d2
fix: resolve ERR_REQUIRE_ESM by using dynamic import for inquirer (#1278)
Inquirer v9+ is ESM-only, causing ERR_REQUIRE_ESM when loaded via
require() in CommonJS. Convert all require('inquirer') calls to
dynamic import('inquirer') across 8 CLI files.

Fixes #1197
2026-01-08 15:42:22 +08:00
Brian Madison 2a8a4388a9 v4 detection cleanup 2025-12-27 20:31:12 +08:00
Brian Madison 7b5b7afdc0 update package.json to resolve windows installer issue with inquirer version 2025-12-26 18:05:59 +08:00
Alex Verkhovsky 19df17b261
feat: add documentation website with Docusaurus build pipeline (#1177)
* feat: add documentation website with Docusaurus build pipeline

* feat(docs): add AI discovery meta tags for llms.txt files

- Add global headTags with ai-terms, llms, llms-full meta tags
- Update landing page link to clarify AI context purpose

* fix(docs): restore accidentally deleted faq.md and glossary.md

Files were removed in 12dd97fe during path restructuring.

* fix(docs): update broken project-readme links to GitHub URL

* feat(schema): add compound trigger format validation
2025-12-23 23:01:36 +08:00
Brian Madison 021936eaa9 update inquirer to v9.x for better windows support 2025-12-22 18:18:16 +08:00
Brian Madison da21790531 quickinstall duplicate success message removed 2025-12-22 14:17:32 +08:00
Brian Madison 34cfdddd3a refac tools part 1 2025-12-22 13:12:25 +08:00
Brian Madison 1e721f7fd0 consolidate and remove some duplication 2025-12-22 10:13:56 +08:00
Brian Madison 23f650ff4d fixed _bmad folder stutter with agent custom files 2025-12-18 03:22:46 +08:00
Brian Madison f36369512b fixed issue with agent customization application, now all fields are customized form the custom yaml. also added a recompile agents menu item 2025-12-17 17:58:37 +08:00
Brian Madison 32615afaf9 memory location is non configurable _bmad/_memory for sidecar content 2025-12-16 15:43:38 +08:00
Brian Madison 59e4cc7b82 minor code cleanup 2025-12-16 13:09:20 +08:00
Brian Madison 2c4c2d9717 reduce installer log output 2025-12-15 23:53:26 +08:00
Brian Madison 901b39de9a fixed duplicate entry in files manfest issue 2025-12-15 20:47:21 +08:00
Brian Madison 4d8d1f84f7 quick update works and retains custom content also 2025-12-15 19:54:40 +08:00
Brian Madison 48795d46de core and custom modules all install through the same flow now 2025-12-15 19:16:03 +08:00
Brian Madison bbda7171bd quick update output modified 2025-12-15 17:30:12 +08:00
Brian Madison 08f05cf9a4 update menu updated 2025-12-15 16:25:01 +08:00
Brian Madison c7827bf031 less verbose final output during install 2025-12-15 15:55:28 +08:00
Brian Madison 60238d2854 default accepted for installer quesitons 2025-12-15 12:55:57 +08:00
Brian Madison 6513c77d1b single install panel, no clearing disjointed between modules 2025-12-15 11:54:37 +08:00
Brian Madison d4eccf07cf reorganize order of questions to make more logical sense 2025-12-15 10:59:15 +08:00
Brian Madison 1da7705821 folder workflow naming alignment for consistency 2025-12-15 10:17:58 +08:00
Brian Madison 7f742d4af6 custom modules install after any non custom modules selected and after the core, manifest tracks custom modules separately to ensure always installed from the custom cache 2025-12-15 09:14:16 +08:00
Brian Madison 4c65f3a006 quick install fixed 2025-12-13 23:45:47 +08:00
Brian Madison cba7cf223f standardize custom agent workflow and module output, and improve module folder selection 2025-12-13 22:59:58 +08:00
Brian Madison add789a408 remove unused code 2025-12-13 19:53:03 +08:00
Brian Madison ae9851acab _cfg -> _config 2025-12-13 19:41:09 +08:00
Brian Madison ac5fa5c23f agent customization now gets allied on quick update and compile agents 2025-12-13 19:23:02 +08:00
Brian Madison 8642553bd7 we only need one yaml lib 2025-12-13 18:35:07 +08:00