Skip to content

fix(builders): pass --project-root to the customization resolver - #116

Merged
bmadcode merged 1 commit into
mainfrom
issue-2796-pass-project-root
Aug 31, 2026
Merged

fix(builders): pass --project-root to the customization resolver#116
bmadcode merged 1 commit into
mainfrom
issue-2796-pass-project-root

Conversation

@bmadcode

@bmadcode bmadcode commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Adds --project-root {project-root} to all 5 resolve_customization.py invocation 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.md
  • bmad-agent-builder/assets/SKILL-template-bootloader.md
  • bmad-workflow-builder/assets/SKILL-template.md

Left alone, the omission kept seeding itself into everything anyone builds from here on. The builders' own activation steps and the make-a-skill-customizable recipe 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.py inferred the project root when --project-root was 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 ~/_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-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-root has 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

    • Improved customization resolution by explicitly using the current project directory.
    • Ensured agent and workflow customizations are resolved consistently across activation and bootloader flows.
  • Documentation

    • Updated customization verification instructions to reflect project-aware resolution.

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
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9dd3a60f-2e48-4537-8558-9f3e14e6f0d9

📥 Commits

Reviewing files that changed from the base of the PR and between 35ddbfa and 65d8f39.

📒 Files selected for processing (6)
  • docs/how-to/make-a-skill-customizable.md
  • skills/bmad-agent-builder/SKILL.md
  • skills/bmad-agent-builder/assets/SKILL-template-bootloader.md
  • skills/bmad-agent-builder/assets/SKILL-template.md
  • skills/bmad-workflow-builder/SKILL.md
  • skills/bmad-workflow-builder/assets/SKILL-template.md

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


Walkthrough

The change updates agent and workflow customization resolver commands to pass {project-root} explicitly. The documentation verification command now passes the current directory through --project-root "$PWD".

Changes

Customization resolution

Layer / File(s) Summary
Agent customization resolution
skills/bmad-agent-builder/SKILL.md, skills/bmad-agent-builder/assets/*
Agent activation and template commands pass {project-root} to resolve_customization.py.
Workflow resolution and verification
skills/bmad-workflow-builder/SKILL.md, skills/bmad-workflow-builder/assets/SKILL-template.md, docs/how-to/make-a-skill-customizable.md
Workflow commands and the resolver verification command pass the project root explicitly. Fallback behavior remains unchanged.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 65d8f

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

A rabbit passes roots along,
To agents where custom blocks belong.
Workflows follow the same trail,
Tests mark the path without fail,
And every resolver sings its song.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: passing --project-root to the customization resolver across builder templates and related documentation.
Docstring Coverage ✅ Passed 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…
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.
Full details: Docstring Coverage

Explanation

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)
  • Create PR with unit tests
  • Commit unit tests in branch issue-2796-pass-project-root

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

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

@bmadcode
bmadcode merged commit b6f1cb7 into main Aug 31, 2026
6 checks passed
bmadcode added a commit that referenced this pull request Aug 31, 2026
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
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