Skip to content

Commit ce84d9f

Browse files
bmadcodeclaude
andauthored
fix(skills): pass --project-root to the customization resolver (#37)
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, which is what actually repairs existing installs since this module ships no copy of the script. This is the hardening half: passing the root explicitly leaves nothing to infer, and matches resolve_config.py, which has always required it. 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 Claude-Session: https://claude.ai/code/session_01L8Hyqmp2giAVgEAnB49zEQ Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 478cc09 commit ce84d9f

45 files changed

Lines changed: 60 additions & 60 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/agents/gds-agent-game-architect/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ You are Cloud Dragonborn, the Game Architect. You design scalable game architect
2020

2121
### Step 1: Resolve the Agent Block
2222

23-
Run: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key agent`
23+
Run: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --project-root {project-root} --key agent`
2424

2525
**If the script fails**, resolve the `agent` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver:
2626

src/agents/gds-agent-game-designer/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ You are Samus Shepard, the Game Designer. You drive creative vision, game design
2020

2121
### Step 1: Resolve the Agent Block
2222

23-
Run: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key agent`
23+
Run: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --project-root {project-root} --key agent`
2424

2525
**If the script fails**, resolve the `agent` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver:
2626

src/agents/gds-agent-game-dev/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ You are Link Freeman, the Game Developer. You implement features, execute dev st
2222

2323
### Step 1: Resolve the Agent Block
2424

25-
Run: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key agent`
25+
Run: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --project-root {project-root} --key agent`
2626

2727
**If the script fails**, resolve the `agent` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver:
2828

src/agents/gds-agent-game-solo-dev/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ You are Indie, the Game Solo Dev. You ship complete games from concept to launch
2020

2121
### Step 1: Resolve the Agent Block
2222

23-
Run: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key agent`
23+
Run: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --project-root {project-root} --key agent`
2424

2525
**If the script fails**, resolve the `agent` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver:
2626

src/agents/gds-agent-tech-writer/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ You are Paige, the Technical Writer. You transform complex game development conc
2020

2121
### Step 1: Resolve the Agent Block
2222

23-
Run: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key agent`
23+
Run: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --project-root {project-root} --key agent`
2424

2525
**If the script fails**, resolve the `agent` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver:
2626

src/workflows/1-preproduction/gds-brainstorm-game/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ description: 'Facilitate game brainstorming sessions with game-specific techniqu
2222

2323
### Step 1: Resolve the Workflow Block
2424

25-
Run: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow`
25+
Run: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --project-root {project-root} --key workflow`
2626

2727
**If the script fails**, resolve the `workflow` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver:
2828

src/workflows/1-preproduction/gds-brainstorm-game/steps/step-04-complete.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,6 @@ This step-file architecture ensures consistent, creative brainstorming with user
277277

278278
## On Complete
279279

280-
Run: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete`
280+
Run: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --project-root {project-root} --key workflow.on_complete`
281281

282282
If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting.

src/workflows/1-preproduction/gds-create-game-brief/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ At the opening greeting, let the user know they can invoke `bmad-party-mode` for
1515

1616
## On Activation
1717

18-
1. Resolve customization: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow`. On failure, read `{skill-root}/customize.toml` directly and use defaults.
18+
1. Resolve customization: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --project-root {project-root} --key workflow`. On failure, read `{skill-root}/customize.toml` directly and use defaults.
1919
2. Execute each entry in `{workflow.activation_steps_prepend}` in order.
2020
3. Treat every entry in `{workflow.persistent_facts}` as foundational context for the rest of the run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim.
2121
4. `{workflow.external_sources}` is an org-configured registry of internal tools (knowledge bases, MCP tools); consult them alongside generic web research on the same triggers in `## Discovery`, org tools preferred when their directive matches. If a named tool is unavailable at runtime, fall back to standard behavior and note the gap when relevant.

src/workflows/1-preproduction/research/gds-domain-research/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ description: 'Conduct game domain and industry research. Use when the user says
2020

2121
### Step 1: Resolve the Workflow Block
2222

23-
Run: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow`
23+
Run: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --project-root {project-root} --key workflow`
2424

2525
**If the script fails**, resolve the `workflow` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver:
2626

src/workflows/1-preproduction/research/gds-domain-research/domain-steps/step-06-research-synthesis.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,6 @@ Congratulations on completing comprehensive game domain research!
446446

447447
## On Complete
448448

449-
Run: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete`
449+
Run: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --project-root {project-root} --key workflow.on_complete`
450450

451451
If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting.

0 commit comments

Comments
 (0)