feat(git): add unified branching strategy option

Add configurable git branching with three strategies:
- none (default): commit to current branch
- phase: create branch per phase (gsd/phase-{N}-{slug})
- milestone: create branch per milestone (gsd/{version}-{slug})

Changes:
- planning-config.md: add git.branching_strategy and templates
- execute-phase.md: handle branch creation based on strategy
- settings.md: add branching strategy to settings UI
- complete-milestone.md: handle branch merging at milestone end
This commit is contained in:
Dave
2026-01-24 14:32:53 -05:00
parent 3d2a960cd9
commit 197800e2d1
4 changed files with 295 additions and 2 deletions

View File

@@ -34,6 +34,7 @@ Parse current values (default to `true` if not present):
- `workflow.plan_check` — spawn plan checker during plan-phase
- `workflow.verifier` — spawn verifier during execute-phase
- `model_profile` — which model each agent uses (default: `balanced`)
- `git.branching_strategy` — branching approach (default: `"none"`)
## 3. Present Settings
@@ -77,6 +78,16 @@ AskUserQuestion([
{ label: "Yes", description: "Verify must-haves after execution" },
{ label: "No", description: "Skip post-execution verification" }
]
},
{
question: "Git branching strategy?",
header: "Branching",
multiSelect: false,
options: [
{ label: "None (Recommended)", description: "Commit directly to current branch" },
{ label: "Per Phase", description: "Create branch for each phase (gsd/phase-{N}-{name})" },
{ label: "Per Milestone", description: "Create branch for entire milestone (gsd/{version}-{name})" }
]
}
])
```
@@ -95,6 +106,9 @@ Merge new settings into existing config.json:
"research": true/false,
"plan_check": true/false,
"verifier": true/false
},
"git": {
"branching_strategy": "none" | "phase" | "milestone"
}
}
```
@@ -116,6 +130,7 @@ Display:
| Plan Researcher | {On/Off} |
| Plan Checker | {On/Off} |
| Execution Verifier | {On/Off} |
| Git Branching | {None/Per Phase/Per Milestone} |
These settings apply to future /gsd:plan-phase and /gsd:execute-phase runs.
@@ -130,7 +145,7 @@ Quick commands:
<success_criteria>
- [ ] Current config read
- [ ] User presented with 4 settings (profile + 3 toggles)
- [ ] Config updated with model_profile and workflow section
- [ ] User presented with 5 settings (profile + 3 workflow toggles + git branching)
- [ ] Config updated with model_profile, workflow, and git sections
- [ ] Changes confirmed to user
</success_criteria>