Skip to content

feat(installer): add BMad Automator module#2345

Open
bma-d wants to merge 3 commits intobmad-code-org:mainfrom
bma-d:bma-d/add-automator
Open

feat(installer): add BMad Automator module#2345
bma-d wants to merge 3 commits intobmad-code-org:mainfrom
bma-d:bma-d/add-automator

Conversation

@bma-d
Copy link
Copy Markdown

@bma-d bma-d commented Apr 28, 2026

What

Adds BMad Automator as an experimental installer module backed by the bmad-code-org/bmad-automator source repo. The Automator payload is kept as pure skills, with Claude Code as the only runnable entrypoint.

Why

This lets users install the Automator from the BMAD installer while keeping the Automator source maintained upstream. The installer also makes the current constraints explicit: Claude Code entrypoint only, Claude Code/Codex workers, and tmux on macOS.

How

  • Registers bma in the bundled registry fallback with source-root, target, worker, and requirement metadata; fallback entries supplement the remote official registry when missing.
  • Resolves source-root external modules, filters skill installation by supported IDE, and shows selected-module notes/warnings during install.
  • Adds skill-only module handling for manifest generation plus docs and installer tests for Claude Code install / Codex skip behavior.

Testing

Ran npm test, npm run docs:validate-links, and npm run docs:build. Also smoke-tested node tools/installer/bmad-cli.js install --modules bma --tools claude-code --yes and the Codex skip path with --tools codex --yes.

@bma-d bma-d requested review from bmadcode and pbean April 28, 2026 03:01
@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented Apr 28, 2026

🤖 Augment PR Summary

Summary: Adds an experimental “BMad Automator” installer module (bma) backed by the upstream bmad-code-org/bmad-automator repo as a pure skill bundle.

Changes:

  • Documented the new bma module in install docs and the module reference.
  • Extended the bundled registry fallback to include Automator metadata (source-root, install targets, notes, requirements).
  • Enhanced ExternalModuleManager to support source-root modules and to supplement remote registry listings with bundled fallback entries.
  • Added IDE install filtering so skills from modules with install-targets are skipped for unsupported IDEs (with a summary warning).
  • Updated manifest/config generation to tolerate “skill-only” modules that ship no module.yaml.
  • Installer UI now surfaces per-module install notes and warns if selected modules won’t install runnable skills for the chosen IDEs.
  • Added an installer test covering Claude Code install vs Codex skip behavior for Automator skills.

Technical Notes: Automator is currently Claude Code–only for runnable skill installation and is marked experimental throughout the registry + UI messaging.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread tools/installer/core/manifest-generator.js
Comment thread test/test-installation-components.js Outdated
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

📝 Walkthrough

Walkthrough

Adds an experimental "BMad Automator" (bma) as a skill-only external module and extends the installer to: normalize new external-module metadata (sourceRoot, installTargets, workerTargets, requirements, installNote), detect/skip skill-only modules in manifest generation, conditionally skip skills by IDE target, and surface install-target/notes warnings in the UI.

Changes

Cohort / File(s) Summary
Documentation
docs/how-to/install-bmad.md, docs/reference/modules.md, tools/installer/README.md
Documented bma module, noted Claude Code-only runtime constraints and macOS tmux requirement, and updated registry/fallback guidance and experimental module metadata patterns.
External Module Registry & Normalization
tools/installer/modules/external-manager.js, tools/installer/modules/registry-fallback.yaml
Added bmad-automator fallback entry (code: bma, sourceRoot, install-targets, worker-targets, requirements, installNote) and normalization that reads sourceRoot, installTargets, workerTargets, requirements, installNote and merges fallback modules when remote registry lacks codes.
Installer UI & Selection Warnings
tools/installer/ui.js
New UI helpers to print module installNote after selection and warn when selected IDE/tools do not satisfy a module's installTargets.
Manifest Generation (skill-only handling)
tools/installer/core/manifest-generator.js
Added detection of "skill-only" modules (sourceRoot + SKILL.md, no module.yaml) and short-circuited collection/config emission to avoid legacy warnings and agent/default processing.
IDE Installer: per-skill targeting
tools/installer/ide/_config-driven.js
Added shouldInstallSkillRecord using ExternalModuleManager to resolve per-module installTargets, skip unsupported skills during installation, increment skippedUnsupported, and report skipped counts in results/summary.
Tests
test/test-installation-components.js
New integration tests and fixtures validating bma registration metadata (experimental/type, sourceRoot, install-targets), normalization behavior, safe sourceRoot resolution, Claude Code vs Codex install behavior, and cleanup of temp directories.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant UI
    participant ExternalModuleManager
    participant ManifestGenerator
    participant IDEInstaller
    participant FileSystem

    User->>UI: select modules & IDEs
    UI->>ExternalModuleManager: fetch selected module metadata
    ExternalModuleManager-->>UI: return normalized metadata (installTargets, sourceRoot, installNote)
    UI-->>User: show installNotes / warn if no compatible IDE
    UI->>ManifestGenerator: proceed to build manifest with selected modules
    ManifestGenerator->>ExternalModuleManager: query listAvailable() for source-root codes
    ExternalModuleManager-->>ManifestGenerator: provide sourceRoot set
    ManifestGenerator->>FileSystem: detect skill-only modules (sourceRoot + SKILL.md)
    ManifestGenerator-->>IDEInstaller: emit manifest excluding skipped skill-only agents
    IDEInstaller->>ExternalModuleManager: resolve per-skill installTargets via shouldInstallSkillRecord
    IDEInstaller->>FileSystem: install supported skills to target directories (.claude/skills, etc.)
    IDEInstaller-->>UI: return results (installed, skippedUnsupported counts)
    UI-->>User: display final summary and warnings
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding BMad Automator as a new module to the installer system.
Description check ✅ Passed The description is well-structured and directly related to the changeset, covering what was added, why it matters, and how it was implemented.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/how-to/install-bmad.md (1)

