gsd-antigravity-kit 2.0.1 → 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 +1 -1
|
@@ -15,6 +15,7 @@ Read all files referenced by the invoking prompt's execution_context before star
|
|
|
15
15
|
<available_agent_types>
|
|
16
16
|
Valid GSD subagent types (use exact names — do not fall back to 'general-purpose'):
|
|
17
17
|
- gsd-phase-researcher — Researches technical approaches for a phase
|
|
18
|
+
- gsd-pattern-mapper — Analyzes codebase for existing patterns, produces PATTERNS.md
|
|
18
19
|
- gsd-planner — Creates detailed plans from phase scope
|
|
19
20
|
- gsd-plan-checker — Reviews plan quality before execution
|
|
20
21
|
</available_agent_types>
|
|
@@ -26,15 +27,18 @@ Valid GSD subagent types (use exact names — do not fall back to 'general-purpo
|
|
|
26
27
|
Load all context in one call (paths only to minimize orchestrator context):
|
|
27
28
|
|
|
28
29
|
```bash
|
|
29
|
-
|
|
30
|
+
INIT=$(gsd-sdk query init.plan-phase "$PHASE")
|
|
30
31
|
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
AGENT_SKILLS_RESEARCHER=$(gsd-sdk query agent-skills gsd-researcher 2>/dev/null)
|
|
33
|
+
AGENT_SKILLS_PLANNER=$(gsd-sdk query agent-skills gsd-planner 2>/dev/null)
|
|
34
|
+
AGENT_SKILLS_CHECKER=$(gsd-sdk query agent-skills gsd-checker 2>/dev/null)
|
|
35
|
+
CONTEXT_WINDOW=$(gsd-sdk query config-get context_window 2>/dev/null || echo "200000")
|
|
36
|
+
TDD_MODE=$(gsd-sdk query config-get workflow.tdd_mode 2>/dev/null || echo "false")
|
|
35
37
|
```
|
|
36
38
|
|
|
37
|
-
When `
|
|
39
|
+
When `TDD_MODE` is `true`, the planner agent is instructed to apply `type: tdd` to eligible tasks using heuristics from `references/tdd.md`. The planner's `<required_reading>` is extended to include `@references/docs/tdd.md` so gate enforcement rules are available during planning.
|
|
40
|
+
|
|
41
|
+
When `CONTEXT_WINDOW >= 500000`, the planner prompt includes the 3 most recent prior phase CONTEXT.md and SUMMARY.md files PLUS any phases explicitly listed in the current phase's `Depends on:` field in ROADMAP.md. Explicit dependencies always load regardless of recency (e.g., Phase 7 declaring `Depends on: Phase 2` always sees Phase 2's context). Bounded recency keeps the planner's context budget focused on recent work.
|
|
38
42
|
|
|
39
43
|
Parse JSON for: `researcher_model`, `planner_model`, `checker_model`, `research_enabled`, `plan_checker_enabled`, `nyquist_validation_enabled`, `commit_docs`, `text_mode`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `padded_phase`, `has_research`, `has_context`, `has_reviews`, `has_plans`, `plan_count`, `planning_exists`, `roadmap_exists`, `phase_req_ids`, `response_language`.
|
|
40
44
|
|
|
@@ -46,7 +50,7 @@ Parse JSON for: `researcher_model`, `planner_model`, `checker_model`, `research_
|
|
|
46
50
|
|
|
47
51
|
## 2. Parse and Normalize Arguments
|
|
48
52
|
|
|
49
|
-
Extract from $ARGUMENTS: phase number (integer or decimal like `2.1`), flags (`--research`, `--skip-research`, `--gaps`, `--skip-verify`, `--prd <filepath>`, `--reviews`, `--text`).
|
|
53
|
+
Extract from $ARGUMENTS: phase number (integer or decimal like `2.1`), flags (`--research`, `--skip-research`, `--gaps`, `--skip-verify`, `--skip-ui`, `--prd <filepath>`, `--reviews`, `--text`, `--bounce`, `--skip-bounce`).
|
|
50
54
|
|
|
51
55
|
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 Antigravity remote sessions (`/rc` mode) where TUI menus don't work through the Antigravity App.
|
|
52
56
|
|
|
@@ -82,7 +86,7 @@ Exit workflow.
|
|
|
82
86
|
## 3. Validate Phase
|
|
83
87
|
|
|
84
88
|
```bash
|
|
85
|
-
|
|
89
|
+
PHASE_INFO=$(gsd-sdk query roadmap.get-phase "${PHASE}")
|
|
86
90
|
```
|
|
87
91
|
|
|
88
92
|
**If `found` is false:** Error with available phases. **If `found` is true:** Extract `phase_number`, `phase_name`, `goal` from JSON.
|
|
@@ -184,7 +188,7 @@ Use full relative paths. Group by topic area.]
|
|
|
184
188
|
|
|
185
189
|
5. Commit:
|
|
186
190
|
```bash
|
|
187
|
-
|
|
191
|
+
gsd-sdk query commit "docs(${padded_phase}): generate context from PRD" "${phase_dir}/${padded_phase}-CONTEXT.md"
|
|
188
192
|
```
|
|
189
193
|
|
|
190
194
|
6. Set `context_content` to the generated CONTEXT.md content and continue to step 5 (Handle Research).
|
|
@@ -203,7 +207,7 @@ If `context_path` is not null, display: `Using phase context from: ${context_pat
|
|
|
203
207
|
|
|
204
208
|
Read discuss mode for context gate label:
|
|
205
209
|
```bash
|
|
206
|
-
|
|
210
|
+
DISCUSS_MODE=$(gsd-sdk query config-get workflow.discuss_mode 2>/dev/null || echo "discuss")
|
|
207
211
|
```
|
|
208
212
|
|
|
209
213
|
If `TEXT_MODE` is true, present as a plain-text numbered list:
|
|
@@ -241,6 +245,46 @@ If "Run discuss-phase first":
|
|
|
241
245
|
```
|
|
242
246
|
**Exit the plan-phase workflow. Do not continue.**
|
|
243
247
|
|
|
248
|
+
## 4.5. Check AI-SPEC
|
|
249
|
+
|
|
250
|
+
**Skip if:** `ai_integration_phase_enabled` from config is false, or `--skip-ai-spec` flag provided.
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
AI_SPEC_FILE=$(ls "${PHASE_DIR}"/*-AI-SPEC.md 2>/dev/null | head -1)
|
|
254
|
+
AI_PHASE_CFG=$(gsd-sdk query config-get workflow.ai_integration_phase 2>/dev/null || echo "true")
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
**Skip if `AI_PHASE_CFG` is `false`.**
|
|
258
|
+
|
|
259
|
+
**If `AI_SPEC_FILE` is empty:** Check phase goal for AI keywords:
|
|
260
|
+
```bash
|
|
261
|
+
echo "${phase_goal}" | grep -qi "agent\|llm\|rag\|chatbot\|embedding\|langchain\|llamaindex\|crewai\|langgraph\|openai\|anthropic\|vector\|eval\|ai system"
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
**If AI keywords detected AND no AI-SPEC.md:**
|
|
265
|
+
```
|
|
266
|
+
◆ Note: This phase appears to involve AI system development.
|
|
267
|
+
Consider running /gsd-ai-integration-phase {N} before planning to:
|
|
268
|
+
- Select the right framework for your use case
|
|
269
|
+
- Research its docs and best practices
|
|
270
|
+
- Design an evaluation strategy
|
|
271
|
+
|
|
272
|
+
Continue planning without AI-SPEC? (non-blocking — /gsd-ai-integration-phase can be run after)
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Use AskUserQuestion with options:
|
|
276
|
+
- "Continue — plan without AI-SPEC"
|
|
277
|
+
- "Stop — I'll run /gsd-ai-integration-phase {N} first"
|
|
278
|
+
|
|
279
|
+
If "Stop": Exit with `/gsd-ai-integration-phase {N}` reminder.
|
|
280
|
+
If "Continue": Proceed. (Non-blocking — planner will note AI-SPEC is absent.)
|
|
281
|
+
|
|
282
|
+
**If `AI_SPEC_FILE` is non-empty:** Extract framework for planner context:
|
|
283
|
+
```bash
|
|
284
|
+
FRAMEWORK_LINE=$(grep "Selected Framework:" "${AI_SPEC_FILE}" | head -1)
|
|
285
|
+
```
|
|
286
|
+
Pass `ai_spec_path` and `framework_line` to planner in step 7 so it can reference the AI design contract.
|
|
287
|
+
|
|
244
288
|
## 5. Handle Research
|
|
245
289
|
|
|
246
290
|
**Skip if:** `--gaps` flag or `--skip-research` flag or `--reviews` flag.
|
|
@@ -293,7 +337,7 @@ Display banner:
|
|
|
293
337
|
### Spawn gsd-phase-researcher
|
|
294
338
|
|
|
295
339
|
```bash
|
|
296
|
-
|
|
340
|
+
PHASE_DESC=$(gsd-sdk query roadmap.get-phase "${PHASE}" --pick section)
|
|
297
341
|
```
|
|
298
342
|
|
|
299
343
|
Research prompt:
|
|
@@ -374,9 +418,9 @@ test -f "${PHASE_DIR}/${PADDED_PHASE}-VALIDATION.md" && echo "VALIDATION_CREATED
|
|
|
374
418
|
> Skip if `workflow.security_enforcement` is explicitly `false`. Absent = enabled.
|
|
375
419
|
|
|
376
420
|
```bash
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
421
|
+
SECURITY_CFG=$(gsd-sdk query config-get workflow.security_enforcement --raw 2>/dev/null || echo "true")
|
|
422
|
+
SECURITY_ASVS=$(gsd-sdk query config-get workflow.security_asvs_level --raw 2>/dev/null || echo "1")
|
|
423
|
+
SECURITY_BLOCK=$(gsd-sdk query config-get workflow.security_block_on --raw 2>/dev/null || echo "high")
|
|
380
424
|
```
|
|
381
425
|
|
|
382
426
|
**If `SECURITY_CFG` is `false`:** Skip to step 5.6.
|
|
@@ -400,8 +444,8 @@ Continue to step 5.6. Security config is passed to the planner in step 8.
|
|
|
400
444
|
> Skip if `workflow.ui_phase` is explicitly `false` AND `workflow.ui_safety_gate` is explicitly `false` in `.planning/config.json`. If keys are absent, treat as enabled.
|
|
401
445
|
|
|
402
446
|
```bash
|
|
403
|
-
|
|
404
|
-
|
|
447
|
+
UI_PHASE_CFG=$(gsd-sdk query config-get workflow.ui_phase 2>/dev/null || echo "true")
|
|
448
|
+
UI_GATE_CFG=$(gsd-sdk query config-get workflow.ui_safety_gate 2>/dev/null || echo "true")
|
|
405
449
|
```
|
|
406
450
|
|
|
407
451
|
**If both are `false`:** Skip to step 6.
|
|
@@ -409,7 +453,7 @@ Continue to step 5.6. Security config is passed to the planner in step 8.
|
|
|
409
453
|
Check if phase has frontend indicators:
|
|
410
454
|
|
|
411
455
|
```bash
|
|
412
|
-
|
|
456
|
+
PHASE_SECTION=$(gsd-sdk query roadmap.get-phase "${PHASE}" 2>/dev/null)
|
|
413
457
|
echo "$PHASE_SECTION" | grep -iE "UI|interface|frontend|component|layout|page|screen|view|form|dashboard|widget" > /dev/null 2>&1
|
|
414
458
|
HAS_UI=$?
|
|
415
459
|
```
|
|
@@ -423,11 +467,13 @@ UI_SPEC_FILE=$(ls "${PHASE_DIR}"/*-UI-SPEC.md 2>/dev/null | head -1)
|
|
|
423
467
|
|
|
424
468
|
**If UI-SPEC.md found:** Set `UI_SPEC_PATH=$UI_SPEC_FILE`. Display: `Using UI design contract: ${UI_SPEC_PATH}`
|
|
425
469
|
|
|
470
|
+
**If UI-SPEC.md missing AND `--skip-ui` flag is present in $ARGUMENTS:** Skip silently to step 6.
|
|
471
|
+
|
|
426
472
|
**If UI-SPEC.md missing AND `UI_GATE_CFG` is `true`:**
|
|
427
473
|
|
|
428
474
|
Read auto-chain state:
|
|
429
475
|
```bash
|
|
430
|
-
|
|
476
|
+
AUTO_CHAIN=$(gsd-sdk query config-get workflow._auto_chain_active 2>/dev/null || echo "false")
|
|
431
477
|
```
|
|
432
478
|
|
|
433
479
|
**If `AUTO_CHAIN` is `true` (running inside a `--chain` or `--auto` pipeline):**
|
|
@@ -445,24 +491,18 @@ Continue to step 6.
|
|
|
445
491
|
|
|
446
492
|
**If `AUTO_CHAIN` is `false` (manual invocation):**
|
|
447
493
|
|
|
448
|
-
|
|
449
|
-
```
|
|
450
|
-
Phase {N} has frontend indicators but no UI-SPEC.md. Generate a design contract before planning?
|
|
451
|
-
|
|
452
|
-
1. Generate UI-SPEC first — Run /gsd-ui-phase {N} then re-run /gsd-plan-phase {N}
|
|
453
|
-
2. Continue without UI-SPEC
|
|
454
|
-
3. Not a frontend phase
|
|
494
|
+
Output this markdown directly (not as a code block):
|
|
455
495
|
|
|
456
|
-
|
|
496
|
+
```
|
|
497
|
+
## ⚠ UI-SPEC.md missing for Phase {N}
|
|
498
|
+
▶ Recommended next step:
|
|
499
|
+
`/gsd-ui-phase {N} ${GSD_WS}` — generate UI design contract before planning
|
|
500
|
+
───────────────────────────────────────────────
|
|
501
|
+
Also available:
|
|
502
|
+
- `/gsd-plan-phase {N} --skip-ui ${GSD_WS}` — plan without UI-SPEC (not recommended for frontend phases)
|
|
457
503
|
```
|
|
458
504
|
|
|
459
|
-
|
|
460
|
-
- header: "UI Design Contract"
|
|
461
|
-
- question: "Phase {N} has frontend indicators but no UI-SPEC.md. Generate a design contract before planning?"
|
|
462
|
-
- options:
|
|
463
|
-
- "Generate UI-SPEC first" → Display: "Run `/gsd-ui-phase {N} ${GSD_WS}` then re-run `/gsd-plan-phase {N} ${GSD_WS}`". Exit workflow.
|
|
464
|
-
- "Continue without UI-SPEC" → Continue to step 6.
|
|
465
|
-
- "Not a frontend phase" → Continue to step 6.
|
|
505
|
+
**Exit the plan-phase workflow. Do not continue.**
|
|
466
506
|
|
|
467
507
|
**If `HAS_UI` is 1 (no frontend indicators):** Skip silently to step 5.7.
|
|
468
508
|
|
|
@@ -473,7 +513,7 @@ Otherwise use AskUserQuestion:
|
|
|
473
513
|
Check if any files in the phase scope match schema patterns:
|
|
474
514
|
|
|
475
515
|
```bash
|
|
476
|
-
|
|
516
|
+
PHASE_SECTION=$(gsd-sdk query roadmap.get-phase "${PHASE}" --pick section 2>/dev/null)
|
|
477
517
|
```
|
|
478
518
|
|
|
479
519
|
Scan `PHASE_SECTION`, `CONTEXT.md` (if loaded), and `RESEARCH.md` (if exists) for file paths matching these ORM patterns:
|
|
@@ -552,6 +592,11 @@ VERIFICATION_PATH=$(_gsd_field "$INIT" verification_path)
|
|
|
552
592
|
UAT_PATH=$(_gsd_field "$INIT" uat_path)
|
|
553
593
|
CONTEXT_PATH=$(_gsd_field "$INIT" context_path)
|
|
554
594
|
REVIEWS_PATH=$(_gsd_field "$INIT" reviews_path)
|
|
595
|
+
PATTERNS_PATH=$(_gsd_field "$INIT" patterns_path)
|
|
596
|
+
|
|
597
|
+
# Detect spike/sketch findings skills (project-local)
|
|
598
|
+
SPIKE_FINDINGS_PATH=$(ls ./.antigravity/skills/spike-findings-*/SKILL.md 2>/dev/null | head -1)
|
|
599
|
+
SKETCH_FINDINGS_PATH=$(ls ./.antigravity/skills/sketch-findings-*/SKILL.md 2>/dev/null | head -1)
|
|
555
600
|
```
|
|
556
601
|
|
|
557
602
|
## 7.5. Verify Nyquist Artifacts
|
|
@@ -572,10 +617,69 @@ VALIDATION_EXISTS=$(ls "${PHASE_DIR}"/*-VALIDATION.md 2>/dev/null | head -1)
|
|
|
572
617
|
If missing and Nyquist is still enabled/applicable — ask user:
|
|
573
618
|
1. Re-run: `/gsd-plan-phase {PHASE} --research ${GSD_WS}`
|
|
574
619
|
2. Disable Nyquist with the exact command:
|
|
575
|
-
|
|
620
|
+
`gsd-sdk query config-set workflow.nyquist_validation false`
|
|
576
621
|
3. Continue anyway (plans fail Dimension 8)
|
|
577
622
|
|
|
578
|
-
Proceed to Step 8 only if user selects 2 or 3.
|
|
623
|
+
Proceed to Step 7.8 (or Step 8 if pattern mapper is disabled) only if user selects 2 or 3.
|
|
624
|
+
|
|
625
|
+
## 7.8. Spawn gsd-pattern-mapper Agent (Optional)
|
|
626
|
+
|
|
627
|
+
**Skip if** `workflow.pattern_mapper` is explicitly set to `false` in config.json (absent key = enabled). Also skip if no CONTEXT.md and no RESEARCH.md exist for this phase (nothing to extract file lists from).
|
|
628
|
+
|
|
629
|
+
Check config:
|
|
630
|
+
```bash
|
|
631
|
+
PATTERN_MAPPER_CFG=$(gsd-sdk query config-get workflow.pattern_mapper 2>/dev/null || echo "true")
|
|
632
|
+
```
|
|
633
|
+
|
|
634
|
+
**If `PATTERN_MAPPER_CFG` is `false`:** Skip to step 8.
|
|
635
|
+
|
|
636
|
+
**If PATTERNS.md already exists** (`PATTERNS_PATH` is non-empty from step 7): Skip to step 8 (use existing).
|
|
637
|
+
|
|
638
|
+
Display banner:
|
|
639
|
+
```
|
|
640
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
641
|
+
GSD ► PATTERN MAPPING PHASE {X}
|
|
642
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
643
|
+
|
|
644
|
+
◆ Spawning pattern mapper...
|
|
645
|
+
```
|
|
646
|
+
|
|
647
|
+
Pattern mapper prompt:
|
|
648
|
+
|
|
649
|
+
```markdown
|
|
650
|
+
<pattern_mapping_context>
|
|
651
|
+
**Phase:** {phase_number} - {phase_name}
|
|
652
|
+
**Phase directory:** {phase_dir}
|
|
653
|
+
**Padded phase:** {padded_phase}
|
|
654
|
+
|
|
655
|
+
<files_to_read>
|
|
656
|
+
- {context_path} (USER DECISIONS from /gsd-discuss-phase)
|
|
657
|
+
- {research_path} (Technical Research)
|
|
658
|
+
</files_to_read>
|
|
659
|
+
|
|
660
|
+
**Output file:** {phase_dir}/{padded_phase}-PATTERNS.md
|
|
661
|
+
|
|
662
|
+
Extract the list of files to be created/modified from CONTEXT.md and RESEARCH.md. For each file, classify by role and data flow, find the closest existing analog in the codebase, extract concrete code excerpts, and produce PATTERNS.md.
|
|
663
|
+
</pattern_mapping_context>
|
|
664
|
+
```
|
|
665
|
+
|
|
666
|
+
Spawn with:
|
|
667
|
+
```
|
|
668
|
+
Task(
|
|
669
|
+
prompt="{above}",
|
|
670
|
+
subagent_type="gsd-pattern-mapper",
|
|
671
|
+
model="{researcher_model}",
|
|
672
|
+
)
|
|
673
|
+
```
|
|
674
|
+
|
|
675
|
+
**Handle return:**
|
|
676
|
+
- **`## PATTERN MAPPING COMPLETE`:** Update `PATTERNS_PATH` to the created file path, continue to step 8.
|
|
677
|
+
- **Any error or empty return:** Log warning, continue to step 8 without patterns (non-blocking).
|
|
678
|
+
|
|
679
|
+
After pattern mapper completes, update the path variable:
|
|
680
|
+
```bash
|
|
681
|
+
PATTERNS_PATH="${PHASE_DIR}/${PADDED_PHASE}-PATTERNS.md"
|
|
682
|
+
```
|
|
579
683
|
|
|
580
684
|
## 8. Spawn gsd-planner Agent
|
|
581
685
|
|
|
@@ -601,14 +705,19 @@ Planner prompt:
|
|
|
601
705
|
- {requirements_path} (Requirements)
|
|
602
706
|
- {context_path} (USER DECISIONS from /gsd-discuss-phase)
|
|
603
707
|
- {research_path} (Technical Research)
|
|
708
|
+
- {PATTERNS_PATH} (Pattern Map — analog files and code excerpts, if exists)
|
|
604
709
|
- {verification_path} (Verification Gaps - if --gaps)
|
|
605
710
|
- {uat_path} (UAT Gaps - if --gaps)
|
|
606
711
|
- {reviews_path} (Cross-AI Review Feedback - if --reviews)
|
|
607
712
|
- {UI_SPEC_PATH} (UI Design Contract — visual/interaction specs, if exists)
|
|
713
|
+
- {SPIKE_FINDINGS_PATH} (Spike Findings — validated patterns, constraints, landmines from experiments, if exists)
|
|
714
|
+
- {SKETCH_FINDINGS_PATH} (Sketch Findings — validated design decisions, CSS patterns, visual direction, if exists)
|
|
608
715
|
${CONTEXT_WINDOW >= 500000 ? `
|
|
609
716
|
**Cross-phase context (1M model enrichment):**
|
|
610
|
-
-
|
|
611
|
-
-
|
|
717
|
+
- CONTEXT.md files from the 3 most recent completed phases (locked decisions — maintain consistency)
|
|
718
|
+
- SUMMARY.md files from the 3 most recent completed phases (what was built — reuse patterns, avoid duplication)
|
|
719
|
+
- CONTEXT.md and SUMMARY.md from any phases listed in the current phase's "Depends on:" field in ROADMAP.md (regardless of recency — explicit dependencies always load, deduplicated against the 3 most recent)
|
|
720
|
+
- Skip all other prior phases to stay within context budget
|
|
612
721
|
` : ''}
|
|
613
722
|
</files_to_read>
|
|
614
723
|
|
|
@@ -619,6 +728,16 @@ ${AGENT_SKILLS_PLANNER}
|
|
|
619
728
|
**Project instructions:** Read ./ANTIGRAVITY.md if exists — follow project-specific guidelines
|
|
620
729
|
**Project skills:** Check .antigravity/skills/ or .agents/skills/ directory (if either exists) — read SKILL.md files, plans should account for project skill rules
|
|
621
730
|
|
|
731
|
+
${TDD_MODE === 'true' ? `
|
|
732
|
+
<tdd_mode_active>
|
|
733
|
+
**TDD Mode is ENABLED.** Apply TDD heuristics from @references/docs/tdd.md to all eligible tasks:
|
|
734
|
+
- Business logic with defined I/O → type: tdd
|
|
735
|
+
- API endpoints with request/response contracts → type: tdd
|
|
736
|
+
- Data transformations, validation, algorithms → type: tdd
|
|
737
|
+
- UI, config, glue code, CRUD → standard plan (type: execute)
|
|
738
|
+
Each TDD plan gets one feature with RED/GREEN/REFACTOR gate sequence.
|
|
739
|
+
</tdd_mode_active>
|
|
740
|
+
` : ''}
|
|
622
741
|
</planning_context>
|
|
623
742
|
|
|
624
743
|
<downstream_consumer>
|
|
@@ -683,41 +802,70 @@ Task(
|
|
|
683
802
|
## 9. Handle Planner Return
|
|
684
803
|
|
|
685
804
|
- **`## PLANNING COMPLETE`:** Display plan count. If `--skip-verify` or `plan_checker_enabled` is false (from init): skip to step 13. Otherwise: step 10.
|
|
686
|
-
- **`## PHASE SPLIT RECOMMENDED`:** The planner determined the phase
|
|
805
|
+
- **`## PHASE SPLIT RECOMMENDED`:** The planner determined the phase exceeds the context budget for full-fidelity implementation of all source items. Handle in step 9b.
|
|
806
|
+
- **`## ⚠ Source Audit: Unplanned Items Found`:** The planner's multi-source coverage audit found items from REQUIREMENTS.md, RESEARCH.md, ROADMAP goal, or CONTEXT.md decisions that are not covered by any plan. Handle in step 9c.
|
|
687
807
|
- **`## CHECKPOINT REACHED`:** Present to user, get response, spawn continuation (step 12)
|
|
688
808
|
- **`## PLANNING INCONCLUSIVE`:** Show attempts, offer: Add context / Retry / Manual
|
|
689
809
|
|
|
690
810
|
## 9b. Handle Phase Split Recommendation
|
|
691
811
|
|
|
692
|
-
When the planner returns `## PHASE SPLIT RECOMMENDED`, it means the phase
|
|
812
|
+
When the planner returns `## PHASE SPLIT RECOMMENDED`, it means the phase's source items exceed the context budget for full-fidelity implementation. The planner proposes groupings.
|
|
693
813
|
|
|
694
814
|
**Extract from planner return:**
|
|
695
815
|
- Proposed sub-phases (e.g., "17a: processing core (D-01 to D-19)", "17b: billing + config UX (D-20 to D-27)")
|
|
696
|
-
- Which D-XX decisions go in each sub-phase
|
|
697
|
-
- Why the split is necessary (
|
|
816
|
+
- Which source items (REQ-IDs, D-XX decisions, RESEARCH items) go in each sub-phase
|
|
817
|
+
- Why the split is necessary (context cost estimate, file count)
|
|
698
818
|
|
|
699
819
|
**Present to user:**
|
|
700
820
|
```
|
|
701
|
-
## Phase {X}
|
|
821
|
+
## Phase {X} exceeds context budget for full-fidelity implementation
|
|
702
822
|
|
|
703
|
-
The planner found {N}
|
|
704
|
-
|
|
823
|
+
The planner found {N} source items that exceed the context budget when
|
|
824
|
+
planned at full fidelity. Instead of reducing scope, we recommend splitting:
|
|
705
825
|
|
|
706
826
|
**Option 1: Split into sub-phases**
|
|
707
|
-
- Phase {X}a: {name} — {
|
|
708
|
-
- Phase {X}b: {name} — {
|
|
827
|
+
- Phase {X}a: {name} — {items} ({N} source items, ~{P}% context)
|
|
828
|
+
- Phase {X}b: {name} — {items} ({M} source items, ~{Q}% context)
|
|
709
829
|
|
|
710
|
-
**Option 2: Proceed anyway** (planner will attempt all, quality may degrade)
|
|
830
|
+
**Option 2: Proceed anyway** (planner will attempt all, quality may degrade past 50% context)
|
|
711
831
|
|
|
712
|
-
**Option 3: Prioritize** — you choose which
|
|
832
|
+
**Option 3: Prioritize** — you choose which items to implement now,
|
|
713
833
|
rest become a follow-up phase
|
|
714
834
|
```
|
|
715
835
|
|
|
716
836
|
Use AskUserQuestion with these 3 options.
|
|
717
837
|
|
|
718
838
|
**If "Split":** Use `/gsd-insert-phase` to create the sub-phases, then replan each.
|
|
719
|
-
**If "Proceed":** Return to planner with instruction to attempt all
|
|
720
|
-
**If "Prioritize":** Use AskUserQuestion (multiSelect) to let user pick which
|
|
839
|
+
**If "Proceed":** Return to planner with instruction to attempt all items at full fidelity, accepting more plans/tasks.
|
|
840
|
+
**If "Prioritize":** Use AskUserQuestion (multiSelect) to let user pick which items are "now" vs "later". Create CONTEXT.md for each sub-phase with the selected items.
|
|
841
|
+
|
|
842
|
+
## 9c. Handle Source Audit Gaps
|
|
843
|
+
|
|
844
|
+
When the planner returns `## ⚠ Source Audit: Unplanned Items Found`, it means items from REQUIREMENTS.md, RESEARCH.md, ROADMAP goal, or CONTEXT.md decisions have no corresponding plan.
|
|
845
|
+
|
|
846
|
+
**Extract from planner return:**
|
|
847
|
+
- Each unplanned item with its source artifact and section
|
|
848
|
+
- The planner's suggested options (A: add plan, B: split phase, C: defer with confirmation)
|
|
849
|
+
|
|
850
|
+
**Present each gap to user.** For each unplanned item:
|
|
851
|
+
|
|
852
|
+
```
|
|
853
|
+
## ⚠ Unplanned: {item description}
|
|
854
|
+
|
|
855
|
+
Source: {RESEARCH.md / REQUIREMENTS.md / ROADMAP goal / CONTEXT.md}
|
|
856
|
+
Details: {why the planner flagged this}
|
|
857
|
+
|
|
858
|
+
Options:
|
|
859
|
+
1. Add a plan to cover this item (recommended)
|
|
860
|
+
2. Split phase — move to a sub-phase with related items
|
|
861
|
+
3. Defer — add to backlog (developer confirms this is intentional)
|
|
862
|
+
```
|
|
863
|
+
|
|
864
|
+
Use AskUserQuestion for each gap (or batch if multiple gaps).
|
|
865
|
+
|
|
866
|
+
**If "Add plan":** Return to planner (step 8) with instruction to add plans covering the missing items, preserving existing plans.
|
|
867
|
+
**If "Split":** Use `/gsd-insert-phase` for overflow items, then replan.
|
|
868
|
+
**If "Defer":** Record in CONTEXT.md `## Deferred Ideas` with developer's confirmation. Proceed to step 10.
|
|
721
869
|
|
|
722
870
|
## 10. Spawn gsd-plan-checker Agent
|
|
723
871
|
|
|
@@ -865,6 +1013,77 @@ Display: `Max iterations reached. {N} issues remain:` + issue list
|
|
|
865
1013
|
|
|
866
1014
|
Offer: 1) Force proceed, 2) Provide guidance and retry, 3) Abandon
|
|
867
1015
|
|
|
1016
|
+
## 12.5. Plan Bounce (Optional External Refinement)
|
|
1017
|
+
|
|
1018
|
+
**Skip if:** `--skip-bounce` flag, `--gaps` flag, or bounce is not activated.
|
|
1019
|
+
|
|
1020
|
+
**Activation:** Bounce runs when `--bounce` flag is present OR `workflow.plan_bounce` config is `true`. The `--skip-bounce` flag always wins (disables bounce even if config enables it). The `--gaps` flag also disables bounce (gap-closure mode should not modify plans externally).
|
|
1021
|
+
|
|
1022
|
+
**Prerequisites:** `workflow.plan_bounce_script` must be set to a valid script path. If bounce is activated but no script is configured, display warning and skip:
|
|
1023
|
+
```
|
|
1024
|
+
⚠ Plan bounce activated but no script configured.
|
|
1025
|
+
Set workflow.plan_bounce_script to the path of your refinement script.
|
|
1026
|
+
Skipping bounce step.
|
|
1027
|
+
```
|
|
1028
|
+
|
|
1029
|
+
**Read pass count:**
|
|
1030
|
+
```bash
|
|
1031
|
+
BOUNCE_PASSES=$(gsd-sdk query config-get workflow.plan_bounce_passes 2>/dev/null || echo "2")
|
|
1032
|
+
BOUNCE_SCRIPT=$(gsd-sdk query config-get workflow.plan_bounce_script 2>/dev/null | jq -r '.' 2>/dev/null || true)
|
|
1033
|
+
```
|
|
1034
|
+
|
|
1035
|
+
Display banner:
|
|
1036
|
+
```
|
|
1037
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1038
|
+
GSD ► BOUNCING PLANS (External Refinement)
|
|
1039
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1040
|
+
|
|
1041
|
+
Script: ${BOUNCE_SCRIPT}
|
|
1042
|
+
Max passes: ${BOUNCE_PASSES}
|
|
1043
|
+
```
|
|
1044
|
+
|
|
1045
|
+
**For each PLAN.md file in the phase directory:**
|
|
1046
|
+
|
|
1047
|
+
1. **Backup:** Copy `*-PLAN.md` to `*-PLAN.pre-bounce.md`
|
|
1048
|
+
```bash
|
|
1049
|
+
cp "${PLAN_FILE}" "${PLAN_FILE%.md}.pre-bounce.md"
|
|
1050
|
+
```
|
|
1051
|
+
|
|
1052
|
+
2. **Invoke bounce script:**
|
|
1053
|
+
```bash
|
|
1054
|
+
"${BOUNCE_SCRIPT}" "${PLAN_FILE}" "${BOUNCE_PASSES}"
|
|
1055
|
+
```
|
|
1056
|
+
|
|
1057
|
+
3. **Validate bounced plan — YAML frontmatter integrity:**
|
|
1058
|
+
After the script returns, check that the bounced file still has valid YAML frontmatter (opening and closing `---` delimiters with parseable content between them). If the bounced plan breaks YAML frontmatter validation, restore the original from the pre-bounce.md backup and continue to the next plan:
|
|
1059
|
+
```
|
|
1060
|
+
⚠ Bounced plan ${PLAN_FILE} has broken YAML frontmatter — restoring original from pre-bounce backup.
|
|
1061
|
+
```
|
|
1062
|
+
|
|
1063
|
+
4. **Handle script failure:** If the bounce script exits non-zero, restore the original plan from the pre-bounce.md backup and continue to the next plan:
|
|
1064
|
+
```
|
|
1065
|
+
⚠ Bounce script failed for ${PLAN_FILE} (exit code ${EXIT_CODE}) — restoring original from pre-bounce backup.
|
|
1066
|
+
```
|
|
1067
|
+
|
|
1068
|
+
**After all plans are bounced:**
|
|
1069
|
+
|
|
1070
|
+
5. **Re-run plan checker on bounced plans:** Spawn gsd-plan-checker (same as step 10) on all modified plans. If a bounced plan fails the checker, restore original from its pre-bounce.md backup:
|
|
1071
|
+
```
|
|
1072
|
+
⚠ Bounced plan ${PLAN_FILE} failed checker validation — restoring original from pre-bounce backup.
|
|
1073
|
+
```
|
|
1074
|
+
|
|
1075
|
+
6. **Commit surviving bounced plans:** If at least one plan survived both the frontmatter validation and the checker re-run, commit the changes:
|
|
1076
|
+
```bash
|
|
1077
|
+
gsd-sdk query commit "refactor(${padded_phase}): bounce plans through external refinement" "${PHASE_DIR}/*-PLAN.md"
|
|
1078
|
+
```
|
|
1079
|
+
|
|
1080
|
+
Display summary:
|
|
1081
|
+
```
|
|
1082
|
+
Plan bounce complete: {survived}/{total} plans refined
|
|
1083
|
+
```
|
|
1084
|
+
|
|
1085
|
+
**Clean up:** Remove all `*-PLAN.pre-bounce.md` backup files after the bounce step completes (whether plans survived or were restored).
|
|
1086
|
+
|
|
868
1087
|
## 13. Requirements Coverage Gate
|
|
869
1088
|
|
|
870
1089
|
After plans pass the checker (or checker is skipped), verify that all phase requirements are covered by at least one plan.
|
|
@@ -921,7 +1140,7 @@ If `TEXT_MODE` is true, present as a plain-text numbered list (options already s
|
|
|
921
1140
|
After plans pass all gates, record that planning is complete so STATE.md reflects the new phase status:
|
|
922
1141
|
|
|
923
1142
|
```bash
|
|
924
|
-
|
|
1143
|
+
gsd-sdk query state.planned-phase --phase "${PHASE_NUMBER}" --name "${PHASE_NAME}" --plans "${PLAN_COUNT}"
|
|
925
1144
|
```
|
|
926
1145
|
|
|
927
1146
|
This updates STATUS to "Ready to execute", sets the correct plan count, and timestamps Last Activity.
|
|
@@ -932,25 +1151,25 @@ Route to `<offer_next>` OR `auto_advance` depending on flags/config.
|
|
|
932
1151
|
|
|
933
1152
|
## 15. Auto-Advance Check
|
|
934
1153
|
|
|
935
|
-
Check for auto-advance trigger:
|
|
1154
|
+
Check for auto-advance trigger using values already loaded in step 1:
|
|
936
1155
|
|
|
937
1156
|
1. Parse `--auto` and `--chain` flags from $ARGUMENTS
|
|
938
|
-
2.
|
|
1157
|
+
2. Use `auto_chain_active` and `auto_advance` from the INIT JSON parsed in step 1 — **do not issue additional `config-get` calls for these values** (they are already present in the init output). Issuing redundant `config-get` calls for values already in INIT can cause infinite read loops on some runtimes.
|
|
1158
|
+
3. **Sync chain flag with intent** — if user invoked manually (no `--auto` and no `--chain`), clear the ephemeral chain flag from any previous interrupted `--auto` chain. This does NOT touch `workflow.auto_advance` (the user's persistent settings preference):
|
|
939
1159
|
```bash
|
|
940
1160
|
if [[ ! "$ARGUMENTS" =~ --auto ]] && [[ ! "$ARGUMENTS" =~ --chain ]]; then
|
|
941
|
-
|
|
1161
|
+
gsd-sdk query config-set workflow._auto_chain_active false 2>/dev/null
|
|
942
1162
|
fi
|
|
943
1163
|
```
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
```
|
|
1164
|
+
|
|
1165
|
+
Set local variables from INIT (parsed once in step 1):
|
|
1166
|
+
- `AUTO_CHAIN` = `auto_chain_active` from INIT JSON (boolean, default false)
|
|
1167
|
+
- `AUTO_CFG` = `auto_advance` from INIT JSON (boolean, default false)
|
|
949
1168
|
|
|
950
1169
|
**If `--auto` or `--chain` flag present AND `AUTO_CHAIN` is not true:** Persist chain flag to config (handles direct invocation without prior discuss-phase):
|
|
951
1170
|
```bash
|
|
952
1171
|
if ([[ "$ARGUMENTS" =~ --auto ]] || [[ "$ARGUMENTS" =~ --chain ]]) && [[ "$AUTO_CHAIN" != "true" ]]; then
|
|
953
|
-
|
|
1172
|
+
gsd-sdk query config-set workflow._auto_chain_active true
|
|
954
1173
|
fi
|
|
955
1174
|
```
|
|
956
1175
|
|
|
@@ -1015,7 +1234,7 @@ Verification: {Passed | Passed with override | Skipped}
|
|
|
1015
1234
|
|
|
1016
1235
|
───────────────────────────────────────────────────────────────
|
|
1017
1236
|
|
|
1018
|
-
## ▶ Next Up
|
|
1237
|
+
## ▶ Next Up — [${PROJECT_CODE}] ${PROJECT_TITLE}
|
|
1019
1238
|
|
|
1020
1239
|
**Execute Phase {X}** — run all {N} plans
|
|
1021
1240
|
|
|
@@ -32,6 +32,9 @@ mkdir -p .planning/seeds
|
|
|
32
32
|
<step name="gather_context">
|
|
33
33
|
Ask focused questions to build a complete seed:
|
|
34
34
|
|
|
35
|
+
|
|
36
|
+
**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.
|
|
37
|
+
|
|
35
38
|
```
|
|
36
39
|
AskUserQuestion(
|
|
37
40
|
header: "Trigger",
|
|
@@ -140,7 +143,7 @@ Related code and decisions found in the current codebase:
|
|
|
140
143
|
|
|
141
144
|
<step name="commit_seed">
|
|
142
145
|
```bash
|
|
143
|
-
|
|
146
|
+
gsd-sdk query commit "docs: plant seed — {$IDEA}" .planning/seeds/SEED-{PADDED}-{slug}.md
|
|
144
147
|
```
|
|
145
148
|
</step>
|
|
146
149
|
|