You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(conductor): migrate interactive prompts to AskUser tool
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.
Copy file name to clipboardExpand all lines: commands/conductor/implement.toml
+33-31Lines changed: 33 additions & 31 deletions
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
35
35
4. **Select Track:**
36
36
- **If a track name was provided:**
37
37
1. Perform an exact, case-insensitive match for the provided name against the track descriptions you parsed.
38
-
2. If a unique match is found, confirm the selection with the user: "I found track '<track_description>'. Is this correct?"
38
+
2. If a unique match is found, confirm the selection with the user using the `AskUser` tool:
39
+
- **header:** "Confirm"
40
+
- **question:** "I found track '<track_description>'. Is this correct?"
41
+
- **type:** "yesno"
39
42
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.
40
43
- **If no track name was provided (or if the previous step failed):**
41
44
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
99
102
a. **Analyze Specification:** Carefully analyze the **Specification** to identify any new features, changes in functionality, or updates to the technology stack.
100
103
b. **Update Product Definition:**
101
104
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.
102
-
ii. **Propose and Confirm Changes:** If an update is needed, generate the proposed changes. Then, present them to the user for confirmation:
103
-
> "Based on the completed track, I propose the following updates to the **Product Definition**:"
104
-
> ```diff
105
-
> [Proposed changes here, ideally in a diff format]
106
-
> ```
107
-
> "Do you approve these changes? (yes/no)"
105
+
ii. **Propose and Confirm Changes:** If an update is needed, generate the proposed changes. Then, present them to the user for confirmation using the `AskUser` tool:
106
+
- **header:** "Update Doc"
107
+
- **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?"
108
+
- **type:** "yesno"
108
109
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.
109
110
c. **Update Tech Stack:**
110
111
i. **Condition for Update:** Similarly, you MUST determine if significant changes in the technology stack are detected as a result of the completed track.
111
-
ii. **Propose and Confirm Changes:** If an update is needed, generate the proposed changes. Then, present them to the user for confirmation:
112
-
> "Based on the completed track, I propose the following updates to the **Tech Stack**:"
113
-
> ```diff
114
-
> [Proposed changes here, ideally in a diff format]
115
-
> ```
116
-
> "Do you approve these changes? (yes/no)"
112
+
ii. **Propose and Confirm Changes:** If an update is needed, generate the proposed changes. Then, present them to the user for confirmation using the `AskUser` tool:
113
+
- **header:** "Update Stack"
114
+
- **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?"
115
+
- **type:** "yesno"
117
116
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.
118
117
d. **Update Product Guidelines (Strictly Controlled):**
119
118
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.
120
119
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.
121
-
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:
122
-
> "WARNING: The completed track suggests a change to the core **Product Guidelines**. This is an unusual step. Please review carefully:"
123
-
> ```diff
124
-
> [Proposed changes here, ideally in a diff format]
125
-
> ```
126
-
> "Do you approve these critical changes to the **Product Guidelines**? (yes/no)"
120
+
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 `AskUser` tool:
121
+
- **header:** "Update Guide"
122
+
- **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?"
123
+
- **type:** "yesno"
127
124
iv. **Action:** Only after receiving explicit user confirmation, perform the file edits. Keep a record of whether this file was changed.
128
125
129
126
6. **Final Report:** Announce the completion of the synchronization process and provide a summary of the actions taken.
@@ -146,31 +143,36 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
146
143
147
144
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.
148
145
149
-
2. **Ask for User Choice:** You MUST prompt the user with the available options for the completed track.
150
-
> "Track '<track_description>' is now complete. What would you like to do?
151
-
> A. **Archive:** Move the track's folder to `conductor/archive/` and remove it from the tracks file.
152
-
> B. **Delete:** Permanently delete the track's folder and remove it from the tracks file.
153
-
> C. **Skip:** Do nothing and leave it in the tracks file.
154
-
> Please enter the number of your choice (A, B, or C)."
146
+
2. **Ask for User Choice:** You MUST prompt the user with the available options for the completed track using the `AskUser` tool.
147
+
- **header:** "Cleanup"
148
+
- **question:** "Track '<track_description>' is now complete. What would you like to do?"
149
+
- **type:** "choice"
150
+
- **multiSelect:** `false`
151
+
- **options:**
152
+
- Label: "Archive"
153
+
- Label: "Delete"
154
+
- Label: "Skip"
155
155
156
156
3. **Handle User Response:**
157
-
* **If user chooses "A" (Archive):**
157
+
* **If user chooses "Archive":**
158
158
i. **Create Archive Directory:** Check for the existence of `conductor/archive/`. If it does not exist, create it.
159
159
ii. **Archive Track Folder:** Move the track's folder from its current location (resolved via the **Tracks Directory**) to `conductor/archive/<track_id>`.
160
160
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.
161
161
iv. **Commit Changes:** Stage the **Tracks Registry** file and `conductor/archive/`. Commit with the message `chore(conductor): Archive track '<track_description>'`.
162
162
v. **Announce Success:** Announce: "Track '<track_description>' has been successfully archived."
163
-
* **If user chooses "B" (Delete):**
164
-
i. **CRITICAL WARNING:** Before proceeding, you MUST ask for a final confirmation due to the irreversible nature of the action.
165
-
> "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)"
163
+
* **If user chooses "Delete":**
164
+
i. **CRITICAL WARNING:** Before proceeding, you MUST ask for a final confirmation using the `AskUser` tool.
165
+
- **header:** "Confirm"
166
+
- **question:** "WARNING: This will permanently delete the track folder. This action cannot be undone. Are you sure?"
167
+
- **type:** "yesno"
166
168
ii. **Handle Confirmation:**
167
169
- **If 'yes'**:
168
170
a. **Delete Track Folder:** Resolve the **Tracks Directory** and permanently delete the track's folder from `<Tracks Directory>/<track_id>`.
169
171
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.
170
172
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>'`.
171
173
d. **Announce Success:** Announce: "Track '<track_description>' has been permanently deleted."
172
-
- **If 'no' (or anything else)**:
174
+
- **If 'no'**:
173
175
a. **Announce Cancellation:** Announce: "Deletion cancelled. The track has not been changed."
174
-
* **If user chooses "C" (Skip) or provides any other input:**
176
+
* **If user chooses "Skip":**
175
177
* Announce: "Okay, the completed track will remain in your tracks file for now."
Copy file name to clipboardExpand all lines: commands/conductor/newTrack.toml
+36-36Lines changed: 36 additions & 36 deletions
Original file line number
Diff line number
Diff line change
@@ -30,8 +30,11 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
30
30
1. **Load Project Context:** Read and understand the content of the project documents (**Product Definition**, **Tech Stack**, etc.) resolved via the **Universal File Resolution Protocol**.
31
31
2. **Get Track Description:**
32
32
* **If `{{args}}` contains a description:** Use the content of `{{args}}`.
33
-
* **If `{{args}}` is empty:** Ask the user:
34
-
> "Please provide a brief description of the track (feature, bug fix, chore, etc.) you wish to start."
33
+
* **If `{{args}}` is empty:** Ask the user using the `AskUser` tool:
34
+
- **Header:** "Description"
35
+
- **Type:** "text"
36
+
- **Question:** "Please provide a brief description of the track (feature, bug fix, chore, etc.) you wish to start."
37
+
- **Placeholder:** "e.g., Implement user authentication"
35
38
Await the user's response and use it as the track description.
36
39
3. **Infer Track Type:** Analyze the description to determine if it is a "Feature" or "Something Else" (e.g., Bug, Chore, Refactor). Do NOT ask the user to classify it.
37
40
@@ -40,48 +43,45 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
40
43
1. **State Your Goal:** Announce:
41
44
> "I'll now guide you through a series of questions to build a comprehensive specification (`spec.md`) for this track."
42
45
43
-
2. **Questioning Phase:** Ask a series of questions to gather details for the `spec.md`. Tailor questions based on the track type (Feature or Other).
44
-
* **CRITICAL:** You MUST ask these questions sequentially (one by one). Do not ask multiple questions in a single turn. Wait for the user's response after each question.
46
+
2. **Questioning Phase:** Ask a series of questions to gather details for the `spec.md` using the `AskUser` tool. You can batch up to 4 related questions in a single tool call to streamline the process. Tailor questions based on the track type (Feature or Other).
47
+
* **CRITICAL:** Wait for the user's response after each `AskUser` tool call.
45
48
* **General Guidelines:**
46
49
* Refer to information in **Product Definition**, **Tech Stack**, etc., to ask context-aware questions.
47
50
* Provide a brief explanation and clear examples for each question.
48
51
* **Strongly Recommendation:** Whenever possible, present 2-3 plausible options (A, B, C) for the user to choose from.
49
-
* **Mandatory:** The last option for every multiple-choice question MUST be "Type your own answer".
50
52
51
-
* **1. Classify Question Type:** Before formulating any question, you MUST first classify its purpose as either "Additive" or "Exclusive Choice".
52
-
* Use **Additive** for brainstorming and defining scope (e.g., users, goals, features, project guidelines). These questions allow for multiple answers.
53
-
* Use **Exclusive Choice** for foundational, singular commitments (e.g., selecting a primary technology, a specific workflow rule). These questions require a single answer.
54
-
55
-
* **2. Formulate the Question:** Based on the classification, you MUST adhere to the following:
56
-
* **Strongly Recommended:** Whenever possible, present 2-3 plausible options (A, B, C) for the user to choose from.
57
-
* **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.
58
-
* **If Exclusive Choice:** Formulate a direct question that guides the user to a single, clear decision. You MUST NOT add "(Select all that apply)".
59
-
60
-
* **3. Interaction Flow:**
61
-
* **CRITICAL:** You MUST ask questions sequentially (one by one). Do not ask multiple questions in a single turn. Wait for the user's response after each question.
62
-
* The last option for every multiple-choice question MUST be "Type your own answer".
63
-
* Confirm your understanding by summarizing before moving on to the next question or section..
53
+
* **1. Formulate the `AskUser` tool call:** Adhere to the following for each question in the `questions` array:
54
+
- **header:** Very short label (max 12 chars).
55
+
- **type:** "choice", "text", or "yesno".
56
+
- **multiSelect:** (Required for type: "choice") Set to `true` for multi-select (additive) or `false` for single-choice (exclusive).
57
+
- **options:** (Required for type: "choice") Provide 2-4 options. Note that "Other" is automatically added.
58
+
- **placeholder:** (For type: "text") Provide a hint.
59
+
60
+
* **2. Interaction Flow:**
61
+
* Wait for the user's response after each `AskUser` tool call.
62
+
* If the user selects "Other", use a subsequent `AskUser` tool call with `type: "text"` to get their input if necessary.
63
+
* Confirm your understanding by summarizing before moving on to drafting.
64
64
65
65
* **If FEATURE:**
66
-
* **Ask 3-5 relevant questions** to clarify the feature request.
66
+
* Ask 3-5 relevant questions to clarify the feature request using the `AskUser` tool.
67
67
* Examples include clarifying questions about the feature, how it should be implemented, interactions, inputs/outputs, etc.
68
68
* Tailor the questions to the specific feature request (e.g., if the user didn't specify the UI, ask about it; if they didn't specify the logic, ask about it).
69
69
70
70
* **If SOMETHING ELSE (Bug, Chore, etc.):**
71
-
* **Ask 2-3 relevant questions** to obtain necessary details.
71
+
* Ask 2-3 relevant questions to obtain necessary details using the `AskUser` tool.
72
72
* Examples include reproduction steps for bugs, specific scope for chores, or success criteria.
73
73
* Tailor the questions to the specific request.
74
74
75
75
3. **Draft `spec.md`:** Once sufficient information is gathered, draft the content for the track's `spec.md` file, including sections like Overview, Functional Requirements, Non-Functional Requirements (if any), Acceptance Criteria, and Out of Scope.
76
76
77
-
4. **User Confirmation:** Present the drafted `spec.md` content to the user for review and approval.
78
-
> "I've drafted the specification for this track. Please review the following:"
79
-
>
80
-
> ```markdown
81
-
> [Drafted spec.md content here]
82
-
> ```
83
-
>
84
-
> "Does this accurately capture the requirements? Please suggest any changes or confirm."
77
+
4. **User Confirmation:** Present the drafted `spec.md` content and ask for approval using the `AskUser` tool.
78
+
- **header:** "Confirm Spec"
79
+
- **question:** "I've drafted the specification for this track. Please review the following:\n\n```markdown\n[Drafted spec.md content here]\n```\n\nDoes this accurately capture the requirements?"
80
+
- **type:** "choice"
81
+
- **multiSelect:** `false`
82
+
- **options:**
83
+
- Label: "Approve"
84
+
- Label: "Revise"
85
85
Await user feedback and revise the `spec.md` content until confirmed.
86
86
87
87
### 2.3 Interactive Plan Generation (`plan.md`)
@@ -99,14 +99,14 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
99
99
- Sub-task: ` - [ ] ...`
100
100
* **CRITICAL: Inject Phase Completion Tasks.** Determine if a "Phase Completion Verification and Checkpointing Protocol" is defined in the **Workflow**. If this protocol exists, then for each **Phase** that you generate in `plan.md`, you MUST append a final meta-task to that phase. The format for this meta-task is: `- [ ] Task: Conductor - User Manual Verification '<Phase Name>' (Protocol in workflow.md)`.
101
101
102
-
3. **User Confirmation:** Present the drafted `plan.md` to the user for review and approval.
103
-
> "I've drafted the implementation plan. Please review the following:"
104
-
>
105
-
> ```markdown
106
-
> [Drafted plan.md content here]
107
-
> ```
108
-
>
109
-
> "Does this plan look correct and cover all the necessary steps based on the spec and our workflow? Please suggest any changes or confirm."
102
+
3. **User Confirmation:** Present the drafted `plan.md` content and ask for approval using the `AskUser` tool.
103
+
- **header:** "Confirm Plan"
104
+
- **question:** "I've drafted the implementation plan. Please review the following:\n\n```markdown\n[Drafted plan.md content here]\n```\n\nDoes this look correct based on the spec and workflow?"
105
+
- **type:** "choice"
106
+
- **multiSelect:** `false`
107
+
- **options:**
108
+
- Label: "Approve"
109
+
- Label: "Revise"
110
110
Await user feedback and revise the `plan.md` content until confirmed.
111
111
112
112
### 2.4 Create Track Artifacts and Update Main Plan
0 commit comments