34-64: ⚠️ Potential issue | 🟡 Minor

Document bma's runtime constraints in this install flow.

This page now presents bma as a normal selectable external module, but it still doesn't tell readers here that the module is only runnable via the Claude Code entrypoint, that Codex is worker-only, or that macOS needs tmux. Add that note near the module-picker/channel sections so the new installer warnings are discoverable before users run the install.

As per coding guidelines, "Preserve the Claude Code-only constraints guidance in the install narrative where relevant (tmux requirement on macOS; Claude Code entrypoint only), and ensure any “notes/warnings during install” behavior is discoverable from the docs."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/how-to/install-bmad.md` around lines 34 - 64, The docs fail to surface
bma's runtime constraints in the installer narrative; add a concise notice near
the module-picker/channel section (the list that mentions external modules: bmb,
cis, gds, tea, bma) stating that bma is only runnable via the Claude Code
entrypoint, Codex is worker-only, and macOS requires tmux to run worker
sessions; preserve the existing install flow language (channels:
stable/next/pinned) and add this as a visible "Note/Warning" paragraph or
callout so users see these constraints before running the installer.
🧹 Nitpick comments (1)
test/test-installation-components.js (1)

112-119: Consider adding workflow.md files in the automator fixture for realism.

The fixture currently creates only SKILL.md. Adding workflow.md would better mirror production skill directories and catch copy-regression classes earlier.

Suggested fixture refinement
   for (const skillName of ['bmad-story-automator', 'bmad-story-automator-review']) {
     const skillDir = path.join(fixtureDir, 'bma', skillName);
     await fs.ensureDir(skillDir);
     await fs.writeFile(
       path.join(skillDir, 'SKILL.md'),
       ['---', `name: ${skillName}`, 'description: Automator skill', '---', '', 'Automator body.'].join('\n'),
     );
+    await fs.writeFile(
+      path.join(skillDir, 'workflow.md'),
+      `# ${skillName}\n\nAutomator workflow body.\n`,
+    );
   }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/test-installation-components.js` around lines 112 - 119, In the loop
that creates automator fixtures (iterating over skillName and writing SKILL.md
into skillDir), also create a workflow.md file for each automator skill to
better mirror production directories; update the code that uses
skillDir/skillName to call fs.writeFile for path.join(skillDir, 'workflow.md')
with a minimal workflow frontmatter and body (e.g., name, description, steps or
a dummy workflow) so tests exercise workflow-related logic and catch
copy/regression issues earlier.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@test/test-installation-components.js`:
- Around line 2845-2848: The test only asserts that Codex skips
'bmad-story-automator' but misses asserting the second automator
'bmad-story-automator-review'; add a negative assertion mirroring the existing
one using tempProjectDir42, fs.pathExists and path.join to check that
path.join(tempProjectDir42, '.agents', 'skills', 'bmad-story-automator-review',
'SKILL.md') does NOT exist and use a clear message like 'Codex setup skips
Claude Code-only automator review skill' so the suite detects partial filtering
regressions.

