opencode-conductor-plugin 1.18.0 → 1.19.1

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.js CHANGED
@@ -46,23 +46,12 @@ const ConductorPlugin = async (ctx) => {
46
46
  };
47
47
  }
48
48
  };
49
- // 2. Load Strategies
50
- let strategySection = "";
51
- try {
52
- const strategyFile = "manual.md"; // Force manual strategy for now
53
- const strategyPath = join(__dirname, "prompts", "strategies", strategyFile);
54
- strategySection = await readFile(strategyPath, "utf-8");
55
- }
56
- catch (e) {
57
- strategySection = "SYSTEM ERROR: Could not load execution strategy.";
58
- }
59
49
  // 3. Load all Command Prompts (Parallel)
60
- const [setup, newTrack, implement, status, revert, workflowMd] = await Promise.all([
50
+ const [setup, newTrack, implement, status, revert] = await Promise.all([
61
51
  loadPrompt("setup.toml"),
62
52
  loadPrompt("newTrack.toml", { args: "$ARGUMENTS" }),
63
53
  loadPrompt("implement.toml", {
64
54
  track_name: "$ARGUMENTS",
65
- strategy_section: strategySection,
66
55
  }),
67
56
  loadPrompt("status.toml"),
68
57
  loadPrompt("revert.toml", { target: "$ARGUMENTS" }),
@@ -78,6 +67,7 @@ const ConductorPlugin = async (ctx) => {
78
67
  console.log("[Conductor] All components ready. Injecting config...");
79
68
  return {
80
69
  tool: {
70
+ ...(ctx.client.tool || {}),
81
71
  "conductor_delegate": createDelegationTool(ctx),
82
72
  "conductor_bg_task": createBackgroundTask(backgroundManager),
83
73
  "conductor_bg_output": createBackgroundOutput(backgroundManager),
@@ -122,10 +112,17 @@ const ConductorPlugin = async (ctx) => {
122
112
  mode: "primary",
123
113
  prompt: conductorPrompt,
124
114
  permission: {
115
+ "read": {
116
+ "*": "allow",
117
+ "*.env": "deny",
118
+ "*.env.*": "deny",
119
+ "*.env.example": "allow"
120
+ },
125
121
  bash: "allow",
126
122
  edit: "allow",
127
123
  webfetch: "allow",
128
124
  external_directory: "deny",
125
+ list: "allow",
129
126
  },
130
127
  tools: {
131
128
  bash: true,
@@ -145,10 +142,25 @@ const ConductorPlugin = async (ctx) => {
145
142
  mode: "primary",
146
143
  prompt: implementerPrompt,
147
144
  permission: {
145
+ "read": {
146
+ "*": "allow",
147
+ "*.env": "deny",
148
+ "*.env.*": "deny",
149
+ "*.env.example": "allow"
150
+ },
148
151
  bash: "allow",
149
152
  edit: "allow",
150
153
  webfetch: "allow",
151
154
  external_directory: "deny",
155
+ list: "allow",
156
+ "conductor_delegate": "allow",
157
+ "conductor_bg_task": "allow",
158
+ "conductor_bg_output": "allow",
159
+ "conductor_bg_cancel": "allow",
160
+ grep: "allow",
161
+ glob: "allow",
162
+ todowrite: "allow",
163
+ todoread: "allow",
152
164
  },
153
165
  tools: {
154
166
  bash: true,
@@ -36,4 +36,4 @@ Your mission is to ensure that every change to the codebase is driven by a forma
36
36
  - **Context Awareness**: Before taking any action, always verify the state of the project by reading the relevant Conductor metadata files (`tracks.md`, `setup_state.json`, etc.).
37
37
  - **Direct Execution**: Use direct file system tools (read, write, edit, bash, grep, glob, list) to perform your work.
38
38
 
39
- **CRITCAL: YOU MUST FOLLOW THE INSTRUCTIONS PROVIDED IN THE COMMAND TEMPLATES EXACTLY. DO NOT PAUSE IN THE MIDDLE OF A SEQUENCE.**
39
+ **CRITCAL: YOU MUST REMEMBER AND FOLLOW THE INSTRUCTIONS PROVIDED IN THE COMMAND TEMPLATES EXACTLY. EACH SEQUENCE IS IMPORTANT AND MUST BE FOLLOWED IN PROCESS ORDER.**
@@ -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
  ---
@@ -29,8 +27,9 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
29
27
 
30
28
  1. **Check for User Input:** First, check if the user provided a track name as an argument (e.g., `/conductor_implement <track_description>`).
31
29
 
32
- 2. **Parse Tracks File:** Use the `read` tool to read and parse the tracks file at `conductor/tracks.md`. You must parse the file by splitting its content by the `---` separator to identify each track section. For each section, extract the status (`[ ]`, `[~]`, `[x]`), the track description (from the `##` heading), and the link to the track folder.
33
- - **CRITICAL:** If no track sections are found after parsing, announce: "The tracks file is empty or malformed. No tracks to implement." and halt.
30
+ 2. **Parse Tracks File:** Read and parse the tracks file at `conductor/tracks.md`. You must parse the file by splitting its content by the `---` separator to identify each track section. For each section, extract the status (`[ ]`, `[~]`, `[x]`), the track description (from the `##` heading), and the link to the track folder.
31
+ - **CRITICAL:** If no track sections are found after parsing:
32
+ - Announce: "The tracks file is empty or malformed. No tracks to implement. Please run `/conductor_newTrack` to start a new track" and halt.
34
33
 
35
34
  3. **Continue:** Immediately proceed to the next step to select a track.
36
35
 
@@ -45,10 +44,13 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
45
44
  - Announce: "No track name provided. Automatically selecting the next incomplete track: '<track_description>'."
46
45
  - Proceed with this track.
47
46
  3. **If no incomplete tracks are found:**
47
+ - Run the TRACK CLEANUP PROTOCOL and verify the completed tracks have been archived properly
48
+ **If a track has not completed the FULL cleanup process**
49
+ - Confirm with the user to auto-fix with the associated findings.
48
50
  - Announce: "No incomplete tracks found in the tracks file. All tasks are completed!"
49
51
  - Halt the process and await further user instructions.
50
52
 
51
- 5. **Handle No Selection:** If no track is selected, inform the user and await further instructions.
53
+ 5. **Handle No Selection:** If no track is selected, inform the user to create a new track via `/conductor_newTrack` and await further instructions.
52
54
 
53
55
  ---
54
56
 
@@ -63,18 +65,19 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
63
65
 
64
66
  3. **Load Track Context:**
65
67
  a. **Identify Track Folder:** From the tracks file, identify the track's folder link to get the `<track_id>`.
66
- b. **Read Files:** You MUST use the `read` tool to read the content of the following files into your context using their full, absolute paths:
68
+ b. **Read Files:** You MUST read the content of the following files into your context using their full, absolute paths:
67
69
  - `conductor/tracks/<track_id>/plan.md`
68
70
  - `conductor/tracks/<track_id>/spec.md`
69
71
  - `conductor/workflow.md`
70
72
  c. **Error Handling:** If you fail to read any of these files, you MUST stop and inform the user of the error.
71
73
 
72
- 5. **Execute Tasks and Update Track Plan:**
73
- a. **Announce:** State that you will now execute the tasks from the track's `plan.md`.
74
- b. **Execute Strategy:**
75
- {{strategy_section}}
74
+ 4. **Execute Tasks and Update Track Plan:**
75
+ a. **Announce:** State that you will now execute the tasks from the track's `plan.md` by following the procedures in `workflow.md`.
76
+ b. **Iterate Through Tasks:** You MUST now loop through each task in the track's `plan.md` one by one.
77
+ c. **For Each Task, You MUST:**
78
+ 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
79
 
77
- 6. **Finalize Track:**
80
+ 5. **Finalize Track:**
78
81
  - After all tasks in the track's local `plan.md` are completed, you MUST update the track's status in the tracks file.
79
82
  - 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>`).
80
83
  - Announce that the track is fully complete and the tracks file has been updated.
@@ -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
@@ -90,8 +88,8 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
90
88
  > "Now I will create an implementation plan (plan.md) based on the specification."
91
89
 
92
90
  2. **Generate Plan:**
93
- * Use the `read` tool to read the confirmed `spec.md` content for this track.
94
- * Use the `read` tool to read the selected workflow file from `conductor/workflow.md`.
91
+ * Read the confirmed `spec.md` content for this track.
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
95
  * Include status markers `[ ]` for each task/sub-task.
@@ -109,7 +107,7 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
109
107
 
110
108
  ### 2.4 Create Track Artifacts and Update Main Plan
111
109
 
112
- 1. **Check for existing track name:** Before generating a new Track ID, use the `list` tool to list all existing track directories in `conductor/tracks/`. Extract the short names from these track IDs (e.g., ``shortname_YYYYMMDD`` -> `shortname`). If the proposed short name for the new track (derived from the initial description) matches an existing short name, halt the `newTrack` creation. Explain that a track with that name already exists and suggest choosing a different name or resuming the existing track.
110
+ 1. **Check for existing track name:** Before generating a new Track ID, list the tracks using shell command `ls conductor/tracks`.. Extract the short names from these track IDs (e.g., ``shortname_YYYYMMDD`` -> `shortname`). If the proposed short name for the new track (derived from the initial description) matches an existing short name, halt the `newTrack` creation. Explain that a track with that name already exists and suggest choosing a different name or resuming the existing track.
113
111
  2. **Generate Track ID:** Create a unique Track ID (e.g., ``shortname_YYYYMMDD``).
114
112
  3. **Create Directory:** Create a new directory: `conductor/tracks/<track_id>/`
115
113
  4. **Create `metadata.json`:** Create a metadata file at `conductor/tracks/<track_id>/metadata.json` with content like:
@@ -125,8 +123,8 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
125
123
  ```
126
124
  * Populate fields with actual values. Use the current timestamp.
127
125
  5. **Write Files:**
128
- * Use the `write` tool to write the confirmed specification content to `conductor/tracks/<track_id>/spec.md`.
129
- * Use the `write` tool to write the confirmed plan content to `conductor/tracks/<track_id>/plan.md`.
126
+ * Write the confirmed specification content to `conductor/tracks/<track_id>/spec.md`.
127
+ * Write the confirmed plan content to `conductor/tracks/<track_id>/plan.md`.
130
128
  6. **Update Tracks File:**
131
129
  - **Announce:** Inform the user you are updating the tracks file.
132
130
  - **Append Section:** Append a new section for the track to the end of `conductor/tracks.md`. The format MUST be:
@@ -31,8 +31,8 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
31
31
  **PROTOCOL: Follow this sequence to provide a status overview.**
32
32
 
33
33
  ### 2.1 Read Project Plan
34
- 1. **Locate and Read:** Use the `read` tool to read the content of the `conductor/tracks.md` file.
35
- 2. **Locate and Read:** List the tracks using the `list` tool on `conductor/tracks`. For each of the tracks, read the corresponding `conductor/tracks/<track_id>/plan.md` file using the `read` tool.
34
+ 1. **Locate and Read:** Read the content of the `conductor/tracks.md` file.
35
+ 2. **Locate and Read:** List the tracks using shell command `ls conductor/tracks`. Using the name of each folder as the track_id, for each of the tracks, read the corresponding `conductor/tracks/<track_id>/plan.md` file.
36
36
 
37
37
  ### 2.2 Parse and Summarize Plan
38
38
  1. **Parse Content:**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-conductor-plugin",
3
- "version": "1.18.0",
3
+ "version": "1.19.1",
4
4
  "description": "Conductor plugin for OpenCode",
5
5
  "type": "module",
6
6
  "repository": "derekbar90/opencode-conductor",