@opengsd/gsd-core 1.8.0 → 1.9.1

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 (177) 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 +107 -34
  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 +236 -107
  15. package/commands/gsd/plan-review-convergence.md +5 -1
  16. package/gsd-core/bin/gsd-tools.cjs +882 -4
  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 +36 -9
  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 +61 -6
  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/project-root.cjs +48 -0
  49. package/gsd-core/bin/lib/review-lane-descriptor.cjs +927 -0
  50. package/gsd-core/bin/lib/review-lane-invocation.cjs +348 -0
  51. package/gsd-core/bin/lib/review-lane-runner.cjs +594 -0
  52. package/gsd-core/bin/lib/review-reviewer-selection.cjs +114 -32
  53. package/gsd-core/bin/lib/roadmap-parser.cjs +54 -6
  54. package/gsd-core/bin/lib/roadmap.cjs +10 -4
  55. package/gsd-core/bin/lib/runtime-artifact-conversion.cjs +31 -4
  56. package/gsd-core/bin/lib/runtime-artifact-layout.cjs +1 -1
  57. package/gsd-core/bin/lib/runtime-hooks-surface.cjs +140 -0
  58. package/gsd-core/bin/lib/runtime-name-policy.cjs +15 -2
  59. package/gsd-core/bin/lib/smart-entry.cjs +1 -1
  60. package/gsd-core/bin/lib/state-document.cjs +164 -20
  61. package/gsd-core/bin/lib/state-transition.cjs +28 -10
  62. package/gsd-core/bin/lib/state.cjs +141 -21
  63. package/gsd-core/bin/lib/uat-predicate.cjs +6 -4
  64. package/gsd-core/bin/lib/uat.cjs +9 -7
  65. package/gsd-core/bin/lib/ui-consideration-probe.cjs +2 -2
  66. package/gsd-core/bin/lib/unusable-input.cjs +216 -0
  67. package/gsd-core/bin/lib/validate.cjs +32 -0
  68. package/gsd-core/bin/lib/verification.cjs +51 -14
  69. package/gsd-core/bin/lib/verify.cjs +146 -22
  70. package/gsd-core/bin/lib/worktree-safety.cjs +360 -15
  71. package/gsd-core/bin/shared/config-defaults.manifest.json +1 -0
  72. package/gsd-core/bin/shared/config-schema.manifest.json +1 -13
  73. package/gsd-core/bin/shared/model-catalog.json +5 -0
  74. package/gsd-core/bin/shared/runtime-aliases.manifest.json +5 -0
  75. package/gsd-core/references/context-budget.md +40 -0
  76. package/gsd-core/references/gate-prompts.md +6 -3
  77. package/gsd-core/references/model-profile-resolution.md +64 -13
  78. package/gsd-core/references/offer-next.md +88 -0
  79. package/gsd-core/references/planning-config.md +2 -1
  80. package/gsd-core/references/reviewer-instances.md +28 -21
  81. package/gsd-core/references/runtime-aware-dispatch.md +42 -0
  82. package/gsd-core/references/ui-consideration-probe.md +2 -2
  83. package/gsd-core/references/worktree-branch-check.md +4 -4
  84. package/gsd-core/templates/summary-minimal.md +4 -0
  85. package/gsd-core/templates/summary-standard.md +4 -0
  86. package/gsd-core/templates/summary.md +7 -0
  87. package/gsd-core/workflows/ai-integration-phase.md +4 -4
  88. package/gsd-core/workflows/audit-fix.md +4 -0
  89. package/gsd-core/workflows/audit-milestone.md +8 -0
  90. package/gsd-core/workflows/autonomous.md +19 -15
  91. package/gsd-core/workflows/check-todos.md +2 -2
  92. package/gsd-core/workflows/code-review-fix.md +14 -6
  93. package/gsd-core/workflows/code-review.md +93 -21
  94. package/gsd-core/workflows/debug.md +10 -2
  95. package/gsd-core/workflows/diagnose-issues.md +4 -0
  96. package/gsd-core/workflows/discuss-phase/modes/advisor.md +2 -4
  97. package/gsd-core/workflows/discuss-phase/modes/auto.md +0 -6
  98. package/gsd-core/workflows/discuss-phase-assumptions.md +15 -9
  99. package/gsd-core/workflows/discuss-phase.md +2 -2
  100. package/gsd-core/workflows/docs-update.md +8 -0
  101. package/gsd-core/workflows/eval-review.md +1 -1
  102. package/gsd-core/workflows/execute-phase/steps/codebase-drift-gate.md +4 -0
  103. package/gsd-core/workflows/execute-phase/steps/executor-isolation-dispatch.md +160 -0
  104. package/gsd-core/workflows/execute-phase.md +85 -115
  105. package/gsd-core/workflows/execute-plan.md +5 -4
  106. package/gsd-core/workflows/explore.md +4 -0
  107. package/gsd-core/workflows/extract-learnings.md +21 -0
  108. package/gsd-core/workflows/help/modes/full.md +3 -3
  109. package/gsd-core/workflows/import.md +4 -1
  110. package/gsd-core/workflows/ingest-docs.md +4 -0
  111. package/gsd-core/workflows/map-codebase.md +13 -6
  112. package/gsd-core/workflows/new-milestone.md +10 -2
  113. package/gsd-core/workflows/new-project.md +11 -4
  114. package/gsd-core/workflows/next.md +5 -2
  115. package/gsd-core/workflows/plan-phase.md +42 -46
  116. package/gsd-core/workflows/plan-review-convergence.md +18 -14
  117. package/gsd-core/workflows/progress.md +1 -1
  118. package/gsd-core/workflows/quick.md +14 -3
  119. package/gsd-core/workflows/review.md +146 -575
  120. package/gsd-core/workflows/scan.md +9 -1
  121. package/gsd-core/workflows/secure-phase.md +10 -2
  122. package/gsd-core/workflows/ship.md +41 -11
  123. package/gsd-core/workflows/smart-entry.md +1 -1
  124. package/gsd-core/workflows/ui-phase.md +8 -1
  125. package/gsd-core/workflows/ui-review.md +8 -1
  126. package/gsd-core/workflows/update.md +104 -5
  127. package/gsd-core/workflows/validate-phase.md +10 -2
  128. package/gsd-core/workflows/verify-work.md +8 -1
  129. package/hooks/dist/gsd-cursor-session-start.js +6 -2
  130. package/hooks/dist/gsd-cursor-stop.js +6 -2
  131. package/hooks/dist/gsd-cursor-subagent-start.js +6 -2
  132. package/hooks/dist/gsd-graphify-update.sh +9 -0
  133. package/hooks/dist/gsd-phase-boundary.sh +14 -2
  134. package/hooks/dist/gsd-prompt-guard.js +101 -2
  135. package/hooks/dist/gsd-read-guard.js +100 -2
  136. package/hooks/dist/gsd-read-injection-scanner.js +109 -2
  137. package/hooks/dist/gsd-statusline.js +9 -6
  138. package/hooks/dist/gsd-workflow-guard.js +110 -6
  139. package/hooks/dist/gsd-worktree-path-guard.js +132 -8
  140. package/hooks/dist/lib/cursor-workspace.js +74 -0
  141. package/hooks/gsd-cursor-session-start.js +6 -2
  142. package/hooks/gsd-cursor-stop.js +6 -2
  143. package/hooks/gsd-cursor-subagent-start.js +6 -2
  144. package/hooks/gsd-graphify-update.sh +9 -0
  145. package/hooks/gsd-phase-boundary.sh +14 -2
  146. package/hooks/gsd-prompt-guard.js +101 -2
  147. package/hooks/gsd-read-guard.js +100 -2
  148. package/hooks/gsd-read-injection-scanner.js +109 -2
  149. package/hooks/gsd-statusline.js +9 -6
  150. package/hooks/gsd-workflow-guard.js +110 -6
  151. package/hooks/gsd-worktree-path-guard.js +132 -8
  152. package/hooks/lib/cursor-workspace.js +74 -0
  153. package/package.json +7 -7
  154. package/pi/gsd.cjs +26 -1
  155. package/scripts/check-coverage-gate.cjs +51 -0
  156. package/scripts/check-glossary-refs.cjs +24 -0
  157. package/scripts/ci-test-scope.cjs +67 -17
  158. package/scripts/gen-adr-index.cjs +6 -4
  159. package/scripts/gen-capability-matrix.cjs +26 -2
  160. package/scripts/gen-capability-registry.cjs +132 -34
  161. package/scripts/gen-emitted-baseline.cjs +145 -0
  162. package/scripts/gen-registry.cjs +39 -15
  163. package/scripts/lint-compiled-artifact-sync.cjs +146 -0
  164. package/scripts/lint-emitted-drift-ack.cjs +149 -0
  165. package/scripts/lint-fix-has-regression-test.cjs +131 -0
  166. package/scripts/lint-resolution-provenance.cjs +9 -0
  167. package/scripts/mutation-matrix.cjs +4 -0
  168. package/scripts/prompt-injection-scan.sh +6 -0
  169. package/scripts/registry-schema.cjs +372 -94
  170. package/scripts/release-notes/conventional-title.cjs +19 -1
  171. package/scripts/release-notes/format-github-release-notes.cjs +7 -3
  172. package/scripts/validate-registry.cjs +10 -6
  173. package/scripts/workflow-size.cjs +16 -8
  174. package/skills/gsd-plan-review-convergence/SKILL.md +5 -1
  175. package/vscode/package.json +1 -1
  176. package/scripts/gen-golden-install-parity-zcode.cjs +0 -77
  177. package/scripts/update-size-baseline.cjs +0 -68
@@ -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