In `@tools/installer/modules/external-manager.js`:
- Around line 127-137: When normalizing module metadata in external-manager.js,
coerce installTargets, workerTargets, and requirements into arrays and drop
invalid shapes: replace the current passthroughs for installTargets,
workerTargets, and requirements with logic that if the parsed value is an array
keep it, if it's a scalar (string/number/boolean) wrap it in a single-element
array, and for null/undefined or non-scalar non-array values return an empty
array; update the object fields installTargets, workerTargets, and requirements
accordingly so downstream code (e.g., UI code calling .some()) never receives a
non-array shape.
- Around line 515-521: The current logic builds sourceRoot with
path.join(cloneDir, moduleInfo.sourceRoot) which allows "../" escapes; change it
to resolve the absolute path (e.g. path.resolve(cloneDir,
moduleInfo.sourceRoot)) and verify it is contained inside the cloneDir (e.g.
compare path.relative(cloneDir, resolvedSourceRoot) does not start with '..' or
ensure resolvedSourceRoot.startsWith(path.resolve(cloneDir) + path.sep)); if the
check fails throw an Error similar to the existing one; update the code paths
around sourceRoot, cloneDir, and moduleInfo.sourceRoot to use the
resolved+validated path before returning.

---

Outside diff comments:
In `@docs/how-to/install-bmad.md`:
- Around line 34-64: The docs fail to surface bma's runtime constraints in the
installer narrative; add a concise notice near the module-picker/channel section
(the list that mentions external modules: bmb, cis, gds, tea, bma) stating that
bma is only runnable via the Claude Code entrypoint, Codex is worker-only, and
macOS requires tmux to run worker sessions; preserve the existing install flow
language (channels: stable/next/pinned) and add this as a visible "Note/Warning"
paragraph or callout so users see these constraints before running the
installer.

---

Nitpick comments:
In `@test/test-installation-components.js`:
- Around line 112-119: In the loop that creates automator fixtures (iterating
over skillName and writing SKILL.md into skillDir), also create a workflow.md
file for each automator skill to better mirror production directories; update
the code that uses skillDir/skillName to call fs.writeFile for
path.join(skillDir, 'workflow.md') with a minimal workflow frontmatter and body
(e.g., name, description, steps or a dummy workflow) so tests exercise
workflow-related logic and catch copy/regression issues earlier.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 63e8b5b1-6b81-44bc-8fb8-82a5f40cd667

📥 Commits

Reviewing files that changed from the base of the PR and between 3e89b30 and adcffe6.

📒 Files selected for processing (9)
  • docs/how-to/install-bmad.md
  • docs/reference/modules.md
  • test/test-installation-components.js
  • tools/installer/README.md
  • tools/installer/core/manifest-generator.js
  • tools/installer/ide/_config-driven.js
  • tools/installer/modules/external-manager.js
  • tools/installer/modules/registry-fallback.yaml
  • tools/installer/ui.js

Comment thread test/test-installation-components.js
Comment thread tools/installer/modules/external-manager.js
Comment thread tools/installer/modules/external-manager.js
@bma-d bma-d force-pushed the bma-d/add-automator branch from 2f328b3 to 6b60599 Compare April 29, 2026 04:29
@bma-d
Copy link
Copy Markdown
Author

bma-d commented Apr 29, 2026

@coderabbitai review
@augmentcode review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

Tip

For best results, initiate chat on the files or code changes.

@bma-d, it looks like you tagged me but didn't include a specific request. How can I help you with PR #2345? For example, I can:

  • Review the changes – trigger a full or focused code review
  • Answer questions – about the implementation, design decisions, or anything else in the PR
  • Generate tests – add or expand test coverage for new functionality
  • Create a follow-up issue – track deferred items or known limitations
  • Summarize the PR – regenerate or refine the AI-generated summary

Just let me know what you need! 🐰


🧠 Learnings used
Learnt from: alexeyv
Repo: bmad-code-org/BMAD-METHOD PR: 2129
File: tools/installer/core/installer.js:40-45
Timestamp: 2026-03-27T12:47:58.429Z
Learning: In `tools/installer/core/installer.js` (BMAD-METHOD), `OfficialModules.build()` is called before `this.customModules.discoverPaths()` populates the custom module path map. This ordering gap has no practical impact because all real call paths (UI-driven installs) pre-collect module configs before `install()` is invoked; the headless/prompt-free code path that would be affected is not currently exercised in production. Do not flag this ordering as a bug in future reviews.

Learnt from: alexeyv
Repo: bmad-code-org/BMAD-METHOD PR: 1701
File: tools/cli/installers/lib/ide/rovodev.js:52-73
Timestamp: 2026-02-19T20:48:09.301Z
Learning: In the BMAD installer (tools/cli/installers/lib/ide/), workflows and tasks are cross-cutting methodology artifacts that should always be installed globally, regardless of which modules are selected. Only agents are module-scoped and should be filtered by selectedModules. This asymmetry in passing selectedModules to collectors is intentional design.

