-
Notifications
You must be signed in to change notification settings - Fork 186
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
Open
jerop
wants to merge
3
commits into
main
Choose a base branch
from
feat/use-ask-user-tool
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+311
−308
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,7 +35,10 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai | |
| 4. **Select Track:** | ||
| - **If a track name was provided:** | ||
| 1. Perform an exact, case-insensitive match for the provided name against the track descriptions you parsed. | ||
| 2. If a unique match is found, confirm the selection with the user: "I found track '<track_description>'. Is this correct?" | ||
| 2. If a unique match is found, confirm the selection with the user using the `ask_user` tool: | ||
| - **header:** "Confirm" | ||
| - **question:** "I found track '<track_description>'. Is this correct?" | ||
| - **type:** "yesno" | ||
| 3. If no match is found, or if the match is ambiguous, inform the user and ask for clarification. Suggest the next available track as below. | ||
| - **If no track name was provided (or if the previous step failed):** | ||
| 1. **Identify Next Track:** Find the first track in the parsed tracks file that is NOT marked as `[x] Completed`. | ||
|
|
@@ -99,31 +102,25 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai | |
| a. **Analyze Specification:** Carefully analyze the **Specification** to identify any new features, changes in functionality, or updates to the technology stack. | ||
| b. **Update Product Definition:** | ||
| i. **Condition for Update:** Based on your analysis, you MUST determine if the completed feature or bug fix significantly impacts the description of the product itself. | ||
| ii. **Propose and Confirm Changes:** If an update is needed, generate the proposed changes. Then, present them to the user for confirmation: | ||
| > "Based on the completed track, I propose the following updates to the **Product Definition**:" | ||
| > ```diff | ||
| > [Proposed changes here, ideally in a diff format] | ||
| > ``` | ||
| > "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" | ||
| - **question:** "Based on the completed track, I propose the following updates to the **Product Definition**:\n\n```diff\n[Proposed changes here]\n```\n\nDo you approve these changes?" | ||
| - **type:** "yesno" | ||
| iii. **Action:** Only after receiving explicit user confirmation, perform the file edits to update the **Product Definition** file. Keep a record of whether this file was changed. | ||
| c. **Update Tech Stack:** | ||
| i. **Condition for Update:** Similarly, you MUST determine if significant changes in the technology stack are detected as a result of the completed track. | ||
| ii. **Propose and Confirm Changes:** If an update is needed, generate the proposed changes. Then, present them to the user for confirmation: | ||
| > "Based on the completed track, I propose the following updates to the **Tech Stack**:" | ||
| > ```diff | ||
| > [Proposed changes here, ideally in a diff format] | ||
| > ``` | ||
| > "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" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "Update Tech Stack" |
||
| - **question:** "Based on the completed track, I propose the following updates to the **Tech Stack**:\n\n```diff\n[Proposed changes here]\n```\n\nDo you approve these changes?" | ||
| - **type:** "yesno" | ||
| iii. **Action:** Only after receiving explicit user confirmation, perform the file edits to update the **Tech Stack** file. Keep a record of whether this file was changed. | ||
| d. **Update Product Guidelines (Strictly Controlled):** | ||
| i. **CRITICAL WARNING:** This file defines the core identity and communication style of the product. It should be modified with extreme caution and ONLY in cases of significant strategic shifts, such as a product rebrand or a fundamental change in user engagement philosophy. Routine feature updates or bug fixes should NOT trigger changes to this file. | ||
| ii. **Condition for Update:** You may ONLY propose an update to this file if the track's **Specification** explicitly describes a change that directly impacts branding, voice, tone, or other core product guidelines. | ||
| 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: | ||
| > "WARNING: The completed track suggests a change to the core **Product Guidelines**. This is an unusual step. Please review carefully:" | ||
| > ```diff | ||
| > [Proposed changes here, ideally in a diff format] | ||
| > ``` | ||
| > "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" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update Product Guidelines |
||
| - **question:** "WARNING: The completed track suggests a change to the core **Product Guidelines**. This is an unusual step. Please review carefully:\n\n```diff\n[Proposed changes here]\n```\n\nDo you approve these critical changes?" | ||
| - **type:** "yesno" | ||
| iv. **Action:** Only after receiving explicit user confirmation, perform the file edits. Keep a record of whether this file was changed. | ||
|
|
||
| 6. **Final Report:** Announce the completion of the synchronization process and provide a summary of the actions taken. | ||
|
|
@@ -146,34 +143,39 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai | |
|
|
||
| 1. **Execution Trigger:** This protocol MUST only be executed after the current track has been successfully implemented and the `SYNCHRONIZE PROJECT DOCUMENTATION` step is complete. | ||
|
|
||
| 2. **Ask for User Choice:** You MUST prompt the user with the available options for the completed track. | ||
| > "Track '<track_description>' is now complete. What would you like to do? | ||
| > A. **Review (Recommended):** Run the review command to verify changes before finalizing. | ||
| > B. **Archive:** Move the track's folder to `conductor/archive/` and remove it from the tracks file. | ||
| > C. **Delete:** Permanently delete the track's folder and remove it from the tracks file. | ||
| > D. **Skip:** Do nothing and leave it in the tracks file. | ||
| > Please enter the option of your choice (A, B, C, or D)." | ||
| 2. **Ask for User Choice:** You MUST prompt the user with the available options for the completed track using the `ask_user` tool. | ||
| - **header:** "Cleanup" | ||
| - **question:** "Track '<track_description>' is now complete. What would you like to do?" | ||
| - **type:** "choice" | ||
| - **multiSelect:** `false` | ||
| - **options:** | ||
| - Label: "Review", Description: "Run the review command to verify changes before finalizing." | ||
| - Label: "Archive" | ||
| - Label: "Delete" | ||
| - Label: "Skip" | ||
|
|
||
| 3. **Handle User Response:** | ||
| * **If user chooses "A" (Review):** | ||
| * **If user chooses "Review":** | ||
| * Announce: "Please run `/conductor:review` to verify your changes. You will be able to archive or delete the track after the review." | ||
| * **If user chooses "B" (Archive):** | ||
| * **If user chooses "Archive":** | ||
| i. **Create Archive Directory:** Check for the existence of `conductor/archive/`. If it does not exist, create it. | ||
| ii. **Archive Track Folder:** Move the track's folder from its current location (resolved via the **Tracks Directory**) to `conductor/archive/<track_id>`. | ||
| iii. **Remove from Tracks File:** Read the content of the **Tracks Registry** file, remove the entire section for the completed track (the part that starts with `---` and contains the track description), and write the modified content back to the file. | ||
| iv. **Commit Changes:** Stage the **Tracks Registry** file and `conductor/archive/`. Commit with the message `chore(conductor): Archive track '<track_description>'`. | ||
| v. **Announce Success:** Announce: "Track '<track_description>' has been successfully archived." | ||
| * **If user chooses "C" (Delete):** | ||
| i. **CRITICAL WARNING:** Before proceeding, you MUST ask for a final confirmation due to the irreversible nature of the action. | ||
| > "WARNING: This will permanently delete the track folder and all its contents. This action cannot be undone. Are you sure you want to proceed? (yes/no)" | ||
| * **If user chooses "Delete":** | ||
| i. **CRITICAL WARNING:** Before proceeding, you MUST ask for a final confirmation using the `ask_user` tool. | ||
| - **header:** "Confirm" | ||
| - **question:** "WARNING: This will permanently delete the track folder. This action cannot be undone. Are you sure?" | ||
| - **type:** "yesno" | ||
| ii. **Handle Confirmation:** | ||
| - **If 'yes'**: | ||
| a. **Delete Track Folder:** Resolve the **Tracks Directory** and permanently delete the track's folder from `<Tracks Directory>/<track_id>`. | ||
| b. **Remove from Tracks File:** Read the content of the **Tracks Registry** file, remove the entire section for the completed track, and write the modified content back to the file. | ||
| c. **Commit Changes:** Stage the **Tracks Registry** file and the deletion of the track directory. Commit with the message `chore(conductor): Delete track '<track_description>'`. | ||
| d. **Announce Success:** Announce: "Track '<track_description>' has been permanently deleted." | ||
| - **If 'no' (or anything else)**: | ||
| - **If 'no'**: | ||
| a. **Announce Cancellation:** Announce: "Deletion cancelled. The track has not been changed." | ||
| * **If user chooses "D" (Skip) or provides any other input:** | ||
| * **If user chooses "Skip":** | ||
| * Announce: "Okay, the completed track will remain in your tracks file for now." | ||
| """ | ||
| """ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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"