conductor-4-all 0.0.15 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +31 -12
- package/dist/index.js +31 -12
- package/dist/templates/commands/implement.toml +79 -37
- package/dist/templates/commands/newTrack.toml +58 -34
- package/dist/templates/commands/revert.toml +41 -36
- package/dist/templates/commands/review.toml +120 -45
- package/dist/templates/commands/setup.toml +280 -238
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -140,6 +140,20 @@ async function loadTemplate(templatePath) {
|
|
|
140
140
|
return (0, import_promises.readFile)(fullPath, "utf-8");
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
+
// src/generators/utils.ts
|
|
144
|
+
function normalizeWorkflowFilename(fileName) {
|
|
145
|
+
if (process.platform !== "win32") {
|
|
146
|
+
return fileName;
|
|
147
|
+
}
|
|
148
|
+
return fileName.replace(/:/g, "_");
|
|
149
|
+
}
|
|
150
|
+
function normalizeWorkflowContent(content) {
|
|
151
|
+
if (process.platform !== "win32") {
|
|
152
|
+
return content;
|
|
153
|
+
}
|
|
154
|
+
return content.replace(/\bconductor:([a-zA-Z0-9_-]+)/g, "conductor_$1");
|
|
155
|
+
}
|
|
156
|
+
|
|
143
157
|
// src/generators/default/strategy.ts
|
|
144
158
|
var { writeFile } = import_fs_extra.default;
|
|
145
159
|
var DefaultContentStrategy = class {
|
|
@@ -152,19 +166,18 @@ var DefaultContentStrategy = class {
|
|
|
152
166
|
let prompt = parsed.prompt;
|
|
153
167
|
prompt = prompt.replace(/__\$\$CODE_AGENT_INSTALL_PATH\$\$__/g, installPath);
|
|
154
168
|
const finalContent = substituteVariables(prompt, { agent_type: agentType });
|
|
155
|
-
|
|
156
|
-
return `---
|
|
169
|
+
const content = parsed.description ? `---
|
|
157
170
|
description: ${parsed.description}
|
|
158
171
|
---
|
|
159
|
-
${finalContent}
|
|
160
|
-
|
|
161
|
-
return finalContent;
|
|
172
|
+
${finalContent}` : finalContent;
|
|
173
|
+
return normalizeWorkflowContent(content);
|
|
162
174
|
}
|
|
163
175
|
};
|
|
164
176
|
var DefaultFileStrategy = class {
|
|
165
177
|
async write(options) {
|
|
166
178
|
const { targetDir, agentDir, commandsDir, commandName, extension, content } = options;
|
|
167
|
-
const
|
|
179
|
+
const rawFileName = `conductor:${commandName}${extension}`;
|
|
180
|
+
const fileName = normalizeWorkflowFilename(rawFileName);
|
|
168
181
|
await writeFile((0, import_path2.join)(targetDir, agentDir, commandsDir, fileName), content);
|
|
169
182
|
}
|
|
170
183
|
};
|
|
@@ -193,8 +206,11 @@ var ConfigurableGenerator = class {
|
|
|
193
206
|
if (!existsSync(targetDir)) {
|
|
194
207
|
throw new Error(`Target directory does not exist: ${targetDir}`);
|
|
195
208
|
}
|
|
196
|
-
const { agentDir, commandsDir, displayName } = this.config;
|
|
197
|
-
const
|
|
209
|
+
const { agentDir, commandsDir, displayName, extension, agentType } = this.config;
|
|
210
|
+
const setupExtension = extension ?? ".md";
|
|
211
|
+
const baseSetupFileName = agentType === "gemini" ? `setup${setupExtension}` : `conductor:setup${setupExtension}`;
|
|
212
|
+
const setupFileName = normalizeWorkflowFilename(baseSetupFileName);
|
|
213
|
+
const setupFile = (0, import_path3.join)(targetDir, agentDir, commandsDir, setupFileName);
|
|
198
214
|
const conductorPath = (0, import_path3.join)(targetDir, agentDir, "conductor");
|
|
199
215
|
if (existsSync(conductorPath) && existsSync(setupFile)) {
|
|
200
216
|
throw new Error(`Conductor (${displayName}) is already installed in: ${targetDir}`);
|
|
@@ -223,7 +239,7 @@ var ConfigurableGenerator = class {
|
|
|
223
239
|
if (protocolFilename) {
|
|
224
240
|
try {
|
|
225
241
|
const protocolSource = (0, import_path3.join)(templateRoot, "GEMINI.md");
|
|
226
|
-
const protocolDest = (0, import_path3.join)(
|
|
242
|
+
const protocolDest = (0, import_path3.join)(process.cwd(), protocolFilename);
|
|
227
243
|
if (existsSync(protocolSource)) {
|
|
228
244
|
let shouldCopy = true;
|
|
229
245
|
if (existsSync(protocolDest)) {
|
|
@@ -457,7 +473,8 @@ var ClineContentStrategy = class {
|
|
|
457
473
|
prompt = prompt.replace(/__\$\$CODE_AGENT_INSTALL_PATH\$\$__/g, installPath);
|
|
458
474
|
const finalContent = substituteVariables(prompt, { agent_type: agentType });
|
|
459
475
|
const title = commandName ? commandName.charAt(0).toUpperCase() + commandName.slice(1) : "Command";
|
|
460
|
-
|
|
476
|
+
const content = `# Conductor ${title}${parsed.description ? "\n\n" + parsed.description + "\n\n" : "\n\n"}${finalContent}`;
|
|
477
|
+
return normalizeWorkflowContent(content);
|
|
461
478
|
}
|
|
462
479
|
};
|
|
463
480
|
var clineContentStrategy = new ClineContentStrategy();
|
|
@@ -498,13 +515,15 @@ var GeminiContentStrategy = class {
|
|
|
498
515
|
return null;
|
|
499
516
|
}
|
|
500
517
|
const content = templateContent.replace(/__\$\$CODE_AGENT_INSTALL_PATH\$\$__/g, installPath);
|
|
501
|
-
|
|
518
|
+
const substituted = substituteVariables(content, { agent_type: agentType });
|
|
519
|
+
return normalizeWorkflowContent(substituted);
|
|
502
520
|
}
|
|
503
521
|
};
|
|
504
522
|
var GeminiFileStrategy = class {
|
|
505
523
|
async write(options) {
|
|
506
524
|
const { targetDir, agentDir, commandsDir, commandName, extension, content } = options;
|
|
507
|
-
const
|
|
525
|
+
const rawFileName = `${commandName}${extension}`;
|
|
526
|
+
const fileName = normalizeWorkflowFilename(rawFileName);
|
|
508
527
|
await writeFile3((0, import_path4.join)(targetDir, agentDir, commandsDir, fileName), content);
|
|
509
528
|
}
|
|
510
529
|
};
|
package/dist/index.js
CHANGED
|
@@ -113,6 +113,20 @@ async function loadTemplate(templatePath) {
|
|
|
113
113
|
return readFile(fullPath, "utf-8");
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
+
// src/generators/utils.ts
|
|
117
|
+
function normalizeWorkflowFilename(fileName) {
|
|
118
|
+
if (process.platform !== "win32") {
|
|
119
|
+
return fileName;
|
|
120
|
+
}
|
|
121
|
+
return fileName.replace(/:/g, "_");
|
|
122
|
+
}
|
|
123
|
+
function normalizeWorkflowContent(content) {
|
|
124
|
+
if (process.platform !== "win32") {
|
|
125
|
+
return content;
|
|
126
|
+
}
|
|
127
|
+
return content.replace(/\bconductor:([a-zA-Z0-9_-]+)/g, "conductor_$1");
|
|
128
|
+
}
|
|
129
|
+
|
|
116
130
|
// src/generators/default/strategy.ts
|
|
117
131
|
var { writeFile } = fs;
|
|
118
132
|
var DefaultContentStrategy = class {
|
|
@@ -125,19 +139,18 @@ var DefaultContentStrategy = class {
|
|
|
125
139
|
let prompt = parsed.prompt;
|
|
126
140
|
prompt = prompt.replace(/__\$\$CODE_AGENT_INSTALL_PATH\$\$__/g, installPath);
|
|
127
141
|
const finalContent = substituteVariables(prompt, { agent_type: agentType });
|
|
128
|
-
|
|
129
|
-
return `---
|
|
142
|
+
const content = parsed.description ? `---
|
|
130
143
|
description: ${parsed.description}
|
|
131
144
|
---
|
|
132
|
-
${finalContent}
|
|
133
|
-
|
|
134
|
-
return finalContent;
|
|
145
|
+
${finalContent}` : finalContent;
|
|
146
|
+
return normalizeWorkflowContent(content);
|
|
135
147
|
}
|
|
136
148
|
};
|
|
137
149
|
var DefaultFileStrategy = class {
|
|
138
150
|
async write(options) {
|
|
139
151
|
const { targetDir, agentDir, commandsDir, commandName, extension, content } = options;
|
|
140
|
-
const
|
|
152
|
+
const rawFileName = `conductor:${commandName}${extension}`;
|
|
153
|
+
const fileName = normalizeWorkflowFilename(rawFileName);
|
|
141
154
|
await writeFile(join2(targetDir, agentDir, commandsDir, fileName), content);
|
|
142
155
|
}
|
|
143
156
|
};
|
|
@@ -166,8 +179,11 @@ var ConfigurableGenerator = class {
|
|
|
166
179
|
if (!existsSync(targetDir)) {
|
|
167
180
|
throw new Error(`Target directory does not exist: ${targetDir}`);
|
|
168
181
|
}
|
|
169
|
-
const { agentDir, commandsDir, displayName } = this.config;
|
|
170
|
-
const
|
|
182
|
+
const { agentDir, commandsDir, displayName, extension, agentType } = this.config;
|
|
183
|
+
const setupExtension = extension ?? ".md";
|
|
184
|
+
const baseSetupFileName = agentType === "gemini" ? `setup${setupExtension}` : `conductor:setup${setupExtension}`;
|
|
185
|
+
const setupFileName = normalizeWorkflowFilename(baseSetupFileName);
|
|
186
|
+
const setupFile = join3(targetDir, agentDir, commandsDir, setupFileName);
|
|
171
187
|
const conductorPath = join3(targetDir, agentDir, "conductor");
|
|
172
188
|
if (existsSync(conductorPath) && existsSync(setupFile)) {
|
|
173
189
|
throw new Error(`Conductor (${displayName}) is already installed in: ${targetDir}`);
|
|
@@ -196,7 +212,7 @@ var ConfigurableGenerator = class {
|
|
|
196
212
|
if (protocolFilename) {
|
|
197
213
|
try {
|
|
198
214
|
const protocolSource = join3(templateRoot, "GEMINI.md");
|
|
199
|
-
const protocolDest = join3(
|
|
215
|
+
const protocolDest = join3(process.cwd(), protocolFilename);
|
|
200
216
|
if (existsSync(protocolSource)) {
|
|
201
217
|
let shouldCopy = true;
|
|
202
218
|
if (existsSync(protocolDest)) {
|
|
@@ -430,7 +446,8 @@ var ClineContentStrategy = class {
|
|
|
430
446
|
prompt = prompt.replace(/__\$\$CODE_AGENT_INSTALL_PATH\$\$__/g, installPath);
|
|
431
447
|
const finalContent = substituteVariables(prompt, { agent_type: agentType });
|
|
432
448
|
const title = commandName ? commandName.charAt(0).toUpperCase() + commandName.slice(1) : "Command";
|
|
433
|
-
|
|
449
|
+
const content = `# Conductor ${title}${parsed.description ? "\n\n" + parsed.description + "\n\n" : "\n\n"}${finalContent}`;
|
|
450
|
+
return normalizeWorkflowContent(content);
|
|
434
451
|
}
|
|
435
452
|
};
|
|
436
453
|
var clineContentStrategy = new ClineContentStrategy();
|
|
@@ -471,13 +488,15 @@ var GeminiContentStrategy = class {
|
|
|
471
488
|
return null;
|
|
472
489
|
}
|
|
473
490
|
const content = templateContent.replace(/__\$\$CODE_AGENT_INSTALL_PATH\$\$__/g, installPath);
|
|
474
|
-
|
|
491
|
+
const substituted = substituteVariables(content, { agent_type: agentType });
|
|
492
|
+
return normalizeWorkflowContent(substituted);
|
|
475
493
|
}
|
|
476
494
|
};
|
|
477
495
|
var GeminiFileStrategy = class {
|
|
478
496
|
async write(options) {
|
|
479
497
|
const { targetDir, agentDir, commandsDir, commandName, extension, content } = options;
|
|
480
|
-
const
|
|
498
|
+
const rawFileName = `${commandName}${extension}`;
|
|
499
|
+
const fileName = normalizeWorkflowFilename(rawFileName);
|
|
481
500
|
await writeFile3(join4(targetDir, agentDir, commandsDir, fileName), content);
|
|
482
501
|
}
|
|
483
502
|
};
|
|
@@ -35,13 +35,29 @@ 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,
|
|
39
|
-
|
|
38
|
+
2. If a unique match is found, immediately call the `ask_user` tool to confirm the selection (do not repeat the question in the chat):
|
|
39
|
+
- **questions:**
|
|
40
|
+
- **header:** "Confirm"
|
|
41
|
+
- **question:** "I found track '<track_description>'. Is this correct?"
|
|
42
|
+
- **type:** "yesno"
|
|
43
|
+
3. If no match is found, or if the match is ambiguous, immediately call the `ask_user` tool to inform the user and request the correct track name (do not repeat the question in the chat):
|
|
44
|
+
- **questions:**
|
|
45
|
+
- **header:** "Clarify"
|
|
46
|
+
- **question:** "I couldn't find a unique track matching the name you provided. Did you mean '<next_available_track>'? Or please type the exact track name."
|
|
47
|
+
- **type:** "text"
|
|
40
48
|
- **If no track name was provided (or if the previous step failed):**
|
|
41
49
|
1. **Identify Next Track:** Find the first track in the parsed tracks file that is NOT marked as `[x] Completed`.
|
|
42
50
|
2. **If a next track is found:**
|
|
43
|
-
-
|
|
44
|
-
|
|
51
|
+
- Immediately call the `ask_user` tool to confirm the selection (do not repeat the question in the chat):
|
|
52
|
+
- **questions:**
|
|
53
|
+
- **header:** "Next Track"
|
|
54
|
+
- **question:** "No track name provided. Would you like to proceed with the next incomplete track: '<track_description>'?"
|
|
55
|
+
- **type:** "yesno"
|
|
56
|
+
- If confirmed, proceed with this track. Otherwise, immediately call the `ask_user` tool to request the correct track name (do not repeat the question in the chat):
|
|
57
|
+
- **questions:**
|
|
58
|
+
- **header:** "Clarify"
|
|
59
|
+
- **question:** "Please type the exact name of the track you would like to implement."
|
|
60
|
+
- **type:** "text"
|
|
45
61
|
3. **If no incomplete tracks are found:**
|
|
46
62
|
- Announce: "No incomplete tracks found in the tracks file. All tasks are completed!"
|
|
47
63
|
- Halt the process and await further user instructions.
|
|
@@ -71,6 +87,7 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
|
|
|
71
87
|
b. **Iterate Through Tasks:** You MUST now loop through each task in the track's **Implementation Plan** one by one.
|
|
72
88
|
c. **For Each Task, You MUST:**
|
|
73
89
|
i. **Defer to Workflow:** The **Workflow** file is the **single source of truth** for the entire task lifecycle. You MUST now read and execute the procedures defined in the "Task Workflow" section of the **Workflow** file you have in your context. Follow its steps for implementation, testing, and committing precisely.
|
|
90
|
+
- **CRITICAL:** Every human-in-the-loop interaction, confirmation, or request for feedback mentioned in the **Workflow** (e.g., manual verification plans or guidance on persistent failures) MUST be conducted using the `ask_user` tool.
|
|
74
91
|
|
|
75
92
|
5. **Finalize Track:**
|
|
76
93
|
- After all tasks in the track's local **Implementation Plan** are completed, you MUST update the track's status in the **Tracks Registry**.
|
|
@@ -99,31 +116,49 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
|
|
|
99
116
|
a. **Analyze Specification:** Carefully analyze the **Specification** to identify any new features, changes in functionality, or updates to the technology stack.
|
|
100
117
|
b. **Update Product Definition:**
|
|
101
118
|
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
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
119
|
+
ii. **Propose and Confirm Changes:** If an update is needed:
|
|
120
|
+
- **Announce:** Briefly state that updates are proposed. Do NOT repeat the request to review in the chat.
|
|
121
|
+
- **Ask for Approval:** Use the `ask_user` tool to request confirmation. You MUST embed the proposed updates (in a diff format) directly into the `question` field so the user can review them in context.
|
|
122
|
+
- **questions:**
|
|
123
|
+
- **header:** "Product"
|
|
124
|
+
- **question:**
|
|
125
|
+
Please review the proposed updates to the Product Definition below. Do you approve?
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
<Insert Proposed product.md Updates/Diff Here>
|
|
130
|
+
- **type:** "yesno"
|
|
108
131
|
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
132
|
c. **Update Tech Stack:**
|
|
110
133
|
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
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
134
|
+
ii. **Propose and Confirm Changes:** If an update is needed:
|
|
135
|
+
- **Announce:** Briefly state that updates are proposed. Do NOT repeat the request to review in the chat.
|
|
136
|
+
- **Ask for Approval:** Use the `ask_user` tool to request confirmation. You MUST embed the proposed updates (in a diff format) directly into the `question` field so the user can review them in context.
|
|
137
|
+
- **questions:**
|
|
138
|
+
- **header:** "Tech Stack"
|
|
139
|
+
- **question:**
|
|
140
|
+
Please review the proposed updates to the Tech Stack below. Do you approve?
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
<Insert Proposed tech-stack.md Updates/Diff Here>
|
|
145
|
+
- **type:** "yesno"
|
|
117
146
|
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
147
|
d. **Update Product Guidelines (Strictly Controlled):**
|
|
119
148
|
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
149
|
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
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
150
|
+
iii. **Propose and Confirm Changes:** If the conditions are met:
|
|
151
|
+
- **Announce:** Briefly state that updates are proposed. Do NOT repeat the request to review in the chat.
|
|
152
|
+
- **Ask for Approval:** Use the `ask_user` tool to request confirmation. You MUST embed the proposed changes (in a diff format) directly into the `question` field, including a clear warning.
|
|
153
|
+
- **questions:**
|
|
154
|
+
- **header:** "Product"
|
|
155
|
+
- **question:**
|
|
156
|
+
WARNING: This is a sensitive action as it impacts core product guidelines. Please review the proposed changes below. Do you approve these critical changes?
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
<Insert Proposed product-guidelines.md Updates/Diff Here>
|
|
161
|
+
- **type:** "yesno"
|
|
127
162
|
iv. **Action:** Only after receiving explicit user confirmation, perform the file edits. Keep a record of whether this file was changed.
|
|
128
163
|
|
|
129
164
|
6. **Final Report:** Announce the completion of the synchronization process and provide a summary of the actions taken.
|
|
@@ -146,34 +181,41 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
|
|
|
146
181
|
|
|
147
182
|
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
183
|
|
|
149
|
-
2. **Ask for User Choice:**
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
184
|
+
2. **Ask for User Choice:** Immediately call the `ask_user` tool to prompt the user (do not repeat the question in the chat):
|
|
185
|
+
- **questions:**
|
|
186
|
+
- **header:** "Track Cleanup"
|
|
187
|
+
- **question:** "Track '<track_description>' is now complete. What would you like to do?"
|
|
188
|
+
- **type:** "choice"
|
|
189
|
+
- **multiSelect:** false
|
|
190
|
+
- **options:**
|
|
191
|
+
- Label: "Review", Description: "Run the review command to verify changes before finalizing."
|
|
192
|
+
- Label: "Archive", Description: "Move the track's folder to `conductor/archive/` and remove it from the tracks file."
|
|
193
|
+
- Label: "Delete", Description: "Permanently delete the track's folder and remove it from the tracks file."
|
|
194
|
+
- Label: "Skip", Description: "Do nothing and leave it in the tracks file."
|
|
156
195
|
|
|
157
196
|
3. **Handle User Response:**
|
|
158
|
-
* **If user chooses "
|
|
197
|
+
* **If user chooses "Review":**
|
|
159
198
|
* Announce: "Please run `/conductor:review` to verify your changes. You will be able to archive or delete the track after the review."
|
|
160
|
-
* **If user chooses "
|
|
199
|
+
* **If user chooses "Archive":**
|
|
161
200
|
i. **Create Archive Directory:** Check for the existence of `conductor/archive/`. If it does not exist, create it.
|
|
162
201
|
ii. **Archive Track Folder:** Move the track's folder from its current location (resolved via the **Tracks Directory**) to `conductor/archive/<track_id>`.
|
|
163
202
|
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.
|
|
164
203
|
iv. **Commit Changes:** Stage the **Tracks Registry** file and `conductor/archive/`. Commit with the message `chore(conductor): Archive track '<track_description>'`.
|
|
165
204
|
v. **Announce Success:** Announce: "Track '<track_description>' has been successfully archived."
|
|
166
|
-
* **If user chooses "
|
|
167
|
-
i. **CRITICAL WARNING:** Before proceeding,
|
|
168
|
-
|
|
205
|
+
* **If user chooses "Delete":**
|
|
206
|
+
i. **CRITICAL WARNING:** Before proceeding, immediately call the `ask_user` tool to ask for final confirmation (do not repeat the warning in the chat):
|
|
207
|
+
- **questions:**
|
|
208
|
+
- **header:** "Confirm"
|
|
209
|
+
- **question:** "WARNING: This will permanently delete the track folder and all its contents. This action cannot be undone. Are you sure?"
|
|
210
|
+
- **type:** "yesno"
|
|
169
211
|
ii. **Handle Confirmation:**
|
|
170
212
|
- **If 'yes'**:
|
|
171
213
|
a. **Delete Track Folder:** Resolve the **Tracks Directory** and permanently delete the track's folder from `<Tracks Directory>/<track_id>`.
|
|
172
214
|
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.
|
|
173
215
|
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>'`.
|
|
174
216
|
d. **Announce Success:** Announce: "Track '<track_description>' has been permanently deleted."
|
|
175
|
-
- **If 'no'
|
|
217
|
+
- **If 'no'**:
|
|
176
218
|
a. **Announce Cancellation:** Announce: "Deletion cancelled. The track has not been changed."
|
|
177
|
-
* **If user chooses "
|
|
219
|
+
* **If user chooses "Skip":**
|
|
178
220
|
* Announce: "Okay, the completed track will remain in your tracks file for now."
|
|
179
|
-
"""
|
|
221
|
+
"""
|
|
@@ -30,8 +30,12 @@ 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
|
-
|
|
33
|
+
* **If `{{args}}` is empty:** Ask the user using the `ask_user` tool (do not repeat the question in the chat):
|
|
34
|
+
- **questions:**
|
|
35
|
+
- **header:** "Description"
|
|
36
|
+
- **type:** "text"
|
|
37
|
+
- **question:** "Please provide a brief description of the track (feature, bug fix, chore, etc.) you wish to start."
|
|
38
|
+
- **placeholder:** "e.g., Implement user authentication"
|
|
35
39
|
Await the user's response and use it as the track description.
|
|
36
40
|
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
41
|
|
|
@@ -40,48 +44,57 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
|
|
|
40
44
|
1. **State Your Goal:** Announce:
|
|
41
45
|
> "I'll now guide you through a series of questions to build a comprehensive specification (`spec.md`) for this track."
|
|
42
46
|
|
|
43
|
-
2. **Questioning Phase:** Ask a series of questions to gather details for the `spec.md
|
|
44
|
-
* **CRITICAL:**
|
|
47
|
+
2. **Questioning Phase:** Ask a series of questions to gather details for the `spec.md` using the `ask_user` tool. You must 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).
|
|
48
|
+
* **CRITICAL:** Wait for the user's response after each `ask_user` tool call.
|
|
45
49
|
* **General Guidelines:**
|
|
46
50
|
* Refer to information in **Product Definition**, **Tech Stack**, etc., to ask context-aware questions.
|
|
47
51
|
* Provide a brief explanation and clear examples for each question.
|
|
48
|
-
* **Strongly Recommendation:** Whenever possible, present 2-3 plausible options
|
|
49
|
-
|
|
50
|
-
|
|
52
|
+
* **Strongly Recommendation:** Whenever possible, present 2-3 plausible options for the user to choose from.
|
|
53
|
+
|
|
51
54
|
* **1. Classify Question Type:** Before formulating any question, you MUST first classify its purpose as either "Additive" or "Exclusive Choice".
|
|
52
55
|
* Use **Additive** for brainstorming and defining scope (e.g., users, goals, features, project guidelines). These questions allow for multiple answers.
|
|
53
56
|
* 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:**
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
|
|
58
|
+
* **2. Formulate the Question:** Use the `ask_user` tool: Adhere to the following for each question in the `questions` array:
|
|
59
|
+
- **header:** Very short label (max 16 chars).
|
|
60
|
+
- **type:** "choice", "text", or "yesno".
|
|
61
|
+
- **multiSelect:** (Required for type: "choice") Set to `true` for multi-select (additive) or `false` for single-choice (exclusive).
|
|
62
|
+
- **options:** (Required for type: "choice") Provide 2-4 options, each with a `label` and `description`. Note that "Other" is automatically added.
|
|
63
|
+
- **placeholder:** (For type: "text") Provide a hint.
|
|
59
64
|
|
|
60
65
|
* **3. Interaction Flow:**
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
* Confirm your understanding by summarizing before moving on to
|
|
66
|
+
* Wait for the user's response after each `ask_user` tool call.
|
|
67
|
+
* If the user selects "Other", use a subsequent `ask_user` tool call with `type: "text"` to get their input if necessary.
|
|
68
|
+
* Confirm your understanding by summarizing before moving on to drafting.
|
|
64
69
|
|
|
65
70
|
* **If FEATURE:**
|
|
66
|
-
* **Ask 3-
|
|
71
|
+
* **Ask 3-4 relevant questions** to clarify the feature request using the `ask_user` tool.
|
|
67
72
|
* Examples include clarifying questions about the feature, how it should be implemented, interactions, inputs/outputs, etc.
|
|
68
73
|
* 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
74
|
|
|
70
75
|
* **If SOMETHING ELSE (Bug, Chore, etc.):**
|
|
71
|
-
* **Ask 2-3 relevant questions** to obtain necessary details.
|
|
76
|
+
* **Ask 2-3 relevant questions** to obtain necessary details using the `ask_user` tool.
|
|
72
77
|
* Examples include reproduction steps for bugs, specific scope for chores, or success criteria.
|
|
73
78
|
* Tailor the questions to the specific request.
|
|
74
79
|
|
|
75
80
|
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
81
|
|
|
77
|
-
4. **User Confirmation:**
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
4. **User Confirmation:**
|
|
83
|
+
- **Announce:** Briefly state that the draft is ready (e.g., "Draft generated."). Do NOT repeat the request to "review" or "approve" in the chat.
|
|
84
|
+
- **Ask for Approval:** Use the `ask_user` tool to request confirmation. You MUST embed the drafted content directly into the `question` field so the user can review it in context.
|
|
85
|
+
- **questions:**
|
|
86
|
+
- **header:** "Confirm Spec"
|
|
87
|
+
- **question:**
|
|
88
|
+
Please review the drafted Specification below. Does this accurately capture the requirements?
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
<Insert Drafted spec.md Content Here>
|
|
93
|
+
- **type:** "choice"
|
|
94
|
+
- **multiSelect:** false
|
|
95
|
+
- **options:**
|
|
96
|
+
- Label: "Approve", Description: "The specification looks correct, proceed to planning."
|
|
97
|
+
- Label: "Revise", Description: "I want to make changes to the requirements."
|
|
85
98
|
Await user feedback and revise the `spec.md` content until confirmed.
|
|
86
99
|
|
|
87
100
|
### 2.3 Interactive Plan Generation (`plan.md`)
|
|
@@ -99,14 +112,22 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
|
|
|
99
112
|
- Sub-task: ` - [ ] ...`
|
|
100
113
|
* **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
114
|
|
|
102
|
-
3. **User Confirmation:**
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
115
|
+
3. **User Confirmation:**
|
|
116
|
+
- **Announce:** Briefly state that the draft is ready (e.g., "Draft generated."). Do NOT repeat the request to "review" or "approve" in the chat.
|
|
117
|
+
- **Ask for Approval:** Use the `ask_user` tool to request confirmation. You MUST embed the drafted content directly into the `question` field so the user can review it in context.
|
|
118
|
+
- **questions:**
|
|
119
|
+
- **header:** "Confirm Plan"
|
|
120
|
+
- **question:**
|
|
121
|
+
Please review the drafted Implementation Plan below. Does this look correct and cover all the necessary steps?
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
<Insert Drafted plan.md Content Here>
|
|
126
|
+
- **type:** "choice"
|
|
127
|
+
- **multiSelect:** false
|
|
128
|
+
- **options:**
|
|
129
|
+
- Label: "Approve", Description: "The plan looks solid, proceed to implementation."
|
|
130
|
+
- Label: "Revise", Description: "I want to modify the implementation steps."
|
|
110
131
|
Await user feedback and revise the `plan.md` content until confirmed.
|
|
111
132
|
|
|
112
133
|
### 2.4 Create Track Artifacts and Update Main Plan
|
|
@@ -148,7 +169,10 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
|
|
|
148
169
|
*Link: [./<Relative Track Path>/](./<Relative Track Path>/)*
|
|
149
170
|
```
|
|
150
171
|
(Replace `<Relative Track Path>` with the path to the track directory relative to the **Tracks Registry** file location.)
|
|
151
|
-
7. **
|
|
172
|
+
7. **Commit Code Changes:**
|
|
173
|
+
- **Announce:** Inform the user you are committing the **Tracks Registry** changes.
|
|
174
|
+
- **Commit Changes:** Stage the **Tracks Registry** files and commit with the message `chore(conductor): Add new track '<track_description>'`.
|
|
175
|
+
8. **Announce Completion:** Inform the user:
|
|
152
176
|
> "New track '<track_id>' has been created and added to the tracks file. You can now start implementation by running `/conductor:implement`."
|
|
153
177
|
|
|
154
178
|
"""
|
|
@@ -37,42 +37,35 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
|
|
|
37
37
|
|
|
38
38
|
* **PATH A: Direct Confirmation**
|
|
39
39
|
1. Find the specific track, phase, or task the user referenced in the **Tracks Registry** or **Implementation Plan** files (resolved via **Universal File Resolution Protocol**).
|
|
40
|
-
2.
|
|
41
|
-
- **
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
2. Immediately call the `ask_user` tool to confirm the selection (do not repeat the question in the chat):
|
|
41
|
+
- **questions:**
|
|
42
|
+
- **header:** "Confirm"
|
|
43
|
+
- **question:** "You asked to revert the [Track/Phase/Task]: '[Description]'. Is this correct?"
|
|
44
|
+
- **type:** "yesno"
|
|
45
|
+
3. If "yes", establish this as the `target_intent` and proceed to Phase 2. If "no", immediately call the `ask_user` tool to ask clarifying questions (do not repeat the question in the chat):
|
|
46
|
+
- **questions:**
|
|
47
|
+
- **header:** "Clarify"
|
|
48
|
+
- **question:** "I'm sorry, I misunderstood. Please describe the Track, Phase, or Task you would like to revert."
|
|
49
|
+
- **type:** "text"
|
|
45
50
|
|
|
46
51
|
* **PATH B: Guided Selection Menu**
|
|
47
52
|
1. **Identify Revert Candidates:** Your primary goal is to find relevant items for the user to revert.
|
|
48
53
|
* **Scan All Plans:** You MUST read the **Tracks Registry** and every track's **Implementation Plan** (resolved via **Universal File Resolution Protocol** using the track's index file).
|
|
49
|
-
* **Prioritize In-Progress:** First, find **
|
|
50
|
-
* **Fallback to Completed:** If and only if NO in-progress items are found, find the **
|
|
51
|
-
2. **Present a Unified Hierarchical Menu:**
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
> "No items are in progress. Please choose a recently completed item to revert:
|
|
62
|
-
>
|
|
63
|
-
> Track: track_20251208_user_profile
|
|
64
|
-
> 1) [Phase] Foundational Setup
|
|
65
|
-
> 2) [Task] Initialize React application
|
|
66
|
-
>
|
|
67
|
-
> Track: track_20251208_auth_ui
|
|
68
|
-
> 3) [Task] Create login form
|
|
69
|
-
>
|
|
70
|
-
> 4) A different Track, Task, or Phase."
|
|
54
|
+
* **Prioritize In-Progress:** First, find the **top 3** most relevant Tracks, Phases, or Tasks marked as "in-progress" (`[~]`).
|
|
55
|
+
* **Fallback to Completed:** If and only if NO in-progress items are found, find the **3 most recently completed** Tasks and Phases (`[x]`).
|
|
56
|
+
2. **Present a Unified Hierarchical Menu:** Immediately call the `ask_user` tool to present the results (do not list them in the chat first):
|
|
57
|
+
- **questions:**
|
|
58
|
+
- **header:** "Select Item"
|
|
59
|
+
- **question:** "I found multiple in-progress items (or recently completed items). Please choose which one to revert:"
|
|
60
|
+
- **type:** "choice"
|
|
61
|
+
- **multiSelect:** false
|
|
62
|
+
- **options:** Provide the identified items as options. Group them by Track in the description if possible. **CRITICAL:** You MUST limit this array to a maximum of 4 items.
|
|
63
|
+
- **Example Option Label:** "[Task] Update user model", **Description:** "Track: track_20251208_user_profile"
|
|
64
|
+
- **Example Option Label:** "[Phase] Implement Backend", **Description:** "Track: track_20251208_user_profile"
|
|
65
|
+
- **Note:** The "Other" option is automatically added by the tool.
|
|
71
66
|
3. **Process User's Choice:**
|
|
72
|
-
* If the user
|
|
73
|
-
* If the user
|
|
74
|
-
* "What is the name or ID of the track you are looking for?"
|
|
75
|
-
* "Can you describe the task you want to revert?"
|
|
67
|
+
* If the user selects a specific item from the list, set this as the `target_intent` and proceed directly to Phase 2.
|
|
68
|
+
* If the user selects "Other" (automatically added for "choice") or the explicit "Other" option provided, you must engage in a dialogue to find the correct target using `ask_user` tool with a single question of `type: "text"` in the `questions` array.
|
|
76
69
|
* Once a target is identified, loop back to Path A for final confirmation.
|
|
77
70
|
|
|
78
71
|
4. **Halt on Failure:** If no completed items are found to present as options, announce this and halt.
|
|
@@ -112,11 +105,23 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
|
|
|
112
105
|
> ` - <sha_plan_commit> ('conductor(plan): Mark task complete')`
|
|
113
106
|
> * **Action:** I will run `git revert` on these commits in reverse order.
|
|
114
107
|
|
|
115
|
-
2. **Final Go/No-Go:**
|
|
116
|
-
- **
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
108
|
+
2. **Final Go/No-Go:** Immediately call the `ask_user` tool to ask for final confirmation (do not repeat the question in the chat):
|
|
109
|
+
- **questions:**
|
|
110
|
+
- **header:** "Confirm Plan"
|
|
111
|
+
- **question:** "Do you want to proceed with the drafted plan?"
|
|
112
|
+
- **type:** "choice"
|
|
113
|
+
- **multiSelect:** false
|
|
114
|
+
- **options:**
|
|
115
|
+
- Label: "Approve", Description: "Proceed with the revert actions."
|
|
116
|
+
- Label: "Revise", Description: "I want to change the revert plan."
|
|
117
|
+
|
|
118
|
+
3. **Process User Choice:**
|
|
119
|
+
- If "Approve", proceed to Phase 4.
|
|
120
|
+
- If "Revise", immediately call the `ask_user` tool to get the correct plan (do not repeat the question in the chat):
|
|
121
|
+
- **questions:**
|
|
122
|
+
- **header:** "Revise"
|
|
123
|
+
- **question:** "Please describe the changes needed for the revert plan."
|
|
124
|
+
- **type:** "text"
|
|
120
125
|
|
|
121
126
|
---
|
|
122
127
|
|