Learnt from: alexeyv
Repo: bmad-code-org/BMAD-METHOD PR: 1915
File: test/test-installation-components.js:1827-1867
Timestamp: 2026-03-12T14:18:49.462Z
Learning: In BMAD-METHOD (`tools/cli/installers/lib/core/installer.js`), `renderInstallSummary` has no IDE-dependent branching. The `ides` context field is passed but not consumed in a way that creates a separate no-IDE code path. There is no distinct `_bmad`-only summary branch in `renderInstallSummary` that warrants isolated automated test coverage. Reviewers must not flag the absence of a dedicated no-IDE summary test as a gap in test coverage for this function.

Learnt from: alexeyv
Repo: bmad-code-org/BMAD-METHOD PR: 2129
File: tools/installer/modules/custom-modules.js:92-98
Timestamp: 2026-03-27T12:48:05.460Z
Learning: In BMAD-METHOD `tools/installer/modules/custom-modules.js`, the hardcoded forward-slash separators used in `_copyWithFiltering()` for filtering `sub-modules/` paths and `-sidecar` directory segments (lines ~92-98) are a known, pre-existing Windows path-separator limitation. This has been explicitly deferred as a follow-up item. Reviewers must not re-flag this as a new issue in future PRs.

Learnt from: alexeyv
Repo: bmad-code-org/BMAD-METHOD PR: 2129
File: tools/installer/core/installer.js:1683-1685
Timestamp: 2026-03-27T12:48:03.246Z
Learning: In BMAD-METHOD (`tools/installer/core/installer.js`), `findBmadDir()` intentionally hardcodes `BMAD_FOLDER_NAME` (`_bmad`) as the BMAD installation directory. The old installer on `main` had identical hardcoded `_bmad` lookup. No renamed-folder detection ever existed in the codebase, so flagging `findBmadDir`'s hardcoded lookup as a regression is a false positive. Do not raise this as an issue in future reviews.

Learnt from: alexeyv
Repo: bmad-code-org/BMAD-METHOD PR: 1851
File: tools/cli/installers/lib/ide/_config-driven.js:688-700
Timestamp: 2026-03-08T08:10:35.406Z
Learning: In BMAD-METHOD, source skill directories (those collected by the `type: skill` manifest pipeline) never contain a `SKILL.md` file. Therefore, in `installVerbatimSkills` (`tools/cli/installers/lib/ide/_config-driven.js`), writing the generated SKILL.md before calling `fs.copy()` for the directory contents is safe — there is no risk of a source `SKILL.md` overwriting the generated YAML-safe one. Reviewers should not flag this write-before-copy ordering as a bug.

Learnt from: n-zhi
Repo: bmad-code-org/BMAD-METHOD PR: 1817
File: tools/cli/installers/lib/ide/templates/combined/antigravity-agent.md:8-8
Timestamp: 2026-03-05T00:13:22.715Z
Learning: In BMAD-METHOD, antigravity templates under `tools/cli/installers/lib/ide/templates/combined/` (e.g., `antigravity-agent.md`, `antigravity-workflow.md`, etc.) were derived from corresponding `default-*.md` templates. The hardcoded `_bmad` folder path in LOAD instructions (instead of `{{bmadFolderName}}`) is a pre-existing systematic issue inherited from those source templates and is intentionally deferred to a dedicated PR for a consistent, holistic fix across all affected templates.

Learnt from: alexeyv
Repo: bmad-code-org/BMAD-METHOD PR: 1896
File: src/core/tasks/bmad-shard-doc/workflow.md:35-35
Timestamp: 2026-03-11T21:28:54.206Z
Learning: In BMAD-METHOD, the unpinned `npx kayvan/markdown-tree-parser` invocation (no explicit version) in `src/core/tasks/bmad-shard-doc/workflow.md` (Step 3) is carried over verbatim from the original `src/core/tasks/shard-doc.xml`. PR `#1896` is a pure format conversion (XML task → native skill directory), not a behavior change. Reviewers must not flag the missing version pin in this file during format-conversion PRs; pinning (e.g., to `kayvan/markdown-tree-parser1.6.1`) should be addressed in a dedicated behavioral follow-up PR.

