opencode-conductor-plugin 1.17.0 → 1.17.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/README.md +9 -9
- package/dist/index.js +15 -15
- package/dist/prompts/agent/conductor.md +1 -1
- package/dist/prompts/agent/implementer.md +5 -5
- package/dist/prompts/implement.toml +2 -2
- package/dist/prompts/newTrack.toml +2 -2
- package/dist/prompts/revert.toml +3 -3
- package/dist/prompts/setup.toml +2 -2
- package/dist/prompts/status.toml +3 -3
- package/dist/tools/background.js +3 -3
- package/dist/tools/delegate.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ The philosophy is simple: **control your code by controlling your context.** By
|
|
|
11
11
|
## 🚀 Key Features
|
|
12
12
|
|
|
13
13
|
* **Specialized `@conductor` Agent**: A dedicated subagent that acts as your Project Architect and Technical Lead.
|
|
14
|
-
* **Native Slash Commands**: Integrated shortcuts like `/
|
|
14
|
+
* **Native Slash Commands**: Integrated shortcuts like `/conductor_setup`, `/conductor_newTrack`, and `/conductor_implement` for frictionless project management.
|
|
15
15
|
* **Modern Permissions**: Fully compatible with OpenCode v1.1.1 granular permission system.
|
|
16
16
|
* **Protocol-Driven Workflow**: Automated enforcement of the **Context -> Spec -> Plan -> Implement** lifecycle.
|
|
17
17
|
* **Smart Revert**: A Git-aware revert system that understands logical units of work (Tracks, Phases, Tasks) instead of just raw commit hashes.
|
|
@@ -26,18 +26,18 @@ The philosophy is simple: **control your code by controlling your context.** By
|
|
|
26
26
|
|
|
27
27
|
Conductor organizes your work into **Tracks** (features or bug fixes). Every Track follows three mandatory phases:
|
|
28
28
|
|
|
29
|
-
### 1. Project Initialization (`/
|
|
29
|
+
### 1. Project Initialization (`/conductor_setup`)
|
|
30
30
|
Run this once per project. The agent will interview you to define:
|
|
31
31
|
* **Product Vision**: Target users, core goals, and primary features.
|
|
32
32
|
* **Tech Stack**: Languages, frameworks, and databases.
|
|
33
33
|
* **Workflow Rules**: Testing standards (e.g., TDD), commit strategies, and documentation patterns.
|
|
34
34
|
|
|
35
|
-
### 2. Track Planning (`/
|
|
35
|
+
### 2. Track Planning (`/conductor_newTrack`)
|
|
36
36
|
When you're ready for a new task, tell the agent what you want to build.
|
|
37
37
|
* **Specification (`spec.md`)**: Conductor asks 3-5 targeted questions to clarify the "What" and "Why".
|
|
38
38
|
* **Implementation Plan (`plan.md`)**: Once the spec is approved, Conductor generates a step-by-step checklist adhering to your project's workflow rules.
|
|
39
39
|
|
|
40
|
-
### 3. Autonomous Implementation (`/
|
|
40
|
+
### 3. Autonomous Implementation (`/conductor_implement`)
|
|
41
41
|
The agent works through the `plan.md` checklist, executing tasks, running tests, and making semantic commits automatically until the Track is complete.
|
|
42
42
|
|
|
43
43
|
---
|
|
@@ -94,11 +94,11 @@ We highly recommend pinning the `@conductor` agent to a "flash" model for optima
|
|
|
94
94
|
|
|
95
95
|
| Command | Description |
|
|
96
96
|
| :--- | :--- |
|
|
97
|
-
| `/
|
|
98
|
-
| `/
|
|
99
|
-
| `/
|
|
100
|
-
| `/
|
|
101
|
-
| `/
|
|
97
|
+
| `/conductor_setup` | Initialize the `conductor/` directory and project "Constitution". |
|
|
98
|
+
| `/conductor_newTrack "desc"` | Start a new feature/bug Track with spec and plan generation. |
|
|
99
|
+
| `/conductor_implement` | Start implementing the next pending task in the current track. |
|
|
100
|
+
| `/conductor_status` | Get a high-level overview of project progress and active tracks. |
|
|
101
|
+
| `/conductor_revert` | Interactively select a task, phase, or track to undo via Git. |
|
|
102
102
|
|
|
103
103
|
---
|
|
104
104
|
|
package/dist/index.js
CHANGED
|
@@ -78,10 +78,10 @@ const ConductorPlugin = async (ctx) => {
|
|
|
78
78
|
console.log("[Conductor] All components ready. Injecting config...");
|
|
79
79
|
return {
|
|
80
80
|
tool: {
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
81
|
+
"conductor_delegate": createDelegationTool(ctx),
|
|
82
|
+
"conductor_background_task": createBackgroundTask(backgroundManager),
|
|
83
|
+
"conductor_background_output": createBackgroundOutput(backgroundManager),
|
|
84
|
+
"conductor_background_cancel": createBackgroundCancel(backgroundManager),
|
|
85
85
|
},
|
|
86
86
|
config: async (config) => {
|
|
87
87
|
if (!config)
|
|
@@ -89,27 +89,27 @@ const ConductorPlugin = async (ctx) => {
|
|
|
89
89
|
console.log("[Conductor] config handler: Merging commands and agents...");
|
|
90
90
|
config.command = {
|
|
91
91
|
...(config.command || {}),
|
|
92
|
-
"
|
|
92
|
+
"conductor_setup": {
|
|
93
93
|
template: setup.prompt,
|
|
94
94
|
description: setup.description,
|
|
95
95
|
agent: "conductor",
|
|
96
96
|
},
|
|
97
|
-
"
|
|
97
|
+
"conductor_newTrack": {
|
|
98
98
|
template: newTrack.prompt,
|
|
99
99
|
description: newTrack.description,
|
|
100
100
|
agent: "conductor",
|
|
101
101
|
},
|
|
102
|
-
"
|
|
102
|
+
"conductor_implement": {
|
|
103
103
|
template: implement.prompt,
|
|
104
104
|
description: implement.description,
|
|
105
105
|
agent: "conductor_implementer",
|
|
106
106
|
},
|
|
107
|
-
"
|
|
107
|
+
"conductor_status": {
|
|
108
108
|
template: status.prompt,
|
|
109
109
|
description: status.description,
|
|
110
110
|
agent: "conductor",
|
|
111
111
|
},
|
|
112
|
-
"
|
|
112
|
+
"conductor_revert": {
|
|
113
113
|
template: revert.prompt,
|
|
114
114
|
description: revert.description,
|
|
115
115
|
agent: "conductor",
|
|
@@ -169,10 +169,10 @@ const ConductorPlugin = async (ctx) => {
|
|
|
169
169
|
todowrite: true,
|
|
170
170
|
todoread: true,
|
|
171
171
|
webfetch: true,
|
|
172
|
-
"
|
|
173
|
-
"
|
|
174
|
-
"
|
|
175
|
-
"
|
|
172
|
+
"conductor_delegate": true,
|
|
173
|
+
"conductor_background_task": true,
|
|
174
|
+
"conductor_background_output": true,
|
|
175
|
+
"conductor_background_cancel": true,
|
|
176
176
|
},
|
|
177
177
|
},
|
|
178
178
|
};
|
|
@@ -182,8 +182,8 @@ const ConductorPlugin = async (ctx) => {
|
|
|
182
182
|
"delegate_to_agent",
|
|
183
183
|
"task",
|
|
184
184
|
"background_task",
|
|
185
|
-
"
|
|
186
|
-
"
|
|
185
|
+
"conductor_delegate",
|
|
186
|
+
"conductor_background_task",
|
|
187
187
|
];
|
|
188
188
|
if (delegationTools.includes(input.tool)) {
|
|
189
189
|
const conductorDir = join(ctx.directory, "conductor");
|
|
@@ -24,7 +24,7 @@ Your mission is to ensure that every change to the codebase is driven by a forma
|
|
|
24
24
|
|
|
25
25
|
## Core Responsibilities
|
|
26
26
|
|
|
27
|
-
1. **Command Execution**: Your primary duty is to execute the logic defined in the Conductor slash commands (`/
|
|
27
|
+
1. **Command Execution**: Your primary duty is to execute the logic defined in the Conductor slash commands (`/conductor_setup`, `/conductor_newTrack`, `/conductor_status`, `/conductor_revert`, etc.). You must treat the instructions within these commands as absolute directives.
|
|
28
28
|
2. **Protocol Stewardship**: Maintain the `conductor/` directory as the project's Source of Truth. Ensure `product.md`, `tech-stack.md`, and `workflow.md` are updated only through the approved protocols.
|
|
29
29
|
3. **Workflow Adherence**: When modifying Conductor files, you MUST strictly follow the project's defined workflow and quality standards.
|
|
30
30
|
4. **Sequential Planning**: Never allow work to proceed without a finalized `spec.md` and `plan.md` for the current Track.
|
|
@@ -15,10 +15,10 @@ permission:
|
|
|
15
15
|
todowrite: allow
|
|
16
16
|
todoread: allow
|
|
17
17
|
webfetch: allow
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
18
|
+
"conductor_delegate": allow
|
|
19
|
+
"conductor_background_task": allow
|
|
20
|
+
"conductor_background_output": allow
|
|
21
|
+
"conductor_background_cancel": allow
|
|
22
22
|
---
|
|
23
23
|
# Conductor Implementer Agent
|
|
24
24
|
|
|
@@ -36,5 +36,5 @@ Your mission is to take an approved Specification and Plan and turn them into hi
|
|
|
36
36
|
## Operating Principles
|
|
37
37
|
|
|
38
38
|
- **Spec Adherence**: Always implement exactly what is defined in the `spec.md`. If you find a technical contradiction, stop and ask the user.
|
|
39
|
-
- **Direct Action & Delegation**: Use direct file system tools for core coding. Use `
|
|
39
|
+
- **Direct Action & Delegation**: Use direct file system tools for core coding. Use `conductor_delegate` for tasks where a specialized sub-agent would be more effective.
|
|
40
40
|
- **Transparency**: Every commit you make MUST include a detailed summary in Git Notes as per the workflow rules.
|
|
@@ -19,7 +19,7 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
|
|
|
19
19
|
|
|
20
20
|
2. **Handle Missing Files:**
|
|
21
21
|
- If ANY of these files are missing, you MUST halt the operation immediately.
|
|
22
|
-
- Announce: "Conductor is not set up. Please run `/
|
|
22
|
+
- Announce: "Conductor is not set up. Please run `/conductor_setup` to set up the environment."
|
|
23
23
|
- Do NOT proceed to Track Selection.
|
|
24
24
|
|
|
25
25
|
---
|
|
@@ -27,7 +27,7 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
|
|
|
27
27
|
## 2.0 TRACK SELECTION
|
|
28
28
|
**PROTOCOL: Identify and select the track to be implemented.**
|
|
29
29
|
|
|
30
|
-
1. **Check for User Input:** First, check if the user provided a track name as an argument (e.g., `/
|
|
30
|
+
1. **Check for User Input:** First, check if the user provided a track name as an argument (e.g., `/conductor_implement <track_description>`).
|
|
31
31
|
|
|
32
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
33
|
- **CRITICAL:** If no track sections are found after parsing, announce: "The tracks file is empty or malformed. No tracks to implement." and halt.
|
|
@@ -17,7 +17,7 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
|
|
|
17
17
|
|
|
18
18
|
2. **Handle Missing Files:**
|
|
19
19
|
- If ANY of these files are missing, you MUST halt the operation immediately.
|
|
20
|
-
- Announce: "Conductor is not set up. Please run `/
|
|
20
|
+
- Announce: "Conductor is not set up. Please run `/conductor_setup` to set up the environment."
|
|
21
21
|
- Do NOT proceed to New Track Initialization.
|
|
22
22
|
|
|
23
23
|
---
|
|
@@ -139,6 +139,6 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
|
|
|
139
139
|
```
|
|
140
140
|
(Replace placeholders with actual values)
|
|
141
141
|
7. **Announce Completion:** Inform the user:
|
|
142
|
-
> "New track '<track_id>' has been created and added to the tracks file. You can now start implementation by running `/
|
|
142
|
+
> "New track '<track_id>' has been created and added to the tracks file. You can now start implementation by running `/conductor_implement`."
|
|
143
143
|
|
|
144
144
|
"""
|
package/dist/prompts/revert.toml
CHANGED
|
@@ -10,8 +10,8 @@ Your workflow MUST anticipate and handle common non-linear Git histories, such a
|
|
|
10
10
|
**CRITICAL**: The user's explicit confirmation is required at multiple checkpoints. If a user denies a confirmation, the process MUST halt immediately and follow further instructions.
|
|
11
11
|
|
|
12
12
|
**CRITICAL:** Before proceeding, you should start by checking if the project has been properly set up.
|
|
13
|
-
1. **Verify Tracks File:** Check if the file `conductor/tracks.md` exists. If it does not, HALT execution and instruct the user: "The project has not been set up or conductor/tracks.md has been corrupted. Please run `/
|
|
14
|
-
2. **Verify Track Exists:** Check if the file `conductor/tracks.md` is not empty. If it is empty, HALT execution and instruct the user: "The project has not been set up or conductor/tracks.md has been corrupted. Please run `/
|
|
13
|
+
1. **Verify Tracks File:** Check if the file `conductor/tracks.md` exists. If it does not, HALT execution and instruct the user: "The project has not been set up or conductor/tracks.md has been corrupted. Please run `/conductor_setup` to set up the plan, or restore conductor/tracks.md."
|
|
14
|
+
2. **Verify Track Exists:** Check if the file `conductor/tracks.md` is not empty. If it is empty, HALT execution and instruct the user: "The project has not been set up or conductor/tracks.md has been corrupted. Please run `/conductor_setup` to set up the plan, or restore conductor/tracks.md."
|
|
15
15
|
|
|
16
16
|
**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.
|
|
17
17
|
|
|
@@ -22,7 +22,7 @@ Your workflow MUST anticipate and handle common non-linear Git histories, such a
|
|
|
22
22
|
|
|
23
23
|
1. **Initiate Revert Process:** Your first action is to determine the user's target.
|
|
24
24
|
|
|
25
|
-
2. **Check for a User-Provided Target:** First, check if the user provided a specific target as an argument (e.g., `/
|
|
25
|
+
2. **Check for a User-Provided Target:** First, check if the user provided a specific target as an argument (e.g., `/conductor_revert track <track_id>`).
|
|
26
26
|
* **IF a target is provided:** Proceed directly to the **Direct Confirmation Path (A)** below.
|
|
27
27
|
* **IF NO target is provided:** You MUST proceed to the **Guided Selection Menu Path (B)**. This is the default behavior.
|
|
28
28
|
|
package/dist/prompts/setup.toml
CHANGED
|
@@ -28,7 +28,7 @@ CRITICAL: When determining model complexity, ALWAYS select the "flash" model, re
|
|
|
28
28
|
- If `STEP` is "2.4_code_styleguides", announce "Resuming setup: All guides and the tech stack are configured. Next, we will define the project workflow." and proceed to **Section 2.5**.
|
|
29
29
|
- If `STEP` is "2.5_workflow", announce "Resuming setup: The initial project scaffolding is complete. Next, we will generate the first track." and proceed to **Phase 2 (3.0)**.
|
|
30
30
|
- If `STEP` is "3.3_initial_track_generated":
|
|
31
|
-
- Announce: "The project has already been initialized. You can create a new track with `/
|
|
31
|
+
- Announce: "The project has already been initialized. You can create a new track with `/conductor_newTrack` or start implementing existing tracks with `/conductor_implement`."
|
|
32
32
|
- Halt the `setup` process.
|
|
33
33
|
- If `STEP` is unrecognized, announce an error and halt.
|
|
34
34
|
|
|
@@ -422,5 +422,5 @@ CRITICAL: When determining model complexity, ALWAYS select the "flash" model, re
|
|
|
422
422
|
### 3.4 Final Announcement
|
|
423
423
|
1. **Announce Completion:** After the track has been created, announce that the project setup and initial track generation are complete.
|
|
424
424
|
2. **Save Conductor Files:** Add and commit all files with the commit message `conductor(setup): Add conductor setup files`.
|
|
425
|
-
3. **Next Steps:** Inform the user that they can now begin work by running `/
|
|
425
|
+
3. **Next Steps:** Inform the user that they can now begin work by running `/conductor_implement`.
|
|
426
426
|
"""
|
package/dist/prompts/status.toml
CHANGED
|
@@ -4,8 +4,8 @@ prompt = """
|
|
|
4
4
|
You are an AI agent. Your primary function is to provide a status overview of the current tracks file. This involves reading the `conductor/tracks.md` file, parsing its content, and summarizing the progress of tasks.
|
|
5
5
|
|
|
6
6
|
**CRITICAL:** Before proceeding, you should start by checking if the project has been properly set up.
|
|
7
|
-
1. **Verify Tracks File:** Check if the file `conductor/tracks.md` exists. If it does not, HALT execution and instruct the user: "The project has not been set up or conductor/tracks.md has been corrupted. Please run `/
|
|
8
|
-
2. **Verify Track Exists:** Check if the file `conductor/tracks.md` is not empty. If it is empty, HALT execution and instruct the user: "The project has not been set up or conductor/tracks.md has been corrupted. Please run `/
|
|
7
|
+
1. **Verify Tracks File:** Check if the file `conductor/tracks.md` exists. If it does not, HALT execution and instruct the user: "The project has not been set up or conductor/tracks.md has been corrupted. Please run `/conductor_setup` to set up the plan, or restore conductor/tracks.md."
|
|
8
|
+
2. **Verify Track Exists:** Check if the file `conductor/tracks.md` is not empty. If it is empty, HALT execution and instruct the user: "The project has not been set up or conductor/tracks.md has been corrupted. Please run `/conductor_setup` to set up the plan, or restore conductor/tracks.md."
|
|
9
9
|
|
|
10
10
|
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.
|
|
11
11
|
|
|
@@ -22,7 +22,7 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
|
|
|
22
22
|
|
|
23
23
|
2. **Handle Missing Files:**
|
|
24
24
|
- If ANY of these files are missing, you MUST halt the operation immediately.
|
|
25
|
-
- Announce: "Conductor is not set up. Please run `/
|
|
25
|
+
- Announce: "Conductor is not set up. Please run `/conductor_setup` to set up the environment."
|
|
26
26
|
- Do NOT proceed to Status Overview Protocol.
|
|
27
27
|
|
|
28
28
|
---
|
package/dist/tools/background.js
CHANGED
|
@@ -45,8 +45,8 @@ export class BackgroundManager {
|
|
|
45
45
|
body: {
|
|
46
46
|
agent: input.agent,
|
|
47
47
|
tools: {
|
|
48
|
-
"
|
|
49
|
-
"
|
|
48
|
+
"conductor_background_task": false,
|
|
49
|
+
"conductor_delegate": false,
|
|
50
50
|
},
|
|
51
51
|
parts: [{ type: "text", text: input.prompt }],
|
|
52
52
|
},
|
|
@@ -100,7 +100,7 @@ export class BackgroundManager {
|
|
|
100
100
|
this.notifyParentSession(task);
|
|
101
101
|
}
|
|
102
102
|
async notifyParentSession(task) {
|
|
103
|
-
const message = `[BACKGROUND TASK COMPLETED] Task "${task.description}" finished. Use
|
|
103
|
+
const message = `[BACKGROUND TASK COMPLETED] Task "${task.description}" finished. Use conductor_background_output with task_id="${task.id}" to get results.`;
|
|
104
104
|
await this.client.session.prompt({
|
|
105
105
|
path: { id: task.parentSessionID },
|
|
106
106
|
body: {
|
package/dist/tools/delegate.js
CHANGED
|
@@ -25,7 +25,7 @@ export function createDelegationTool(ctx) {
|
|
|
25
25
|
body: {
|
|
26
26
|
agent: args.subagent_type,
|
|
27
27
|
tools: {
|
|
28
|
-
"
|
|
28
|
+
"conductor_delegate": false, // Disable this tool for the child session
|
|
29
29
|
},
|
|
30
30
|
parts: [{ type: "text", text: args.prompt }],
|
|
31
31
|
},
|