-
Notifications
You must be signed in to change notification settings - Fork 212
Migrate interactive prompts to AskUser tool
#90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
fbb7d1e to
5eacb73
Compare
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.
7bf0bcf to
fef5dd2
Compare
| > ``` | ||
| > "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" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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:** |
There was a problem hiding this comment.
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". |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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?
Refactors the interactive flows in
implement,newTrack,revert,setupandreviewcommands to use theAskUsertool. 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