Skip to content

Resolve {project-root} by walking up to the nearest _bmad/ - #38

Merged
bmadcode merged 1 commit into
mainfrom
project-root-walk-up
Sep 25, 2026
Merged

bmadcode merged 1 commit into
mainfrom
project-root-walk-up

Conversation

@bmadcode

@bmadcode bmadcode commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Every skill now says {project-root} is the nearest folder containing _bmad/, starting at the project working directory and moving up through its parents.

The old line said {project-root} paths resolve from the project working directory. That breaks when an agent starts inside a worktree or subfolder that has no _bmad/ of its own, such as oss/.worktrees/<repo>/<branch> with _bmad/ at oss/.

We tested both wordings in sandboxes with identical decoy installs, across Claude Code, Codex, opencode (GLM) and Antigravity models. The new wording found the right _bmad/ 43 of 45 times. The old wording managed 31 of 45 and wrote to the wrong copy 3 times.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Qrjf7zEvqbDcipTM3UYZuP

Summary by CodeRabbit

  • Improvements
    • Project paths now resolve to the nearest parent folder containing the project configuration, helping workflows and agents locate project files when run from nested directories.

Skills started inside a worktree or subfolder now find the _bmad/ install above them instead of assuming the working directory.
@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: dfce2fce-e308-4222-82de-162b4cd0b39e

📥 Commits

Reviewing files that changed from the base of the PR and between 2486f5f and cf759b2.

📒 Files selected for processing (30)
  • src/agents/gds-agent-game-architect/SKILL.md
  • src/agents/gds-agent-game-designer/SKILL.md
  • src/agents/gds-agent-game-dev/SKILL.md
  • src/agents/gds-agent-game-solo-dev/SKILL.md
  • src/agents/gds-agent-tech-writer/SKILL.md
  • src/workflows/1-preproduction/gds-brainstorm-game/SKILL.md
  • src/workflows/1-preproduction/research/gds-domain-research/SKILL.md
  • src/workflows/2-design/gds-create-narrative/SKILL.md
  • src/workflows/2-design/gds-gdd/SKILL.md
  • src/workflows/2-design/gds-prd/SKILL.md
  • src/workflows/3-technical/gds-check-implementation-readiness/SKILL.md
  • src/workflows/3-technical/gds-create-epics-and-stories/SKILL.md
  • src/workflows/3-technical/gds-game-architecture/SKILL.md
  • src/workflows/3-technical/gds-generate-project-context/SKILL.md
  • src/workflows/4-production/gds-code-review/SKILL.md
  • src/workflows/4-production/gds-correct-course/SKILL.md
  • src/workflows/4-production/gds-create-story/SKILL.md
  • src/workflows/4-production/gds-dev-story/SKILL.md
  • src/workflows/4-production/gds-retrospective/SKILL.md
  • src/workflows/4-production/gds-sprint-planning/SKILL.md
  • src/workflows/4-production/gds-sprint-status/SKILL.md
  • src/workflows/gametest/gds-e2e-scaffold/SKILL.md
  • src/workflows/gametest/gds-performance-test/SKILL.md
  • src/workflows/gametest/gds-playtest-plan/SKILL.md
  • src/workflows/gametest/gds-test-automate/SKILL.md
  • src/workflows/gametest/gds-test-design/SKILL.md
  • src/workflows/gametest/gds-test-framework/SKILL.md
  • src/workflows/gametest/gds-test-review/SKILL.md
  • src/workflows/gds-document-project/SKILL.md
  • src/workflows/gds-quick-flow/gds-quick-dev/SKILL.md

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


Walkthrough

Changes

Project Root Resolution

Layer / File(s) Summary
Agent skill instructions
src/agents/*/SKILL.md
Agent skills now define {project-root} as the nearest ancestor containing _bmad/, searched upward from the project working directory.
Preproduction and design workflows
src/workflows/1-preproduction/..., src/workflows/2-design/...
Preproduction and design workflows use the updated {project-root} rule.
Technical and production workflows
src/workflows/3-technical/..., src/workflows/4-production/...
Technical and production workflows replace direct working-directory resolution with upward ancestor search.
Game-test and utility workflows
src/workflows/gametest/..., src/workflows/gds-document-project/..., src/workflows/gds-quick-flow/...
Game-test and utility workflows document the same nearest-ancestor resolution rule.

Priority: ➖ Normal

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

Change: Bug fix

Merge Risk: ⚪ Minimal · up to cf759

The root-resolution change is consistent across the supplied skill and workflow summaries. The inspected story workflow intentionally places artifacts under the resolved root, so no merge-blocking issue is established.

Architecture Summary

Architecture risk: 🔵 Low · up to cf759

The change affects 1 system.

Changed systems: src

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — src (service) was modified; 30 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in src/agents/gds-agent-game-architect/SKILL.md: {project-root} now identifies the nearest folder containing _bmad/, searching from the project working directory up through its parents, rather than resolving directly to the project working directory.
  • observed — Modified behavior in src/agents/gds-agent-game-designer/SKILL.md: {project-root} now resolves to the nearest ancestor containing _bmad/, rather than always resolving to the project working directory.
  • observed — Modified behavior in src/agents/gds-agent-game-dev/SKILL.md: {project-root} now refers to the nearest ancestor containing _bmad/, found by searching upward from the project working directory; previously, it always referred to the project working directory.
  • observed — Modified behavior in src/agents/gds-agent-game-solo-dev/SKILL.md: {project-root} now identifies the nearest ancestor containing _bmad/, rather than resolving to the project working directory.
🚥 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 summarizes the main change: resolving {project-root} by walking upward to the nearest directory containing _bmad/.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

A rabbit hops through folders wide
_bmad/ becomes the guide
Ancestors line up in a row
{project-root} knows where to go
Thirty notes now say it so

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

@bmadcode
bmadcode merged commit ff88709 into main Sep 25, 2026
20 checks passed
@bmadcode
bmadcode deleted the project-root-walk-up branch September 25, 2026 10:18
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