Learnt from: alexeyv
Repo: bmad-code-org/BMAD-METHOD PR: 1851
File: tools/cli/installers/lib/ide/_config-driven.js:705-714
Timestamp: 2026-03-08T08:10:32.911Z
Learning: In BMAD-METHOD (tools/cli/installers/lib/ide/_config-driven.js), no production platform configuration currently uses the `targets` array (multi-target installation path). The `installToMultipleTargets` code path is effectively unreachable for all real platforms, so concerns about multi-target interactions with `installVerbatimSkills` (e.g., source-dir deletion via install_to_bmad=false affecting a second target) are moot. Do not flag multi-target scenarios for this file as blocking issues.

Learnt from: alexeyv
Repo: bmad-code-org/BMAD-METHOD PR: 1850
File: docs/how-to/install-bmad.md:81-81
Timestamp: 2026-03-07T23:10:42.989Z
Learning: In BMAD-METHOD, `bmad-persona` is a valid installed skill artifact and is part of the standard install output. It should appear in install directory structure examples (e.g., in `docs/how-to/install-bmad.md`) and should not be flagged as undocumented or missing from the skills reference.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

@bma-d, sure! Kicking off a full review of PR #2345 now. 🐰


🧠 Learnings used
Learnt from: alexeyv
Repo: bmad-code-org/BMAD-METHOD PR: 1970
File: AGENTS.md:8-9
Timestamp: 2026-03-14T06:22:13.840Z
Learning: In BMAD-METHOD, `AGENTS.md` at the repo root is targeted at AI coding agents, not human contributors. The maintainer (alexeyv) expects capable agents to self-recover from environment issues (e.g., wrong Node.js version) by reading `package.json` / `.nvmrc` directly. Do not flag missing explicit prerequisite versions (e.g., Node >= 20.0.0) in `AGENTS.md` as review issues.

Learnt from: alexeyv
Repo: bmad-code-org/BMAD-METHOD PR: 1851
File: tools/cli/installers/lib/ide/_config-driven.js:688-700
Timestamp: 2026-03-08T08:10:35.406Z
Learning: In BMAD-METHOD, source skill directories (those collected by the `type: skill` manifest pipeline) never contain a `SKILL.md` file. Therefore, in `installVerbatimSkills` (`tools/cli/installers/lib/ide/_config-driven.js`), writing the generated SKILL.md before calling `fs.copy()` for the directory contents is safe — there is no risk of a source `SKILL.md` overwriting the generated YAML-safe one. Reviewers should not flag this write-before-copy ordering as a bug.

Learnt from: alexeyv
Repo: bmad-code-org/BMAD-METHOD PR: 1878
File: src/core/tasks/bmad-index-docs/SKILL.md:3-3
Timestamp: 2026-03-11T15:36:32.294Z
Learning: In BMAD-METHOD, the SKILL.md description for `bmad-index-docs` (src/core/tasks/bmad-index-docs/SKILL.md) — including the phrase "all docs in the folder" and the absence of a clarifying-question instruction when no folder is specified — is carried over verbatim from the original `src/core/tasks/index-docs.xml`. PR `#1878` is a faithful format conversion (XML task → native skill directory), not a behavior change. Reviewers must not flag these as regressions introduced by the conversion; any behavioral corrections should be addressed in a dedicated follow-up PR.

Learnt from: alexeyv
Repo: bmad-code-org/BMAD-METHOD PR: 1896
File: src/core/tasks/bmad-shard-doc/workflow.md:73-86
Timestamp: 2026-03-11T21:28:59.373Z
Learning: In BMAD-METHOD, the missing HALT/error-handling paths in the "Handle Original Document" step of src/core/tasks/bmad-shard-doc/workflow.md (delete and move branches, lines ~73-86) — specifically the absence of failure checks after the delete, mkdir, and move operations before printing confirmation messages — are pre-existing behavior carried over verbatim from the original src/core/tasks/shard-doc.xml. PR `#1896` is a pure format conversion (XML task → native skill directory) with no behavioral changes. Reviewers must not flag these missing error paths as regressions introduced by the conversion; any behavioral improvements (e.g., adding HALT on failure for filesystem ops) should be addressed in a dedicated follow-up PR.

Learnt from: alexeyv
Repo: bmad-code-org/BMAD-METHOD PR: 1871
File: src/core/tasks/bmad-review-edge-case-hunter/workflow.md:0-0
Timestamp: 2026-03-09T14:20:00.961Z
Learning: In BMAD-METHOD, the YAML frontmatter requirement for `workflow.md` files (enforced by `getWorkflowsFromPath()` in `tools/cli/installers/lib/core/manifest-generator.js`) applies only to standalone workflow directories, NOT to `workflow.md` files inside skill directories. Skill directories are discovered by `collectSkills()` via `SKILL.md` + `bmad-skill-manifest.yaml` before `getWorkflowsFromPath()` runs, so the frontmatter guard never fires for skill-type `workflow.md` files. Reviewers must not flag missing YAML frontmatter in `workflow.md` files that reside inside skill directories (i.e., directories containing `SKILL.md` and `bmad-skill-manifest.yaml`).

