opencode-conductor-plugin 1.1.2 → 1.2.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/README.md +76 -45
- package/dist/commands/implement.js +3 -1
- package/dist/commands/newTrack.js +5 -3
- package/dist/commands/setup.js +4 -1
- package/dist/index.js +13 -6
- package/dist/prompts/agent/conductor.md +4 -2
- package/dist/prompts/implement.toml +7 -3
- package/dist/utils/bootstrap.js +7 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,63 +1,69 @@
|
|
|
1
1
|
# Conductor Plugin for OpenCode
|
|
2
2
|
|
|
3
|
-
**Measure twice, code once.**
|
|
3
|
+
> **Measure twice, code once.**
|
|
4
4
|
|
|
5
|
-
Conductor is
|
|
5
|
+
Conductor is a specialized OpenCode plugin designed to enforce a rigorous, **Context-Driven Development** lifecycle. It transforms OpenCode from a reactive coding tool into a proactive project architect that follows a strict protocol to specify, plan, and implement software features and bug fixes.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
The philosophy behind Conductor is simple: **control your code**. By treating context as a managed artifact alongside your code, you transform your repository into a single source of truth that drives every agent interaction with deep, persistent project awareness.
|
|
7
|
+
The philosophy is simple: **control your code by controlling your context.** By treating project requirements and plans as managed artifacts, Conductor ensures every agent interaction is grounded in deep, persistent project awareness.
|
|
10
8
|
|
|
11
9
|
---
|
|
12
10
|
|
|
13
11
|
## 🚀 Key Features
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
13
|
+
* **Specialized `@conductor` Agent**: A dedicated subagent that acts as your Project Architect and Technical Lead.
|
|
14
|
+
* **Native Slash Commands**: Integrated shortcuts like `/c-setup`, `/c-new`, and `/c-implement` for frictionless project management.
|
|
15
|
+
* **Protocol-Driven Workflow**: Automated enforcement of the **Context -> Spec -> Plan -> Implement** lifecycle.
|
|
16
|
+
* **Smart Revert**: A Git-aware revert system that understands logical units of work (Tracks, Phases, Tasks) instead of just raw commit hashes.
|
|
17
|
+
* **19+ Style Templates**: Built-in support for a vast range of languages including Rust, Solidity, Zig, Julia, Kotlin, Swift, and more.
|
|
18
|
+
* **Zero-Config Bootstrap**: Automatically installs agents and commands to your global OpenCode configuration on first run.
|
|
19
|
+
* **Sisyphus Synergy**: Optimized to work alongside [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode) for a multi-agent team experience.
|
|
21
20
|
|
|
22
|
-
|
|
21
|
+
---
|
|
23
22
|
|
|
24
|
-
|
|
23
|
+
## 🛠️ The Conductor Lifecycle
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
Initializes the `conductor/` directory with your project's "Constitution" (Product vision, Tech Stack, and Workflow rules).
|
|
28
|
-
```bash
|
|
29
|
-
/c-setup
|
|
30
|
-
```
|
|
25
|
+
Conductor organizes your work into **Tracks** (features or bug fixes). Every Track follows three mandatory phases:
|
|
31
26
|
|
|
32
|
-
###
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
27
|
+
### 1. Project Initialization (`/c-setup`)
|
|
28
|
+
Run this once per project. The `@conductor` agent will interview you to define:
|
|
29
|
+
* **Product Vision**: Target users, core goals, and primary features.
|
|
30
|
+
* **Tech Stack**: Languages, frameworks, and databases.
|
|
31
|
+
* **Workflow Rules**: Testing standards (e.g., TDD), commit strategies, and documentation patterns.
|
|
37
32
|
|
|
38
|
-
###
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
```
|
|
33
|
+
### 2. Track Planning (`/c-new`)
|
|
34
|
+
When you're ready for a new task, tell Conductor what you want to build.
|
|
35
|
+
* **Specification (`spec.md`)**: Conductor asks 3-5 targeted questions to clarify the "What" and "Why".
|
|
36
|
+
* **Implementation Plan (`plan.md`)**: Once the spec is approved, Conductor generates a step-by-step checklist adhering to your project's workflow rules.
|
|
43
37
|
|
|
44
|
-
###
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
/c-status
|
|
48
|
-
/c-revert "last task"
|
|
49
|
-
```
|
|
38
|
+
### 3. Autonomous Implementation (`/c-implement`)
|
|
39
|
+
The agent works through the `plan.md` checklist, executing tasks, running tests, and making semantic commits automatically until the Track is complete.
|
|
50
40
|
|
|
51
41
|
---
|
|
52
42
|
|
|
53
43
|
## 📦 Installation
|
|
54
44
|
|
|
55
|
-
|
|
45
|
+
Add the plugin to your global OpenCode configuration file. OpenCode will automatically fetch and install it from NPM.
|
|
46
|
+
|
|
47
|
+
**File:** `~/.config/opencode/opencode.json`
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"plugin": [
|
|
52
|
+
"opencode-conductor-plugin"
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
*Note: Please restart OpenCode after the first run to enable the global slash commands.*
|
|
58
|
+
|
|
59
|
+
---
|
|
56
60
|
|
|
57
61
|
## ⚙️ Configuration
|
|
58
62
|
|
|
59
|
-
|
|
63
|
+
We highly recommend pinning the `@conductor` agent to a "flash" model for optimal performance during planning phases.
|
|
60
64
|
|
|
65
|
+
### Standard OpenCode Config
|
|
66
|
+
**File:** `~/.config/opencode/opencode.json`
|
|
61
67
|
```json
|
|
62
68
|
{
|
|
63
69
|
"agent": {
|
|
@@ -68,24 +74,49 @@ You can customize the model used by the `@conductor` agent in your global `openc
|
|
|
68
74
|
}
|
|
69
75
|
```
|
|
70
76
|
|
|
77
|
+
### OhMyOpenCode Config
|
|
78
|
+
**File:** `~/.config/opencode/oh-my-opencode.json`
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"agents": {
|
|
82
|
+
"conductor": {
|
|
83
|
+
"model": "google/gemini-3-flash"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
71
89
|
---
|
|
72
90
|
|
|
73
|
-
##
|
|
91
|
+
## 📋 Commands Reference
|
|
74
92
|
|
|
75
|
-
|
|
93
|
+
| Command | Description |
|
|
94
|
+
| :--- | :--- |
|
|
95
|
+
| `/c-setup` | Initialize the `conductor/` directory and project "Constitution". |
|
|
96
|
+
| `/c-new "desc"` | Start a new feature/bug Track with spec and plan generation. |
|
|
97
|
+
| `/c-implement` | Start implementing the next pending task in the current track. |
|
|
98
|
+
| `/c-status` | Get a high-level overview of project progress and active tracks. |
|
|
99
|
+
| `/c-revert` | Interactively select a task, phase, or track to undo via Git. |
|
|
76
100
|
|
|
77
101
|
---
|
|
78
102
|
|
|
79
|
-
##
|
|
103
|
+
## 🤝 Synergy with OhMyOpenCode
|
|
104
|
+
|
|
105
|
+
If you use the **OhMyOpenCode** suite, `@conductor` acts as your Technical Lead. While **Sisyphus** manages the general conversation and orchestration, he can delegate complex architectural planning and protocol enforcement to the `@conductor` agent.
|
|
106
|
+
|
|
107
|
+
Conductor includes built-in "Loop Protection" to ensure it never conflicts with OhMyOpenCode's continuation enforcers during interactive Q&A sessions.
|
|
108
|
+
|
|
109
|
+
---
|
|
80
110
|
|
|
81
|
-
|
|
111
|
+
## 📈 Automated Versioning
|
|
82
112
|
|
|
83
|
-
|
|
84
|
-
- `feat:`
|
|
85
|
-
- `
|
|
113
|
+
This project follows **Conventional Commits**. Releases are automated via Semantic Release:
|
|
114
|
+
- `feat:` -> Minor version bump
|
|
115
|
+
- `fix:` -> Patch version bump
|
|
116
|
+
- `BREAKING CHANGE:` -> Major version bump
|
|
86
117
|
|
|
87
118
|
---
|
|
88
119
|
|
|
89
|
-
## 📜
|
|
120
|
+
## 📜 License
|
|
90
121
|
|
|
91
|
-
|
|
122
|
+
Distributed under the [Apache License 2.0](LICENSE).
|
|
@@ -12,6 +12,8 @@ export const implementCommand = (ctx) => tool({
|
|
|
12
12
|
if (!existsSync(join(conductorDir, "product.md"))) {
|
|
13
13
|
return "Conductor is not set up. Please run `conductor_setup`.";
|
|
14
14
|
}
|
|
15
|
-
return await loadPrompt("implement.toml"
|
|
15
|
+
return await loadPrompt("implement.toml", {
|
|
16
|
+
isOMOActive: ctx.isOMOActive ? "true" : "false"
|
|
17
|
+
});
|
|
16
18
|
},
|
|
17
19
|
});
|
|
@@ -9,11 +9,13 @@ export const newTrackCommand = (ctx) => tool({
|
|
|
9
9
|
},
|
|
10
10
|
async execute(args) {
|
|
11
11
|
const conductorDir = join(ctx.directory, "conductor");
|
|
12
|
-
if (!existsSync(join(conductorDir, "product.md"))
|
|
13
|
-
!existsSync(join(conductorDir, "workflow.md"))) {
|
|
12
|
+
if (!existsSync(join(conductorDir, "product.md"))) {
|
|
14
13
|
return "Conductor is not set up. Please run `conductor_setup`.";
|
|
15
14
|
}
|
|
16
15
|
// Map the description to {{args}} in the legacy TOML
|
|
17
|
-
return await loadPrompt("newTrack.toml", {
|
|
16
|
+
return await loadPrompt("newTrack.toml", {
|
|
17
|
+
args: args.description || "",
|
|
18
|
+
isOMOActive: ctx.isOMOActive ? "true" : "false"
|
|
19
|
+
});
|
|
18
20
|
},
|
|
19
21
|
});
|
package/dist/commands/setup.js
CHANGED
|
@@ -14,6 +14,9 @@ export const setupCommand = (ctx) => tool({
|
|
|
14
14
|
const stateManager = new StateManager(ctx.directory);
|
|
15
15
|
// Resolve the absolute path to the templates directory in the distribution
|
|
16
16
|
const templatesDir = join(__dirname, "../templates");
|
|
17
|
-
return await loadPrompt("setup.toml", {
|
|
17
|
+
return await loadPrompt("setup.toml", {
|
|
18
|
+
templatesDir,
|
|
19
|
+
isOMOActive: ctx.isOMOActive ? "true" : "false"
|
|
20
|
+
});
|
|
18
21
|
},
|
|
19
22
|
});
|
package/dist/index.js
CHANGED
|
@@ -3,15 +3,22 @@ import { newTrackCommand } from "./commands/newTrack.js";
|
|
|
3
3
|
import { implementCommand } from "./commands/implement.js";
|
|
4
4
|
import { statusCommand } from "./commands/status.js";
|
|
5
5
|
import { revertCommand } from "./commands/revert.js";
|
|
6
|
+
import { join } from "path";
|
|
7
|
+
import { homedir } from "os";
|
|
8
|
+
import { existsSync } from "fs";
|
|
6
9
|
const ConductorPlugin = async (ctx) => {
|
|
7
|
-
|
|
10
|
+
// Detect oh-my-opencode for synergy features
|
|
11
|
+
const omoPath = join(homedir(), ".config", "opencode", "node_modules", "oh-my-opencode");
|
|
12
|
+
const isOMOActive = existsSync(omoPath);
|
|
13
|
+
console.log(`[Conductor] Plugin tools loaded. (OMO Synergy: ${isOMOActive ? "Enabled" : "Disabled"})`);
|
|
14
|
+
const extendedCtx = { ...ctx, isOMOActive };
|
|
8
15
|
return {
|
|
9
16
|
tool: {
|
|
10
|
-
conductor_setup: setupCommand(
|
|
11
|
-
conductor_new_track: newTrackCommand(
|
|
12
|
-
conductor_implement: implementCommand(
|
|
13
|
-
conductor_status: statusCommand(
|
|
14
|
-
conductor_revert: revertCommand(
|
|
17
|
+
conductor_setup: setupCommand(extendedCtx),
|
|
18
|
+
conductor_new_track: newTrackCommand(extendedCtx),
|
|
19
|
+
conductor_implement: implementCommand(extendedCtx),
|
|
20
|
+
conductor_status: statusCommand(extendedCtx),
|
|
21
|
+
conductor_revert: revertCommand(extendedCtx),
|
|
15
22
|
},
|
|
16
23
|
};
|
|
17
24
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Spec-Driven Development Architect. Manages the project lifecycle using the Conductor protocol.
|
|
3
|
-
mode:
|
|
3
|
+
mode: agent
|
|
4
4
|
tools:
|
|
5
5
|
conductor_setup: true
|
|
6
6
|
conductor_new_track: true
|
|
@@ -30,4 +30,6 @@ Your mission is to ensure that software development follows a rigorous, context-
|
|
|
30
30
|
- **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.
|
|
31
31
|
|
|
32
32
|
## Loop Protection Directive (CRITICAL)
|
|
33
|
-
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."
|
|
33
|
+
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."
|
|
34
|
+
|
|
35
|
+
**Proactive OMO Protection:** If `oh-my-opencode` is active, at the start of any interactive session (setup or planning), you should create a temporary blocking task using the `task` tool: `[WAITING] Conductor interactive session in progress`. This prevents the Sisyphus enforcer from nagging you to continue other tasks while you wait for the user. Delete it once the session concludes.
|
|
@@ -67,10 +67,14 @@ CRITICAL: You must validate the success of every tool call. If any tool call fai
|
|
|
67
67
|
- `conductor/workflow.md`
|
|
68
68
|
c. **Error Handling:** If you fail to read any of these files, you MUST stop and inform the user of the error.
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
5. **Execute Tasks and Update Track Plan:**
|
|
71
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. **
|
|
73
|
-
|
|
72
|
+
b. **OMO Delegation (Synergy Mode):** If `isOMOActive` is "true", you SHOULD consider yourself the Architect. Instead of implementing every code change yourself, you can call `@sisyphus` to handle the granular TDD loops for each task.
|
|
73
|
+
- *Action:* For each task, announce: "Delegating implementation of task [Name] to Sisyphus."
|
|
74
|
+
- *Action:* Call `@sisyphus` with the task description and reference the `spec.md` and `workflow.md`.
|
|
75
|
+
- *Action:* Once Sisyphus completes the task, you verify it against the plan and move to the next.
|
|
76
|
+
c. **Manual Implementation (Standard Mode):** If `isOMOActive` is "false" or if you choose to implement directly, you MUST now loop through each task in the track's `plan.md` one by one.
|
|
77
|
+
d. **For Each Task, You MUST:**
|
|
74
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.
|
|
75
79
|
|
|
76
80
|
5. **Finalize Track:**
|
package/dist/utils/bootstrap.js
CHANGED
|
@@ -17,23 +17,19 @@ export async function bootstrap(ctx) {
|
|
|
17
17
|
mkdirSync(targetAgentDir, { recursive: true });
|
|
18
18
|
if (!existsSync(targetCommandDir))
|
|
19
19
|
mkdirSync(targetCommandDir, { recursive: true });
|
|
20
|
-
// 2. Install Agent
|
|
20
|
+
// 2. Install/Update Agent
|
|
21
21
|
const targetAgentFile = join(targetAgentDir, "conductor.md");
|
|
22
|
-
if (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
installedAnything = true;
|
|
26
|
-
}
|
|
22
|
+
if (existsSync(sourceAgentFile)) {
|
|
23
|
+
copyFileSync(sourceAgentFile, targetAgentFile);
|
|
24
|
+
installedAnything = true;
|
|
27
25
|
}
|
|
28
|
-
// 3. Install Commands
|
|
26
|
+
// 3. Install/Update Commands
|
|
29
27
|
if (existsSync(sourceCommandsDir)) {
|
|
30
28
|
const commands = readdirSync(sourceCommandsDir);
|
|
31
29
|
for (const cmdFile of commands) {
|
|
32
30
|
const targetCmdFile = join(targetCommandDir, cmdFile);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
installedAnything = true;
|
|
36
|
-
}
|
|
31
|
+
copyFileSync(join(sourceCommandsDir, cmdFile), targetCmdFile);
|
|
32
|
+
installedAnything = true;
|
|
37
33
|
}
|
|
38
34
|
}
|
|
39
35
|
if (installedAnything) {
|