Feature: multi-git / polyrepo workspace support (project root is not a git repo)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 30/100
Hướng nghiên cứu
Bắt đầu bằng cách đọc src/bmad_loop/workspace.py và src/bmad_loop/bmadconfig.py, sau đó lần theo các kết quả xác thực của git.probe, git.worktree-clean và policy.isolation-repo-root. So sánh phần công việc liên quan đến #414 và #443 trước khi quyết định trạng thái multi-root và việc điều phối commit nên thuộc về đâu. Hoàn thành nghĩa là đã thống nhất phạm vi và thiết kế, với các fixture hoặc trường hợp kiểm thử bao quát một workspace không phải git và nhiều repository anh em.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Request first-class support for polyrepo / multi-git workspaces: a BMAD project whose workspace root is not a git repository, with several sibling git repos under it that a single story may touch and that must be committed separately (per repo, with path allowlists).
Today bmad-loop appears to assume one git root (Workspace.root / repo_root: Path). That model fits monorepos and single-repo projects, but blocks using bmad-loop as the unattended orchestrator for multi-repo product workspaces.
Context / motivation
We run a multi-product workspace roughly like:
quest/ # workspace root — NOT a git repo
├── _bmad/ # BMAD install + custom (shared)
├── AGENTS.md
├── quest-api/ # git repo (.NET / ABP backend)
├── quest-admin/ # git repo (Vue admin monorepo)
├── quest-mobile/ # git repo (Taro + Vue mobile)
└── docs/ # git repo (product docs + BMAD artifacts:
# sprint-status, stories, specs under docs/_bmad-output/)
Realities that matter for orchestration:
- Agents and humans work from the workspace root (shared
_bmad/, shared sprint board, cross-repo stories), not from a single child repo. - One story often spans 2–3 repos (e.g. API + OpenAPI client regen in admin + story/sprint updates in
docs). - Commits must be split by host repo with strict stage allowlists (never
git add .at workspace root; no mixing unrelated dirty trees). - Sprint / implementation artifacts live in
docs/, while code lives in other repos — not under a single git tree that also holds the code.
We already use BMAD Method (planning + implementation skills) and maintain a custom unattended Goal orchestrator for multi-repo serial story execution. We want to align with official bmad-build-auto + bmad-loop where possible, but today the loop’s SCM model does not match this layout.
What we understand works today (and what does not)
Supported (as documented / implemented on main)
- Single git repository as project (or project == git root).
- Monorepo path split via optional
repo_rootin_bmad/bmm/config.yaml: one git root, project dir may differ (e.g. package subdirectory). Documented as monorepo / “git root differs from project dir”. repo_rootis a singlePath(ProjectPaths.repo_root), not a list.- Worktree isolation, baseline match, squash-to-one-story-commit, and
git.worktree-clean/git.probeall operate on that one repo. repo_root ≠ projectis incompatible withisolation = "worktree"(#414 / #443 track plumbing for monorepo+worktree, not multi-git).
Not supported (gap for us)
| Need | Current bmad-loop model |
|---|---|
Workspace root with no .git |
Preflight expects a git worktree (git.probe, clean check) |
| Multiple sibling git repos | Single Workspace.root / repo_root |
| One story → N commits (one per touched repo) | Squash / story commit against one repo |
| Per-repo stage allowlists | Single-tree git add / commit semantics |
| Sprint board in repo A, code in repos B/C | Artifacts can sit outside the tree, but code+commit still one root |
Workarounds we considered and rejected as primary path:
- Point
--projectatquest-apionly → loses admin/mobile/docs in the same loop. - Four independent loop installs → four boards, no cross-repo hard gates.
- Collapse into one monorepo → incompatible with our release/ownership model.
Desired outcomes (product)
Minimal viable multi-git support would let us:
- Set project = workspace root (may have no git).
- Declare one or more git roots (sibling repos) that the orchestrator may touch.
- Run the usual pick story → build-auto → verify → review → commit loop with sessions still cwd’d at the workspace root (so agents see all trees +
_bmad). - On commit boundary:
- detect which configured roots have changes for this story,
- commit per root (optional message template still OK),
- never require the workspace root itself to be a git repo,
- optionally enforce per-root path allowlists / ignore patterns.
- Preflight:
- each configured root is a git repo and (policy-dependent) clean enough to start,
- missing root or non-git path is a clear validate finding.
Nice-to-have (later):
- Per-story or per-epic primary repo + optional secondary roots.
- Worktree isolation per root (or only for roots that are dirty / opted in).
- Verify commands with cwd per root (e.g.
dotnet testin api,pnpm testin admin). - Documented guidance for “BMAD artifacts in a docs-only repo”.
Non-goals (for this request)
- Replacing multi-package monorepos (already covered by
repo_root). - Automatic PR creation across remotes.
- Parallel multi-root fan-out (serial per story is fine).
Suggested design sketch (for discussion, not a demand)
Something like (names illustrative only):
# .bmad-loop/policy.toml or _bmad/bmm/config.yaml
[scm]
# project may be a non-git workspace root
mode = "polyrepo" # or isolation remains "none"|"worktree" per root later
[[scm.repos]]
id = "api"
path = "quest-api" # relative to project
# optional: verify_commands, commit_message_template, path_allowlist
[[scm.repos]]
id = "admin"
path = "quest-admin"
[[scm.repos]]
id = "docs"
path = "docs"
Engine changes (high level):
Workspace/ commit / baseline APIs become multi-root-aware (or a thin coordinator over N single-root workspaces).git.probe/ clean checks iterate configured roots.- Story completion records N SHAs (or a map id→sha) instead of one
commit_sha. bmad-build-autocan keep writing specs underimplementation_artifacts(often in the docs repo); the loop only needs to accept multi-root dirty trees without treating “workspace root is not git” as fatal.
Happy to adjust this to whatever fits the existing Workspace seam better.
Environment
- BMAD-METHOD: planning upgrade to ≥ 6.11 (
bmad-build-auto); currently on 6.10 withbmad-dev-auto. - bmad-loop: module present in project (
bmad-loop-setup/ skills); not adopted as main orchestrator because of multi-git gap. - Host OS: macOS.
- Coding agents: Grok Build CLI / Claude / Codex as available.
References (upstream)
- README: Worktree isolation +
repo_rootmonorepo note (“decouples where git/code work happens from where run state lives”) src/bmad_loop/workspace.py: singleroot/repo_rootsrc/bmad_loop/bmadconfig.py:repo_root: Path; worktree+repo_rootrefusal- Validate findings:
git.probe,git.worktree-clean,policy.isolation-repo-root - Issues #414 / #443 (monorepo + worktree plumbing) — related but not multi-git
Ask
- Is multi-git / polyrepo on the roadmap, or intentionally out of scope?
- If in scope, would you prefer a policy-driven
[[scm.repos]]model vs requiring a synthetic parent git (submodules/subtree) that we do not want? - Any recommended interim pattern for “artifacts in docs repo + code in sibling repos” that still uses official build-auto under a thin external orchestrator?
Thanks — happy to supply a minimal public fixture layout or test cases if useful.
- Ngôn ngữ chính
- Python
- Star
- 174
- Fork
- 72
- Merge trung bình
- 19 giờ 25 phút
- Pull request đã merge (30 ngày)
- 84
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của bmad-code-org/bmad-loop
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
bmad-code-org/bmad-loop#973 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
bmad-code-org/bmad-loop#965 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] diagnose/probe-adapter leak guard misses Stripe, Slack app-level, SendGrid and PyPI keys, and non-http URL credentialsCó thể đã có người làm @CloneOfAlex đã nhận hôm nay. Đang mởbug
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 25/100
bmad-code-org/bmad-loop#1026 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
bmad-code-org/bmad-loop#1004 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 49/100
bmad-code-org/bmad-loop#1002 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của bmad-code-org/bmad-loop
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
microsoft/markitdown#2820 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
yt-project/yt#5624 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
NousResearch/hermes-agent#148376 ·
Maintainer thường phản hồi trong vòng 1 ngày