Bug Description
/gsd:pr-branch ignores sub-repos defined in planning.sub_repos config. All git commands inside the sub-repo handling path run without a -C <repo> flag, so they operate on the shell's current working directory (the root repo) instead of the intended sub-repo.
Steps to Reproduce
- Set up a project with
planning.sub_repos: ["backend", "frontend"] in .planning/config.json
- Make uncommitted changes inside one of the sub-repos (e.g.
backend/)
- Run
/gsd:pr-branch
- Observe: sub-repos are never scanned; no PR is created for
backend/
Expected Behavior
For each sub-repo in planning.sub_repos:
git -C "$REPO" status --porcelain detects uncommitted changes
- User is prompted to handle all / select / skip
- Selected repos get a branch created, changes committed, pushed, and a companion PR opened
Actual Behavior
Sub-repos are silently skipped. Git commands were being called without -C <repo>, so they operated on the root repo's working directory.
Root Cause
The pr-branch workflow lacked a handle_sub_repos step. Git commands were not scoped with git -C <repo> — relying on cd which does not persist shell state between agent-executed commands.
Environment
- GSD Version: current
next branch
- Runtime: Claude Code
- OS: macOS
Bug Description
/gsd:pr-branchignores sub-repos defined inplanning.sub_reposconfig. All git commands inside the sub-repo handling path run without a-C <repo>flag, so they operate on the shell's current working directory (the root repo) instead of the intended sub-repo.Steps to Reproduce
planning.sub_repos: ["backend", "frontend"]in.planning/config.jsonbackend/)/gsd:pr-branchbackend/Expected Behavior
For each sub-repo in
planning.sub_repos:git -C "$REPO" status --porcelaindetects uncommitted changesActual Behavior
Sub-repos are silently skipped. Git commands were being called without
-C <repo>, so they operated on the root repo's working directory.Root Cause
The
pr-branchworkflow lacked ahandle_sub_reposstep. Git commands were not scoped withgit -C <repo>— relying oncdwhich does not persist shell state between agent-executed commands.Environment
nextbranch