@opengsd/gsd-core 1.8.0 → 1.9.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.
Files changed (174) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.opencode/plugins/gsd-core.js +31 -1
  4. package/agents/gsd-code-fixer.md +1 -1
  5. package/agents/gsd-codebase-mapper.md +1 -1
  6. package/agents/gsd-debug-session-manager.md +36 -0
  7. package/agents/gsd-executor.md +20 -7
  8. package/agents/gsd-intel-updater.md +3 -3
  9. package/agents/gsd-phase-researcher.md +4 -2
  10. package/agents/gsd-plan-checker.md +20 -0
  11. package/agents/gsd-planner.md +15 -23
  12. package/agents/gsd-project-researcher.md +2 -2
  13. package/agents/gsd-ui-auditor.md +0 -40
  14. package/bin/install.js +186 -55
  15. package/commands/gsd/plan-review-convergence.md +5 -1
  16. package/gsd-core/bin/gsd-tools.cjs +849 -2
  17. package/gsd-core/bin/lib/api-coverage.cjs +22 -8
  18. package/gsd-core/bin/lib/audit.cjs +8 -8
  19. package/gsd-core/bin/lib/capability-consent.cjs +40 -1
  20. package/gsd-core/bin/lib/capability-lifecycle.cjs +58 -0
  21. package/gsd-core/bin/lib/capability-loader.cjs +23 -1
  22. package/gsd-core/bin/lib/capability-registry.cjs +1353 -132
  23. package/gsd-core/bin/lib/capability-trust.cjs +468 -33
  24. package/gsd-core/bin/lib/capability-validator.cjs +882 -6
  25. package/gsd-core/bin/lib/check-command-router.cjs +12 -2
  26. package/gsd-core/bin/lib/cjs-command-router-adapter.cjs +15 -0
  27. package/gsd-core/bin/lib/claude-orchestration-command-router.cjs +102 -12
  28. package/gsd-core/bin/lib/claude-orchestration.cjs +125 -22
  29. package/gsd-core/bin/lib/commands.cjs +246 -18
  30. package/gsd-core/bin/lib/config-loader.cjs +200 -28
  31. package/gsd-core/bin/lib/config.cjs +90 -5
  32. package/gsd-core/bin/lib/estimate-cli.cjs +336 -0
  33. package/gsd-core/bin/lib/frontmatter.cjs +125 -15
  34. package/gsd-core/bin/lib/host-integration.cjs +215 -8
  35. package/gsd-core/bin/lib/init.cjs +44 -19
  36. package/gsd-core/bin/lib/install-engine.cjs +1 -0
  37. package/gsd-core/bin/lib/milestone.cjs +5 -5
  38. package/gsd-core/bin/lib/model-catalog.cjs +51 -1
  39. package/gsd-core/bin/lib/observability/logger.cjs +7 -2
  40. package/gsd-core/bin/lib/phase-command-router.cjs +10 -1
  41. package/gsd-core/bin/lib/phase-estimation.cjs +398 -0
  42. package/gsd-core/bin/lib/phase-id.cjs +278 -5
  43. package/gsd-core/bin/lib/phase.cjs +57 -5
  44. package/gsd-core/bin/lib/plan-drift-guard.cjs +1 -1
  45. package/gsd-core/bin/lib/plan-scan.cjs +1 -1
  46. package/gsd-core/bin/lib/planning-workspace.cjs +9 -2
  47. package/gsd-core/bin/lib/profile-output.cjs +34 -8
  48. package/gsd-core/bin/lib/review-lane-descriptor.cjs +927 -0
  49. package/gsd-core/bin/lib/review-lane-invocation.cjs +348 -0
  50. package/gsd-core/bin/lib/review-lane-runner.cjs +594 -0
  51. package/gsd-core/bin/lib/review-reviewer-selection.cjs +114 -32
  52. package/gsd-core/bin/lib/roadmap-parser.cjs +54 -6
  53. package/gsd-core/bin/lib/roadmap.cjs +10 -4
  54. package/gsd-core/bin/lib/runtime-artifact-conversion.cjs +31 -4
  55. package/gsd-core/bin/lib/runtime-artifact-layout.cjs +1 -1
  56. package/gsd-core/bin/lib/runtime-hooks-surface.cjs +140 -0
  57. package/gsd-core/bin/lib/runtime-name-policy.cjs +15 -2
  58. package/gsd-core/bin/lib/smart-entry.cjs +1 -1
  59. package/gsd-core/bin/lib/state-document.cjs +164 -20
  60. package/gsd-core/bin/lib/state-transition.cjs +28 -10
  61. package/gsd-core/bin/lib/state.cjs +141 -21
  62. package/gsd-core/bin/lib/uat-predicate.cjs +6 -4
  63. package/gsd-core/bin/lib/uat.cjs +9 -7
  64. package/gsd-core/bin/lib/ui-consideration-probe.cjs +2 -2
  65. package/gsd-core/bin/lib/unusable-input.cjs +216 -0
  66. package/gsd-core/bin/lib/validate.cjs +32 -0
  67. package/gsd-core/bin/lib/verification.cjs +51 -14
  68. package/gsd-core/bin/lib/verify.cjs +128 -20
  69. package/gsd-core/bin/lib/worktree-safety.cjs +360 -15
  70. package/gsd-core/bin/shared/config-defaults.manifest.json +1 -0
  71. package/gsd-core/bin/shared/config-schema.manifest.json +1 -13
  72. package/gsd-core/bin/shared/model-catalog.json +5 -0
  73. package/gsd-core/bin/shared/runtime-aliases.manifest.json +5 -0
  74. package/gsd-core/references/context-budget.md +40 -0
  75. package/gsd-core/references/gate-prompts.md +6 -3
  76. package/gsd-core/references/model-profile-resolution.md +64 -13
  77. package/gsd-core/references/offer-next.md +88 -0
  78. package/gsd-core/references/planning-config.md +2 -1
  79. package/gsd-core/references/reviewer-instances.md +28 -21
  80. package/gsd-core/references/runtime-aware-dispatch.md +42 -0
  81. package/gsd-core/references/ui-consideration-probe.md +2 -2
  82. package/gsd-core/references/worktree-branch-check.md +4 -4
  83. package/gsd-core/templates/summary-minimal.md +4 -0
  84. package/gsd-core/templates/summary-standard.md +4 -0
  85. package/gsd-core/templates/summary.md +7 -0
  86. package/gsd-core/workflows/ai-integration-phase.md +4 -4
  87. package/gsd-core/workflows/audit-fix.md +4 -0
  88. package/gsd-core/workflows/audit-milestone.md +8 -0
  89. package/gsd-core/workflows/autonomous.md +19 -15
  90. package/gsd-core/workflows/check-todos.md +2 -2
  91. package/gsd-core/workflows/code-review-fix.md +14 -6
  92. package/gsd-core/workflows/code-review.md +76 -19
  93. package/gsd-core/workflows/debug.md +10 -2
  94. package/gsd-core/workflows/diagnose-issues.md +4 -0
  95. package/gsd-core/workflows/discuss-phase/modes/advisor.md +2 -4
  96. package/gsd-core/workflows/discuss-phase/modes/auto.md +0 -6
  97. package/gsd-core/workflows/discuss-phase-assumptions.md +15 -9
  98. package/gsd-core/workflows/discuss-phase.md +2 -2
  99. package/gsd-core/workflows/docs-update.md +8 -0
  100. package/gsd-core/workflows/eval-review.md +1 -1
  101. package/gsd-core/workflows/execute-phase/steps/codebase-drift-gate.md +4 -0
  102. package/gsd-core/workflows/execute-phase/steps/executor-isolation-dispatch.md +160 -0
  103. package/gsd-core/workflows/execute-phase.md +85 -115
  104. package/gsd-core/workflows/execute-plan.md +5 -4
  105. package/gsd-core/workflows/explore.md +4 -0
  106. package/gsd-core/workflows/extract-learnings.md +21 -0
  107. package/gsd-core/workflows/help/modes/full.md +3 -3
  108. package/gsd-core/workflows/import.md +4 -1
  109. package/gsd-core/workflows/ingest-docs.md +4 -0
  110. package/gsd-core/workflows/map-codebase.md +13 -6
  111. package/gsd-core/workflows/new-milestone.md +10 -2
  112. package/gsd-core/workflows/new-project.md +11 -4
  113. package/gsd-core/workflows/next.md +5 -2
  114. package/gsd-core/workflows/plan-phase.md +42 -46
  115. package/gsd-core/workflows/plan-review-convergence.md +18 -14
  116. package/gsd-core/workflows/progress.md +1 -1
  117. package/gsd-core/workflows/quick.md +14 -3
  118. package/gsd-core/workflows/review.md +146 -575
  119. package/gsd-core/workflows/scan.md +9 -1
  120. package/gsd-core/workflows/secure-phase.md +10 -2
  121. package/gsd-core/workflows/ship.md +41 -11
  122. package/gsd-core/workflows/smart-entry.md +1 -1
  123. package/gsd-core/workflows/ui-phase.md +8 -1
  124. package/gsd-core/workflows/ui-review.md +8 -1
  125. package/gsd-core/workflows/update.md +104 -5
  126. package/gsd-core/workflows/validate-phase.md +10 -2
  127. package/gsd-core/workflows/verify-work.md +8 -1
  128. package/hooks/dist/gsd-cursor-session-start.js +6 -2
  129. package/hooks/dist/gsd-cursor-stop.js +6 -2
  130. package/hooks/dist/gsd-cursor-subagent-start.js +6 -2
  131. package/hooks/dist/gsd-graphify-update.sh +9 -0
  132. package/hooks/dist/gsd-phase-boundary.sh +14 -2
  133. package/hooks/dist/gsd-prompt-guard.js +101 -2
  134. package/hooks/dist/gsd-read-guard.js +100 -2
  135. package/hooks/dist/gsd-read-injection-scanner.js +109 -2
  136. package/hooks/dist/gsd-statusline.js +9 -6
  137. package/hooks/dist/gsd-workflow-guard.js +110 -6
  138. package/hooks/dist/gsd-worktree-path-guard.js +132 -8
  139. package/hooks/dist/lib/cursor-workspace.js +74 -0
  140. package/hooks/gsd-cursor-session-start.js +6 -2
  141. package/hooks/gsd-cursor-stop.js +6 -2
  142. package/hooks/gsd-cursor-subagent-start.js +6 -2
  143. package/hooks/gsd-graphify-update.sh +9 -0
  144. package/hooks/gsd-phase-boundary.sh +14 -2
  145. package/hooks/gsd-prompt-guard.js +101 -2
  146. package/hooks/gsd-read-guard.js +100 -2
  147. package/hooks/gsd-read-injection-scanner.js +109 -2
  148. package/hooks/gsd-statusline.js +9 -6
  149. package/hooks/gsd-workflow-guard.js +110 -6
  150. package/hooks/gsd-worktree-path-guard.js +132 -8
  151. package/hooks/lib/cursor-workspace.js +74 -0
  152. package/package.json +7 -7
  153. package/pi/gsd.cjs +26 -1
  154. package/scripts/check-coverage-gate.cjs +51 -0
  155. package/scripts/check-glossary-refs.cjs +24 -0
  156. package/scripts/ci-test-scope.cjs +67 -17
  157. package/scripts/gen-adr-index.cjs +6 -4
  158. package/scripts/gen-capability-matrix.cjs +26 -2
  159. package/scripts/gen-capability-registry.cjs +132 -34
  160. package/scripts/gen-emitted-baseline.cjs +145 -0
  161. package/scripts/lint-compiled-artifact-sync.cjs +146 -0
  162. package/scripts/lint-emitted-drift-ack.cjs +149 -0
  163. package/scripts/lint-fix-has-regression-test.cjs +131 -0
  164. package/scripts/lint-resolution-provenance.cjs +9 -0
  165. package/scripts/mutation-matrix.cjs +4 -0
  166. package/scripts/prompt-injection-scan.sh +6 -0
  167. package/scripts/registry-schema.cjs +57 -8
  168. package/scripts/release-notes/conventional-title.cjs +19 -1
  169. package/scripts/release-notes/format-github-release-notes.cjs +7 -3
  170. package/scripts/workflow-size.cjs +16 -8
  171. package/skills/gsd-plan-review-convergence/SKILL.md +5 -1
  172. package/vscode/package.json +1 -1
  173. package/scripts/gen-golden-install-parity-zcode.cjs +0 -77
  174. package/scripts/update-size-baseline.cjs +0 -68
