fix: support legacy baut automator installs#15
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThis PR adds legacy compatibility for the previous ChangesLegacy baut Compatibility
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@install.sh`:
- Around line 157-179: The code currently matches "- name: baut" globally after
the first "modules:" and can remove YAML outside a modules list or in
non-manifest files; update the loop so you only treat a baut match when
moduleIndent is set and the item's indentation places it directly under that
modules block (i.e., require moduleIndent !== null and compute itemIndent from
bautMatch then ensure itemIndent > moduleIndent before marking changed and
skipping the block), and apply the same guard to the later scan (the block at
lines ~184-190) so both uses of bautMatch/shouldEndBlock only run when inside an
actual modules: section; keep references to moduleIndent, bautMatch, itemIndent,
shouldEndBlock and changed when making the checks.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f4f0de72-5f7c-4f70-90b5-6e65d619a1a9
📒 Files selected for processing (7)
.claude-plugin/marketplace.jsonREADME.mddocs/installation-and-layout.mddocs/troubleshooting.mdinstall.shpackage.jsonscripts/compat-test.sh
🤖 Augment PR SummarySummary: This PR adds backward compatibility for legacy BMAD Automator installs that still reference the pre-rename module code Changes:
Technical Notes: Migration is implemented as a small Node script embedded in 🤖 Was this summary useful? React with 👍 or 👎 |
| }, | ||
| { | ||
| "name": "baut", | ||
| "source": "./skills", |
There was a problem hiding this comment.
In .claude-plugin/marketplace.json line 41, the new baut plugin entry doesn’t include a skills list (unlike bmad-automator) and uses source: "./skills", which may not match the custom-source resolver expectations (docs/plans mention plugin-level skills entries). This could cause legacy source discovery to still fail or to pull an unexpected set of skills.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| const yamlNames = new Set([".yaml", ".yml"]); | ||
| const timestamp = new Date().toISOString().replace(/[-:]/g, "").replace(/\.\d{3}Z$/, "Z"); | ||
|
|
||
| function walk(dir, files = []) { |
There was a problem hiding this comment.
In install.sh line 125, walk() collects all .yml/.yaml files under _bmad/, but the PR description/docs describe targeting _bmad/**/manifest.y*ml. If any other YAML under _bmad/ contains modules: plus a - name: baut line, it will also be backed up and rewritten unexpectedly.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| continue; | ||
| } | ||
|
|
||
| const bautMatch = moduleIndent === null ? null : line.match(/^(\s*)-\s+name:\s+['"]?baut['"]?\s*$/); |
There was a problem hiding this comment.
In install.sh line 166, bautMatch only checks that a modules: key was seen somewhere earlier (moduleIndent !== null), but doesn’t verify the matched - name: baut line is actually inside the modules: list (indentation-wise). This can remove a name: baut block from a later, unrelated YAML list if it appears in the same file after modules:.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| } | ||
|
|
||
| function shouldEndBlock(line, itemIndent, moduleIndent) { | ||
| if (/^\s*$/.test(line) || /^\s*#/.test(line)) return false; |
There was a problem hiding this comment.
In install.sh line 143, shouldEndBlock() treats blank/comment-only lines as never ending the baut block, so comments/whitespace separating module entries can be removed along with the baut entry. If preserving surrounding YAML formatting/comments is important (as the docs suggest), this behavior may be surprising.
Severity: low
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
|
Review follow-up pushed in Addressed:
Verified:
Not changed:
|
|
Addressed via bmad-code-org/BMAD-METHOD#2391 |
Summary
Adds compatibility for existing BMAD installations that still contain a legacy
bautmodule entry after the automator rename.Implemented
bautmarketplace alias that points at the automator skill source, so source lookup can still resolve old manifests._bmad/YAML manifests for amodules:list entry namedbautbautmodule block_bmad/config.tomland_bmad/config.user.tomlautomator, not the compatibility alias.scripts/compat-test.shand wires it intonpm run verify.Verification
npm run verifyautomatoronly.bautsource lookup resolves successfully.npx bmad-method@next install --action update --modules automator --tools codex --yessucceeds after the migration.Summary by CodeRabbit
New Features
Documentation
Tests