Skip to content

Migrate interactive prompts to AskUser tool#90

Open
jerop wants to merge 3 commits intomainfrom
feat/use-ask-user-tool
Open

Migrate interactive prompts to AskUser tool#90
jerop wants to merge 3 commits intomainfrom
feat/use-ask-user-tool

Conversation

@jerop
Copy link

@jerop jerop commented Jan 29, 2026

Refactors the interactive flows in implement, newTrack, revert, setup and review commands to use the AskUser tool. This replaces free-text parsing and A-E options with structured inputs (multi-choice, yesno, text), improving the user experience.

This change is just making a refactor and maintaining the prompts as they were. In future work, we can look into changing some of the questions e.g. using custom input for feedback instead of just selecting reject.

Closes google-gemini/gemini-cli#17689

@jerop jerop requested a review from sherzat3 January 29, 2026 18:55
@jerop jerop force-pushed the feat/use-ask-user-tool branch 2 times, most recently from fbb7d1e to 5eacb73 Compare January 29, 2026 19:02
jerop added 3 commits January 29, 2026 15:42
Refactors the interactive flows in `implement`, `newTrack`, `revert`, and `setup` commands to utilize the `AskUser` tool. This replaces free-text parsing with structured inputs (choice, yesno, text), improving the reliability and user experience of the CLI interactions.

Updates:
- `implement.toml`: specific prompts for track selection, document synchronization (with diff previews), and cleanup options using the `AskUser` tool.
- `newTrack.toml`: structured questions for track specification and planning with the `AskUser` tool, including Markdown previews. Removed redundant option descriptions.
- `revert.toml`: better selection menus for reverting tracks/tasks and plan confirmation using the `AskUser` tool. Removed redundant option descriptions.
- `setup.toml`: enhanced project initialization and configuration questionnaires using the `AskUser` tool, including document previews. Removed redundant option descriptions. Explicitly mentions AskUser tool calls.
@jerop jerop force-pushed the feat/use-ask-user-tool branch from 7bf0bcf to fef5dd2 Compare January 29, 2026 20:47
> ```
> "Do you approve these changes? (yes/no)"
ii. **Propose and Confirm Changes:** If an update is needed, generate the proposed changes. Then, present them to the user for confirmation using the `ask_user` tool:
- **header:** "Update Doc"
Copy link
Collaborator

Choose a reason for hiding this comment

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

"Update Product Doc"

> ```
> "Do you approve these changes? (yes/no)"
ii. **Propose and Confirm Changes:** If an update is needed, generate the proposed changes. Then, present them to the user for confirmation using the `ask_user` tool:
- **header:** "Update Stack"
Copy link
Collaborator

Choose a reason for hiding this comment

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

"Update Tech Stack"

> ```
> "Do you approve these critical changes to the **Product Guidelines**? (yes/no)"
iii. **Propose and Confirm Changes:** If the conditions are met, you MUST generate the proposed changes and present them to the user with a clear warning using the `ask_user` tool:
- **header:** "Update Guide"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Update Product Guidelines

- **question:** "I found multiple in-progress items (or recently completed items). Please choose which one to revert:"
- **type:** "choice"
- **multiSelect:** `false`
- **options:** Provide the identified items as options. Group them by Track in the description if possible.
Copy link
Collaborator

Choose a reason for hiding this comment

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

For lines L56-58: Can you also add an example where the label is the [Phase]?

- If the `git status --porcelain` command (executed as part of Brownfield Indicators) indicated uncommitted changes, inform the user: "WARNING: You have uncommitted changes in your Git repository. Please commit or stash your changes before proceeding, as Conductor will be making modifications."
- **Begin Brownfield Project Initialization Protocol:**
- **1.0 Pre-analysis Confirmation:**
- **1.0 Pre-analysis Confirmation:**
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: revert the indentation

- **General Guidelines:**
* **1. Formulate the `ask_user` tool call:** Adhere to the following for each question in the `questions` array:
- **header:** Very short label (max 12 chars).
- **type:** "choice", "text", or "yesno".
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wouldn't this always be "choice"?

- **options:** (Required for type: "choice") Provide 2-4 options. Note that "Other" is automatically added.
- **placeholder:** (For type: "text") Provide a hint.

* **2. Autogenerate Option:** For the final question in a batch, include a "choice" option:
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be an option on every question to allow use to fast-track this section altogether.

- **multiSelect:** `false`
- **options:**
- Label: "Approve"
- Label: "Edit"
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be "suggest changes", because "edit" may hint the user that they will enter the edit mode, which is not the case here.

* **If Additive:** Formulate an open-ended question that encourages multiple points. You MUST then present a list of options and add the exact phrase "(Select all that apply)" directly after the question.
* **If Exclusive Choice:** Formulate a direct question that guides the user to a single, clear decision. You MUST NOT add "(Select all that apply)".
2. **Gather Information:** Use the `ask_user` tool to ask relevant questions. You can batch up to 4 related questions in a single tool call to streamline the process.
- **CONSTRAINT:** Limit your inquiry to a maximum of 5-8 details gathered across 1 or 2 `ask_user` tool calls.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why 5-8 questions? Can we stick to max 5, as it was there previously?

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.

Update Conductor to use the AskUser tool

2 participants