@@ -140,6 +140,14 @@ Before spawning agents, detect whether the current runtime supports the `Agent`
140
140
  <step name="spawn_agents" condition="Agent tool is available">
141
141
  Spawn 4 parallel gsd-codebase-mapper agents.
142
142
 
143
+ <!-- #2508 runtime-aware-dispatch -->
144
+
145
+ > **Runtime-aware dispatch (#2508 Phase 4).** GSD workflows dispatch specialized subagents by role. Before dispatching on a built-in-only runtime (kimi-code — three built-ins only), resolve the role to a built-in via `gsd_run query resolve-dispatch-type --requested <role> --raw`. On named-dispatch runtimes (Claude/OpenCode/…) the role is returned unchanged; on kimi-code it maps to `coder`/`explore`/`plan` by role-suffix. The persona rides `${AGENT_SKILLS_<ROLE>}` (Phase 3) regardless. See @gsd-core/references/runtime-aware-dispatch.md.
146
+
147
+ <!-- #2517 model-omit-on-inherit -->
148
+
149
+ > **Model omission (#2517).** Omit the `model` parameter entirely when the value it would carry (`mapper_model`) is `"inherit"` or empty. An empty value 404s on runtimes without native tier aliases — the default on non-Claude runtimes. Omitting it inherits the orchestrator's model. See @gsd-core/references/model-profile-resolution.md.
150
+
143
151
  Use Agent tool with `subagent_type="gsd-codebase-mapper"`, `model="{mapper_model}"`, and `run_in_background=true` for parallel execution.
144
152
 
145
153
  **CRITICAL:** Use the dedicated `gsd-codebase-mapper` agent, NOT `Explore` or `browser_subagent`. The mapper agent writes documents directly.
@@ -163,7 +171,7 @@ Write these documents to {codebase_dir}/:
163
171
  - STACK.md - Languages, runtime, frameworks, dependencies, configuration
164
172
  - INTEGRATIONS.md - External APIs, databases, auth providers, webhooks
165
173
 
166
- IMPORTANT: Use {date} for all [YYYY-MM-DD] date placeholders in documents.
174
+ IMPORTANT: Set all date stamps (`**Analysis Date:**`, footer `*... analysis: ...*`, `<!-- refreshed: ... -->`) to {date}, overwriting any existing date.
167
175
 
168
176
  Scope: ${PATH_SCOPE_HINT:-(full repo)} — when --paths is supplied, restrict exploration to those prefixes only.
169
177
 
@@ -189,7 +197,7 @@ Write these documents to {codebase_dir}/:
189
197
  - ARCHITECTURE.md - Pattern, layers, data flow, abstractions, entry points
190
198
  - STRUCTURE.md - Directory layout, key locations, naming conventions
191
199
 
192
- IMPORTANT: Use {date} for all [YYYY-MM-DD] date placeholders in documents.
200
+ IMPORTANT: Set all date stamps (`**Analysis Date:**`, footer `*... analysis: ...*`, `<!-- refreshed: ... -->`) to {date}, overwriting any existing date.
193
201
 
194
202
  Scope: ${PATH_SCOPE_HINT:-(full repo)} — when --paths is supplied, restrict exploration to those prefixes only.
195
203
 
@@ -215,7 +223,7 @@ Write these documents to {codebase_dir}/:
215
223
  - CONVENTIONS.md - Code style, naming, patterns, error handling
216
224
  - TESTING.md - Framework, structure, mocking, coverage
217
225
 
218
- IMPORTANT: Use {date} for all [YYYY-MM-DD] date placeholders in documents.
226
+ IMPORTANT: Set all date stamps (`**Analysis Date:**`, footer `*... analysis: ...*`, `<!-- refreshed: ... -->`) to {date}, overwriting any existing date.
219
227
 
220
228
  Scope: ${PATH_SCOPE_HINT:-(full repo)} — when --paths is supplied, restrict exploration to those prefixes only.
221
229
 
@@ -240,7 +248,7 @@ Analyze this codebase for technical debt, known issues, and areas of concern.
240
248
  Write this document to {codebase_dir}/:
241
249
  - CONCERNS.md - Tech debt, bugs, security, performance, fragile areas
242
250
 
243
- IMPORTANT: Use {date} for all [YYYY-MM-DD] date placeholders in documents.
251
+ IMPORTANT: Set all date stamps (`**Analysis Date:**`, footer `*... analysis: ...*`, `<!-- refreshed: ... -->`) to {date}, overwriting any existing date.
244
252
 
245
253
  Scope: ${PATH_SCOPE_HINT:-(full repo)} — when --paths is supplied, restrict exploration to those prefixes only.
246
254
 
@@ -293,7 +301,7 @@ When the `Agent` tool is unavailable, perform codebase mapping sequentially in t
293
301
 
294
302
  **IMPORTANT:** Do NOT use `browser_subagent`, `Explore`, or any browser-based tool. Use only file system tools (Read, Bash, Write, Grep, Glob, list_dir, view_file, grep_search, or equivalent tools available in your runtime).
295
303
 
296
- **IMPORTANT:** Use `{date}` from init context for all `[YYYY-MM-DD]` date placeholders in documents. NEVER guess the date.
304
+ **IMPORTANT:** Set all date stamps (`**Analysis Date:**`, footer, `<!-- refreshed -->`) to `{date}` from init context, overwriting any existing date — Update runs seed from files with concrete prior dates, so merely replacing `[YYYY-MM-DD]` placeholders is not sufficient. NEVER guess the date.
297
305
 
298
306
  **SCOPE:** When `${PATH_SCOPE_HINT}` is non-empty (i.e. `--paths` was supplied), restrict every pass below to the validated path prefixes in `${SCOPED_PATHS}`. Do NOT scan files outside those prefixes. When `${PATH_SCOPE_HINT}` is empty, perform a full-repo scan.
299
307
 
@@ -407,7 +415,6 @@ Created .planning/codebase/:
407
415
  - INTEGRATIONS.md ([N] lines) - External services and APIs
408
416
  - CONCERNS.md ([N] lines) - Technical debt and issues
409
417
 
410
-
411
418
  ---
412
419
 
413
420
  ## ▶ Next Up — [${PROJECT_CODE}] ${PROJECT_TITLE}
@@ -352,6 +352,10 @@ mkdir -p .planning/research
352
352
  Spawn 4 parallel gsd-project-researcher agents. Each uses this template with dimension-specific fields:
353
353
 
354
354
  **Common structure for all 4 researchers:**
355
+ <!-- #2517 model-omit-on-inherit -->
356
+
357
+ > **Model omission (#2517).** Omit the `model` parameter entirely when the value it would carry (`researcher_model`, `synthesizer_model`, `roadmapper_model`) is `"inherit"` or empty. An empty value 404s on runtimes without native tier aliases — the default on non-Claude runtimes. Omitting it inherits the orchestrator's model. See @gsd-core/references/model-profile-resolution.md.
358
+
355
359
  ```text
356
360
  Agent(prompt="
357
361
  <research_type>Project Research — {DIMENSION} for [new features].</research_type>
@@ -374,6 +378,10 @@ ${AGENT_SKILLS_RESEARCHER}
374
378
 
375
379
  <quality_gate>{GATES}</quality_gate>
376
380
 
381
+ <!-- #2508 runtime-aware-dispatch -->
382
+
383
+ > **Runtime-aware dispatch (#2508 Phase 4).** GSD workflows dispatch specialized subagents by role. Before dispatching on a built-in-only runtime (kimi-code — three built-ins only), resolve the role to a built-in via `gsd_run query resolve-dispatch-type --requested <role> --raw`. On named-dispatch runtimes (Claude/OpenCode/…) the role is returned unchanged; on kimi-code it maps to `coder`/`explore`/`plan` by role-suffix. The persona rides `${AGENT_SKILLS_<ROLE>}` (Phase 3) regardless. See @gsd-core/references/runtime-aware-dispatch.md.
384
+
377
385
  <output>
378
386
  Write to: {research_dir}/{FILE}
379
387
  Use template: ~/.claude/gsd-core/templates/research-project/{FILE}
@@ -418,8 +426,8 @@ Commit after writing.
418
426
 
419
427
  **Synthesizer output self-heal (#222) — verify SUMMARY.md materialized:** The synthesizer's canonical output is `.planning/research/SUMMARY.md` on disk; its brief structured return (`## SYNTHESIS COMPLETE` plus a few `###` confirmation lines) is NOT the file content. A known LLM false-refusal (issue #222) sometimes makes the agent return the full SUMMARY.md document inline — fabricating a write restriction (e.g. "the runtime is blocking file writes") — instead of writing the file. Prompt hardening alone does not fully eliminate it, so the orchestrator MUST absorb the failure deterministically before spawning `gsd-roadmapper`:
420
428
 
421
- 1. Verify `.planning/research/SUMMARY.md` exists AND is substantive — non-empty, and free of any leftover `<!-- gsd:write-continue -->` continuation sentinel (which marks a truncated/incomplete write). You may validate with `gsd-tools verify-summary .planning/research/SUMMARY.md` — it exits 0 regardless, so check its JSON `passed` field (`"passed": false` means missing or invalid), not the process exit code. If it passes, continue normally.
422
- 2. If it is MISSING or invalid AND the synthesizer's return message contains the FULL SUMMARY.md document — recognizable by the template's top-level markers `# Project Research Summary`, `## Key Findings`, `## Implications for Roadmap`, and `## Sources`, not merely the brief `## SYNTHESIS COMPLETE` confirmation — the false-refusal fired: write that returned document to `.planning/research/SUMMARY.md` with the Write tool, then commit ALL research artifacts the synthesizer owns (it commits on behalf of the four researchers) with `gsd-tools query commit "docs: complete project research" --files .planning/research/` unless they are already committed. Log `⚠ #222 self-heal: synthesizer returned SUMMARY.md inline without writing it; orchestrator persisted the file.`
429
+ 1. Verify `.planning/research/SUMMARY.md` exists AND is substantive — non-empty, and free of any leftover `<!-- gsd:write-continue -->` continuation sentinel (which marks a truncated/incomplete write). You may validate with `gsd_run verify-summary .planning/research/SUMMARY.md` — it exits 0 regardless, so check its JSON `passed` field (`"passed": false` means missing or invalid), not the process exit code. If it passes, continue normally.
430
+ 2. If it is MISSING or invalid AND the synthesizer's return message contains the FULL SUMMARY.md document — recognizable by the template's top-level markers `# Project Research Summary`, `## Key Findings`, `## Implications for Roadmap`, and `## Sources`, not merely the brief `## SYNTHESIS COMPLETE` confirmation — the false-refusal fired: write that returned document to `.planning/research/SUMMARY.md` with the Write tool, then commit ALL research artifacts the synthesizer owns (it commits on behalf of the four researchers) with `gsd_run query commit "docs: complete project research" --files .planning/research/` unless they are already committed. Log `⚠ #222 self-heal: synthesizer returned SUMMARY.md inline without writing it; orchestrator persisted the file.`
423
431
  3. If it is MISSING or invalid AND the return is only a brief confirmation (no full SUMMARY document to recover), the synthesizer genuinely failed — surface the error and stop; do NOT spawn `gsd-roadmapper` against a missing or incomplete SUMMARY.md.
424
432
 
425
433
  This guarantees `gsd-roadmapper` (which lists SUMMARY.md as required reading) never runs against a missing or truncated SUMMARY.md.
@@ -111,7 +111,7 @@ elif [ -n "$OPENCODE_CONFIG_DIR" ] || [ -n "$OPENCODE_CONFIG" ]; then RUNTIME="o
111
111
  else RUNTIME="claude"; fi
112
112
  ```
113
113
 
114
- Set the instruction file variable via the shared runtime-name policy adapter (`gsd-tools query project-instruction-file`, backed by `getProjectInstructionFile` in `runtime-name-policy.cjs` — the single source of truth shared with `profile-output.cjs`):
114
+ Set the instruction file variable via the shared runtime-name policy adapter (`gsd_run query project-instruction-file`, backed by `getProjectInstructionFile` in `runtime-name-policy.cjs` — the single source of truth shared with `profile-output.cjs`):
115
115
  ```bash
116
116
  INSTRUCTION_FILE=$(gsd_run query project-instruction-file --runtime "$RUNTIME")
117
117
  ```
@@ -132,7 +132,6 @@ All subsequent references to the project instruction file use `$INSTRUCTION_FILE
132
132
 
133
133
  **If `needs_codebase_map` is true** (from init — existing code detected but no codebase map):
134
134
 
135
-
136
135
  **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-Claude runtimes (OpenAI Codex, Gemini CLI, etc.) where `AskUserQuestion` is not available.
137
136
  Use AskUserQuestion:
138
137
 
@@ -946,6 +945,10 @@ Display spawning indicator:
946
945
 
947
946
  Spawn 4 parallel gsd-project-researcher agents with path references:
948
947
 
948
+ <!-- #2517 model-omit-on-inherit -->
949
+
950
+ > **Model omission (#2517).** Omit the `model` parameter entirely when the value it would carry (`researcher_model`, `synthesizer_model`, `roadmapper_model`) is `"inherit"` or empty. An empty value 404s on runtimes without native tier aliases — the default on non-Claude runtimes. Omitting it inherits the orchestrator's model. See @gsd-core/references/model-profile-resolution.md.
951
+
949
952
  ```text
950
953
  Agent(prompt="<research_type>
951
954
  Project Research — Stack dimension for [domain].
@@ -981,6 +984,10 @@ Your STACK.md feeds into roadmap creation. Be prescriptive:
981
984
  - [ ] Confidence levels assigned to each recommendation
982
985
  </quality_gate>
983
986
 
987
+ <!-- #2508 runtime-aware-dispatch -->
988
+
989
+ > **Runtime-aware dispatch (#2508 Phase 4).** GSD workflows dispatch specialized subagents by role. Before dispatching on a built-in-only runtime (kimi-code — three built-ins only), resolve the role to a built-in via `gsd_run query resolve-dispatch-type --requested <role> --raw`. On named-dispatch runtimes (Claude/OpenCode/…) the role is returned unchanged; on kimi-code it maps to `coder`/`explore`/`plan` by role-suffix. The persona rides `${AGENT_SKILLS_<ROLE>}` (Phase 3) regardless. See @gsd-core/references/runtime-aware-dispatch.md.
990
+
984
991
  <output>
985
992
  Write to: {research_dir}/STACK.md
986
993
  Use template: ~/.claude/gsd-core/templates/research-project/STACK.md
@@ -1139,8 +1146,8 @@ Commit after writing.
1139
1146
 
1140
1147
  **Synthesizer output self-heal (#222) — verify SUMMARY.md materialized:** The synthesizer's canonical output is `.planning/research/SUMMARY.md` on disk; its brief structured return (`## SYNTHESIS COMPLETE` plus a few `###` confirmation lines) is NOT the file content. A known LLM false-refusal (issue #222) sometimes makes the agent return the full SUMMARY.md document inline — fabricating a write restriction (e.g. "the runtime is blocking file writes") — instead of writing the file. Prompt hardening alone does not fully eliminate it, so the orchestrator MUST absorb the failure deterministically before spawning `gsd-roadmapper`:
1141
1148
 
1142
- 1. Verify `.planning/research/SUMMARY.md` exists AND is substantive — non-empty, and free of any leftover `<!-- gsd:write-continue -->` continuation sentinel (which marks a truncated/incomplete write). You may validate with `gsd-tools verify-summary .planning/research/SUMMARY.md` — it exits 0 regardless, so check its JSON `passed` field (`"passed": false` means missing or invalid), not the process exit code. If it passes, continue normally.
1143
- 2. If it is MISSING or invalid AND the synthesizer's return message contains the FULL SUMMARY.md document — recognizable by the template's top-level markers `# Project Research Summary`, `## Key Findings`, `## Implications for Roadmap`, and `## Sources`, not merely the brief `## SYNTHESIS COMPLETE` confirmation — the false-refusal fired: write that returned document to `.planning/research/SUMMARY.md` with the Write tool, then commit ALL research artifacts the synthesizer owns (it commits on behalf of the four researchers) with `gsd-tools query commit "docs: complete project research" --files .planning/research/` unless they are already committed. Log `⚠ #222 self-heal: synthesizer returned SUMMARY.md inline without writing it; orchestrator persisted the file.`
1149
+ 1. Verify `.planning/research/SUMMARY.md` exists AND is substantive — non-empty, and free of any leftover `<!-- gsd:write-continue -->` continuation sentinel (which marks a truncated/incomplete write). You may validate with `gsd_run verify-summary .planning/research/SUMMARY.md` — it exits 0 regardless, so check its JSON `passed` field (`"passed": false` means missing or invalid), not the process exit code. If it passes, continue normally.
1150
+ 2. If it is MISSING or invalid AND the synthesizer's return message contains the FULL SUMMARY.md document — recognizable by the template's top-level markers `# Project Research Summary`, `## Key Findings`, `## Implications for Roadmap`, and `## Sources`, not merely the brief `## SYNTHESIS COMPLETE` confirmation — the false-refusal fired: write that returned document to `.planning/research/SUMMARY.md` with the Write tool, then commit ALL research artifacts the synthesizer owns (it commits on behalf of the four researchers) with `gsd_run query commit "docs: complete project research" --files .planning/research/` unless they are already committed. Log `⚠ #222 self-heal: synthesizer returned SUMMARY.md inline without writing it; orchestrator persisted the file.`
1144
1151
  3. If it is MISSING or invalid AND the return is only a brief confirmation (no full SUMMARY document to recover), the synthesizer genuinely failed — surface the error and stop; do NOT spawn `gsd-roadmapper` against a missing or incomplete SUMMARY.md.
1145
1152
 
1146
1153
  This guarantees `gsd-roadmapper` (which lists SUMMARY.md as required reading) never runs against a missing or truncated SUMMARY.md.
@@ -187,7 +187,8 @@ Choice [S]:
187
187
  ```
188
188
  2. Commit the deferral record:
189
189
  ```bash
190
- gsd_run query commit "docs: defer incomplete Phase {src} items to backlog"
190
+ gsd_run query commit "docs: defer incomplete Phase {src} items to backlog" \
191
+ --files .planning/ROADMAP.md
191
192
  ```
192
193
  3. Continue routing to `determine_next_action` immediately — no second prompt.
193
194
 
@@ -263,7 +264,9 @@ if echo "$ARGUMENTS" | grep -qE '(^|[[:space:]])\-\-(converge|cross-ai)([[:space
263
264
  fi
264
265
 
265
266
  CONVERGENCE_ARGS=""
266
- for REVIEW_FLAG in --codex --gemini --claude --opencode --ollama --lm-studio --llama-cpp --all --text; do
267
+ # Lane flags derived from the declared roster (#2800/#2272); --all and --text are convergence
268
+ # controls, not reviewer lanes, so they stay literal.
269
+ for REVIEW_FLAG in $(gsd_run review-lane flags) --all --text; do
267
270
  if echo "$ARGUMENTS" | grep -qE "(^|[[:space:]])${REVIEW_FLAG}([[:space:]]|$)"; then
268
271
  CONVERGENCE_ARGS="${CONVERGENCE_ARGS} ${REVIEW_FLAG}"
269
272
  fi
@@ -79,10 +79,12 @@ MVP_MODE_CFG=$(gsd_run query config-get workflow.mvp_mode 2>/dev/null || echo "f
79
79
 
80
80
  When the tdd capability's `workflow.tdd_mode` is active (resolved via the plan:pre render-hooks), the planner agent is instructed to apply `type: tdd` to eligible tasks using heuristics from `references/tdd.md`. The TDD guidance is injected via the tdd capability's contribution hook at §5.6; no inline config-get is needed.
81
81
 
82
- 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.
82
+ When `CONTEXT_WINDOW >= 500000`, the planner prompt includes the 3 most recent prior-phase CONTEXT.md/SUMMARY.md files plus any phases in the current phase's `Depends on:` field (explicit deps load regardless of recency).
83
83
 
84
84
  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`, `phase_status` (#3569), `planning_exists`, `roadmap_exists`, `phase_req_ids`, `response_language`, `granularity`.
85
85
 
86
+ **#2517:** omit the `model=` param from an `Agent()` call when its `researcher`/`planner`/`checker`_model is `"inherit"` or empty — passing `model=""` 404s on non-Claude runtimes; omitting inherits the orchestrator model (mirrors execute-phase).
87
+
86
88
  **If `response_language` is set:** All user-facing orchestrator output MUST be in `{response_language}`; technical terms, code, paths, and subagent prompts stay in English. Pass `response_language: {value}` into every spawned subagent prompt.
87
89
 
88
90
  **File paths (for <files_to_read> blocks):** `state_path`, `roadmap_path`, `requirements_path`, `context_path`, `research_path`, `verification_path`, `uat_path`, `reviews_path`. These are null if files don't exist.
@@ -716,7 +718,6 @@ after `$SPEC_FILE` (Step 7), before the gsd-planner spawn (Step 8).
716
718
  disabled or no requirement IDs; §A deterministic edge probe → `$COVERAGE` when `EDGE_ABSENT`; §B
717
719
  prohibition recall in the planner). Pass `$COVERAGE` and `$SPECLESS_FALLBACK_DISABLED` into Step 8.
718
720
 
719
-
720
721
  ## 8. Spawn gsd-planner Agent
721
722
 
722
723
  Display banner:
@@ -892,20 +893,17 @@ Agent(
892
893
 
893
894
  **Skip if `CHUNKED_MODE` is `false`.**
894
895
 
895
- Chunked mode splits the single long-lived planner Agent run into a short outline Agent run followed by
896
- N short per-plan Agent runs. Each run is bounded to ~3–5 min; each plan is committed individually
897
- for crash resilience. If any run hangs and the terminal is force-killed, rerunning
898
- `/gsd:plan-phase {N} --chunked` resumes from the last successfully committed plan.
896
+ Chunked mode splits the single planner run into a short outline run + N short per-plan
897
+ runs (~3–5 min each), committing each plan individually for crash resilience. Rerunning
898
+ `/gsd:plan-phase {N} --chunked` resumes from the last committed plan.
899
899
 
900
- **Intended for new or in-progress chunked runs.** To recover plans already written by a prior
901
- *non-chunked* run, use step 6's "Add more plans" or proceed directly to `/gsd:execute-phase`
902
- — don't start a fresh chunked run over existing non-chunked plans.
900
+ For recovering plans from a prior *non-chunked* run, use step 6's "Add more plans" or
901
+ proceed to `/gsd:execute-phase` — don't start a fresh chunked run over them.
903
902
 
904
903
  ### 8.5.1 Outline Phase (outline-only mode, ~2 min)
905
904
 
906
- **Resume detection:** If `${PHASE_DIR}/${PADDED_PHASE}-PLAN-OUTLINE.md` already exists **and
907
- is valid** (contains the `## OUTLINE COMPLETE` marker), skip this sub-step — the outline
908
- already exists from a previous run. Proceed directly to 8.5.2.
905
+ **Resume detection:** If `${PHASE_DIR}/${PADDED_PHASE}-PLAN-OUTLINE.md` exists and contains
906
+ the `## OUTLINE COMPLETE` marker (written by the outline agent — #2762), skip to 8.5.2.
909
907
 
910
908
  ```bash
911
909
  OUTLINE_FILE="${PHASE_DIR}/${PADDED_PHASE}-PLAN-OUTLINE.md"
@@ -933,6 +931,8 @@ Agent(
933
931
  The outline must be a markdown table with columns:
934
932
  Plan ID | Objective | Wave | Depends On | Requirements
935
933
 
934
+ End the file with a final line `## OUTLINE COMPLETE` — §8.5.1's resume-check greps
935
+ the file for it, so it MUST be written here, not just returned.
936
936
  Return: ## OUTLINE COMPLETE with plan count.",
937
937
  subagent_type="gsd-planner",
938
938
  model="{planner_model}",
@@ -950,14 +950,14 @@ Handle return:
950
950
 
951
951
  For each plan entry extracted from `PLAN-OUTLINE.md`:
952
952
 
953
- 1. **Resume check:** If `${PHASE_DIR}/{plan_id}-PLAN.md` already exists on disk **and has
954
- valid YAML frontmatter** (opening `---` delimiter present), skip this plan (do not
955
- overwrite completed work — resume safety).
953
+ 1. **Resume check:** Skip if `${PHASE_DIR}/{plan_id}-PLAN.md` exists with valid frontmatter
954
+ (resume safety) — UNLESS `--reviews` is set, whose purpose is to REPLAN with review
955
+ feedback (§6), so existing plans are overwritten, not skipped (#2762).
956
956
 
957
957
  ```bash
958
958
  PLAN_FILE="${PHASE_DIR}/${plan_id}-PLAN.md"
959
- if [[ -f "$PLAN_FILE" ]] && head -1 "$PLAN_FILE" | grep -q '^---'; then
960
- continue # plan already written, skip
959
+ if [[ -f "$PLAN_FILE" ]] && head -1 "$PLAN_FILE" | grep -q '^---' && [[ "$ARGUMENTS" != *"--reviews"* ]]; then
960
+ continue # resume safety — NOT under --reviews (replan)
961
961
  fi
962
962
  ```
963
963
 
@@ -1291,7 +1291,7 @@ Skipping bounce step.
1291
1291
  **Read pass count:**
1292
1292
  ```bash
1293
1293
  BOUNCE_PASSES=$(gsd_run query config-get workflow.plan_bounce_passes 2>/dev/null || echo "2")
1294
- BOUNCE_SCRIPT=$(gsd_run query config-get workflow.plan_bounce_script 2>/dev/null | jq -r '.' 2>/dev/null || true)
1294
+ BOUNCE_SCRIPT=$(gsd_run query config-get workflow.plan_bounce_script --raw 2>/dev/null || true)
1295
1295
  ```
1296
1296
 
1297
1297
  Display banner:
@@ -1399,47 +1399,43 @@ If `TEXT_MODE` is true, present as a plain-text numbered list (options already s
1399
1399
 
1400
1400
  ## 13a. Decision Coverage Gate
1401
1401
 
1402
- After the requirements coverage gate passes, verify that every trackable
1403
- decision captured by discuss-phase in CONTEXT.md `<decisions>` is referenced
1404
- by at least one plan. This is the **translation gate** from issue #2492 —
1405
- its job is to refuse to mark a phase planned when a discuss-phase decision
1406
- silently dropped on the way into the plans.
1402
+ Verify every trackable decision in CONTEXT.md `<decisions>` is referenced by at
1403
+ least one plan. This **translation gate** (#2492) refuses to mark a phase planned
1404
+ when a discuss-phase decision silently dropped.
1407
1405
 
1408
- **Skip if** `workflow.context_coverage_gate` is explicitly set to `false`
1409
- (absent key = enabled). Also skip if no CONTEXT.md exists for this phase
1410
- (nothing to translate) or if its `<decisions>` block is empty.
1406
+ **Skip if** `workflow.context_coverage_gate` is `false` (absent = enabled), or
1407
+ no CONTEXT.md exists for this phase, or its `<decisions>` block is empty.
1411
1408
 
1412
1409
  ```bash
1413
1410
  GATE_CFG=$(gsd_run query config-get workflow.context_coverage_gate 2>/dev/null || echo "true")
1414
1411
  if [ "$GATE_CFG" != "false" ]; then
1415
- GATE_RESULT=$(gsd_run query check.decision-coverage-plan "${PHASE_DIR}" "${CONTEXT_PATH}")
1416
- # BLOCKING: refuse to mark phase planned when a trackable decision is uncovered.
1417
- # `passed: true` covers both real-pass and skipped cases (gate disabled / no CONTEXT.md /
1418
- # no trackable decisions). Verify-phase counterpart deliberately omits this exit-1 — that
1419
- # gate is non-blocking by design (review finding F15).
1420
- echo "$GATE_RESULT" | jq -e '(.passed // .data.passed) == true' >/dev/null || {
1421
- echo "$GATE_RESULT" | jq -r '(.message // .data.message // "Decision coverage gate failed.")'
1422
- exit 1
1423
- }
1412
+ # #2770: CONTEXT_PATH from step-1 init doesn't survive into this Bash block;
1413
+ # recompute it. Only run when a CONTEXT.md exists (handler fails closed on an
1414
+ # empty arg, so an unguarded empty glob would halt a context-less phase).
1415
+ CONTEXT_PATH=$(ls "${PHASE_DIR}"/*-CONTEXT.md 2>/dev/null | head -1)
1416
+ if [ -n "$CONTEXT_PATH" ]; then
1417
+ GATE_RESULT=$(gsd_run query check.decision-coverage-plan "${PHASE_DIR}" "${CONTEXT_PATH}")
1418
+ # BLOCKING: refuse to mark phase planned when a trackable decision is uncovered.
1419
+ # `passed: true` covers both real-pass and skipped cases (gate disabled / no CONTEXT.md /
1420
+ # no trackable decisions). Verify-phase counterpart deliberately omits this exit-1 — that
1421
+ # gate is non-blocking by design (review finding F15).
1422
+ echo "$GATE_RESULT" | jq -e '(.passed // .data.passed) == true' >/dev/null || {
1423
+ echo "$GATE_RESULT" | jq -r '(.message // .data.message // "Decision coverage gate failed.")'
1424
+ exit 1
1425
+ }
1426
+ fi
1424
1427
  fi
1425
1428
  ```
1426
1429
 
1427
1430
  The handler returns JSON:
1428
1431
  ```json
1429
- {
1430
- "passed": true,
1431
- "skipped": false,
1432
- "total": 2,
1433
- "covered": 2,
1434
- "uncovered": [ { "id": "D-01", "text": "...", "category": "..." } ],
1435
- "message": "..."
1436
- }
1432
+ { "passed": true, "skipped": false, "total": 2, "covered": 2,
1433
+ "uncovered": [{ "id": "D-01", "text": "...", "category": "..." }], "message": "..." }
1437
1434
  ```
1438
1435
 
1439
1436
  **If `passed` is true (or `skipped` is true):** Display
1440
- `✓ Decision coverage: {M}/{N} CONTEXT.md decisions covered by plans` (or
1441
- `(skipped — gate disabled)` / `(skipped — no decisions)`) and proceed to
1442
- step 13b.
1437
+ `✓ Decision coverage: {M}/{N} decisions covered` (or `(skipped)`) and proceed
1438
+ to step 13b.
1443
1439
 
1444
1440
  **If `passed` is false:** Display the handler's `message` block. It already
1445
1441
  names each uncovered decision (`D-NN | category | text`) and tells the user
@@ -18,22 +18,11 @@ Read all files referenced by the invoking prompt's execution_context before star
18
18
 
19
19
  ## 1. Parse and Normalize Arguments
20
20
 
21
- Extract from $ARGUMENTS: phase number, reviewer flags (`--codex`, `--gemini`, `--agy`/`--antigravity`, `--claude`, `--opencode`, `--ollama`, `--lm-studio`, `--llama-cpp`, `--all`), `--max-cycles N`, `--text`, `--ws`.
21
+ Extract from $ARGUMENTS: phase number, reviewer flags (the declared reviewer lane flags, plus `--all`), `--max-cycles N`, `--text`, `--ws`.
22
22
 
23
23
  ```bash
24
24
  PHASE=$(echo "$ARGUMENTS" | grep -oE '[0-9]+\.?[0-9]*' | head -1)
25
25
 
26
- REVIEWER_FLAGS=""
27
- echo "$ARGUMENTS" | grep -q '\-\-codex' && REVIEWER_FLAGS="$REVIEWER_FLAGS --codex"
28
- echo "$ARGUMENTS" | grep -q '\-\-gemini' && REVIEWER_FLAGS="$REVIEWER_FLAGS --gemini"
29
- echo "$ARGUMENTS" | grep -q '\-\-agy' && REVIEWER_FLAGS="$REVIEWER_FLAGS --agy"
30
- echo "$ARGUMENTS" | grep -q '\-\-antigravity' && REVIEWER_FLAGS="$REVIEWER_FLAGS --antigravity"
31
- echo "$ARGUMENTS" | grep -q '\-\-claude' && REVIEWER_FLAGS="$REVIEWER_FLAGS --claude"
32
- echo "$ARGUMENTS" | grep -q '\-\-opencode' && REVIEWER_FLAGS="$REVIEWER_FLAGS --opencode"
33
- echo "$ARGUMENTS" | grep -q '\-\-ollama' && REVIEWER_FLAGS="$REVIEWER_FLAGS --ollama"
34
- echo "$ARGUMENTS" | grep -q '\-\-lm-studio' && REVIEWER_FLAGS="$REVIEWER_FLAGS --lm-studio"
35
- echo "$ARGUMENTS" | grep -q '\-\-llama-cpp' && REVIEWER_FLAGS="$REVIEWER_FLAGS --llama-cpp"
36
- echo "$ARGUMENTS" | grep -q '\-\-all' && REVIEWER_FLAGS="$REVIEWER_FLAGS --all"
37
26
  # #2315: do NOT default REVIEWER_FLAGS to --codex here. The default is resolved
38
27
  # against review.default_reviewers in step 1.5 (after the config gate) so a bare
39
28
  # invocation respects the configured reviewer lineup per ADR-0011 / ADR-0015.
@@ -66,6 +55,20 @@ Then re-run: /gsd:plan-review-convergence {PHASE}
66
55
  ```
67
56
 
68
57
  ```bash
58
+ # Reviewer flags are DERIVED from the declared lane roster (#2800/#2272), never hand-listed.
59
+ # Three surfaces used to enumerate them independently and had drifted: --coderabbit was missing
60
+ # from all three, --qwen/--cursor/--kimi-code from this one, and the old unanchored
61
+ # `grep -q '\-\-agy'` matched INSIDE --antigravity, appending both for one user flag.
62
+ # `--all` is a selection control, not a lane, so it stays literal.
63
+ # This block must stay AFTER the launcher preamble (below) because it calls `gsd_run` —
64
+ # do not move it back above the preamble in a future edit.
65
+ REVIEWER_FLAGS=""
66
+ for REVIEW_FLAG in $(gsd_run review-lane flags) --all; do
67
+ if echo "$ARGUMENTS" | grep -qE "(^|[[:space:]])${REVIEW_FLAG}([[:space:]]|$)"; then
68
+ REVIEWER_FLAGS="$REVIEWER_FLAGS $REVIEW_FLAG"
69
+ fi
70
+ done
71
+
69
72
  # #2315: Resolve reviewer selection when no explicit flag was given.
70
73
  # The pre-fix bug unconditionally set REVIEWER_FLAGS="--codex" in step 1, BEFORE
71
74
  # the config gate — silently overriding any configured review.default_reviewers
@@ -82,8 +85,9 @@ Then re-run: /gsd:plan-review-convergence {PHASE}
82
85
  if [ -z "$REVIEWER_FLAGS" ]; then
83
86
  DEFAULT_REVIEWERS_JSON=$(gsd_run query config-get review.default_reviewers 2>/dev/null || echo "")
84
87
  if ! command -v jq >/dev/null 2>&1; then
85
- # jq is a documented production dependency (review.md:244 — "install jq if
86
- # missing"). If it is absent we cannot inspect the configured default, so
88
+ # jq is a documented production dependency (review.md, detect_clis — the
89
+ # "jq-dependent reviewer lanes" note). If it is absent we cannot inspect
90
+ # the configured default (it is a JSON array, not a --raw/--pick scalar), so
87
91
  # fail safe with --codex and surface the reason rather than silently
88
92
  # reproducing the #2315 override under degraded conditions.
89
93
  echo "WARNING: jq not on PATH — cannot read review.default_reviewers; falling back to --codex (#2315)" >&2
@@ -141,7 +141,7 @@ WINDOWS_OPEN=$(printf '%s' "$WINDOWS_STATUS" | jq -r '.ledger.open_count // 0' 2
141
141
  WINDOWS_WAIVED=$(printf '%s' "$WINDOWS_STATUS" | jq -r '.ledger.waived_count // 0' 2>/dev/null || echo 0)
142
142
  ```
143
143
 
144
- Render `Open Windows` only when `$WINDOWS_OPEN` is greater than `0` (or `$WINDOWS_WAIVED` is greater than `0`, so an auditable deferral history remains visible). Phrase: `{WINDOWS_OPEN} open, {WINDOWS_WAIVED} waived — resolves with /gsd:ship gate; inspect via gsd-tools windows status`. The ledger is cross-phase; the count is the project total, not the current phase's.
144
+ Render `Open Windows` only when `$WINDOWS_OPEN` is greater than `0` (or `$WINDOWS_WAIVED` is greater than `0`, so an auditable deferral history remains visible). Phrase: `{WINDOWS_OPEN} open, {WINDOWS_WAIVED} waived — resolves with /gsd:ship gate; inspect via gsd_run windows status`. The ledger is cross-phase; the count is the project total, not the current phase's.
145
145
 
146
146
 
147
147
  ## Active Debug Sessions
@@ -47,7 +47,6 @@ RESPONSE_LANGUAGE=$(gsd_run query config-get response_language --default "" 2>/d
47
47
 
48
48
  If `$DESCRIPTION` is empty after parsing, prompt user interactively:
49
49
 
50
-
51
50
  **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-Claude runtimes (OpenAI Codex, Gemini CLI, etc.) where `AskUserQuestion` is not available.
52
51
 
53
52
  ```
@@ -237,7 +236,11 @@ else
237
236
  # On success HEAD is exactly at origin/$DEFAULT_BRANCH, so a post-creation
238
237
  # merge-base / "ahead-of" guard would be unreachable — the explicit base
239
238
  # argument here is the single source of correctness for #2916.
240
- git checkout -b "$branch_name" "origin/$DEFAULT_BRANCH" \
239
+ # --no-track: with the default branch.autoSetupMerge=true, checkout -b from a
240
+ # remote-tracking ref wires branch.<name>.merge to refs/heads/$DEFAULT_BRANCH
241
+ # (origin/master), so a GUI sync pushes quick-task commits straight onto
242
+ # origin/$DEFAULT_BRANCH, bypassing PR review (#2498).
243
+ git checkout -b "$branch_name" "origin/$DEFAULT_BRANCH" --no-track \
241
244
  || { echo "ERROR: Could not create '$branch_name' from origin/$DEFAULT_BRANCH (#2916)." >&2; exit 1; }
242
245
  fi
243
246
  ```
@@ -415,6 +418,10 @@ Display banner:
415
418
 
416
419
  Spawn a single focused researcher (not 4 parallel researchers like full phases — quick tasks need targeted research, not broad domain surveys):
417
420
 
421
+ <!-- #2517 model-omit-on-inherit -->
422
+
423
+ > **Model omission (#2517).** Omit the `model` parameter entirely when the value it would carry (`planner_model`, `checker_model`, `executor_model`, `reviewer_model`, `verifier_model`) is `"inherit"` or empty. An empty value 404s on runtimes without native tier aliases — the default on non-Claude runtimes. Omitting it inherits the orchestrator's model. See @gsd-core/references/model-profile-resolution.md.
424
+
418
425
  ```
419
426
  Agent(
420
427
  prompt="
@@ -445,6 +452,10 @@ This is a quick task, not a full phase. Research should be concise and targeted:
445
452
  Do NOT produce a full domain survey. Target 1-2 pages of actionable findings.
446
453
  </focus>
447
454
 
455
+ <!-- #2508 runtime-aware-dispatch -->
456
+
457
+ > **Runtime-aware dispatch (#2508 Phase 4).** GSD workflows dispatch specialized subagents by role. Before dispatching on a built-in-only runtime (kimi-code — three built-ins only), resolve the role to a built-in via `gsd_run query resolve-dispatch-type --requested <role> --raw`. On named-dispatch runtimes (Claude/OpenCode/…) the role is returned unchanged; on kimi-code it maps to `coder`/`explore`/`plan` by role-suffix. The persona rides `${AGENT_SKILLS_<ROLE>}` (Phase 3) regardless. See @gsd-core/references/runtime-aware-dispatch.md.
458
+
448
459
  <output>
449
460
  Write research to: ${QUICK_DIR}/${quick_id}-RESEARCH.md
450
461
  Use standard research format but keep it lean — skip sections that don't apply.
@@ -983,7 +994,7 @@ Use `date` from init:
983
994
  | ${quick_id} | ${DESCRIPTION} | ${date} | ${commit_hash} | [${quick_id}-${slug}](./quick/${quick_id}-${slug}/) |
984
995
  ```
985
996
 
986
- For a schema-safe append outside this workflow (e.g. from fast.md), `gsd-tools quick-tasks-append --task <text>` performs the equivalent write via the shared, schema-backed `appendQuickTaskRow` helper (#2133, ADR-2143 §3/§7).
997
+ For a schema-safe append outside this workflow (e.g. from fast.md), `gsd_run quick-tasks-append --task <text>` performs the equivalent write via the shared, schema-backed `appendQuickTaskRow` helper (#2133, ADR-2143 §3/§7).
987
998
 
988
999
  **7d. Update "Last activity" line:**
989
1000