Files
msd-core/gsd-core/references/gate-prompts.md
Tom Boucher 3af1941948 fix(#2772): resolve four discuss-phase text inconsistencies (dead MAX_PASSES read, gate-prompts drift, circular auto_advance, answer_validation drift) (#2886)
* test(#2772): structural guards for the four discuss-phase text inconsistencies

* fix(#2772): resolve four discuss-phase text inconsistencies

1. auto.md: remove the dead MAX_PASSES/max_discuss_passes config read (contradicted
   the mandated single-pass rule + wasted a shim invocation per auto run).
2. gate-prompts.md: context-handling options now match the actual check_existing flow
   (Update it | View it | Skip, not Overwrite|Append|Cancel); gray-area-option no longer
   mandates 'Let Claude decide' (contradicts discuss-phase.md's no-cop-out rule).
3. discuss-phase.md: auto_advance fallback ends the workflow instead of routing back to
   the already-run confirm_creation step (circular).
4. discuss-phase-assumptions.md: re-sync answer_validation to the parent canonical block
   (had drifted — lost the 'Other' empty-text branch).

* chore(#2772): changeset fragment

* fix+test(#2772): also fix the assumptions auto_advance circularity (review minor 1) + add positive test anchors (review minor 2)

The sibling discuss-phase-assumptions.md had the identical auto_advance→confirm_creation
circularity; fix it the same way (end the workflow). Add positive anchors to both
auto_advance tests so a re-phrased regression can't slip past. File #2885 for the dead
max_discuss_passes config still advertised in settings/registry/docs (review minor 3).

* fix(#2772): keep discuss-phase.md under the 32000B #717 cap + ack assumptions growth

The auto_advance fixes + the assumptions answer_validation re-sync grew both files
past the emitted-attribution gate (and discuss-phase.md past the #717 32000B cap).
Condense the auto_advance prose in both files (discuss-phase.md now net -11, under
cap; auto.md already net -4650 from the MAX_PASSES shim removal). Add
discuss-phase-assumptions.md to tests/emitted-drift-ack.json for its residual +220
(answer_validation re-sync + auto_advance fix).

* chore(#2772): backfill changeset PR number (2886)

---------

Co-authored-by: Test <test@example.com>
2026-07-30 18:14:34 -04:00

3.9 KiB

Gate Prompt Patterns

Reusable prompt patterns for structured gate checks in workflows and agents.

For checkpoint box format details, see references/ui-brand.md -- checkpoint boxes use double-line border drawing with 62-character inner width.

Rules

  • header must be max 12 characters
  • multiSelect is always false for gate checks
  • Always handle the "Other" case (user typed a freeform response instead of selecting)
  • Max 4 options per prompt -- if more are needed, use a 2-step flow

Pattern: approve-revise-abort

3-option gate for plan approval, gap-closure approval.

  • question: "Approve these {noun}?"
  • header: "Approve?"
  • options: Approve | Request changes | Abort

Pattern: yes-no

Simple 2-option confirmation for re-planning, rebuild, replace plans, commit.

  • question: "{Specific question about the action}"
  • header: "Confirm"
  • options: Yes | No

Pattern: stale-continue

2-option refresh gate for staleness warnings, timestamp freshness.

  • question: "{Artifact} may be outdated. Refresh or continue?"
  • header: "Stale"
  • options: Refresh | Continue anyway

Pattern: yes-no-pick

3-option selection for seed selection, item inclusion.

  • question: "Include {items} in planning?"
  • header: "Include?"
  • options: Yes, all | Let me pick | No

Pattern: multi-option-failure

4-option failure handler for build failures.

  • question: "Plan {id} failed. How should we proceed?"
  • header: "Failed"
  • options: Retry | Skip | Rollback | Abort

Pattern: multi-option-escalation

4-option escalation for review escalation (max retries exceeded).

  • question: "Phase {N} has failed verification {attempt} times. How should we proceed?"
  • header: "Escalate"
  • options: Accept gaps | Re-plan (via /gsd:plan-phase) | Debug (via /gsd:debug) | Retry

Pattern: multi-option-gaps

4-option gap handler for review gaps-found.

  • question: "{count} verification gaps need attention. How should we proceed?"
  • header: "Gaps"
  • options: Auto-fix | Override | Manual | Skip

Pattern: multi-option-priority

4-option priority selection for milestone gap priority.

  • question: "Which gaps should we address?"
  • header: "Priority"
  • options: Must-fix only | Must + should | Everything | Let me pick

Pattern: toggle-confirm

2-option confirmation for enabling/disabling boolean features.

  • question: "Enable {feature_name}?"
  • header: "Toggle"
  • options: Enable | Disable

Pattern: action-routing

Up to 4 suggested next actions with selection (status, resume workflows).

  • question: "What would you like to do next?"
  • header: "Next Step"
  • options: {primary action} | {alternative 1} | {alternative 2} | Something else
  • Note: Dynamically generate options from workflow state. Always include "Something else" as last option.

Pattern: scope-confirm

3-option confirmation for quick task scope validation.

  • question: "This task looks complex. Proceed as quick task or use full planning?"
  • header: "Scope"
  • options: Quick task | Full plan (via /gsd:plan-phase) | Revise

Pattern: depth-select

3-option depth selection for planning workflow preferences.

  • question: "How thorough should planning be?"
  • header: "Depth"
  • options: Quick (3-5 phases, skip research) | Standard (5-8 phases, default) | Comprehensive (8-12 phases, deep research)

Pattern: context-handling

3-option handler for existing CONTEXT.md in discuss workflow.

  • question: "Phase {N} already has a CONTEXT.md. How should we handle it?"
  • header: "Context"
  • options: Update it | View it | Skip

Pattern: gray-area-option

Dynamic template for presenting gray area choices in discuss workflow.

  • question: "{Gray area title}"
  • header: "Decision"
  • options: {Option 1} | {Option 2}
  • Note: Options generated at runtime. Present real choices only — do NOT include a "skip" or "you decide" option (the user ran discuss-phase to decide). An "Other" free-text escape hatch may be offered per modes/default.md, but never a "Let Claude decide" cop-out.