google-gemini / google-gemini/gemini-cli
[Feature Request]: Interactive clarification questions & pre-flight GitHub review gate
- Dominant language
- TypeScript
- Stars
- 107k
- Forks
- 14.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 45
Description
### What would you like to be added?
We would like to propose adding two high-leverage interactive guardrails / extension capabilities to Gemini CLI:
1. **Interactive Clarification Dialog (`ask_user_question`)**:
A native tool/extension hook allowing the agent to prompt the user with structured multi-choice options (with descriptions) and open-ended input when requirements are ambiguous, instead of proceeding on blind assumptions.
2. **Pre-flight GitHub Modification Review Gate (`gh-review-gate`)**:
A human-in-the-loop interceptor for modifying GitHub CLI operations (`gh pr create/edit`, `gh issue create/edit`, `gh release create`, etc.). Before touching upstream state, it displays a formatted draft in the terminal and enters an interactive 2-option loop:
- `1. Submit`
- `2. Review from me (request edits)`
The agent revises the draft iteratively until explicit human approval is given.
---
### Why is this needed?
- **Zero Blind Assumptions**: Autonomous coding agents often guess architectural decisions, dependency choices, or API schemas when prompts leave edge cases open. A structured questioning tool ensures the agent stops and gathers targeted user preferences first.
- **Upstream Safety & Public Hygiene**: Automated tool execution should not submit PRs, open issues, or publish comments to public repositories without pre-flight human verification. The review gate guarantees the user can inspect the exact title/body diff and request edits before upstream execution.
---
### Additional context & TUI Previews
We have built and battle-tested both extensions daily in our terminal agent workflow (`pi` harness) across production and open-source repositories with outstanding results.
#### 1. Interactive Question Prompt (TUI Modal):
```text
[Clarification / Question Prompt] Which database adapter should we scaffold?
> 1. PostgreSQL (pgx v5)
High-performance native driver with binary protocol support
2. SQLite (modernc.org/sqlite)
Pure Go embedded database with zero CGo dependency
3. Type something...
↑↓/1-9 navigate & select • Enter confirm • Esc cancel
```
#### 2. GitHub Draft Review Gate (2-Option Loop):
```text
[GitHub Review Draft] Create PR -> org/repo
Title: Add zero-copy buffer pipeline to streaming parser
Draft Content:
### Summary
Replaces intermediate slice allocations with byte slicing...
Select action:
-> 1. Submit
2. Review from me (request edits)
↑↓ navigate • Enter select • Esc/Ctrl+C cancel
```
#### Contribution & Next Steps:
If maintainers are open to this, we would love to polish and contribute ports of these extensions / tools to the Gemini CLI extension ecosystem.
---
*AI Disclosure: Drafted with AI assistance; reviewed and verified by contributor.*
Contributor guide
Research direction
No repository files, tests, or entry points are named. Start by reviewing the Gemini CLI extension ecosystem and its existing tool hooks, then determine how the proposed clarification dialog and GitHub modification review gate fit current terminal flows; done means the scope and integration points for both capabilities are agreed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, typescript
- Domain
- cli, developer-experience, devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100