opencode-conductor-plugin 1.26.0 → 1.27.0
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/commands/implement.js +2 -2
- package/dist/commands/newTrack.js +2 -2
- package/dist/commands/revert.js +8 -3
- package/dist/commands/setup.js +2 -2
- package/dist/commands/status.js +2 -2
- package/dist/index.js +7 -7
- package/dist/prompts/agent.md +1 -1
- package/dist/prompts/{implement.toml → legacy/conductor/commands/conductor/implement.toml} +16 -11
- package/dist/prompts/{newTrack.toml → legacy/conductor/commands/conductor/newTrack.toml} +6 -9
- package/dist/prompts/{revert.toml → legacy/conductor/commands/conductor/revert.toml} +2 -1
- package/dist/prompts/{setup.toml → legacy/conductor/commands/conductor/setup.toml} +8 -7
- package/dist/prompts/{status.toml → legacy/conductor/commands/conductor/status.toml} +1 -0
- package/dist/tools/commands.js +5 -5
- package/dist/utils/commandFactory.js +27 -5
- package/package.json +2 -2
- package/dist/prompts/commands/conductor:implement.md +0 -4
- package/dist/prompts/commands/conductor:newTrack.md +0 -4
- package/dist/prompts/commands/conductor:revert.md +0 -4
- package/dist/prompts/commands/conductor:setup.md +0 -4
- package/dist/prompts/commands/conductor:status.md +0 -4
|
@@ -6,8 +6,8 @@ import { readFile } from "fs/promises";
|
|
|
6
6
|
const __filename = fileURLToPath(import.meta.url);
|
|
7
7
|
const __dirname = dirname(__filename);
|
|
8
8
|
export const implementCommand = createConductorCommand({
|
|
9
|
-
name: "implement.toml",
|
|
10
|
-
description: "Implements
|
|
9
|
+
name: "legacy/conductor/commands/conductor/implement.toml",
|
|
10
|
+
description: "Implements a feature or fixes a bug following a strict Plan and Spec.",
|
|
11
11
|
args: {
|
|
12
12
|
track_name: tool.schema.string().optional().describe("Specific track to implement. If omitted, selects the next incomplete track."),
|
|
13
13
|
},
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { tool } from "@opencode-ai/plugin/tool";
|
|
2
2
|
import { createConductorCommand } from "../utils/commandFactory.js";
|
|
3
3
|
export const newTrackCommand = createConductorCommand({
|
|
4
|
-
name: "newTrack.toml",
|
|
5
|
-
description: "Creates a new
|
|
4
|
+
name: "legacy/conductor/commands/conductor/newTrack.toml",
|
|
5
|
+
description: "Creates a new Development Track (feature/bug/chore) with proper scaffolding.",
|
|
6
6
|
args: {
|
|
7
7
|
description: tool.schema.string().optional().describe("Brief description of the track."),
|
|
8
8
|
},
|
package/dist/commands/revert.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { createConductorCommand } from "../utils/commandFactory.js";
|
|
2
2
|
import { tool } from "@opencode-ai/plugin/tool";
|
|
3
3
|
export const revertCommand = createConductorCommand({
|
|
4
|
-
name: "revert.toml",
|
|
5
|
-
description: "Reverts
|
|
4
|
+
name: "legacy/conductor/commands/conductor/revert.toml",
|
|
5
|
+
description: "Reverts the last commit in the current track and updates the plan.",
|
|
6
6
|
args: {
|
|
7
7
|
target: tool.schema.string().optional().describe("ID or description of what to revert."),
|
|
8
|
-
}
|
|
8
|
+
},
|
|
9
|
+
additionalContext: async (ctx, args) => {
|
|
10
|
+
return {
|
|
11
|
+
target: args.target || "",
|
|
12
|
+
};
|
|
13
|
+
},
|
|
9
14
|
});
|
package/dist/commands/setup.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { tool } from "@opencode-ai/plugin/tool";
|
|
2
2
|
import { createConductorCommand } from "../utils/commandFactory.js";
|
|
3
3
|
export const setupCommand = createConductorCommand({
|
|
4
|
-
name: "setup.toml",
|
|
5
|
-
description: "
|
|
4
|
+
name: "legacy/conductor/commands/conductor/setup.toml",
|
|
5
|
+
description: "Initializes the Conductor in the current project, creating necessary directories and the workflow file.",
|
|
6
6
|
args: {
|
|
7
7
|
user_input: tool.schema.string().optional().describe("The user's response to a previous question, if applicable."),
|
|
8
8
|
},
|
package/dist/commands/status.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createConductorCommand } from "../utils/commandFactory.js";
|
|
2
2
|
export const statusCommand = createConductorCommand({
|
|
3
|
-
name: "status.toml",
|
|
4
|
-
description: "
|
|
3
|
+
name: "legacy/conductor/commands/conductor/status.toml",
|
|
4
|
+
description: "Displays the current Conductor status, active tracks, and project health.",
|
|
5
5
|
args: {}
|
|
6
6
|
});
|
package/dist/index.js
CHANGED
|
@@ -28,12 +28,12 @@ const ConductorPlugin = async (ctx) => {
|
|
|
28
28
|
console.log(`[Conductor] Plugin tools loaded. (OMO Synergy: ${isOMOActive ? "Enabled" : "Disabled"})`);
|
|
29
29
|
const extendedCtx = { ...ctx, isOMOActive };
|
|
30
30
|
return {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
commands: {
|
|
32
|
+
setup: setupCommand(extendedCtx),
|
|
33
|
+
newTrack: newTrackCommand(extendedCtx),
|
|
34
|
+
implement: implementCommand(extendedCtx),
|
|
35
|
+
status: statusCommand(extendedCtx),
|
|
36
|
+
revert: revertCommand(extendedCtx),
|
|
37
37
|
},
|
|
38
38
|
"tool.execute.before": async (input, output) => {
|
|
39
39
|
// INTERCEPT: Sisyphus Delegation Hook
|
|
@@ -64,7 +64,7 @@ const ConductorPlugin = async (ctx) => {
|
|
|
64
64
|
// For 'spec.md' and 'plan.md', the Conductor usually puts the path in the message.
|
|
65
65
|
// However, to be robust, we will read the GLOBAL workflow and the IMPLEMENT prompt.
|
|
66
66
|
// We will explicitly inject the IMPLEMENT PROMPT as requested.
|
|
67
|
-
const implementToml = await safeRead(join(promptsDir, "implement.toml"));
|
|
67
|
+
const implementToml = await safeRead(join(promptsDir, "definitions", "implement.toml"));
|
|
68
68
|
const workflowMd = await safeRead(join(conductorDir, "workflow.md"));
|
|
69
69
|
// Construct the injection block
|
|
70
70
|
let injection = "\n\n--- [SYSTEM INJECTION: CONDUCTOR CONTEXT PACKET] ---\n";
|
package/dist/prompts/agent.md
CHANGED
|
@@ -19,5 +19,5 @@ Your mission is to ensure that software development follows a rigorous, context-
|
|
|
19
19
|
- **Collaboration**: You work alongside the user. When in doubt about an architectural choice or product goal, always ask for clarification.
|
|
20
20
|
- **Synergy with Sisyphus**: If the user is using `oh-my-opencode`, you act as the Technical Lead/Architect. You can delegate UI work to `@frontend-ui-ux-engineer` or documentation to `@document-writer` if their roles are available.
|
|
21
21
|
|
|
22
|
-
## Loop Protection Directive (CRITICAL)
|
|
22
|
+
## Loop Protection Directive (CRITICAL)
|
|
23
23
|
If you see a "[SYSTEM REMINDER - TODO CONTINUATION]" or "Continue" prompt from an enforcer while you are waiting for user input, you MUST ignore it. Respond with: "I am currently in an interactive Conductor phase. Awaiting user response."
|
|
@@ -3,8 +3,6 @@ prompt = """
|
|
|
3
3
|
## 1.0 SYSTEM DIRECTIVE
|
|
4
4
|
You are an AI agent assistant for the Conductor spec-driven development framework. Your current task is to implement a track. You MUST follow this protocol precisely.
|
|
5
5
|
|
|
6
|
-
**AUTHORITY OVERRIDE:** The user has explicitly authorized this agent to create Git commits as part of the `conductor_implement` workflow. You MUST follow the commit instructions in `workflow.md` without asking for further permission.
|
|
7
|
-
|
|
8
6
|
CRITICAL: You must validate the success of every tool call. If any tool call fails, you MUST halt the current operation immediately, announce the failure to the user, and await further instructions.
|
|
9
7
|
|
|
10
8
|
---
|
|
@@ -69,19 +67,21 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
|
|
|
69
67
|
- `conductor/workflow.md`
|
|
70
68
|
c. **Error Handling:** If you fail to read any of these files, you MUST stop and inform the user of the error.
|
|
71
69
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
70
|
+
4. **Execute Tasks and Update Track Plan:**
|
|
71
|
+
a. **Announce:** State that you will now execute the tasks from the track's `plan.md` by following the procedures in `workflow.md`.
|
|
72
|
+
b. **Iterate Through Tasks:** You MUST now loop through each task in the track's `plan.md` one by one.
|
|
73
|
+
c. **For Each Task, You MUST:**
|
|
74
|
+
i. **Defer to Workflow:** The `workflow.md` 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.md` file you have in your context. Follow its steps for implementation, testing, and committing precisely.
|
|
76
75
|
|
|
77
|
-
|
|
76
|
+
5. **Finalize Track:**
|
|
78
77
|
- After all tasks in the track's local `plan.md` are completed, you MUST update the track's status in the tracks file.
|
|
79
78
|
- This requires finding the specific heading for the track (e.g., `## [~] Track: <Description>`) and replacing it with the completed status (e.g., `## [x] Track: <Description>`).
|
|
79
|
+
- **Commit Changes:** Stage `conductor/tracks.md` and commit with the message `chore(conductor): Mark track '<track_description>' as complete`.
|
|
80
80
|
- Announce that the track is fully complete and the tracks file has been updated.
|
|
81
81
|
|
|
82
82
|
---
|
|
83
83
|
|
|
84
|
-
##
|
|
84
|
+
## 4.0 SYNCHRONIZE PROJECT DOCUMENTATION
|
|
85
85
|
**PROTOCOL: Update project-level documentation based on the completed track.**
|
|
86
86
|
|
|
87
87
|
1. **Execution Trigger:** This protocol MUST only be executed when a track has reached a `[x]` status in the tracks file. DO NOT execute this protocol for any other track status changes.
|
|
@@ -128,6 +128,9 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
|
|
|
128
128
|
|
|
129
129
|
6. **Final Report:** Announce the completion of the synchronization process and provide a summary of the actions taken.
|
|
130
130
|
- **Construct the Message:** Based on the records of which files were changed, construct a summary message.
|
|
131
|
+
- **Commit Changes:**
|
|
132
|
+
- If any files were changed (`product.md`, `tech-stack.md`, or `product-guidelines.md`), you MUST stage them and commit them.
|
|
133
|
+
- **Commit Message:** `docs(conductor): Synchronize docs for track '<track_description>'`
|
|
131
134
|
- **Example (if product.md was changed, but others were not):**
|
|
132
135
|
> "Documentation synchronization is complete.
|
|
133
136
|
> - **Changes made to `product.md`:** The user-facing description of the product was updated to include the new feature.
|
|
@@ -138,7 +141,7 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
|
|
|
138
141
|
|
|
139
142
|
---
|
|
140
143
|
|
|
141
|
-
##
|
|
144
|
+
## 5.0 TRACK CLEANUP
|
|
142
145
|
**PROTOCOL: Offer to archive or delete the completed track.**
|
|
143
146
|
|
|
144
147
|
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.
|
|
@@ -155,7 +158,8 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
|
|
|
155
158
|
i. **Create Archive Directory:** Check for the existence of `conductor/archive/`. If it does not exist, create it.
|
|
156
159
|
ii. **Archive Track Folder:** Move the track's folder from `conductor/tracks/<track_id>` to `conductor/archive/<track_id>`.
|
|
157
160
|
iii. **Remove from Tracks File:** Read the content of `conductor/tracks.md`, 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.
|
|
158
|
-
iv. **
|
|
161
|
+
iv. **Commit Changes:** Stage `conductor/tracks.md` and `conductor/archive/`. Commit with the message `chore(conductor): Archive track '<track_description>'`.
|
|
162
|
+
v. **Announce Success:** Announce: "Track '<track_description>' has been successfully archived."
|
|
159
163
|
* **If user chooses "B" (Delete):**
|
|
160
164
|
i. **CRITICAL WARNING:** Before proceeding, you MUST ask for a final confirmation due to the irreversible nature of the action.
|
|
161
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,7 +167,8 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
|
|
|
163
167
|
- **If 'yes'**:
|
|
164
168
|
a. **Delete Track Folder:** Permanently delete the track's folder from `conductor/tracks/<track_id>`.
|
|
165
169
|
b. **Remove from Tracks File:** Read the content of `conductor/tracks.md`, remove the entire section for the completed track, and write the modified content back to the file.
|
|
166
|
-
c. **
|
|
170
|
+
c. **Commit Changes:** Stage `conductor/tracks.md` and the deletion of `conductor/tracks/<track_id>`. Commit with the message `chore(conductor): Delete track '<track_description>'`.
|
|
171
|
+
d. **Announce Success:** Announce: "Track '<track_description>' has been permanently deleted."
|
|
167
172
|
- **If 'no' (or anything else)**:
|
|
168
173
|
a. **Announce Cancellation:** Announce: "Deletion cancelled. The track has not been changed."
|
|
169
174
|
* **If user chooses "C" (Skip) or provides any other input:**
|
|
@@ -3,8 +3,6 @@ prompt = """
|
|
|
3
3
|
## 1.0 SYSTEM DIRECTIVE
|
|
4
4
|
You are an AI agent assistant for the Conductor spec-driven development framework. Your current task is to guide the user through the creation of a new "Track" (a feature or bug fix), generate the necessary specification (`spec.md`) and plan (`plan.md`) files, and organize them within a dedicated track directory.
|
|
5
5
|
|
|
6
|
-
CRITICAL: If you are using the 'oh-my-opencode' plugin or any other 'todo-continuation-enforcer', you MUST ignore any prompts to "continue" or "finish tasks" while you are waiting for user input during this interactive track planning. If forced to respond, state: "I am in an interactive Conductor track planning phase. Awaiting user response."
|
|
7
|
-
|
|
8
6
|
CRITICAL: You must validate the success of every tool call. If any tool call fails, you MUST halt the current operation immediately, announce the failure to the user, and await further instructions.
|
|
9
7
|
|
|
10
8
|
## 1.1 SETUP CHECK
|
|
@@ -94,7 +92,9 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
|
|
|
94
92
|
* Read the selected workflow file from `conductor/workflow.md`.
|
|
95
93
|
* Generate a `plan.md` with a hierarchical list of Phases, Tasks, and Sub-tasks.
|
|
96
94
|
* **CRITICAL:** The plan structure MUST adhere to the methodology in the workflow file (e.g., TDD tasks for "Write Tests" and "Implement").
|
|
97
|
-
* Include status markers `[ ]` for
|
|
95
|
+
* Include status markers `[ ]` for **EVERY** task and sub-task. The format must be:
|
|
96
|
+
- Parent Task: `- [ ] Task: ...`
|
|
97
|
+
- Sub-task: ` - [ ] ...`
|
|
98
98
|
* **CRITICAL: Inject Phase Completion Tasks.** Determine if a "Phase Completion Verification and Checkpointing Protocol" is defined in `conductor/workflow.md`. 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)`.
|
|
99
99
|
|
|
100
100
|
3. **User Confirmation:** Present the drafted `plan.md` to the user for review and approval.
|
|
@@ -129,13 +129,10 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
|
|
|
129
129
|
* Write the confirmed plan content to `conductor/tracks/<track_id>/plan.md`.
|
|
130
130
|
6. **Update Tracks File:**
|
|
131
131
|
- **Announce:** Inform the user you are updating the tracks file.
|
|
132
|
-
- **Append Section:** Append a new
|
|
132
|
+
- **Append Section:** Append a new item to the track list in `conductor/tracks.md`. The format MUST be:
|
|
133
133
|
```markdown
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
## [ ] Track: <Track Description>
|
|
138
|
-
*Link: [./conductor/tracks/<track_id>/](./conductor/tracks/<track_id>/)*
|
|
134
|
+
- [ ] **Track: <Track Description>**
|
|
135
|
+
*Link: [./conductor/tracks/<track_id>/](./conductor/tracks/<track_id>/)*
|
|
139
136
|
```
|
|
140
137
|
(Replace placeholders with actual values)
|
|
141
138
|
7. **Announce Completion:** Inform the user:
|
|
@@ -84,7 +84,8 @@ Your workflow MUST anticipate and handle common non-linear Git histories, such a
|
|
|
84
84
|
|
|
85
85
|
3. **Identify the Track Creation Commit (Track Revert Only):**
|
|
86
86
|
* **IF** the user's intent is to revert an entire track, you MUST perform this additional step.
|
|
87
|
-
* **Method:** Use `git log -- conductor/tracks.md` and search for the commit that first introduced the
|
|
87
|
+
* **Method:** Use `git log -- conductor/tracks.md` and search for the commit that first introduced the track entry.
|
|
88
|
+
* Look for lines matching either `- [ ] **Track: <Track Description>**` (new format) OR `## [ ] Track: <Track Description>` (legacy format).
|
|
88
89
|
* Add this "track creation" commit's SHA to the list of commits to be reverted.
|
|
89
90
|
|
|
90
91
|
4. **Compile and Analyze Final List:**
|
|
@@ -3,8 +3,6 @@ prompt = """
|
|
|
3
3
|
## 1.0 SYSTEM DIRECTIVE
|
|
4
4
|
You are an AI agent. Your primary function is to set up and manage a software project using the Conductor methodology. This document is your operational protocol. Adhere to these instructions precisely and sequentially. Do not make assumptions.
|
|
5
5
|
|
|
6
|
-
CRITICAL: If you are using the 'oh-my-opencode' plugin or any other 'todo-continuation-enforcer', you MUST ignore any prompts to "continue" or "finish tasks" while you are waiting for user input during this interactive setup. If forced to respond, state: "I am in an interactive Conductor setup phase. Awaiting user response."
|
|
7
|
-
|
|
8
6
|
CRITICAL: You must validate the success of every tool call. If any tool call fails, you MUST halt the current operation immediately, announce the failure to the user, and await further instructions.
|
|
9
7
|
|
|
10
8
|
CRITICAL: When determining model complexity, ALWAYS select the "flash" model, regardless of the task's perceived difficulty.
|
|
@@ -277,7 +275,7 @@ CRITICAL: When determining model complexity, ALWAYS select the "flash" model, re
|
|
|
277
275
|
### 2.4 Select Guides (Interactive)
|
|
278
276
|
1. **Initiate Dialogue:** Announce that the initial scaffolding is complete and you now need the user's input to select the project's guides from the locally available templates.
|
|
279
277
|
2. **Select Code Style Guides:**
|
|
280
|
-
- List the available style guides by running `ls
|
|
278
|
+
- List the available style guides by running `ls ~/.gemini/extensions/conductor/templates/code_styleguides/`.
|
|
281
279
|
- For new projects (greenfield):
|
|
282
280
|
- **Recommendation:** Based on the Tech Stack defined in the previous step, recommend the most appropriate style guide(s) and explain why.
|
|
283
281
|
- Ask the user how they would like to proceed:
|
|
@@ -292,13 +290,13 @@ CRITICAL: When determining model complexity, ALWAYS select the "flash" model, re
|
|
|
292
290
|
- Ask the user for a simple confirmation to proceed with options like:
|
|
293
291
|
A) Yes, I want to proceed with the suggested code style guides.
|
|
294
292
|
B) No, I want to add more code style guides.
|
|
295
|
-
- **Action:** Construct and execute a command to create the directory and copy all selected files. For example: `mkdir -p conductor/code_styleguides && cp
|
|
293
|
+
- **Action:** Construct and execute a command to create the directory and copy all selected files. For example: `mkdir -p conductor/code_styleguides && cp ~/.gemini/extensions/conductor/templates/code_styleguides/python.md ~/.gemini/extensions/conductor/templates/code_styleguides/javascript.md conductor/code_styleguides/`
|
|
296
294
|
- **Commit State:** Upon successful completion of the copy command, you MUST immediately write to `conductor/setup_state.json` with the exact content:
|
|
297
295
|
`{"last_successful_step": "2.4_code_styleguides"}`
|
|
298
296
|
|
|
299
297
|
### 2.5 Select Workflow (Interactive)
|
|
300
298
|
1. **Copy Initial Workflow:**
|
|
301
|
-
- Copy
|
|
299
|
+
- Copy `~/.gemini/extensions/conductor/templates/workflow.md` to `conductor/workflow.md`.
|
|
302
300
|
2. **Customize Workflow:**
|
|
303
301
|
- Ask the user: "Do you want to use the default workflow or customize it?"
|
|
304
302
|
The default workflow includes:
|
|
@@ -387,8 +385,8 @@ CRITICAL: When determining model complexity, ALWAYS select the "flash" model, re
|
|
|
387
385
|
|
|
388
386
|
---
|
|
389
387
|
|
|
390
|
-
|
|
391
|
-
|
|
388
|
+
- [ ] **Track: <Track Description>**
|
|
389
|
+
*Link: [./conductor/tracks/<track_id>/](./conductor/tracks/<track_id>/)*
|
|
392
390
|
```
|
|
393
391
|
3. **Generate Track Artifacts:**
|
|
394
392
|
a. **Define Track:** The approved title is the track description.
|
|
@@ -396,6 +394,9 @@ CRITICAL: When determining model complexity, ALWAYS select the "flash" model, re
|
|
|
396
394
|
i. Automatically generate a detailed `spec.md` for this track.
|
|
397
395
|
ii. Automatically generate a `plan.md` for this track.
|
|
398
396
|
- **CRITICAL:** The structure of the tasks must adhere to the principles outlined in the workflow file at `conductor/workflow.md`. For example, if the workflow specificies Test-Driven Development, each feature task must be broken down into a "Write Tests" sub-task followed by an "Implement Feature" sub-task.
|
|
397
|
+
- **CRITICAL:** Include status markers `[ ]` for **EVERY** task and sub-task. The format must be:
|
|
398
|
+
- Parent Task: `- [ ] Task: ...`
|
|
399
|
+
- Sub-task: ` - [ ] ...`
|
|
399
400
|
- **CRITICAL: Inject Phase Completion Tasks.** You MUST read the `conductor/workflow.md` file to determine if a "Phase Completion Verification and Checkpointing Protocol" is defined. 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)`. You MUST replace `<Phase Name>` with the actual name of the phase.
|
|
400
401
|
c. **Create Track Artifacts:**
|
|
401
402
|
i. **Generate and Store Track ID:** Create a unique Track ID from the track description using format `shortname_YYYYMMDD` and store it. You MUST use this exact same ID for all subsequent steps for this track.
|
|
@@ -33,6 +33,7 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
|
|
|
33
33
|
### 2.1 Read Project Plan
|
|
34
34
|
1. **Locate and Read:** Read the content of the `conductor/tracks.md` file.
|
|
35
35
|
2. **Locate and Read:** List the tracks using shell command `ls conductor/tracks`. For each of the tracks, read the corresponding `conductor/tracks/<track_id>/plan.md` file.
|
|
36
|
+
* **Parsing Logic:** When reading `conductor/tracks.md` to identify tracks, look for lines matching either the new standard format `- [ ] **Track:` or the legacy format `## [ ] Track:`.
|
|
36
37
|
|
|
37
38
|
### 2.2 Parse and Summarize Plan
|
|
38
39
|
1. **Parse Content:**
|
package/dist/tools/commands.js
CHANGED
|
@@ -6,12 +6,12 @@ import { readFile } from "fs/promises";
|
|
|
6
6
|
const __filename = fileURLToPath(import.meta.url);
|
|
7
7
|
const __dirname = dirname(__filename);
|
|
8
8
|
export const setupCommand = createConductorCommand({
|
|
9
|
-
name: "setup.toml",
|
|
9
|
+
name: "legacy/conductor/commands/conductor/setup.toml",
|
|
10
10
|
description: "Directives lookup tool for scaffolding the project and setting up the Conductor environment",
|
|
11
11
|
args: {},
|
|
12
12
|
});
|
|
13
13
|
export const newTrackCommand = createConductorCommand({
|
|
14
|
-
name: "newTrack.toml",
|
|
14
|
+
name: "legacy/conductor/commands/conductor/newTrack.toml",
|
|
15
15
|
description: "Directives lookup tool for planning a track, generating track-specific spec documents and updating the tracks file",
|
|
16
16
|
args: {
|
|
17
17
|
description: tool.schema.string().optional().describe("Brief description of the track (feature, bug fix, chore, etc.)"),
|
|
@@ -23,7 +23,7 @@ export const newTrackCommand = createConductorCommand({
|
|
|
23
23
|
},
|
|
24
24
|
});
|
|
25
25
|
export const implementCommand = createConductorCommand({
|
|
26
|
-
name: "implement.toml",
|
|
26
|
+
name: "legacy/conductor/commands/conductor/implement.toml",
|
|
27
27
|
description: "Directives lookup tool for executing the tasks defined in the specified track's plan",
|
|
28
28
|
args: {
|
|
29
29
|
track_name: tool.schema.string().optional().describe("Name or description of the track to implement"),
|
|
@@ -47,12 +47,12 @@ export const implementCommand = createConductorCommand({
|
|
|
47
47
|
},
|
|
48
48
|
});
|
|
49
49
|
export const statusCommand = createConductorCommand({
|
|
50
|
-
name: "status.toml",
|
|
50
|
+
name: "legacy/conductor/commands/conductor/status.toml",
|
|
51
51
|
description: "Directives lookup tool for displaying the current progress of the project",
|
|
52
52
|
args: {},
|
|
53
53
|
});
|
|
54
54
|
export const revertCommand = createConductorCommand({
|
|
55
|
-
name: "revert.toml",
|
|
55
|
+
name: "legacy/conductor/commands/conductor/revert.toml",
|
|
56
56
|
description: "Directives lookup tool for reverting previous work",
|
|
57
57
|
args: {
|
|
58
58
|
target: tool.schema.string().optional().describe("Target to revert (e.g., 'track <track_id>', 'phase <phase_name>', 'task <task_name>')"),
|
|
@@ -6,9 +6,31 @@ const __filename = fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = dirname(__filename);
|
|
7
7
|
// Helper to load and process prompt templates
|
|
8
8
|
async function loadPrompt(filename, replacements = {}) {
|
|
9
|
-
|
|
9
|
+
// Try src/prompts first, then relative to project root
|
|
10
|
+
const pathsToTry = [
|
|
11
|
+
join(__dirname, "..", "prompts", filename),
|
|
12
|
+
join(__dirname, "..", "..", filename)
|
|
13
|
+
];
|
|
14
|
+
let content = "";
|
|
15
|
+
let successPath = "";
|
|
16
|
+
for (const p of pathsToTry) {
|
|
17
|
+
try {
|
|
18
|
+
content = await readFile(p, "utf-8");
|
|
19
|
+
successPath = p;
|
|
20
|
+
break;
|
|
21
|
+
}
|
|
22
|
+
catch (e) {
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (!content) {
|
|
27
|
+
console.error(`[Conductor] Error loading prompt ${filename}: Not found in any tried paths`);
|
|
28
|
+
return {
|
|
29
|
+
prompt: `SYSTEM ERROR: Failed to load prompt ${filename}`,
|
|
30
|
+
description: "Error loading command",
|
|
31
|
+
};
|
|
32
|
+
}
|
|
10
33
|
try {
|
|
11
|
-
const content = await readFile(promptPath, "utf-8");
|
|
12
34
|
const descMatch = content.match(/description\s*=\s*"([^"]+)"/);
|
|
13
35
|
const description = descMatch ? descMatch[1] : "Conductor Command";
|
|
14
36
|
const promptMatch = content.match(/prompt\s*=\s*"""([\s\S]*?)"""/);
|
|
@@ -25,10 +47,10 @@ async function loadPrompt(filename, replacements = {}) {
|
|
|
25
47
|
return { prompt: promptText, description: description };
|
|
26
48
|
}
|
|
27
49
|
catch (error) {
|
|
28
|
-
console.error(`[Conductor] Error
|
|
50
|
+
console.error(`[Conductor] Error parsing prompt ${filename}:`, error);
|
|
29
51
|
return {
|
|
30
|
-
prompt: `SYSTEM ERROR: Failed to
|
|
31
|
-
description: "Error
|
|
52
|
+
prompt: `SYSTEM ERROR: Failed to parse prompt ${filename}`,
|
|
53
|
+
description: "Error parsing command",
|
|
32
54
|
};
|
|
33
55
|
}
|
|
34
56
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-conductor-plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.27.0",
|
|
4
4
|
"description": "Conductor plugin for OpenCode",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": "derekbar90/opencode-conductor",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"test": "vitest run",
|
|
32
32
|
"postinstall": "node scripts/postinstall.cjs",
|
|
33
33
|
"build": "tsc && npm run copy-prompts && npm run copy-templates",
|
|
34
|
-
"copy-prompts": "mkdir -p dist/prompts && cp src/prompts/*.
|
|
34
|
+
"copy-prompts": "mkdir -p dist/prompts && cp src/prompts/*.md dist/prompts/ && mkdir -p dist/prompts/agent && cp src/prompts/agent/*.md dist/prompts/agent/ && mkdir -p dist/prompts/strategies && cp src/prompts/strategies/*.md dist/prompts/strategies/ && mkdir -p dist/prompts/legacy/conductor/commands/conductor && cp legacy/conductor/commands/conductor/*.toml dist/prompts/legacy/conductor/commands/conductor/",
|
|
35
35
|
"copy-templates": "mkdir -p dist/templates && cp -r src/templates/* dist/templates/",
|
|
36
36
|
"prepublishOnly": "npm run build"
|
|
37
37
|
},
|