Skip to content

feat(start): add HITL confirmation gate on gate1 green verdict (#57)#58

Merged
JFK merged 3 commits intomainfrom
57-feat/unify-all-hitl-gates-to-use-askuserquest
Apr 12, 2026
Merged

feat(start): add HITL confirmation gate on gate1 green verdict (#57)#58
JFK merged 3 commits intomainfrom
57-feat/unify-all-hitl-gates-to-use-askuserquest

Conversation

@JFK
Copy link
Copy Markdown
Owner

@JFK JFK commented Apr 12, 2026

Closes #57

Summary

  • Add HITL confirmation gate (step 12a) to start.md for gate1 green verdict, mirroring the established pattern in ship.md step 9a
  • New config option gate1.green_continue_requires_confirm (default true) allows power users to disable the pause
  • Introduce GATE1_KEY_SUGGESTIONS variable — advice extracted once in step 12a, reused by step 17a to avoid triple-scanning GATE1_OUTPUT
  • Update step 18a skip conditions to cover green+abort case

Implementation notes

  • Two files changed: commands/start.md (step 12a, config defaults, step 17a, step 18a) and commands/config.md (built-in defaults sync)
  • Pattern consistency: step 12a uses the same 3-option AskUserQuestion pattern (Yes/No/Feedback with re-present loop) as ship.md step 9a and propose.md step 11
  • Config naming: gate1.green_continue_requires_confirm follows the established convention from gate2.green_continue_requires_confirm and gate1.yellow_continue_requires_confirm
  • GATE1_KEY_SUGGESTIONS: stored in English (Layer A), translated at render time when lang != "en"
  • Abort state: partial state file written via atomic temp+mv (same as step 14)
  • DRY_RUN: step 12a runs during DRY_RUN (operator sees gate1 summary), matching ship.md step 9a behavior

Pre-PR review summary

  • gate2 mode: advisor-only (no binary gate configured)
  • audit: skipped
  • binary_gate: (none)
  • cso: green
  • qa-lead: green
  • cto: green
  • gate1: green via /ask
  • review provider: copilot

Full reviews are saved in the plugin cache:

  • ~/.claude/cache/gh-issue-driven/57-feat-unify-all-hitl-gates-to-use-askuserquest.gate1.md
  • ~/.claude/cache/gh-issue-driven/57-feat-unify-all-hitl-gates-to-use-askuserquest.gate2.md

🤖 Generated via /gh-issue-driven:ship

Add step 12a to start.md — when gate1 returns green and
gate1.green_continue_requires_confirm is true (default), show a
Considerations block with the gate1 summary and ask the operator
to confirm before branch creation.

- New config option gate1.green_continue_requires_confirm (default true)
- 3-option AskUserQuestion: Yes/No/Feedback with re-present loop
- GATE1_KEY_SUGGESTIONS extracted once in 12a, reused by step 17a
- Step 18a skip conditions updated for green+abort case

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 12, 2026 11:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a Human-in-the-Loop (HITL) confirmation pause to /gh-issue-driven:start when gate1 returns a green verdict, aligning the operator-control pattern with other commands and avoiding repeated rescans of gate1 output.

Changes:

  • Introduces gate1.green_continue_requires_confirm (default true) and routes green verdict handling through a new step 12a confirmation gate.
  • Extracts and caches up to 3 actionable items from GATE1_OUTPUT into GATE1_KEY_SUGGESTIONS for reuse in step 17a.
  • Updates step 18a skip conditions to include the green+abort path.

Comment on lines 281 to 286
"gate1": {
"primary": "/claude-c-suite:ask",
"fallback": "/claude-c-suite:ceo",
"yellow_continue_requires_confirm": true
"yellow_continue_requires_confirm": true,
"green_continue_requires_confirm": true
}
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gate1.green_continue_requires_confirm is introduced here and referenced as a built-in default, but the canonical built-in defaults in commands/config.md still omit this gate1 key. This makes /gh-issue-driven:config show and the overall config contract inconsistent with what /start documents as the default behavior. Please add gate1.green_continue_requires_confirm (default true) to commands/config.md built-in defaults (and any other config-default listings) so the key is discoverable and consistent.

Copilot uses AI. Check for mistakes.
Comment on lines +578 to +582
```

When extracting advice, use the same heuristic as step 17a: look for bullet points, numbered list items, or lines containing "should", "consider", "recommend", "must", "watch out", "risk", "edge case" in `GATE1_OUTPUT`. Extract up to **3** of the most concrete items. If nothing extractable, omit the advice bullets (do not invent guidance). Store the extracted items as `GATE1_KEY_SUGGESTIONS` so that step 17a can reuse them without re-scanning `GATE1_OUTPUT`.

When `lang != "en"`, produce the Considerations block, the question text, and all option labels in the language specified by `lang`.
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GATE1_KEY_SUGGESTIONS is stored here for reuse in step 17a, but the value contract isn’t defined (e.g., ordered list of plain strings vs pre-formatted bullets) and the empty/no-advice case is ambiguous. Please specify the exact representation for GATE1_KEY_SUGGESTIONS (recommended: ordered list of 0–3 plain-text strings) and ensure step 17a treats an empty value as “no suggestions” (omit the checklist) rather than formatting placeholders or inventing guidance.

Copilot uses AI. Check for mistakes.
- Add gate1.green_continue_requires_confirm to config.md built-in defaults
- Define GATE1_KEY_SUGGESTIONS value contract: ordered list of 0-3 plain-text strings, empty list = no suggestions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.


- **Question**: `Gate1 is green. Continue with branch creation?`
- **Option 1 — "Yes, continue"**: continue to step 13.
- **Option 2 — "No, abort"**: save state with `phase=started, gate1.verdict=green` (no branch created) and exit cleanly.
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Step 12a (and the existing yellow-abort path in step 12) says to “save state … (no branch created)”, but the only state-file write described later is step 14, which won’t be reached on an early abort. Please clarify whether an early-abort should (a) write a partial state file before exiting (and specify how/where), or (b) not persist state at all (and adjust the wording accordingly).

Suggested change
- **Option 2 — "No, abort"**: save state with `phase=started, gate1.verdict=green` (no branch created) and exit cleanly.
- **Option 2 — "No, abort"**: immediately write a **partial state file** at the normal state-file path, using the same atomic temp+mv procedure defined for the later state save step, with at least `phase=started` and `gate1.verdict=green`, and explicitly record that no branch was created. After that write succeeds, exit cleanly.

Copilot uses AI. Check for mistakes.
Comment on lines +582 to +584
Store the extracted items as `GATE1_KEY_SUGGESTIONS` — an ordered list of 0–3 plain-text strings (no bullet prefixes, no formatting). Step 17a reuses this list directly: an empty list means "no suggestions" (omit the checklist entirely).

When `lang != "en"`, produce the Considerations block, the question text, and all option labels in the language specified by `lang`.
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Step 12a stores extracted advice into GATE1_KEY_SUGGESTIONS and step 17a later reuses it “directly” while step 17d requires the implementation guidance to be localized when lang != "en". As written, it’s ambiguous whether GATE1_KEY_SUGGESTIONS should be stored in the operator language (translated) or in the original GATE1_OUTPUT language; please make this explicit to avoid mixed-language guidance when lang is non-English and the list is reused without reprocessing.

Suggested change
Store the extracted items as `GATE1_KEY_SUGGESTIONS` — an ordered list of 0–3 plain-text strings (no bullet prefixes, no formatting). Step 17a reuses this list directly: an empty list means "no suggestions" (omit the checklist entirely).
When `lang != "en"`, produce the Considerations block, the question text, and all option labels in the language specified by `lang`.
Store the extracted items as `GATE1_KEY_SUGGESTIONS` — an ordered list of 0–3 plain-text strings (no bullet prefixes, no formatting). This list is a durable/internal artifact and must be stored in **English only**. If the extracted text from `GATE1_OUTPUT` is not already English, translate/normalize each item into concise English before storing it. Step 17a reuses this list directly in its stored English form: an empty list means "no suggestions" (omit the checklist entirely).
When `lang != "en"`, localize only the **rendered/operator-facing** text: produce the Considerations block, the question text, and all option labels in the language specified by `lang`. If you show advice bullets from `GATE1_KEY_SUGGESTIONS`, translate them for display at render time, but do **not** overwrite or re-store `GATE1_KEY_SUGGESTIONS` in that language.

Copilot uses AI. Check for mistakes.
Comment on lines 166 to 171
"gate1": {
"primary": "/claude-c-suite:ask",
"fallback": "/claude-c-suite:ceo",
"yellow_continue_requires_confirm": true
"yellow_continue_requires_confirm": true,
"green_continue_requires_confirm": true
},
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description claims this is a “Single file change: only commands/start.md modified”, but this PR also updates commands/config.md (built-in defaults). Please update the description (or remove the single-file claim) so the metadata matches the actual diff.

Copilot uses AI. Check for mistakes.
- Clarify abort state-file write in step 12a (atomic temp+mv, same as step 14)
- Define GATE1_KEY_SUGGESTIONS language contract: store in English, translate at render time
- Keep GATE1_KEY_SUGGESTIONS as durable internal artifact (Layer A = English)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@JFK JFK merged commit ce70a25 into main Apr 12, 2026
1 check passed
@JFK JFK deleted the 57-feat/unify-all-hitl-gates-to-use-askuserquest branch April 12, 2026 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unify all HITL gates to use AskUserQuestion for operator confirmation

2 participants