Learnt from: alexeyv
Repo: bmad-code-org/BMAD-METHOD PR: 1878
File: src/core/tasks/bmad-index-docs/SKILL.md:6-6
Timestamp: 2026-03-11T15:36:30.965Z
Learning: In BMAD-METHOD, SKILL.md body files produced by converting legacy XML tasks (e.g., index-docs.xml → src/core/tasks/bmad-index-docs/SKILL.md) intentionally mirror the thin structure of the original XML (task description + delegation to workflow.md). Reviewers must not flag the absence of inline preconditions (e.g., target folder specification) in SKILL.md bodies during XML-to-native-skill conversion PRs; such enhancements are out of scope and belong in dedicated behavioral follow-up PRs.

Learnt from: alexeyv
Repo: bmad-code-org/BMAD-METHOD PR: 2129
File: tools/installer/core/installer.js:40-45
Timestamp: 2026-03-27T12:47:58.429Z
Learning: In `tools/installer/core/installer.js` (BMAD-METHOD), `OfficialModules.build()` is called before `this.customModules.discoverPaths()` populates the custom module path map. This ordering gap has no practical impact because all real call paths (UI-driven installs) pre-collect module configs before `install()` is invoked; the headless/prompt-free code path that would be affected is not currently exercised in production. Do not flag this ordering as a bug in future reviews.

Learnt from: alexeyv
Repo: bmad-code-org/BMAD-METHOD PR: 1933
File: src/bmm/workflows/1-analysis/bmad-create-product-brief/SKILL.md:3-3
Timestamp: 2026-03-13T15:14:20.501Z
Learning: In BMAD-METHOD, grammar nitpicks (missing articles, contraction typos like "lets" vs "let's") and minor wording inconsistencies (e.g., "product brief" vs "project brief") in SKILL.md `description` fields are considered noise by the maintainer. Do not flag these minor text issues in SKILL.md description strings during PR reviews for this repository.

Learnt from: alexeyv
Repo: bmad-code-org/BMAD-METHOD PR: 1896
File: src/core/tasks/bmad-shard-doc/workflow.md:35-35
Timestamp: 2026-03-11T21:28:54.206Z
Learning: In BMAD-METHOD, the unpinned `npx kayvan/markdown-tree-parser` invocation (no explicit version) in `src/core/tasks/bmad-shard-doc/workflow.md` (Step 3) is carried over verbatim from the original `src/core/tasks/shard-doc.xml`. PR `#1896` is a pure format conversion (XML task → native skill directory), not a behavior change. Reviewers must not flag the missing version pin in this file during format-conversion PRs; pinning (e.g., to `kayvan/markdown-tree-parser1.6.1`) should be addressed in a dedicated behavioral follow-up PR.

Learnt from: alexeyv
Repo: bmad-code-org/BMAD-METHOD PR: 2129
File: tools/installer/core/installer.js:1683-1685
Timestamp: 2026-03-27T12:48:03.246Z
Learning: In BMAD-METHOD (`tools/installer/core/installer.js`), `findBmadDir()` intentionally hardcodes `BMAD_FOLDER_NAME` (`_bmad`) as the BMAD installation directory. The old installer on `main` had identical hardcoded `_bmad` lookup. No renamed-folder detection ever existed in the codebase, so flagging `findBmadDir`'s hardcoded lookup as a regression is a false positive. Do not raise this as an issue in future reviews.

Learnt from: alexeyv
Repo: bmad-code-org/BMAD-METHOD PR: 1701
File: tools/cli/installers/lib/ide/rovodev.js:52-73
Timestamp: 2026-02-19T20:48:09.301Z
Learning: In the BMAD installer (tools/cli/installers/lib/ide/), workflows and tasks are cross-cutting methodology artifacts that should always be installed globally, regardless of which modules are selected. Only agents are module-scoped and should be filtered by selectedModules. This asymmetry in passing selectedModules to collectors is intentional design.

Learnt from: alexeyv
Repo: bmad-code-org/BMAD-METHOD PR: 1915
File: test/test-installation-components.js:1827-1867
Timestamp: 2026-03-12T14:18:49.462Z
Learning: In BMAD-METHOD (`tools/cli/installers/lib/core/installer.js`), `renderInstallSummary` has no IDE-dependent branching. The `ides` context field is passed but not consumed in a way that creates a separate no-IDE code path. There is no distinct `_bmad`-only summary branch in `renderInstallSummary` that warrants isolated automated test coverage. Reviewers must not flag the absence of a dedicated no-IDE summary test as a gap in test coverage for this function.

