fix(builders): pass --project-root to the customization resolver - #116
Conversation
Core's resolve_customization.py inferred the project root when the flag
was absent, and for a skill installed under the user's home that
inference walked up to ~ — where a user-level install's ~/_bmad made
home look like the project. Team overrides in the real project were
silently ignored: no error, no warning, just shipped defaults.
The resolver itself is fixed in BMAD-METHOD#2802. This is the hardening
half, and it matters more here than in the other modules: three of the
six files are the generator templates the agent and workflow builders
stamp into every new skill, so the omission was seeding itself into
everything anyone builds from here on.
The builders' own activation steps and the make-a-skill-customizable
recipe are covered too. The recipe runs from the project directory with
a relative path, so it passes "$PWD" rather than the {project-root}
placeholder the templates use.
No behaviour change where the inference already landed correctly. The
flag has always existed, so new skill text works against an old resolver
and old text against the new one.
Refs bmad-code-org/BMAD-METHOD#2796
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L8Hyqmp2giAVgEAnB49zEQ
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. WalkthroughThe change updates agent and workflow customization resolver commands to pass ChangesCustomization resolution
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The PR makes customization resolution use the explicit project root across generated skills and setup guidance, preventing project overrides from being missed. No actionable merge-blocking risk remains beyond normal checks and review. Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (6 skipped: 6 unsupported.) ✨ 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 |
Covers #116, #113, and #106. Bumps the three .claude-plugin/marketplace.json plugin versions to 2.2.2, which the release workflow does not touch. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L8Hyqmp2giAVgEAnB49zEQ
Adds
--project-root {project-root}to all 5resolve_customization.pyinvocation sites across 6 files.This one matters more than its size suggests. Three of the six are the generator templates the builders stamp into every new skill:
bmad-agent-builder/assets/SKILL-template.mdbmad-agent-builder/assets/SKILL-template-bootloader.mdbmad-workflow-builder/assets/SKILL-template.mdLeft alone, the omission kept seeding itself into everything anyone builds from here on. The builders' own activation steps and the
make-a-skill-customizablerecipe are covered too — that recipe runs from the project directory with a relative path, so it passes"$PWD"rather than the{project-root}placeholder the templates use.Why
resolve_customization.pyinferred the project root when--project-rootwas absent, walking up from the skill's installed directory. For a skill installed under the user's home that walk reaches~— and a user-level install's~/_bmadmade home look like the project. Team overrides in the real project were silently ignored: no error, no warning, just shipped defaults.The resolver itself is fixed in bmad-code-org/BMAD-METHOD#2802. That is what actually repairs existing installs — this module ships no copy of the script and calls core's at
{project-root}/_bmad/scripts/, so it inherits the fix on upgrade with nothing to do here.This PR is the hardening half. Passing the root explicitly leaves nothing to infer, and matches
resolve_config.py, which has always required the flag.Safety
No behaviour change wherever the inference already landed correctly, which is the common case.
--project-roothas always existed, so there is no version skew in either direction: new skill text works against an old resolver, and old text against the new one. This can merge before or after #2802.Refs bmad-code-org/BMAD-METHOD#2796
🤖 Generated with Claude Code
https://claude.ai/code/session_01L8Hyqmp2giAVgEAnB49zEQ
Summary by CodeRabbit
Bug Fixes
Documentation