feat(workflow): add git.create_tag config to disable milestone tagging

Adds boolean config key `git.create_tag` (default: true, fully backcompat)
so projects with their own release flow can disable GSD's automatic
`git tag -a v[X.Y]` on milestone completion. Also adds tag-collision
pre-check to prevent silent failure on re-run. Closes #3086

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-05-14 12:06:36 -04:00
parent 625ccf5217
commit da21edfb59
11 changed files with 134 additions and 5 deletions

View File

@@ -724,9 +724,16 @@ fi
<step name="git_tag">
<config-check>
Read `git.create_tag` via `gsd-sdk query config-get git.create_tag 2>/dev/null || echo "true"`.
If the result is `false` → skip this step entirely and proceed to `git_commit_milestone`.
</config-check>
Create git tag:
```bash
# Pre-check: skip if tag already exists (prevents silent failure on retry)
if git rev-parse "v${milestone_version}" >/dev/null 2>&1; then echo "Tag v${milestone_version} already exists, skipping"; exit 0; fi
git tag -a v[X.Y] -m "v[X.Y] [Name]
Delivered: [One sentence]

View File

@@ -246,6 +246,15 @@ AskUserQuestion([
{ label: "Per Milestone", description: "Create branch for entire milestone (gsd/{version}-{name})" }
]
},
{
question: "Create git tags on milestone completion?",
header: "Git Tagging",
multiSelect: false,
options: [
{ label: "Yes (Recommended)", description: "Tag releases with version (e.g., v1.0) on milestone completion" },
{ label: "No", description: "Skip git tagging — use if your project doesn't use tags or uses a different release convention" }
]
},
{
question: "Enable context window warnings? (injects advisory messages when context is getting full)",
header: "Ctx Warnings",
@@ -349,7 +358,8 @@ Merge new settings into existing config.json:
},
"git": {
"branching_strategy": "none" | "phase" | "milestone",
"quick_branch_template": <string|null>
"quick_branch_template": <string|null>,
"create_tag": true/false
},
"hooks": {
"context_warnings": true/false,
@@ -450,6 +460,7 @@ Display:
| UI Safety Gate | {On/Off} |
| AI Integration Phase | {On/Off} |
| Git Branching | {None/Per Phase/Per Milestone} |
| Git Tagging | {On/Off} |
| Skip Discuss | {On/Off} |
| Context Warnings | {On/Off} |
| Saved as Defaults | {Yes/No} |
@@ -470,7 +481,7 @@ Quick commands:
<success_criteria>
- [ ] Current config read
- [ ] User presented with 22 settings (profile + workflow toggles + features + git branching + ctx warnings), grouped into six sections: Planning, Execution, Docs & Output, Features, Model & Pipeline, Misc. `code_review_depth` is conditional on `code_review=on`.
- [ ] User presented with 23 settings (profile + workflow toggles + features + git branching + git tagging + ctx warnings), grouped into six sections: Planning, Execution, Docs & Output, Features, Model & Pipeline, Misc. `code_review_depth` is conditional on `code_review=on`.
- [ ] Config updated with model_profile, workflow, and git sections
- [ ] User offered to save as global defaults (~/.gsd/defaults.json)
- [ ] Changes confirmed to user