Learnt from: alexeyv
Repo: bmad-code-org/BMAD-METHOD PR: 2129
File: tools/installer/modules/custom-modules.js:92-98
Timestamp: 2026-03-27T12:48:05.460Z
Learning: In BMAD-METHOD `tools/installer/modules/custom-modules.js`, the hardcoded forward-slash separators used in `_copyWithFiltering()` for filtering `sub-modules/` paths and `-sidecar` directory segments (lines ~92-98) are a known, pre-existing Windows path-separator limitation. This has been explicitly deferred as a follow-up item. Reviewers must not re-flag this as a new issue in future PRs.

Learnt from: n-zhi
Repo: bmad-code-org/BMAD-METHOD PR: 1817
File: tools/cli/installers/lib/ide/templates/combined/antigravity-agent.md:8-8
Timestamp: 2026-03-05T00:13:22.715Z
Learning: In BMAD-METHOD, antigravity templates under `tools/cli/installers/lib/ide/templates/combined/` (e.g., `antigravity-agent.md`, `antigravity-workflow.md`, etc.) were derived from corresponding `default-*.md` templates. The hardcoded `_bmad` folder path in LOAD instructions (instead of `{{bmadFolderName}}`) is a pre-existing systematic issue inherited from those source templates and is intentionally deferred to a dedicated PR for a consistent, holistic fix across all affected templates.

Learnt from: alexeyv
Repo: bmad-code-org/BMAD-METHOD PR: 1850
File: docs/how-to/install-bmad.md:81-81
Timestamp: 2026-03-07T23:10:42.989Z
Learning: In BMAD-METHOD, `bmad-persona` is a valid installed skill artifact and is part of the standard install output. It should appear in install directory structure examples (e.g., in `docs/how-to/install-bmad.md`) and should not be flagged as undocumented or missing from the skills reference.

Learnt from: alexeyv
Repo: bmad-code-org/BMAD-METHOD PR: 1851
File: tools/cli/installers/lib/ide/_config-driven.js:705-714
Timestamp: 2026-03-08T08:10:32.911Z
Learning: In BMAD-METHOD (tools/cli/installers/lib/ide/_config-driven.js), no production platform configuration currently uses the `targets` array (multi-target installation path). The `installToMultipleTargets` code path is effectively unreachable for all real platforms, so concerns about multi-target interactions with `installVerbatimSkills` (e.g., source-dir deletion via install_to_bmad=false affecting a second target) are moot. Do not flag multi-target scenarios for this file as blocking issues.
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@tools/installer/ide/_config-driven.js`:
- Around line 218-224: Wrap the call to
ExternalModuleManager.getModuleByCode(moduleName) in a try/catch so lookup
failures don't throw and abort the install; if an error occurs, log a warning
including moduleName and the error, set targets to null (fail-open so the
install proceeds on all targets), cache that null into this.moduleTargetCache
for moduleName, and continue to return the existing expression (!targets ||
targets.includes(this.name)); reference ExternalModuleManager, getModuleByCode,
moduleTargetCache, moduleName and this.name when making the change.

In `@tools/installer/ui.js`:
- Around line 961-965: The calls to ExternalModuleManager.listAvailable inside
showSelectedExternalModuleNotes (and similarly in showSelectedModuleIdeWarnings)
must be guarded so registry failures don’t abort the installer: wrap the
listAvailable() call in a try/catch, log a non-fatal warning/error if it throws,
and fall back to an empty array (or null-safe value) so the rest of the function
can continue; ensure you reference ExternalModuleManager and listAvailable in
the catch handling and do not rethrow or call process.exit.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e8c6824a-0d05-419e-b3f3-2b2f15ca7b1f

📥 Commits

Reviewing files that changed from the base of the PR and between adcffe6 and 6b60599.

📒 Files selected for processing (9)
  • docs/how-to/install-bmad.md
  • docs/reference/modules.md
  • test/test-installation-components.js
  • tools/installer/README.md
  • tools/installer/core/manifest-generator.js
  • tools/installer/ide/_config-driven.js
  • tools/installer/modules/external-manager.js
  • tools/installer/modules/registry-fallback.yaml
  • tools/installer/ui.js
✅ Files skipped from review due to trivial changes (2)
  • docs/reference/modules.md
  • tools/installer/modules/registry-fallback.yaml
🚧 Files skipped from review as they are similar to previous changes (4)
  • docs/how-to/install-bmad.md
  • tools/installer/README.md
  • tools/installer/core/manifest-generator.js
  • tools/installer/modules/external-manager.js

Comment on lines +218 to +224
const { ExternalModuleManager } = require('../modules/external-manager');
this.externalModuleManager = this.externalModuleManager || new ExternalModuleManager();
const moduleInfo = await this.externalModuleManager.getModuleByCode(moduleName);
const targets = moduleInfo?.installTargets?.length ? moduleInfo.installTargets : null;
this.moduleTargetCache.set(moduleName, targets);

return !targets || targets.includes(this.name);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Guard module metadata lookup failures to avoid hard install aborts.

getModuleByCode() is unguarded here; if it throws (registry/file read/transient failure), the whole IDE install can fail mid-run. In tooling code, this path should handle lookup failure explicitly (e.g., warn and fail-open/fail-closed consistently) instead of crashing the install flow.

Suggested hardening
   const { ExternalModuleManager } = require('../modules/external-manager');
   this.externalModuleManager = this.externalModuleManager || new ExternalModuleManager();
-  const moduleInfo = await this.externalModuleManager.getModuleByCode(moduleName);
+  let moduleInfo = null;
+  try {
+    moduleInfo = await this.externalModuleManager.getModuleByCode(moduleName);
+  } catch {
+    // Metadata lookup is advisory for filtering; avoid aborting entire install.
+    this.moduleTargetCache.set(moduleName, null);
+    return true;
+  }
   const targets = moduleInfo?.installTargets?.length ? moduleInfo.installTargets : null;
   this.moduleTargetCache.set(moduleName, targets);

As per coding guidelines tools/**: Build script/tooling. Check error handling and proper exit codes.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tools/installer/ide/_config-driven.js` around lines 218 - 224, Wrap the call
to ExternalModuleManager.getModuleByCode(moduleName) in a try/catch so lookup
failures don't throw and abort the install; if an error occurs, log a warning
including moduleName and the error, set targets to null (fail-open so the
install proceeds on all targets), cache that null into this.moduleTargetCache
for moduleName, and continue to return the existing expression (!targets ||
targets.includes(this.name)); reference ExternalModuleManager, getModuleByCode,
moduleTargetCache, moduleName and this.name when making the change.

