OpenCode Conductor is a reusable plugin for the OpenCode ecosystem that implements the powerful "Context-Driven Development" (CDD) workflow. Originally popularized by the Gemini CLI Conductor, this approach enables AI agents to build complex features with high precision by grounding them in your project's specific product mission, technical stack, and development standards.
AI agents often fail on large tasks because they:
Conductor solves these problems through three core mechanisms:
product.md, tech-stack.md, workflow.md)Add the plugin to your global opencode.jsonc configuration (usually found in ~/.config/opencode/opencode.jsonc):
{
"plugin": [
"opencode-conductor@latest"
]
}
OpenCode will automatically download and load the plugin the next time you start a session.
If you want to modify the plugin or use it locally without publishing:
# Clone the repository
git clone https://github.com/NocturnLabs/opencode-conductor.git
cd opencode-conductor
# Install dependencies
npm install
# Build and install locally using mise
mise run install
After installation, start OpenCode in any project directory and run:
/conductor-setup
If the plugin is correctly installed, you'll see the conductor directory being created with the core context files.
In any project directory, run the setup command:
/conductor-setup
This creates a conductor/ directory at your project root with template files:
conductor/
├── product.md # High-level product mission
├── tech-stack.md # Frameworks, languages, and tools
├── workflow.md # Coding standards and processes
└── tracks.md # Index of all tracks (managed by plugin)
Open the generated files and fill them out with your project's specifics. The better the context, the better the AI's implementation.
Describe what your project is and who it serves:
# Product Context
## Mission
OpenCode Console is a web-based observability dashboard for AI coding agents.
## Target Users
- Developers using autonomous coding tools
- Teams who need visibility into AI agent decisions
## Core Value Proposition
Transform terminal-native AI agent experiences into rich visual dashboards
with real-time monitoring, debugging, and control capabilities.
List the technologies, frameworks, and specific versions:
# Tech Stack
## Frontend
- **Framework**: Next.js 15 (App Router)
- **UI Library**: React 19
- **Styling**: Tailwind CSS + Shadcn/UI
- **Icons**: Lucide React
- **State**: TanStack Query + Zustand
## Backend
- **Runtime**: Bun 1.1+
- **Database**: SQLite with Drizzle ORM
- **Real-time**: WebSockets via Socket.io
## Development
- **Language**: TypeScript 5.5+
- **Linting**: ESLint with Next.js config
- **Package Manager**: Bun
Document your coding standards and processes:
# Workflow
## Code Standards
- Use functional React components with hooks
- All components should be in `src/components/`
- Use TypeScript strict mode
- Follow ESLint rules without exceptions
## Testing
- Unit tests in `__tests__/` directories
- Use Vitest for testing
- Minimum 80% coverage for new features
## Git Conventions
- Conventional commits (feat:, fix:, docs:, etc.)
- Branch naming: feature/*, bugfix/*, hotfix/*
- All PRs require at least one review
When you're ready to build a feature, create a track with a unique ID and descriptive title:
/conductor-new id:"auth-system" title:"JWT Authentication System"
This creates a new track directory with template files:
conductor/tracks/auth-system/
├── spec.md # Technical specification
├── plan.md # Implementation checklist
└── metadata.json # Status and timestamps
Open conductor/tracks/auth-system/spec.md and write a detailed technical specification:
# Spec: JWT Authentication System
## Goals
- Implement secure JWT-based authentication
- Support login, logout, and session refresh
- Integrate with existing user database
## Requirements
### Functional Requirements
1. Login endpoint accepts email/password, returns JWT token
2. Protected routes validate JWT before processing
3. Refresh token mechanism extends sessions without re-login
4. Logout invalidates tokens on server-side
### Non-Functional Requirements
- Token expiry: 15 minutes for access, 7 days for refresh
- Rate limiting: 5 failed login attempts per minute
- All tokens stored in HttpOnly cookies
### API Endpoints
- POST /api/auth/login
- POST /api/auth/logout
- POST /api/auth/refresh
- GET /api/auth/me
### Security Considerations
- Passwords hashed with bcrypt (cost factor 12)
- CSRF protection on all auth endpoints
- Secure cookie attributes in production
Open conductor/tracks/auth-system/plan.md and break down the work into discrete tasks:
# Plan: JWT Authentication System
## Tasks
### Database & Models
- [ ] Create users table with Drizzle schema
- [ ] Create refresh_tokens table for server-side token storage
- [ ] Run database migration
### Core Authentication
- [ ] Implement password hashing utility with bcrypt
- [ ] Create JWT signing and verification functions
- [ ] Build login endpoint with validation
### Session Management
- [ ] Implement refresh token generation and storage
- [ ] Create refresh endpoint
- [ ] Build logout endpoint with token invalidation
### Middleware & Protection
- [ ] Create authentication middleware
- [ ] Add protected route wrapper component
- [ ] Implement rate limiting for auth endpoints
### Testing
- [ ] Write unit tests for auth utilities
- [ ] Write integration tests for auth endpoints
- [ ] Test edge cases (expired tokens, invalid credentials)
Run the "do" command to let the agent start working:
/conductor-do id:"auth-system"
The agent will:
You can run /conductor-do repeatedly to continue implementing tasks until the plan is complete.
View the status of all tracks and the overall project health:
/conductor-status
This displays the tracks index and helps you understand what's been completed and what remains.
Scaffolds the conductor/ directory and creates core context files.
Usage:
/conductor-setup
What it creates:
conductor/product.md - Product mission templateconductor/tech-stack.md - Technology stack templateconductor/workflow.md - Development workflow templateconductor/tracks.md - Tracks index (managed by plugin)conductor/tracks/ - Directory for feature tracksNotes:
Creates a new development track with specification and plan templates.
Usage:
/conductor-new id:"<track-id>" title:"<Track Title>"
Arguments:
| Argument | Type | Required | Description |
|---|---|---|---|
id | String | Yes | Unique identifier for the track (e.g., feat-login, bug-123) |
title | String | Yes | Human-readable title for the track |
What it creates:
conductor/tracks/<id>/spec.md - Specification templateconductor/tracks/<id>/plan.md - Implementation plan templateconductor/tracks/<id>/metadata.json - Status and timestamp metadataExample:
/conductor-new id:"real-time-events" title:"Real-Time Event Streaming"
Notes:
tracks.md indexReads context and implements pending tasks for a specific track.
Usage:
/conductor-do id:"<track-id>"
Arguments:
| Argument | Type | Required | Description |
|---|---|---|---|
id | String | Yes | The track ID to work on |
Execution Flow:
conductor_get_context to read all core context filesconductor_read_plan to get the current plan- [ ])- [x]) using conductor_update_taskExample:
/conductor-do id:"auth-system"
Notes:
Provides a high-level summary of all tracks and context health.
Usage:
/conductor-status
Output includes:
After setup and creating tracks, your project will have this structure:
your-project/
├── conductor/
│ ├── product.md # High-level product mission
│ ├── tech-stack.md # Frameworks, languages, and tools
│ ├── workflow.md # Coding standards and processes
│ ├── tracks.md # Index of all tracks (auto-managed)
│ └── tracks/ # Feature-specific directories
│ ├── auth-system/
│ │ ├── spec.md # Detailed technical specification
│ │ ├── plan.md # Checkbox-list of implementation tasks
│ │ └── metadata.json # Status, title, and timestamps
│ └── real-time-events/
│ ├── spec.md
│ ├── plan.md
│ └── metadata.json
└── ... (your project files)
Each track includes a metadata file tracking its lifecycle:
{
"id": "auth-system",
"title": "JWT Authentication System",
"status": "pending",
"created_at": "2025-12-19T10:30:00.000Z"
}
Status values:
pending - Track created but no tasks startedin_progress - At least one task completedcompleted - All tasks marked as doneblocked - Waiting on external dependencyThe tracks index is automatically updated when you create new tracks:
# Tracks Index
List of all development tracks.
- [ ] auth-system: JWT Authentication System
- [ ] real-time-events: Real-Time Event Streaming
- [x] database-setup: Initial Database Configuration
The Conductor plugin registers the following MCP tools:
| Tool | Description |
|---|---|
conductor_init | Initialize conductor directory and context files |
conductor_create_track | Create a new development track |
conductor_get_context | Read all context files and return combined content |
conductor_read_plan | Get the plan for a specific track |
conductor_update_task | Mark a task as completed in a track's plan |
The plugin is implemented as a TypeScript module using the @opencode-ai/plugin SDK:
import { tool } from "@opencode-ai/plugin/tool";
import type { Plugin } from "@opencode-ai/plugin";
export const ConductorPlugin: Plugin = async ({ project, client, $, directory, worktree }) => {
// Tool definitions...
return {
tool: {
conductor_init,
conductor_create_track,
conductor_get_context,
conductor_read_plan,
conductor_update_task,
},
};
};
/conductor-do often rather than trying to complete everything at onceThe track ID must be unique. Either:
Ensure your context files are in the correct location:
conductor/product.md
conductor/tech-stack.md
conductor/workflow.md
The task matching is exact. Ensure the task text in the command matches the plan exactly, including whitespace.
Contributions are welcome! Please feel free to submit a Pull Request.
git clone https://github.com/NocturnLabs/opencode-conductor.git
cd opencode-conductor
npm install
To publish a new version (org members only):
package.jsonnpm version patch # or minor/major
git push --tags
This project is licensed under the MIT License - see the LICENSE file for details.
Opencode Personal Knowledge
Opencode Personal Knowledge is a dual-interface knowledge management system designed for AI agents and power users. It combines a robust CLI for manual management with a Model Context Protocol (MCP) server that exposes your knowledge base to AI assistants (like Claude or Opencode Agents), enabling them to semantically search and retrieve information from your personal library.
OpenCode Console
A high-performance, web-based observability and management interface for the OpenCode AI coding agent.