Project Overview
CodeConductor evolved from an earlier project called AgentSync. The VS Code extension was rebranded in v0.1.1 as Teambotics CodeBuddy for marketplace presence, while the underlying coordination protocol retained the CodeConductor name. Both names appear in docs and config keys — the canonical command prefix is codebuddy.* with legacy codeconductor.* aliases still active.
Section 1 — Implemented Features & How to Use Them
17 features fully shippedFull session lifecycle: start, heartbeat, pause, redirect, end, and cancel. Sessions are persisted to SQLite and surfaced in the VS Code tree view and dashboard in real time.
- Sessions include agent name, model tier, file-lock intent, and token budget
- Stale sessions auto-expire after a configurable inactivity window
- Multiple agents can hold concurrent sessions; the dashboard shows all active sessions
cc_start_session({ agentName: "dev-agent", modelTier: "tier3", intent: ["src/app.js"] })
cc_heartbeat({ sessionId: "...", progress: "Refactoring auth module" })
cc_end_session({ sessionId: "..." })
Command Palette → CodeBuddy: Start Session, or click the session node in the CodeBuddy sidebar tree.
Prevents concurrent agents from editing the same files. Supports two enforcement modes configurable per repo:
- warn — conflicting agent receives a warning but is not blocked
- block — second agent cannot acquire the lock until the first releases it
- Exclusive and shared lock modes (read-only vs. write intent)
- Lock state is visible in the sidebar under the "Locks" tree node
cc_lock_files({ sessionId, files: ["src/auth.js"], mode: "exclusive" })
cc_check_files({ files: ["src/auth.js"] }) // check without acquiring
cc_release_files({ sessionId }) // release all locks for session
{ "fileLocking": { "mode": "block" } }
Agents create structured handoff objects to pass work to other agents or human reviewers. Supports priority queuing, pipeline chains, and model-tier recommendations.
- Handoffs include title, description, priority, required capabilities, and context snapshot
- Pipeline chains allow sequential agent workflows to auto-advance
- Incoming PM tip: handoffs are the primary mechanism for agent-to-agent task delegation
cc_create_handoff({ title: "Review auth PR", priority: 2, requiredCapabilities: ["code-review"] })
cc_claim_handoff({ handoffId: "..." }) // agent picks it up
cc_get_next_task({ agentCapabilities: ["code-review"] }) // auto-match
Two dashboard surfaces: a compact sidebar panel and a full-screen editor panel. Both show live agent sessions, file locks, handoffs, and health status.
- Sidebar: compact view, always visible in the Activity Bar
- Full panel: detailed session cards, lock tables, handoff queue
- Human intervention controls: pause, redirect, end, claim handoff from the UI
Command Palette → CodeBuddy: Open Dashboard
Or click the 🎼 icon in the Activity Bar sidebar.
Toggle compact/full: CodeBuddy: Toggle Dashboard Mode
Standalone MCP server exposing 24 cc_* tools over stdio transport. Any MCP-compatible AI agent can connect without the VS Code extension being present.
- Groups: Sessions (7), Locks (3), Handoffs (5), Agents (3), Context & Budget (6)
- Compatible clients: Claude Code, GitHub Copilot (MCP preview), Cursor, any MCP SDK client
{ "mcpServers": { "codebuddy": { "command": "node", "args": ["out/codebuddy-server.js"] } } }
Full tool reference: docs/API.md | Integration guide: docs/MCP-INTEGRATION.md
Over 100 Markdown agent templates organized into 10 categories. Templates define agent personality, capabilities, and tool-use preferences.
- Categories: Engineering, Design, Marketing, Product, Project Management, Strategy, Support, Testing, Specialized, Spatial Computing
- Used by
cc_match_agentsandcc_get_agent_promptto build system prompts
cc_list_agents() // browse all templates
cc_match_agents({ requiredCapabilities: ["frontend", "react"] })
cc_get_agent_prompt({ agentId: "frontend-engineer" })
Templates live in templates/agents/. Add new .md files to extend the catalog — no code changes required.
Per-session token accounting with configurable budget limits and warning thresholds. Agents can query remaining budget before performing expensive operations.
- VS Code settings:
codebuddy.tokenBudget.maxTokensDefault(default 120 000) - Warning fires at
codebuddy.tokenBudget.sessionDurationWarningMinutes - Budget-aware model tier recommendations via
cc_get_model_recommendation
cc_record_token_usage({ sessionId, tokensUsed: 4200, operation: "refactor" })
cc_get_budget_status({ sessionId })
cc_get_model_recommendation({ sessionId })
Compresses the current workspace state into a handoff-friendly context object. AST context extraction (via Tree-sitter) scopes context to the relevant code symbols rather than whole files.
- Supports JS, JSX, TS, TSX out of the box
- Capsule saved to
.codebuddy/context-capsule.json
cc_context_capsule({ sessionId }) // full workspace snapshot
cc_get_context_scope({ sessionId, filePath: "src/auth.js", symbol: "loginUser" })
A project-local knowledge base that agents can read and write. Implemented as structured Markdown files under .codebuddy/wiki/. Inspired by the Karpathy LLM Wiki pattern.
- Survives session boundaries — knowledge persists across agent restarts
- Added in v0.2.0 alongside the external dashboard WebSocket server
Tracks build, test, and deploy health across the workspace. Health state is emitted at session end and surfaced in the dashboard.
- Agents record health outcomes; the dashboard shows a traffic-light view
- Run via
cc_end_session— health checks fire automatically
Per-repo settings in .codebuddy.json control locking behavior, tool gating, wiki, token budgets, and agent routing preferences. Supports a legacy .codeconductor.json path as well.
{ "fileLocking": { "mode": "warn" }, "tokenBudget": { "maxTokens": 80000 } }
Full schema reference: docs/CONFIGURATION.md
A lightweight WebSocket server (ws) that allows external browser or tooling clients to subscribe to real-time CodeConductor state events without running inside VS Code.
- Useful for CI dashboards, team overview screens, and non-VS Code agents
- Implementation:
src/extension/websocket-server.js
All 20 VS Code Commands
| Command ID | Label | Description |
|---|---|---|
codebuddy.startSession | Start Session | Start a new agent coordination session |
codebuddy.endSession | End Session | End the active session and release all locks |
codebuddy.lockFiles | Lock Files | Acquire advisory file locks for the current session |
codebuddy.releaseFiles | Release Files | Release all held file locks |
codebuddy.pauseAgent | Pause Agent | Publish a pause directive to the active agent |
codebuddy.redirectAgent | Redirect Agent | Publish a redirect directive with new instructions |
codebuddy.heartbeat | Send Heartbeat | Manually send a session keepalive |
codebuddy.createHandoff | Create Handoff | Create a new work handoff for another agent |
codebuddy.claimNextHandoff | Claim Handoff | Claim the next available open handoff |
codebuddy.toggleServer | Toggle Server | Start or stop the MCP server process |
codebuddy.openDashboard | Open Dashboard | Open the full-screen coordination dashboard |
codebuddy.toggleDashboardMode | Toggle Dashboard Mode | Switch between compact sidebar and full panel |
codebuddy.quickRefresh | Quick Refresh | Force refresh all dashboard and tree view surfaces |
codebuddy.tree.pauseSession | Pause (tree) | Pause session from the tree view context menu |
codebuddy.tree.endSession | End (tree) | End session from the tree view |
codebuddy.tree.releaseLock | Release Lock (tree) | Release a specific lock from the tree view |
codebuddy.tree.claimHandoff | Claim (tree) | Claim a handoff from the tree view |
codebuddy.tree.completeHandoff | Complete (tree) | Mark a claimed handoff complete from the tree view |
Legacy codeconductor.* aliases are registered for all commands for backward compatibility with pre-v0.1.1 setups. | ||
Section 2 — Work in Progress / Partially Formed
4 areas with known gapsHANDOFF_REPORT.md document several items that block a clean v0.1.0 public release. These are tracked under the v0.1.0 Release Readiness milestone in Linear.
What's broken: npm run lint fails with a no-case-declarations error in src/extension/dashboard-actions.js line 80. A const is declared inside a case block without braces. Two additional no-unused-vars warnings exist in dashboard-provider.js.
Impact: The Husky pre-commit hook would fail on any committer's machine. The extension works at runtime — this is a lint-level issue only.
Fix: Wrap the offending case block in {}. Two-minute change. Remove or prefix unused vars with _.
What's missing: Unit tests exist for dashboard model, actions, and HTML generation. However, the sidebar webview (dashboard-provider.js) and full panel (dashboard-panel.js, webview/dashboard.js) have no end-to-end rendering tests.
Impact: UI changes can silently break the webview with no test failure. This is the most significant quality gap before a Marketplace publish.
Approach candidates: @vscode/test-electron integration runner, or a lightweight webview screenshot harness.
What's wrong: Three files with local Windows absolute paths were committed: lint-results.json, lint-results.txt, lint.json. These are development artifacts that should be in .gitignore.
Impact: Noise for other developers. Will expose contributor machine paths in git history.
Fix: Add to .gitignore, remove from tracking with git rm --cached.
What's missing: The 24 MCP server tool handlers (src/server/tools/) and the resource layer (src/server/resources.js) lack a dedicated test suite. Core library behavior is well-covered, but the MCP transport + tool dispatch layer is tested only indirectly.
Impact: A regression in an MCP tool handler could ship without a failing test. Medium risk given the stable core underneath.
What's slow: Every write to the SQLite store calls db.export() + fs.writeFileSync() synchronously, blocking the Node.js event loop. Documented in docs/IMPLEMENTATION-PLAN.md.
Impact: Measurable latency with 10+ concurrent agents. Not a problem in single-agent or low-frequency use cases.
Proposed fix: Debounced async write queue with ~300ms batching. src/core/store.js is the only file to change.
The README.md links to docs/TROUBLESHOOTING.md and docs/ROADMAP.md. One or both may be absent or stub-only. This creates broken links for first-time users reading the README.
Fix: Either create the missing docs or update the README to remove/replace the links. Tracked as TEA-244.
Phase 4 (Real-time Dashboard + Human Oversight) is marked In Progress in Linear. The dashboard surfaces exist and render correctly, but the phase definition included release-grade smoke coverage and gap validation between current UI and original spec — those are still open (TEA-242 is the child issue).
The packaged codeconductor-0.1.0.vsix exists in the repo root and the CHANGELOG documents v0.1.0. However, the GitHub release has not been published and the extension has not been submitted to the VS Code Marketplace. Both are open Todo items in Linear.
Note: The repo is now at v0.2.0 on master, meaning the next publish will need to decide whether to backfill v0.1.0 or publish v0.2.0 directly.
Section 3 — Features Yet to Come
v0.x polish + v2.0 visionNear-term (v0.x — pre-Marketplace)
The open milestone in Linear tracks the final polish items before the first public release. All items have been triaged and Linear issues created.
- ● TEA-243 — Fix dashboard lint errors (High, Bug)
- ● TEA-242 — Add E2E dashboard smoke coverage (High, Testing)
- ● TEA-241 — Publish to VS Code Marketplace (High, Release)
- ● TEA-240 — Publish GitHub release + attach VSIX (High, Release)
- ● TEA-244 — Create missing docs (Medium)
- ● Remove lint artifact files from git tracking
Medium-term (v0.x after release)
Debounced async write queue for SQLite persistence, eliminating the synchronous writeFileSync on every state change. Estimated 2–4 hour implementation in src/core/store.js.
Dedicated src/server/__tests__/tools.test.js and resources.test.js covering all 24 MCP tools and the resource exposure layer. Framework exists — needs test authoring.
Event-driven routing engine that automatically dispatches work between agents. Listens for session_end and handoff_created events, evaluates routing rules from config, and advances pipeline chains. Tracked in Linear as Todo.
- Capability-based agent matching
- Priority + round-robin ranking
- Config-driven routing rules
Long-term (v2.0 Vision — Documented in docs/PLAN-v2.0-Frontend-Backend.md)
Separate the dashboard into a standalone React/Vite frontend application backed by an Express server. This would enable team-wide dashboards running outside of VS Code — on a shared monitor, CI display, or web portal.
WebSocket-driven collaborative dashboard where multiple team members and agents see the same live view. The WebSocket server foundation exists in v0.2.0; the full collaborative UI is v2.0 scope.
Dashboard charts showing token usage per agent, handoff completion rates, session duration distributions, and model tier efficiency metrics. Backend tracking already exists — UI is the gap.
Visual prediction of token burn rate based on session history. The per-session tracking backend is complete in src/core/token-budget.js; the forecasting chart layer is deferred to v2.0.
Replace sql.js (in-memory WASM SQLite) with a native SQLite binding (better-sqlite3 or equivalent) to unlock proper transaction isolation and WAL mode for high-concurrency scenarios.
Linear Issue Tracker — CodeConductor Project
16 issues total · 8 done · 2 in progress · 6 openDone
src/core/ — sessions, locks, handoffs, health, events, git, store, token budget, AST context, summaries, protocol enforcement.cc_* tools exposed over stdio. Full API documented in docs/API.md..codeconductor.json / .codebuddy.json preference system implemented and tested.docs/PROJECT-LINKS.md created. Notion hub and Linear project linked from README and CONTRIBUTING.In Progress
Todo / Open
no-case-declarations in dashboard-actions.js:80. Blocks clean npm run lint.codeconductor-0.1.0.vsix, align release notes with CHANGELOG. Must decide: publish v0.1.0 or skip to v0.2.0.docs/TROUBLESHOOTING.md and/or docs/ROADMAP.md. Verify existence; create or remove stale links.Architecture Overview
Layer 1 — VS Code Extension
- extension.js — Activation & lifecycle
- server-manager.js — Spawns/kills MCP server
- commands.js — 20 command registrations
- tree-view.js — Activity Bar sidebar tree
- status-bar.js — Connection status indicator
- dashboard-provider.js — Sidebar webview
- dashboard-panel.js — Full-screen editor panel
- dashboard-html.js — CSP-safe HTML generator
- dashboard-model.js — Aggregates MCP resources
- dashboard-actions.js — UI → MCP tool dispatch
- websocket-server.js — External WS broadcast
Layer 2 — MCP Server
- server/index.js — Bootstrap
- server/tools/ — 24 cc_* tool handlers
- server/resources.js — MCP resource exposure
- server/transport.js — Stdio transport
- @modelcontextprotocol/sdk — Protocol SDK
- Connects to: Claude Code, Copilot, Cursor
Layer 3 — Core Library
- store.js — SQLite via sql.js (WASM)
- sessions.js — Session lifecycle
- locks.js — Advisory file locking
- handoffs.js — Work item routing
- health.js — Build/test/deploy tracking
- events.js — In-process event bus
- agent-catalog.js — 100+ templates
- context-capsule.js — Workspace compression
- token-budget.js — Per-session accounting
- wiki.js — Persistent knowledge base
- ast-context.js — Tree-sitter AST scoping
- repo-preferences.js — Config loading
State Persistence
State is persisted to .codebuddy/state.db via sql.js (SQLite over WASM — no native binaries). An in-process event bus propagates state changes from the core library to the extension UI in real time. The wiki lives at .codebuddy/wiki/ as Markdown files.
Build & Distribution
out/extension.js & out/codebuddy-server.js@vscode/vsce → .vsixsrc/test/__mocks__/vscode.jsCompleteness Matrix
| Feature | Implemented | Tested | Documented | Notes |
|---|---|---|---|---|
| Session Management | ✅ 100% | ✅ | ✅ | Full lifecycle |
| File Locking | ✅ 100% | ✅ | ✅ | warn/block modes |
| Handoff Workflows | ✅ 100% | ✅ | ✅ | Chains, priorities, tiers |
| Health Checks | ✅ 100% | ✅ | ✅ | Build/test/deploy |
| Agent Catalog | ✅ 100% | ✅ | ✅ | 100+ templates, 10 categories |
| Context Capsule | ✅ 100% | ✅ | ✅ | Workspace compression |
| Token Budget | ✅ 100% | ✅ | ✅ | Backend complete; no forecasting UI |
| Wiki | ✅ 100% | ✅ | ✅ | v0.2.0 addition |
| AST Context | ✅ 100% | ✅ | ✅ | Tree-sitter; JS/TS/JSX/TSX |
| MCP Tools (24) | ✅ 100% | ⚠️ Partial | ✅ | Server tools lack dedicated test suite |
| VS Code Extension | ✅ 100% | ✅ | ✅ | All 20 commands registered |
| Dashboard — Sidebar | ✅ 100% | ✅ | ✅ | Unit-tested; renders live data |
| Dashboard — Full Panel | ✅ 100% | ⚠️ No E2E | ✅ | TEA-242 open |
| WebSocket Server | ✅ 100% | ⚠️ Minimal | ✅ | External dashboard foundation |
| Repo Preferences | ✅ 100% | ✅ | ✅ | .codebuddy.json + legacy path |
| Protocol Enforcement | ✅ 100% | ✅ | ✅ | LimitIT compliance |
| Git Integration | ✅ 100% | ✅ | ✅ | Status, diff, log utilities |
| Orchestration Engine | ❌ Not started | ❌ | ⚠️ Spec in TEA-188 | Phase 5 — Todo in Linear |
| Marketplace Publish | ❌ Not done | — | — | TEA-241 open |
| GitHub Release v0.1.0 | ❌ Not done | — | — | TEA-240 open; VSIX exists |
| Lint passes cleanly | ❌ Failing | — | — | TEA-243 — fix is trivial |
Immediate Actions for the Incoming PM
Fix no-case-declarations in src/extension/dashboard-actions.js:80 (add braces around case block). Remove lint-results.json, lint-results.txt, lint.json from git tracking. Linear: TEA-243.
The repo is at v0.2.0 on master but no GitHub release exists. The packaged VSIX says v0.1.0. Decide whether to tag and publish v0.1.0 from history or publish v0.2.0 as the first public release. Affects TEA-240 and TEA-241.
Assign TEA-242 to a dev. The @vscode/test-electron harness is the recommended approach. Without this, any dashboard regression ships silently.
Once lint is clean, create the GitHub release and publish to the VS Code Marketplace under the Teambotics publisher. Verify package.json marketplace metadata before submitting. TEA-240, TEA-241.
This is the next major feature milestone. Full spec exists in the Linear issue. Needs an engineer assigned. The core event bus and handoff infrastructure it depends on are complete.
The Notion hub was last verified against the repo on 2026-04-10. The canonical link map is in docs/PROJECT-LINKS.md. When the repo shape or project framing changes materially, update both the Notion Hub and the Linear current-state doc.