Comment thread tools/installer/ui.js
Comment on lines +961 to +965
async showSelectedExternalModuleNotes(selectedModuleIds, externalModules = null) {
if (!externalModules) {
const externalManager = new ExternalModuleManager();
externalModules = await externalManager.listAvailable();
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Guard advisory external-module lookups so they can’t fail the install flow.

showSelectedExternalModuleNotes() and showSelectedModuleIdeWarnings() do uncaught listAvailable() calls. If registry loading fails, the installer can abort during warning/notice rendering, even though this path is non-essential.

💡 Suggested hardening
+  async _safeListExternalModules() {
+    try {
+      const externalManager = new ExternalModuleManager();
+      return await externalManager.listAvailable();
+    } catch {
+      await prompts.log.warn('Could not load external module metadata; skipping module notes/warnings.');
+      return [];
+    }
+  }
+
   async showSelectedExternalModuleNotes(selectedModuleIds, externalModules = null) {
-    if (!externalModules) {
-      const externalManager = new ExternalModuleManager();
-      externalModules = await externalManager.listAvailable();
-    }
+    if (!externalModules) externalModules = await this._safeListExternalModules();

     const notes = externalModules
       .filter((mod) => selectedModuleIds.includes(mod.code) && mod.installNote)
       .map((mod) => `${mod.name}: ${mod.installNote}`);
@@
   async showSelectedModuleIdeWarnings(selectedModuleIds, selectedIdes = []) {
-    const externalManager = new ExternalModuleManager();
-    const externalModules = await externalManager.listAvailable();
+    const externalModules = await this._safeListExternalModules();

As per coding guidelines: tools/**: Build script/tooling. Check error handling and proper exit codes.

Also applies to: 976-979

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tools/installer/ui.js` around lines 961 - 965, The calls to
ExternalModuleManager.listAvailable inside showSelectedExternalModuleNotes (and
similarly in showSelectedModuleIdeWarnings) must be guarded so registry failures
don’t abort the installer: wrap the listAvailable() call in a try/catch, log a
non-fatal warning/error if it throws, and fall back to an empty array (or
null-safe value) so the rest of the function can continue; ensure you reference
ExternalModuleManager and listAvailable in the catch handling and do not rethrow
or call process.exit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant