gsd-antigravity-kit 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent/skills/gsd/SKILL.md +26 -4
- package/.agent/skills/gsd/VERSION +1 -1
- package/.agent/skills/gsd/assets/templates/AI-SPEC.md +246 -0
- package/.agent/skills/gsd/assets/templates/DEBUG.md +7 -2
- package/.agent/skills/gsd/assets/templates/config.json +56 -48
- package/.agent/skills/gsd/assets/templates/research.md +40 -0
- package/.agent/skills/gsd/assets/templates/spec.md +307 -0
- package/.agent/skills/gsd/assets/templates/state.md +8 -0
- package/.agent/skills/gsd/bin/gsd-tools.cjs +212 -11
- package/.agent/skills/gsd/bin/help-manifest.json +8 -2
- package/.agent/skills/gsd/bin/hooks/gsd-check-update-worker.js +108 -0
- package/.agent/skills/gsd/bin/hooks/gsd-check-update.js +14 -89
- package/.agent/skills/gsd/bin/hooks/gsd-context-monitor.js +34 -5
- package/.agent/skills/gsd/bin/hooks/gsd-phase-boundary.sh +1 -0
- package/.agent/skills/gsd/bin/hooks/gsd-prompt-guard.js +1 -1
- package/.agent/skills/gsd/bin/hooks/gsd-read-guard.js +6 -1
- package/.agent/skills/gsd/bin/hooks/gsd-session-state.sh +1 -0
- package/.agent/skills/gsd/bin/hooks/gsd-statusline.js +150 -16
- package/.agent/skills/gsd/bin/hooks/gsd-validate-commit.sh +1 -0
- package/.agent/skills/gsd/bin/hooks/gsd-workflow-guard.js +1 -1
- package/.agent/skills/gsd/bin/lib/audit.cjs +757 -0
- package/.agent/skills/gsd/bin/lib/commands.cjs +17 -7
- package/.agent/skills/gsd/bin/lib/config.cjs +66 -20
- package/.agent/skills/gsd/bin/lib/core.cjs +212 -12
- package/.agent/skills/gsd/bin/lib/frontmatter.cjs +6 -8
- package/.agent/skills/gsd/bin/lib/graphify.cjs +494 -0
- package/.agent/skills/gsd/bin/lib/gsd2-import.cjs +511 -0
- package/.agent/skills/gsd/bin/lib/init.cjs +371 -18
- package/.agent/skills/gsd/bin/lib/intel.cjs +9 -30
- package/.agent/skills/gsd/bin/lib/milestone.cjs +18 -17
- package/.agent/skills/gsd/bin/lib/model-profiles.cjs +1 -0
- package/.agent/skills/gsd/bin/lib/phase.cjs +225 -98
- package/.agent/skills/gsd/bin/lib/profile-output.cjs +17 -5
- package/.agent/skills/gsd/bin/lib/roadmap.cjs +12 -5
- package/.agent/skills/gsd/bin/lib/state.cjs +394 -129
- package/.agent/skills/gsd/bin/lib/template.cjs +8 -4
- package/.agent/skills/gsd/bin/lib/uat.cjs +2 -1
- package/.agent/skills/gsd/bin/lib/verify.cjs +111 -42
- package/.agent/skills/gsd/migration_report.md +2 -2
- package/.agent/skills/gsd/references/agents/gsd-advisor-researcher.md +23 -0
- package/.agent/skills/gsd/references/agents/gsd-ai-researcher.md +133 -0
- package/.agent/skills/gsd/references/agents/gsd-code-fixer.md +11 -10
- package/.agent/skills/gsd/references/agents/gsd-code-reviewer.md +2 -2
- package/.agent/skills/gsd/references/agents/gsd-codebase-mapper.md +13 -2
- package/.agent/skills/gsd/references/agents/gsd-debug-session-manager.md +314 -0
- package/.agent/skills/gsd/references/agents/gsd-debugger.md +147 -76
- package/.agent/skills/gsd/references/agents/gsd-doc-verifier.md +1 -1
- package/.agent/skills/gsd/references/agents/gsd-doc-writer.md +615 -602
- package/.agent/skills/gsd/references/agents/gsd-domain-researcher.md +153 -0
- package/.agent/skills/gsd/references/agents/gsd-eval-auditor.md +175 -0
- package/.agent/skills/gsd/references/agents/gsd-eval-planner.md +154 -0
- package/.agent/skills/gsd/references/agents/gsd-executor.md +108 -38
- package/.agent/skills/gsd/references/agents/gsd-framework-selector.md +160 -0
- package/.agent/skills/gsd/references/agents/gsd-integration-checker.md +454 -443
- package/.agent/skills/gsd/references/agents/gsd-intel-updater.md +40 -20
- package/.agent/skills/gsd/references/agents/gsd-nyquist-auditor.md +187 -176
- package/.agent/skills/gsd/references/agents/gsd-pattern-mapper.md +335 -0
- package/.agent/skills/gsd/references/agents/gsd-phase-researcher.md +112 -13
- package/.agent/skills/gsd/references/agents/gsd-plan-checker.md +104 -10
- package/.agent/skills/gsd/references/agents/gsd-planner.md +125 -167
- package/.agent/skills/gsd/references/agents/gsd-project-researcher.md +25 -2
- package/.agent/skills/gsd/references/agents/gsd-research-synthesizer.md +3 -3
- package/.agent/skills/gsd/references/agents/gsd-roadmapper.md +12 -1
- package/.agent/skills/gsd/references/agents/gsd-security-auditor.md +139 -128
- package/.agent/skills/gsd/references/agents/gsd-ui-auditor.md +3 -3
- package/.agent/skills/gsd/references/agents/gsd-ui-checker.md +11 -2
- package/.agent/skills/gsd/references/agents/gsd-ui-researcher.md +27 -4
- package/.agent/skills/gsd/references/agents/gsd-verifier.md +13 -19
- package/.agent/skills/gsd/references/commands/atomic/add-todo.md +2 -2
- package/.agent/skills/gsd/references/commands/atomic/check-todos.md +2 -2
- package/.agent/skills/gsd/references/commands/atomic/cleanup.md +2 -2
- package/.agent/skills/gsd/references/commands/atomic/do.md +2 -2
- package/.agent/skills/gsd/references/commands/atomic/help.md +2 -2
- package/.agent/skills/gsd/references/commands/atomic/join-discord.md +2 -2
- package/.agent/skills/gsd/references/commands/atomic/note.md +2 -2
- package/.agent/skills/gsd/references/commands/atomic/session-report.md +2 -2
- package/.agent/skills/gsd/references/commands/atomic/ship.md +2 -2
- package/.agent/skills/gsd/references/commands/atomic/stats.md +2 -2
- package/.agent/skills/gsd/references/commands/atomic/thread.md +141 -41
- package/.agent/skills/gsd/references/commands/atomic/undo.md +2 -2
- package/.agent/skills/gsd/references/commands/milestone/add-backlog.md +15 -12
- package/.agent/skills/gsd/references/commands/milestone/audit-milestone.md +2 -2
- package/.agent/skills/gsd/references/commands/milestone/complete-milestone.md +2 -2
- package/.agent/skills/gsd/references/commands/milestone/milestone-summary.md +2 -2
- package/.agent/skills/gsd/references/commands/milestone/new-milestone.md +2 -2
- package/.agent/skills/gsd/references/commands/milestone/plan-milestone-gaps.md +2 -2
- package/.agent/skills/gsd/references/commands/milestone/plant-seed.md +2 -2
- package/.agent/skills/gsd/references/commands/milestone/review-backlog.md +4 -4
- package/.agent/skills/gsd/references/commands/misc/ai-integration-phase.md +38 -0
- package/.agent/skills/gsd/references/commands/misc/audit-fix.md +2 -2
- package/.agent/skills/gsd/references/commands/misc/audit-uat.md +2 -2
- package/.agent/skills/gsd/references/commands/misc/eval-review.md +34 -0
- package/.agent/skills/gsd/references/commands/misc/extract_learnings.md +24 -0
- package/.agent/skills/gsd/references/commands/misc/from-gsd2.md +49 -0
- package/.agent/skills/gsd/references/commands/misc/graphify.md +203 -0
- package/.agent/skills/gsd/references/commands/misc/inbox.md +40 -0
- package/.agent/skills/gsd/references/commands/misc/next.md +5 -3
- package/.agent/skills/gsd/references/commands/misc/progress.md +4 -3
- package/.agent/skills/gsd/references/commands/misc/sketch-wrap-up.md +33 -0
- package/.agent/skills/gsd/references/commands/misc/sketch.md +47 -0
- package/.agent/skills/gsd/references/commands/misc/spec-phase.md +64 -0
- package/.agent/skills/gsd/references/commands/misc/spike-wrap-up.md +33 -0
- package/.agent/skills/gsd/references/commands/misc/spike.md +43 -0
- package/.agent/skills/gsd/references/commands/misc/verify-work.md +2 -2
- package/.agent/skills/gsd/references/commands/phase/add-phase.md +2 -2
- package/.agent/skills/gsd/references/commands/phase/add-tests.md +2 -2
- package/.agent/skills/gsd/references/commands/phase/discuss-phase.md +5 -5
- package/.agent/skills/gsd/references/commands/phase/execute-phase.md +4 -4
- package/.agent/skills/gsd/references/commands/phase/insert-phase.md +2 -2
- package/.agent/skills/gsd/references/commands/phase/list-phase-assumptions.md +2 -2
- package/.agent/skills/gsd/references/commands/phase/plan-phase.md +3 -3
- package/.agent/skills/gsd/references/commands/phase/remove-phase.md +2 -2
- package/.agent/skills/gsd/references/commands/phase/research-phase.md +5 -5
- package/.agent/skills/gsd/references/commands/phase/secure-phase.md +2 -2
- package/.agent/skills/gsd/references/commands/phase/ui-phase.md +2 -2
- package/.agent/skills/gsd/references/commands/phase/ui-review.md +2 -2
- package/.agent/skills/gsd/references/commands/phase/validate-phase.md +2 -2
- package/.agent/skills/gsd/references/commands/phase/workstreams.md +9 -9
- package/.agent/skills/gsd/references/commands/project/analyze-dependencies.md +2 -2
- package/.agent/skills/gsd/references/commands/project/explore.md +2 -2
- package/.agent/skills/gsd/references/commands/project/import.md +2 -2
- package/.agent/skills/gsd/references/commands/project/intel.md +10 -10
- package/.agent/skills/gsd/references/commands/project/list-workspaces.md +2 -2
- package/.agent/skills/gsd/references/commands/project/map-codebase.md +2 -2
- package/.agent/skills/gsd/references/commands/project/new-project.md +2 -2
- package/.agent/skills/gsd/references/commands/project/new-workspace.md +2 -2
- package/.agent/skills/gsd/references/commands/project/remove-workspace.md +2 -2
- package/.agent/skills/gsd/references/commands/project/scan.md +2 -2
- package/.agent/skills/gsd/references/commands/system/autonomous.md +4 -3
- package/.agent/skills/gsd/references/commands/system/code-review-fix.md +3 -3
- package/.agent/skills/gsd/references/commands/system/code-review.md +3 -3
- package/.agent/skills/gsd/references/commands/system/debug.md +177 -100
- package/.agent/skills/gsd/references/commands/system/docs-update.md +2 -2
- package/.agent/skills/gsd/references/commands/system/fast.md +2 -2
- package/.agent/skills/gsd/references/commands/system/forensics.md +2 -2
- package/.agent/skills/gsd/references/commands/system/gsd-tools.md +153 -6
- package/.agent/skills/gsd/references/commands/system/health.md +2 -2
- package/.agent/skills/gsd/references/commands/system/manager.md +3 -3
- package/.agent/skills/gsd/references/commands/system/pause-work.md +2 -2
- package/.agent/skills/gsd/references/commands/system/pr-branch.md +2 -2
- package/.agent/skills/gsd/references/commands/system/profile-user.md +2 -2
- package/.agent/skills/gsd/references/commands/system/quick.md +127 -3
- package/.agent/skills/gsd/references/commands/system/reapply-patches.md +45 -6
- package/.agent/skills/gsd/references/commands/system/resume-work.md +2 -2
- package/.agent/skills/gsd/references/commands/system/review.md +6 -4
- package/.agent/skills/gsd/references/commands/system/set-profile.md +3 -3
- package/.agent/skills/gsd/references/commands/system/settings.md +2 -2
- package/.agent/skills/gsd/references/commands/system/update.md +2 -2
- package/.agent/skills/gsd/references/docs/ai-evals.md +156 -0
- package/.agent/skills/gsd/references/docs/ai-frameworks.md +186 -0
- package/.agent/skills/gsd/references/docs/artifact-types.md +18 -0
- package/.agent/skills/gsd/references/docs/autonomous-smart-discuss.md +277 -0
- package/.agent/skills/gsd/references/docs/checkpoints.md +30 -0
- package/.agent/skills/gsd/references/docs/common-bug-patterns.md +49 -49
- package/.agent/skills/gsd/references/docs/continuation-format.md +11 -7
- package/.agent/skills/gsd/references/docs/debugger-philosophy.md +76 -0
- package/.agent/skills/gsd/references/docs/decimal-phase-calculation.md +64 -64
- package/.agent/skills/gsd/references/docs/executor-examples.md +110 -0
- package/.agent/skills/gsd/references/docs/git-integration.md +4 -4
- package/.agent/skills/gsd/references/docs/git-planning-commit.md +40 -38
- package/.agent/skills/gsd/references/docs/ios-scaffold.md +123 -0
- package/.agent/skills/gsd/references/docs/mandatory-initial-read.md +2 -0
- package/.agent/skills/gsd/references/docs/phase-argument-parsing.md +61 -61
- package/.agent/skills/gsd/references/docs/planner-antipatterns.md +89 -0
- package/.agent/skills/gsd/references/docs/planner-revision.md +87 -87
- package/.agent/skills/gsd/references/docs/planner-source-audit.md +73 -0
- package/.agent/skills/gsd/references/docs/planning-config.md +33 -8
- package/.agent/skills/gsd/references/docs/project-skills-discovery.md +19 -0
- package/.agent/skills/gsd/references/docs/sketch-interactivity.md +41 -0
- package/.agent/skills/gsd/references/docs/sketch-theme-system.md +94 -0
- package/.agent/skills/gsd/references/docs/sketch-tooling.md +45 -0
- package/.agent/skills/gsd/references/docs/sketch-variant-patterns.md +81 -0
- package/.agent/skills/gsd/references/docs/tdd.md +67 -0
- package/.agent/skills/gsd/references/docs/universal-anti-patterns.md +5 -0
- package/.agent/skills/gsd/references/docs/workstream-flag.md +11 -11
- package/.agent/skills/gsd/references/mapping.md +1 -1
- package/.agent/skills/gsd/references/workflows/add-phase.md +112 -112
- package/.agent/skills/gsd/references/workflows/add-tests.md +6 -3
- package/.agent/skills/gsd/references/workflows/add-todo.md +5 -3
- package/.agent/skills/gsd/references/workflows/ai-integration-phase.md +284 -0
- package/.agent/skills/gsd/references/workflows/audit-fix.md +157 -157
- package/.agent/skills/gsd/references/workflows/audit-milestone.md +340 -340
- package/.agent/skills/gsd/references/workflows/audit-uat.md +109 -109
- package/.agent/skills/gsd/references/workflows/autonomous.md +20 -288
- package/.agent/skills/gsd/references/workflows/check-todos.md +4 -2
- package/.agent/skills/gsd/references/workflows/cleanup.md +3 -1
- package/.agent/skills/gsd/references/workflows/code-review-fix.md +497 -497
- package/.agent/skills/gsd/references/workflows/code-review.md +515 -515
- package/.agent/skills/gsd/references/workflows/complete-milestone.md +97 -24
- package/.agent/skills/gsd/references/workflows/diagnose-issues.md +238 -238
- package/.agent/skills/gsd/references/workflows/discovery-phase.md +2 -0
- package/.agent/skills/gsd/references/workflows/discuss-phase-assumptions.md +11 -11
- package/.agent/skills/gsd/references/workflows/discuss-phase.md +143 -19
- package/.agent/skills/gsd/references/workflows/do.md +8 -2
- package/.agent/skills/gsd/references/workflows/docs-update.md +5 -3
- package/.agent/skills/gsd/references/workflows/eval-review.md +155 -0
- package/.agent/skills/gsd/references/workflows/execute-phase.md +338 -54
- package/.agent/skills/gsd/references/workflows/execute-plan.md +80 -104
- package/.agent/skills/gsd/references/workflows/explore.md +3 -1
- package/.agent/skills/gsd/references/workflows/extract_learnings.md +232 -0
- package/.agent/skills/gsd/references/workflows/forensics.md +3 -3
- package/.agent/skills/gsd/references/workflows/health.md +2 -2
- package/.agent/skills/gsd/references/workflows/help.md +59 -1
- package/.agent/skills/gsd/references/workflows/import.md +3 -1
- package/.agent/skills/gsd/references/workflows/inbox.md +387 -384
- package/.agent/skills/gsd/references/workflows/insert-phase.md +130 -130
- package/.agent/skills/gsd/references/workflows/list-workspaces.md +56 -56
- package/.agent/skills/gsd/references/workflows/manager.md +5 -3
- package/.agent/skills/gsd/references/workflows/map-codebase.md +19 -5
- package/.agent/skills/gsd/references/workflows/milestone-summary.md +6 -6
- package/.agent/skills/gsd/references/workflows/new-milestone.md +63 -9
- package/.agent/skills/gsd/references/workflows/new-project.md +126 -22
- package/.agent/skills/gsd/references/workflows/new-workspace.md +6 -4
- package/.agent/skills/gsd/references/workflows/next.md +220 -153
- package/.agent/skills/gsd/references/workflows/note.md +2 -0
- package/.agent/skills/gsd/references/workflows/pause-work.md +11 -7
- package/.agent/skills/gsd/references/workflows/plan-milestone-gaps.md +273 -273
- package/.agent/skills/gsd/references/workflows/plan-phase.md +281 -62
- package/.agent/skills/gsd/references/workflows/plant-seed.md +4 -1
- package/.agent/skills/gsd/references/workflows/pr-branch.md +41 -13
- package/.agent/skills/gsd/references/workflows/profile-user.md +15 -13
- package/.agent/skills/gsd/references/workflows/progress.md +133 -21
- package/.agent/skills/gsd/references/workflows/quick.md +67 -27
- package/.agent/skills/gsd/references/workflows/remove-phase.md +155 -155
- package/.agent/skills/gsd/references/workflows/remove-workspace.md +4 -2
- package/.agent/skills/gsd/references/workflows/research-phase.md +3 -3
- package/.agent/skills/gsd/references/workflows/resume-project.md +3 -3
- package/.agent/skills/gsd/references/workflows/review.md +71 -8
- package/.agent/skills/gsd/references/workflows/scan.md +102 -102
- package/.agent/skills/gsd/references/workflows/secure-phase.md +7 -5
- package/.agent/skills/gsd/references/workflows/settings.md +24 -7
- package/.agent/skills/gsd/references/workflows/ship.md +71 -6
- package/.agent/skills/gsd/references/workflows/sketch-wrap-up.md +283 -0
- package/.agent/skills/gsd/references/workflows/sketch.md +263 -0
- package/.agent/skills/gsd/references/workflows/spec-phase.md +262 -0
- package/.agent/skills/gsd/references/workflows/spike-wrap-up.md +273 -0
- package/.agent/skills/gsd/references/workflows/spike.md +270 -0
- package/.agent/skills/gsd/references/workflows/stats.md +60 -60
- package/.agent/skills/gsd/references/workflows/transition.md +671 -671
- package/.agent/skills/gsd/references/workflows/ui-phase.md +33 -12
- package/.agent/skills/gsd/references/workflows/ui-review.md +6 -4
- package/.agent/skills/gsd/references/workflows/undo.md +3 -1
- package/.agent/skills/gsd/references/workflows/update.md +113 -2
- package/.agent/skills/gsd/references/workflows/validate-phase.md +7 -5
- package/.agent/skills/gsd/references/workflows/verify-phase.md +93 -10
- package/.agent/skills/gsd/references/workflows/verify-work.md +50 -10
- package/.agent/skills/gsd-converter/references/mapping.md +1 -1
- package/.agent/skills/gsd-converter/scripts/convert.py +36 -17
- package/.agent/skills/gsd-converter/scripts/regression_test.py +68 -33
- package/README.md +3 -2
- package/package.json +4 -2
- package/.agent/skills/release-manager/SKILL.md +0 -162
- package/.agent/skills/release-manager/bin/LICENSE +0 -21
- package/.agent/skills/release-manager/bin/gh.exe +0 -0
- package/.agent/skills/release-manager/references/update_kb_from_fixes.md +0 -29
- package/.agent/skills/release-manager/scripts/release.ps1 +0 -222
- package/.agent/skills/selectpaste-update/SKILL.md +0 -46
- package/.agent/skills/selectpaste-update/scripts/sync-commands.py +0 -317
|
@@ -20,6 +20,8 @@ command -v antigravity >/dev/null 2>&1 && echo "antigravity:available" || echo "
|
|
|
20
20
|
command -v codex >/dev/null 2>&1 && echo "codex:available" || echo "codex:missing"
|
|
21
21
|
command -v coderabbit >/dev/null 2>&1 && echo "coderabbit:available" || echo "coderabbit:missing"
|
|
22
22
|
command -v opencode >/dev/null 2>&1 && echo "opencode:available" || echo "opencode:missing"
|
|
23
|
+
command -v qwen >/dev/null 2>&1 && echo "qwen:available" || echo "qwen:missing"
|
|
24
|
+
command -v cursor >/dev/null 2>&1 && echo "cursor:available" || echo "cursor:missing"
|
|
23
25
|
```
|
|
24
26
|
|
|
25
27
|
Parse flags from `$ARGUMENTS`:
|
|
@@ -28,6 +30,8 @@ Parse flags from `$ARGUMENTS`:
|
|
|
28
30
|
- `--codex` → include Codex
|
|
29
31
|
- `--coderabbit` → include CodeRabbit
|
|
30
32
|
- `--opencode` → include OpenCode
|
|
33
|
+
- `--qwen` → include Qwen Code
|
|
34
|
+
- `--cursor` → include Cursor
|
|
31
35
|
- `--all` → include all available
|
|
32
36
|
- No flags → include all available
|
|
33
37
|
|
|
@@ -38,6 +42,8 @@ No external AI CLIs found. Install at least one:
|
|
|
38
42
|
- codex: https://github.com/openai/codex
|
|
39
43
|
- antigravity: https://github.com/anthropics/antigravity-code
|
|
40
44
|
- opencode: https://opencode.ai (leverages GitHub Copilot subscription models)
|
|
45
|
+
- qwen: https://github.com/nicepkg/qwen-code (Alibaba Qwen models)
|
|
46
|
+
- cursor: https://cursor.com (Cursor IDE agent mode)
|
|
41
47
|
|
|
42
48
|
Then run /gsd-review again.
|
|
43
49
|
```
|
|
@@ -50,6 +56,9 @@ Determine which CLI to skip based on the current runtime environment:
|
|
|
50
56
|
if [ "$ANTIGRAVITY_AGENT" = "1" ]; then
|
|
51
57
|
# Antigravity is a separate client — all CLIs are external, skip none
|
|
52
58
|
SELF_CLI="none"
|
|
59
|
+
elif [ -n "$CURSOR_SESSION_ID" ]; then
|
|
60
|
+
# Running inside Cursor agent — skip cursor for independence
|
|
61
|
+
SELF_CLI="cursor"
|
|
53
62
|
elif [ -n "$ANTIGRAVITY_ENTRYPOINT" ]; then
|
|
54
63
|
# Running inside Antigravity CLI — skip antigravity for independence
|
|
55
64
|
SELF_CLI="antigravity"
|
|
@@ -71,7 +80,7 @@ Rules:
|
|
|
71
80
|
Collect phase artifacts for the review prompt:
|
|
72
81
|
|
|
73
82
|
```bash
|
|
74
|
-
|
|
83
|
+
INIT=$(gsd-sdk query init.phase-op "${PHASE_ARG}")
|
|
75
84
|
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
76
85
|
```
|
|
77
86
|
|
|
@@ -139,26 +148,48 @@ Write to a temp file: `/tmp/gsd-review-prompt-{phase}.md`
|
|
|
139
148
|
</step>
|
|
140
149
|
|
|
141
150
|
<step name="invoke_reviewers">
|
|
151
|
+
Read model preferences from planning config. Null/missing values fall back to CLI defaults.
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
# JSON scalars from gsd-sdk query; use jq -r to strip JSON string quotes (install jq if missing)
|
|
155
|
+
GEMINI_MODEL=$(gsd-sdk query config-get review.models.gemini 2>/dev/null | jq -r '.' 2>/dev/null || true)
|
|
156
|
+
ANTIGRAVITY_MODEL=$(gsd-sdk query config-get review.models.antigravity 2>/dev/null | jq -r '.' 2>/dev/null || true)
|
|
157
|
+
CODEX_MODEL=$(gsd-sdk query config-get review.models.codex 2>/dev/null | jq -r '.' 2>/dev/null || true)
|
|
158
|
+
OPENCODE_MODEL=$(gsd-sdk query config-get review.models.opencode 2>/dev/null | jq -r '.' 2>/dev/null || true)
|
|
159
|
+
```
|
|
160
|
+
|
|
142
161
|
For each selected CLI, invoke in sequence (not parallel — avoid rate limits):
|
|
143
162
|
|
|
144
163
|
**Gemini:**
|
|
145
164
|
```bash
|
|
146
|
-
|
|
165
|
+
if [ -n "$GEMINI_MODEL" ] && [ "$GEMINI_MODEL" != "null" ]; then
|
|
166
|
+
cat /tmp/gsd-review-prompt-{phase}.md | gemini -m "$GEMINI_MODEL" -p - 2>/dev/null > /tmp/gsd-review-gemini-{phase}.md
|
|
167
|
+
else
|
|
168
|
+
cat /tmp/gsd-review-prompt-{phase}.md | gemini -p - 2>/dev/null > /tmp/gsd-review-gemini-{phase}.md
|
|
169
|
+
fi
|
|
147
170
|
```
|
|
148
171
|
|
|
149
172
|
**Antigravity (separate session):**
|
|
150
173
|
```bash
|
|
151
|
-
|
|
174
|
+
if [ -n "$ANTIGRAVITY_MODEL" ] && [ "$ANTIGRAVITY_MODEL" != "null" ]; then
|
|
175
|
+
cat /tmp/gsd-review-prompt-{phase}.md | antigravity --model "$ANTIGRAVITY_MODEL" -p - 2>/dev/null > /tmp/gsd-review-antigravity-{phase}.md
|
|
176
|
+
else
|
|
177
|
+
cat /tmp/gsd-review-prompt-{phase}.md | antigravity -p - 2>/dev/null > /tmp/gsd-review-antigravity-{phase}.md
|
|
178
|
+
fi
|
|
152
179
|
```
|
|
153
180
|
|
|
154
181
|
**Codex:**
|
|
155
182
|
```bash
|
|
156
|
-
|
|
183
|
+
if [ -n "$CODEX_MODEL" ] && [ "$CODEX_MODEL" != "null" ]; then
|
|
184
|
+
cat /tmp/gsd-review-prompt-{phase}.md | codex exec --model "$CODEX_MODEL" --skip-git-repo-check - 2>/dev/null > /tmp/gsd-review-codex-{phase}.md
|
|
185
|
+
else
|
|
186
|
+
cat /tmp/gsd-review-prompt-{phase}.md | codex exec --skip-git-repo-check - 2>/dev/null > /tmp/gsd-review-codex-{phase}.md
|
|
187
|
+
fi
|
|
157
188
|
```
|
|
158
189
|
|
|
159
190
|
**CodeRabbit:**
|
|
160
191
|
|
|
161
|
-
Note: CodeRabbit reviews the current git diff/working tree — it does not accept a prompt. It may take up to 5 minutes. Use `timeout: 360000` on the Bash tool call.
|
|
192
|
+
Note: CodeRabbit reviews the current git diff/working tree — it does not accept a prompt or model flag. It may take up to 5 minutes. Use `timeout: 360000` on the Bash tool call.
|
|
162
193
|
|
|
163
194
|
```bash
|
|
164
195
|
coderabbit review --prompt-only 2>/dev/null > /tmp/gsd-review-coderabbit-{phase}.md
|
|
@@ -166,12 +197,32 @@ coderabbit review --prompt-only 2>/dev/null > /tmp/gsd-review-coderabbit-{phase}
|
|
|
166
197
|
|
|
167
198
|
**OpenCode (via GitHub Copilot):**
|
|
168
199
|
```bash
|
|
169
|
-
|
|
200
|
+
if [ -n "$OPENCODE_MODEL" ] && [ "$OPENCODE_MODEL" != "null" ]; then
|
|
201
|
+
cat /tmp/gsd-review-prompt-{phase}.md | opencode run --model "$OPENCODE_MODEL" - 2>/dev/null > /tmp/gsd-review-opencode-{phase}.md
|
|
202
|
+
else
|
|
203
|
+
cat /tmp/gsd-review-prompt-{phase}.md | opencode run - 2>/dev/null > /tmp/gsd-review-opencode-{phase}.md
|
|
204
|
+
fi
|
|
170
205
|
if [ ! -s /tmp/gsd-review-opencode-{phase}.md ]; then
|
|
171
206
|
echo "OpenCode review failed or returned empty output." > /tmp/gsd-review-opencode-{phase}.md
|
|
172
207
|
fi
|
|
173
208
|
```
|
|
174
209
|
|
|
210
|
+
**Qwen Code:**
|
|
211
|
+
```bash
|
|
212
|
+
cat /tmp/gsd-review-prompt-{phase}.md | qwen - 2>/dev/null > /tmp/gsd-review-qwen-{phase}.md
|
|
213
|
+
if [ ! -s /tmp/gsd-review-qwen-{phase}.md ]; then
|
|
214
|
+
echo "Qwen review failed or returned empty output." > /tmp/gsd-review-qwen-{phase}.md
|
|
215
|
+
fi
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
**Cursor:**
|
|
219
|
+
```bash
|
|
220
|
+
cat /tmp/gsd-review-prompt-{phase}.md | cursor agent -p --mode ask --trust 2>/dev/null > /tmp/gsd-review-cursor-{phase}.md
|
|
221
|
+
if [ ! -s /tmp/gsd-review-cursor-{phase}.md ]; then
|
|
222
|
+
echo "Cursor review failed or returned empty output." > /tmp/gsd-review-cursor-{phase}.md
|
|
223
|
+
fi
|
|
224
|
+
```
|
|
225
|
+
|
|
175
226
|
If a CLI fails, log the error and continue with remaining CLIs.
|
|
176
227
|
|
|
177
228
|
Display progress:
|
|
@@ -191,7 +242,7 @@ Combine all review responses into `{phase_dir}/{padded_phase}-REVIEWS.md`:
|
|
|
191
242
|
```markdown
|
|
192
243
|
---
|
|
193
244
|
phase: {N}
|
|
194
|
-
reviewers: [gemini, antigravity, codex, coderabbit, opencode]
|
|
245
|
+
reviewers: [gemini, antigravity, codex, coderabbit, opencode, qwen, cursor]
|
|
195
246
|
reviewed_at: {ISO timestamp}
|
|
196
247
|
plans_reviewed: [{list of PLAN.md files}]
|
|
197
248
|
---
|
|
@@ -228,6 +279,18 @@ plans_reviewed: [{list of PLAN.md files}]
|
|
|
228
279
|
|
|
229
280
|
---
|
|
230
281
|
|
|
282
|
+
## Qwen Review
|
|
283
|
+
|
|
284
|
+
{qwen review content}
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## Cursor Review
|
|
289
|
+
|
|
290
|
+
{cursor review content}
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
231
294
|
## Consensus Summary
|
|
232
295
|
|
|
233
296
|
{synthesize common concerns across all reviewers}
|
|
@@ -244,7 +307,7 @@ plans_reviewed: [{list of PLAN.md files}]
|
|
|
244
307
|
|
|
245
308
|
Commit:
|
|
246
309
|
```bash
|
|
247
|
-
|
|
310
|
+
gsd-sdk query commit "docs: cross-AI review for phase {N}" {phase_dir}/{padded_phase}-REVIEWS.md
|
|
248
311
|
```
|
|
249
312
|
</step>
|
|
250
313
|
|
|
@@ -1,102 +1,102 @@
|
|
|
1
|
-
<purpose>
|
|
2
|
-
Lightweight codebase assessment. Spawns a single gsd-codebase-mapper agent for one focus area,
|
|
3
|
-
producing targeted documents in `.planning/codebase/`.
|
|
4
|
-
</purpose>
|
|
5
|
-
|
|
6
|
-
<required_reading>
|
|
7
|
-
Read all files referenced by the invoking prompt's execution_context before starting.
|
|
8
|
-
</required_reading>
|
|
9
|
-
|
|
10
|
-
<available_agent_types>
|
|
11
|
-
Valid GSD subagent types (use exact names — do not fall back to 'general-purpose'):
|
|
12
|
-
- gsd-codebase-mapper — Maps project structure and dependencies
|
|
13
|
-
</available_agent_types>
|
|
14
|
-
|
|
15
|
-
<process>
|
|
16
|
-
|
|
17
|
-
## Focus-to-Document Mapping
|
|
18
|
-
|
|
19
|
-
| Focus | Documents Produced |
|
|
20
|
-
|-------|-------------------|
|
|
21
|
-
| `tech` | STACK.md, INTEGRATIONS.md |
|
|
22
|
-
| `arch` | ARCHITECTURE.md, STRUCTURE.md |
|
|
23
|
-
| `quality` | CONVENTIONS.md, TESTING.md |
|
|
24
|
-
| `concerns` | CONCERNS.md |
|
|
25
|
-
| `tech+arch` | STACK.md, INTEGRATIONS.md, ARCHITECTURE.md, STRUCTURE.md |
|
|
26
|
-
|
|
27
|
-
## Step 1: Parse arguments and resolve focus
|
|
28
|
-
|
|
29
|
-
Parse the user's input for `--focus <area>`. Default to `tech+arch` if not specified.
|
|
30
|
-
|
|
31
|
-
Validate that the focus is one of: `tech`, `arch`, `quality`, `concerns`, `tech+arch`.
|
|
32
|
-
|
|
33
|
-
If invalid:
|
|
34
|
-
```
|
|
35
|
-
Unknown focus area: "{input}". Valid options: tech, arch, quality, concerns, tech+arch
|
|
36
|
-
```
|
|
37
|
-
Exit.
|
|
38
|
-
|
|
39
|
-
## Step 2: Check for existing documents
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
|
|
43
|
-
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Look up which documents would be produced for the selected focus (from the mapping table above).
|
|
47
|
-
|
|
48
|
-
For each target document, check if it already exists in `.planning/codebase/`:
|
|
49
|
-
```bash
|
|
50
|
-
ls -la .planning/codebase/{DOCUMENT}.md 2>/dev/null
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
If any exist, show their modification dates and ask:
|
|
54
|
-
```
|
|
55
|
-
Existing documents found:
|
|
56
|
-
- STACK.md (modified 2026-04-03)
|
|
57
|
-
- INTEGRATIONS.md (modified 2026-04-01)
|
|
58
|
-
|
|
59
|
-
Overwrite with fresh scan? [y/N]
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
If user says no, exit.
|
|
63
|
-
|
|
64
|
-
## Step 3: Create output directory
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
mkdir -p .planning/codebase
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
## Step 4: Spawn mapper agent
|
|
71
|
-
|
|
72
|
-
Spawn a single `gsd-codebase-mapper` agent with the selected focus area:
|
|
73
|
-
|
|
74
|
-
```
|
|
75
|
-
Task(
|
|
76
|
-
prompt="Scan this codebase with focus: {focus}. Write results to .planning/codebase/. Produce only: {document_list}",
|
|
77
|
-
subagent_type="gsd-codebase-mapper",
|
|
78
|
-
model="{resolved_model}"
|
|
79
|
-
)
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
## Step 5: Report
|
|
83
|
-
|
|
84
|
-
```
|
|
85
|
-
## Scan Complete
|
|
86
|
-
|
|
87
|
-
**Focus:** {focus}
|
|
88
|
-
**Documents produced:**
|
|
89
|
-
{list of documents written with line counts}
|
|
90
|
-
|
|
91
|
-
Use `/gsd-map-codebase` for a comprehensive 4-area parallel scan.
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
</process>
|
|
95
|
-
|
|
96
|
-
<success_criteria>
|
|
97
|
-
- [ ] Focus area correctly parsed (default: tech+arch)
|
|
98
|
-
- [ ] Existing documents detected with modification dates shown
|
|
99
|
-
- [ ] User prompted before overwriting
|
|
100
|
-
- [ ] Single mapper agent spawned with correct focus
|
|
101
|
-
- [ ] Output documents written to .planning/codebase/
|
|
102
|
-
</success_criteria>
|
|
1
|
+
<purpose>
|
|
2
|
+
Lightweight codebase assessment. Spawns a single gsd-codebase-mapper agent for one focus area,
|
|
3
|
+
producing targeted documents in `.planning/codebase/`.
|
|
4
|
+
</purpose>
|
|
5
|
+
|
|
6
|
+
<required_reading>
|
|
7
|
+
Read all files referenced by the invoking prompt's execution_context before starting.
|
|
8
|
+
</required_reading>
|
|
9
|
+
|
|
10
|
+
<available_agent_types>
|
|
11
|
+
Valid GSD subagent types (use exact names — do not fall back to 'general-purpose'):
|
|
12
|
+
- gsd-codebase-mapper — Maps project structure and dependencies
|
|
13
|
+
</available_agent_types>
|
|
14
|
+
|
|
15
|
+
<process>
|
|
16
|
+
|
|
17
|
+
## Focus-to-Document Mapping
|
|
18
|
+
|
|
19
|
+
| Focus | Documents Produced |
|
|
20
|
+
|-------|-------------------|
|
|
21
|
+
| `tech` | STACK.md, INTEGRATIONS.md |
|
|
22
|
+
| `arch` | ARCHITECTURE.md, STRUCTURE.md |
|
|
23
|
+
| `quality` | CONVENTIONS.md, TESTING.md |
|
|
24
|
+
| `concerns` | CONCERNS.md |
|
|
25
|
+
| `tech+arch` | STACK.md, INTEGRATIONS.md, ARCHITECTURE.md, STRUCTURE.md |
|
|
26
|
+
|
|
27
|
+
## Step 1: Parse arguments and resolve focus
|
|
28
|
+
|
|
29
|
+
Parse the user's input for `--focus <area>`. Default to `tech+arch` if not specified.
|
|
30
|
+
|
|
31
|
+
Validate that the focus is one of: `tech`, `arch`, `quality`, `concerns`, `tech+arch`.
|
|
32
|
+
|
|
33
|
+
If invalid:
|
|
34
|
+
```
|
|
35
|
+
Unknown focus area: "{input}". Valid options: tech, arch, quality, concerns, tech+arch
|
|
36
|
+
```
|
|
37
|
+
Exit.
|
|
38
|
+
|
|
39
|
+
## Step 2: Check for existing documents
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
INIT=$(gsd-sdk query init.map-codebase 2>/dev/null || echo "{}")
|
|
43
|
+
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Look up which documents would be produced for the selected focus (from the mapping table above).
|
|
47
|
+
|
|
48
|
+
For each target document, check if it already exists in `.planning/codebase/`:
|
|
49
|
+
```bash
|
|
50
|
+
ls -la .planning/codebase/{DOCUMENT}.md 2>/dev/null
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
If any exist, show their modification dates and ask:
|
|
54
|
+
```
|
|
55
|
+
Existing documents found:
|
|
56
|
+
- STACK.md (modified 2026-04-03)
|
|
57
|
+
- INTEGRATIONS.md (modified 2026-04-01)
|
|
58
|
+
|
|
59
|
+
Overwrite with fresh scan? [y/N]
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
If user says no, exit.
|
|
63
|
+
|
|
64
|
+
## Step 3: Create output directory
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
mkdir -p .planning/codebase
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Step 4: Spawn mapper agent
|
|
71
|
+
|
|
72
|
+
Spawn a single `gsd-codebase-mapper` agent with the selected focus area:
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
Task(
|
|
76
|
+
prompt="Scan this codebase with focus: {focus}. Write results to .planning/codebase/. Produce only: {document_list}",
|
|
77
|
+
subagent_type="gsd-codebase-mapper",
|
|
78
|
+
model="{resolved_model}"
|
|
79
|
+
)
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Step 5: Report
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
## Scan Complete
|
|
86
|
+
|
|
87
|
+
**Focus:** {focus}
|
|
88
|
+
**Documents produced:**
|
|
89
|
+
{list of documents written with line counts}
|
|
90
|
+
|
|
91
|
+
Use `/gsd-map-codebase` for a comprehensive 4-area parallel scan.
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
</process>
|
|
95
|
+
|
|
96
|
+
<success_criteria>
|
|
97
|
+
- [ ] Focus area correctly parsed (default: tech+arch)
|
|
98
|
+
- [ ] Existing documents detected with modification dates shown
|
|
99
|
+
- [ ] User prompted before overwriting
|
|
100
|
+
- [ ] Single mapper agent spawned with correct focus
|
|
101
|
+
- [ ] Output documents written to .planning/codebase/
|
|
102
|
+
</success_criteria>
|
|
@@ -16,16 +16,16 @@ Valid GSD subagent types (use exact names — do not fall back to 'general-purpo
|
|
|
16
16
|
## 0. Initialize
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
|
|
19
|
+
INIT=$(gsd-sdk query init.phase-op "${PHASE_ARG}")
|
|
20
20
|
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
21
|
-
|
|
21
|
+
AGENT_SKILLS_AUDITOR=$(gsd-sdk query agent-skills gsd-security-auditor 2>/dev/null)
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
Parse: `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `padded_phase`.
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
AUDITOR_MODEL=$(gsd-sdk query resolve-model gsd-security-auditor --raw)
|
|
28
|
+
SECURITY_CFG=$(gsd-sdk query config-get workflow.security_enforcement --raw 2>/dev/null || echo "true")
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
If `SECURITY_CFG` is `false`: exit with "Security enforcement disabled. Enable via /gsd-settings."
|
|
@@ -73,6 +73,8 @@ If `threats_open: 0` → skip to Step 6 directly.
|
|
|
73
73
|
|
|
74
74
|
## 4. Present Threat Plan
|
|
75
75
|
|
|
76
|
+
|
|
77
|
+
**Text mode (`workflow.text_mode: true` in config or `--text` flag):** Set `TEXT_MODE=true` if `--text` is present in `$ARGUMENTS` OR `text_mode` from init JSON is `true`. When TEXT_MODE is active, replace every `AskUserQuestion` call with a plain-text numbered list and ask the user to type their choice number. This is required for non-Antigravity runtimes (OpenAI Codex, Gemini CLI, etc.) where `AskUserQuestion` is not available.
|
|
76
78
|
Call AskUserQuestion with threat table and options:
|
|
77
79
|
1. "Verify all open threats" → Step 5
|
|
78
80
|
2. "Accept all open — document in accepted risks log" → add to SECURITY.md accepted risks, set all CLOSED, Step 6
|
|
@@ -132,7 +134,7 @@ Do NOT emit next-phase routing. Stop here.
|
|
|
132
134
|
## 7. Commit
|
|
133
135
|
|
|
134
136
|
```bash
|
|
135
|
-
|
|
137
|
+
gsd-sdk query commit "docs(phase-${PHASE}): add/update security threat verification"
|
|
136
138
|
```
|
|
137
139
|
|
|
138
140
|
## 8. Results + Routing
|
|
@@ -12,17 +12,19 @@ Read all files referenced by the invoking prompt's execution_context before star
|
|
|
12
12
|
Ensure config exists and load current state:
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
|
|
16
|
-
.agent/skills/gsd/bin/gsd-tools.cjs"
|
|
15
|
+
gsd-sdk query config-ensure-section
|
|
16
|
+
.agent/skills/gsd/bin/gsd-tools.cjs" config-path)
|
|
17
|
+
INIT=$(gsd-sdk query state.load)
|
|
17
18
|
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
18
19
|
```
|
|
19
20
|
|
|
20
|
-
Creates
|
|
21
|
+
Creates config.json (at the workstream-aware path) with defaults if missing and loads current config values.
|
|
22
|
+
Store `$GSD_CONFIG_PATH` — all subsequent reads and writes use this path, not the hardcoded `.planning/config.json`, so active-workstream installs write to the correct location (#2282).
|
|
21
23
|
</step>
|
|
22
24
|
|
|
23
25
|
<step name="read_current">
|
|
24
26
|
```bash
|
|
25
|
-
cat
|
|
27
|
+
cat "$GSD_CONFIG_PATH"
|
|
26
28
|
```
|
|
27
29
|
|
|
28
30
|
Parse current values (default to `true` if not present):
|
|
@@ -32,12 +34,15 @@ Parse current values (default to `true` if not present):
|
|
|
32
34
|
- `workflow.nyquist_validation` — validation architecture research during plan-phase (default: true if absent)
|
|
33
35
|
- `workflow.ui_phase` — generate UI-SPEC.md design contracts for frontend phases (default: true if absent)
|
|
34
36
|
- `workflow.ui_safety_gate` — prompt to run /gsd-ui-phase before planning frontend phases (default: true if absent)
|
|
37
|
+
- `workflow.ai_integration_phase` — framework selection + eval strategy for AI phases (default: true if absent)
|
|
35
38
|
- `model_profile` — which model each agent uses (default: `balanced`)
|
|
36
39
|
- `git.branching_strategy` — branching approach (default: `"none"`)
|
|
37
40
|
- `workflow.use_worktrees` — whether parallel executor agents run in worktree isolation (default: `true`)
|
|
38
41
|
</step>
|
|
39
42
|
|
|
40
43
|
<step name="present_settings">
|
|
44
|
+
|
|
45
|
+
**Text mode (`workflow.text_mode: true` in config or `--text` flag):** Set `TEXT_MODE=true` if `--text` is present in `$ARGUMENTS` OR `text_mode` from init JSON is `true`. When TEXT_MODE is active, replace every `AskUserQuestion` call with a plain-text numbered list and ask the user to type their choice number. This is required for non-Antigravity runtimes (OpenAI Codex, Gemini CLI, etc.) where `AskUserQuestion` is not available.
|
|
41
46
|
Use AskUserQuestion with current values pre-selected:
|
|
42
47
|
|
|
43
48
|
```
|
|
@@ -118,6 +123,15 @@ AskUserQuestion([
|
|
|
118
123
|
{ label: "No", description: "No prompt — plan-phase proceeds without UI-SPEC check." }
|
|
119
124
|
]
|
|
120
125
|
},
|
|
126
|
+
{
|
|
127
|
+
question: "Enable AI Phase? (framework selection + eval strategy for AI phases)",
|
|
128
|
+
header: "AI Phase",
|
|
129
|
+
multiSelect: false,
|
|
130
|
+
options: [
|
|
131
|
+
{ label: "Yes (Recommended)", description: "Run /gsd-ai-phase before planning AI system phases. Surfaces the right framework, researches its docs, and designs the evaluation strategy." },
|
|
132
|
+
{ label: "No", description: "Skip AI design contract. Good for non-AI phases or when framework is already decided." }
|
|
133
|
+
]
|
|
134
|
+
},
|
|
121
135
|
{
|
|
122
136
|
question: "Git branching strategy?",
|
|
123
137
|
header: "Branching",
|
|
@@ -161,7 +175,7 @@ AskUserQuestion([
|
|
|
161
175
|
multiSelect: false,
|
|
162
176
|
options: [
|
|
163
177
|
{ label: "Yes (Recommended)", description: "Each parallel executor runs in its own worktree branch — no conflicts between agents." },
|
|
164
|
-
{ label: "No", description: "Disable worktree isolation.
|
|
178
|
+
{ label: "No", description: "Disable worktree isolation. Agents run sequentially on the main working tree. Use if EnterWorktree creates branches from wrong base (known cross-platform issue)." }
|
|
165
179
|
]
|
|
166
180
|
}
|
|
167
181
|
])
|
|
@@ -183,6 +197,7 @@ Merge new settings into existing config.json:
|
|
|
183
197
|
"nyquist_validation": true/false,
|
|
184
198
|
"ui_phase": true/false,
|
|
185
199
|
"ui_safety_gate": true/false,
|
|
200
|
+
"ai_integration_phase": true/false,
|
|
186
201
|
"text_mode": true/false,
|
|
187
202
|
"research_before_questions": true/false,
|
|
188
203
|
"discuss_mode": "discuss" | "assumptions",
|
|
@@ -200,7 +215,7 @@ Merge new settings into existing config.json:
|
|
|
200
215
|
}
|
|
201
216
|
```
|
|
202
217
|
|
|
203
|
-
Write updated config to `.planning/config.json`.
|
|
218
|
+
Write updated config to `$GSD_CONFIG_PATH` (the workstream-aware path resolved in `ensure_and_load_config`). Never hardcode `.planning/config.json` — workstream installs route to `.planning/workstreams/<slug>/config.json`.
|
|
204
219
|
</step>
|
|
205
220
|
|
|
206
221
|
<step name="save_as_defaults">
|
|
@@ -244,6 +259,7 @@ Write `~/.gsd/defaults.json` with:
|
|
|
244
259
|
"nyquist_validation": <current>,
|
|
245
260
|
"ui_phase": <current>,
|
|
246
261
|
"ui_safety_gate": <current>,
|
|
262
|
+
"ai_integration_phase": <current>,
|
|
247
263
|
"skip_discuss": <current>
|
|
248
264
|
}
|
|
249
265
|
}
|
|
@@ -268,6 +284,7 @@ Display:
|
|
|
268
284
|
| Nyquist Validation | {On/Off} |
|
|
269
285
|
| UI Phase | {On/Off} |
|
|
270
286
|
| UI Safety Gate | {On/Off} |
|
|
287
|
+
| AI Integration Phase | {On/Off} |
|
|
271
288
|
| Git Branching | {None/Per Phase/Per Milestone} |
|
|
272
289
|
| Skip Discuss | {On/Off} |
|
|
273
290
|
| Context Warnings | {On/Off} |
|
|
@@ -287,7 +304,7 @@ Quick commands:
|
|
|
287
304
|
|
|
288
305
|
<success_criteria>
|
|
289
306
|
- [ ] Current config read
|
|
290
|
-
- [ ] User presented with
|
|
307
|
+
- [ ] User presented with 14 settings (profile + 11 workflow toggles + git branching + ctx warnings)
|
|
291
308
|
- [ ] Config updated with model_profile, workflow, and git sections
|
|
292
309
|
- [ ] User offered to save as global defaults (~/.gsd/defaults.json)
|
|
293
310
|
- [ ] Changes confirmed to user
|
|
@@ -12,7 +12,7 @@ Read all files referenced by the invoking prompt's execution_context before star
|
|
|
12
12
|
Parse arguments and load project state:
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
|
|
15
|
+
INIT=$(gsd-sdk query init.phase-op "${PHASE_ARG}")
|
|
16
16
|
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
17
17
|
```
|
|
18
18
|
|
|
@@ -20,14 +20,14 @@ Parse from init JSON: `phase_found`, `phase_dir`, `phase_number`, `phase_name`,
|
|
|
20
20
|
|
|
21
21
|
Also load config for branching strategy:
|
|
22
22
|
```bash
|
|
23
|
-
|
|
23
|
+
CONFIG=$(gsd-sdk query state.load)
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
Extract: `branching_strategy`, `branch_name`.
|
|
27
27
|
|
|
28
28
|
Detect base branch for PRs and merges:
|
|
29
29
|
```bash
|
|
30
|
-
|
|
30
|
+
BASE_BRANCH=$(gsd-sdk query config-get git.base_branch 2>/dev/null || echo "")
|
|
31
31
|
if [ -z "$BASE_BRANCH" ] || [ "$BASE_BRANCH" = "null" ]; then
|
|
32
32
|
BASE_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's|^refs/remotes/origin/||')
|
|
33
33
|
BASE_BRANCH="${BASE_BRANCH:-main}"
|
|
@@ -159,8 +159,73 @@ Report: "PR #{number} created: {url}"
|
|
|
159
159
|
</step>
|
|
160
160
|
|
|
161
161
|
<step name="optional_review">
|
|
162
|
+
|
|
163
|
+
**External code review command (automated sub-step):**
|
|
164
|
+
|
|
165
|
+
Before prompting the user, check if an external review command is configured:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
REVIEW_CMD=$(gsd-sdk query config-get workflow.code_review_command 2>/dev/null | jq -r '.' 2>/dev/null || echo "")
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
If `REVIEW_CMD` is non-empty and not `"null"`, run the external review:
|
|
172
|
+
|
|
173
|
+
1. **Generate diff and stats:**
|
|
174
|
+
```bash
|
|
175
|
+
DIFF=$(git diff ${BASE_BRANCH}...HEAD)
|
|
176
|
+
DIFF_STATS=$(git diff --stat ${BASE_BRANCH}...HEAD)
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
2. **Load phase context from STATE.md:**
|
|
180
|
+
```bash
|
|
181
|
+
STATE_STATUS=$(gsd-sdk query state.load 2>/dev/null | head -20)
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
3. **Build review prompt and pipe to command via stdin:**
|
|
185
|
+
Construct a review prompt containing the diff, diff stats, and phase context, then pipe it to the configured command:
|
|
186
|
+
```bash
|
|
187
|
+
REVIEW_PROMPT="You are reviewing a pull request.\n\nDiff stats:\n${DIFF_STATS}\n\nPhase context:\n${STATE_STATUS}\n\nFull diff:\n${DIFF}\n\nRespond with JSON: { \"verdict\": \"APPROVED\" or \"REVISE\", \"confidence\": 0-100, \"summary\": \"...\", \"issues\": [{\"severity\": \"...\", \"file\": \"...\", \"line_range\": \"...\", \"description\": \"...\", \"suggestion\": \"...\"}] }"
|
|
188
|
+
REVIEW_OUTPUT=$(echo "${REVIEW_PROMPT}" | timeout 120 ${REVIEW_CMD} 2>/tmp/gsd-review-stderr.log)
|
|
189
|
+
REVIEW_EXIT=$?
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
4. **Handle timeout (120s) and failure:**
|
|
193
|
+
If `REVIEW_EXIT` is non-zero or the command times out:
|
|
194
|
+
```bash
|
|
195
|
+
if [ $REVIEW_EXIT -ne 0 ]; then
|
|
196
|
+
REVIEW_STDERR=$(cat /tmp/gsd-review-stderr.log 2>/dev/null)
|
|
197
|
+
echo "WARNING: External review command failed (exit ${REVIEW_EXIT}). stderr: ${REVIEW_STDERR}"
|
|
198
|
+
echo "Continuing with manual review flow..."
|
|
199
|
+
fi
|
|
200
|
+
```
|
|
201
|
+
On failure, warn with stderr output and fall through to the manual review flow below.
|
|
202
|
+
|
|
203
|
+
5. **Parse JSON result:**
|
|
204
|
+
If the command succeeded, parse the JSON output and report the verdict:
|
|
205
|
+
```bash
|
|
206
|
+
# Parse verdict and summary from REVIEW_OUTPUT JSON
|
|
207
|
+
VERDICT=$(echo "${REVIEW_OUTPUT}" | node -e "
|
|
208
|
+
let d=''; process.stdin.on('data',c=>d+=c); process.stdin.on('end',()=>{
|
|
209
|
+
try { const r=JSON.parse(d); console.log(r.verdict); }
|
|
210
|
+
catch(e) { console.log('INVALID_JSON'); }
|
|
211
|
+
});
|
|
212
|
+
")
|
|
213
|
+
```
|
|
214
|
+
- If `verdict` is `"APPROVED"`: report approval with confidence and summary.
|
|
215
|
+
- If `verdict` is `"REVISE"`: report issues found, list each issue with severity, file, line_range, description, and suggestion.
|
|
216
|
+
- If JSON is invalid (`INVALID_JSON`): warn "External review returned invalid JSON" with stderr and continue.
|
|
217
|
+
|
|
218
|
+
Regardless of the external review result, fall through to the manual review options below.
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
**Manual review options:**
|
|
223
|
+
|
|
162
224
|
Ask if user wants to trigger a code review:
|
|
163
225
|
|
|
226
|
+
|
|
227
|
+
**Text mode (`workflow.text_mode: true` in config or `--text` flag):** Set `TEXT_MODE=true` if `--text` is present in `$ARGUMENTS` OR `text_mode` from init JSON is `true`. When TEXT_MODE is active, replace every `AskUserQuestion` call with a plain-text numbered list and ask the user to type their choice number. This is required for non-Antigravity runtimes (OpenAI Codex, Gemini CLI, etc.) where `AskUserQuestion` is not available.
|
|
228
|
+
|
|
164
229
|
```
|
|
165
230
|
AskUserQuestion:
|
|
166
231
|
question: "PR created. Run a code review before merge?"
|
|
@@ -186,13 +251,13 @@ Report the PR URL and suggest: "Review the diff at {url}/files"
|
|
|
186
251
|
Update STATE.md to reflect the shipping action:
|
|
187
252
|
|
|
188
253
|
```bash
|
|
189
|
-
|
|
190
|
-
|
|
254
|
+
gsd-sdk query state.update "Last Activity" "$(date +%Y-%m-%d)"
|
|
255
|
+
gsd-sdk query state.update "Status" "Phase ${PHASE_NUMBER} shipped — PR #${PR_NUMBER}"
|
|
191
256
|
```
|
|
192
257
|
|
|
193
258
|
If `commit_docs` is true:
|
|
194
259
|
```bash
|
|
195
|
-
|
|
260
|
+
gsd-sdk query commit "docs(${padded_phase}): ship phase ${PHASE_NUMBER} — PR #${PR_NUMBER}" .planning/STATE.md
|
|
196
261
|
```
|
|
197
262
|
</step>
|
|
198
263
|
|