@osovv/vv-opencode
An opinionated agentic development layer for OpenCode — spec-first when it matters, review-driven execution, portable model roles, safer tools, and long-run safety. Under the hood it ships as a set of OpenCode plugins, managed agents, skills, and the vvoc CLI.
OpenCode owns the mechanics: streaming, model invocation, sandboxing, permissions. The development process — when to clarify, when to plan, when to review, how to survive long runs — it leaves up to you.
vv-opencode adds that process layer. It is a hand-picked workflow crystallized from a year and a half of daily agentic development: you run vvoc install, learn three skills (vv-spec, vv-plan, vv-execute), and get a disciplined spec-to-code pipeline with review gates, portable model roles, and long-run safety — without needing to know how any of it works inside.
The spec pipeline is the most visible part, but it is only one layer. Everything underneath runs on every session whether or not you ever write a spec: each model edits files through the tool it knows best, routine permissions are approved without interrupting your run, secrets never reach the model, and multi-agent work is held together by an explicit state machine instead of prompt luck. If you already have your own spec tooling, keep it — the runtime layers below apply anyway.
Why vv-opencode?
OpenCode is a strong, flexible base, but it intentionally leaves the development process up to you. Left to itself, agentic work tends to drift: requirements get skipped, one agent silently implements and "reviews" itself, multi-agent loops churn through "one more final review", long runs stall on permission prompts, and model choices are hardcoded everywhere.
vv-opencode addresses each of these:
- Formalized trajectories — small changes stay direct, unclear bugs start with investigation, large changes go through spec and plan, risky implementation uses review loops.
- Spec-first by default — broad requests become explicit specs, plans, and review gates before implementation, and every artifact is saved as grep-able XML.
- Review-driven execution — implementation, spec review, and code review are separate steps with bounded retries, not one agent silently doing everything.
- A state machine for multi-agent work — explicit work items, required reviewers, round limits, and hard stops instead of free-form subagent loops.
- Portable model choices — agents reference roles like
vv-role:smart and vv-role:fast; you map roles to concrete models per machine or project and switch stacks with one preset command.
- Per-model editing — each model edits through the tool it knows best: DeepSeek gets its
str_replace_editor contract, GLM/Qwen/Kimi use the host built-in edit, GPT keeps the host apply_patch path, and unmatched models get the plugin's hashline_edit. Routing is resolved dynamically per session and exposes exactly one edit tool to each model.
- Provider-neutral web tools — agents get one canonical
web_search and web_fetch contract backed by Exa, Brave, Z.AI, DeepSeek, native retrieval, or Spider, instead of provider-specific search and reader schemas leaking into your prompts.
- Long-run safety — Guardian auto-approves routine low-risk permissions (risky ones stay in OpenCode's manual approval flow), and secrets are redacted before they reach the model.
- Reproducible setup —
vvoc install / vvoc sync recreate the same workflow on any machine or project.
You just talk to OpenCode normally
You don't need to learn a command surface first. Ask for what you want — vv-controller picks the lightest appropriate trajectory, and explicit skills take over only when the work needs them:
> Rename this field and update its tests.
→ handled directly
> Why does auth occasionally return 401 after a token refresh?
→ root-cause investigation first → targeted fix → verification
> Add organizations with role-based access.
→ vv-spec → approval → vv-plan → approval → vv-execute
├─ implement
├─ spec review
└─ code review
Every managed skill can also be invoked explicitly when you want to drive the process yourself.
Quick start
bun add -g @opencode/cli@2.2.5 # native OpenCode host; >=2.0.18 <3.0.0 is supported
bun add -g @osovv/vv-opencode
vvoc install
vvoc install does four things:
- pins
@osovv/vv-opencode once in the native OpenCode plugins array — the host resolves that package's ./server export for server plugins and its ./tui export for the terminal UI;
- scaffolds the managed agents and skills and registers them through the native
agents and skills config;
- writes the canonical
vvoc.json config;
- sets
vv-controller as your default OpenCode agent (default_agent), with the spec, planning, review, reflection, and handoff skills auto-triggering by request type.
vv-opencode supports the OpenCode 2.x line from >=2.0.18 <3.0.0. Inside that window a host is either verified (listed in src/hosts.json, currently 2.2.5, with live-host evidence) or tolerated (any other stable 2.x: vvoc works, warns once, and marks the host in vvoc status). Hosts outside the window — 1.x, 3.x, and prereleases — are refused before any write by vvoc install/init/sync/launch. vvoc status and vvoc doctor report the installed version, the window (OpenCode supported range: >=2.0.18 <3.0.0), and the verified list without changing any files. See docs/host-updates.md for the upgrade procedure. Install the host from npm as @opencode/cli (its opencode binary) or from the matching official binary distribution; do not install the legacy opencode-ai V1 host.
Want to try it without touching your global setup? Scope everything to one project:
vvoc install --scope project
vvoc launch --scope project
Project scope writes only to ./.opencode/ and ./.vvoc/. A plain opencode launch may still apply OpenCode's native config discovery and merge behavior; vvoc launch --scope project is the hard sandbox path — it starts OpenCode with OPENCODE_CONFIG and VVOC_CONFIG pinned to the selected local files (and pins the native OPENCODE_CONFIG_DIR discovery root when the selected config sits outside the default one, so generated sibling agents and skills are still found), so you can smoke-test vv-opencode in one repository without mutating your primary global setup.
Already installed? Run vvoc sync anytime to refresh plugins, prompts, skills, and presets.
Upgrading from vvoc 1.x with a V1 OpenCode host
vvoc 2.x is native-only and requires an OpenCode 2.x host inside >=2.0.18 <3.0.0. On a machine still running a V1 OpenCode host, vvoc upgrade installs vvoc 2.x, detects the unsupported host, prints a best-effort method-aware install command, and exits non-zero; it never installs or replaces OpenCode itself. After you install the supported host, the next vvoc sync materializes the legacy opencode.json(c) into the native V2 shape, validates the result, and writes a timestamped *.vvoc-backup-<timestamp> sibling before replacing the file. V1 fields that need a manual decision (provider filters, accepted-but-unsupported fields, lsp, or ambiguous provider/model shapes) abort the migration without writing and print a checklist. A legacy tui.json(c) is reported, never deleted; OpenCode migrates its own terminal client settings to cli.json.
How it works: spec → plan → execute
vvoc keeps larger agentic work from jumping straight into edits. A request first becomes explicit artifacts; only the approved plan gets executed, with bounded implementation and review loops. This trajectory is opt-in per request: small changes never go through it, and if you already run your own spec workflow, you can keep it — nothing else in vv-opencode depends on these skills.
Request / idea
↓
vv-spec
asks clarifying questions
writes .vvoc/specs/YYYY-MM-DD-<slug>/spec.xml
waits for spec approval
↓
vv-plan
reads the approved spec
writes .vvoc/specs/YYYY-MM-DD-<slug>/plan.xml
defines tasks, contracts, dependencies, and acceptance criteria
waits for plan approval
↓
vv-execute
applies the approved plan task by task
runs implementation + review internally
verifies before moving on
↓
Verified result
Inside vv-execute, each plan task goes through a tracked loop:
Each plan task
↓
vv-implementer
implements the focused task and runs targeted verification
↓
vv-spec-reviewer
checks whether the result matches the approved spec
↓
vv-code-reviewer
checks bugs, regressions, maintainability, and missing tests
↓
verification
pass → next task
fail → bounded retry loop
needs context / blocked → stop and ask the user
All artifacts for one feature live together:
.vvoc/specs/YYYY-MM-DD-<slug>/
spec.xml # what should be built and why
design-context.xml # optional design memory
plan.xml # how to implement and verify it
Package ids are date-prefixed (YYYY-MM-DD-<slug>, for example 2026-06-24-cache-store) so active packages sort by creation date; the prefix is date-only, never a full timestamp. Spec and plan lifecycle runs through a top-level status: draft while being written, approved after explicit user approval, applied after successful execution. vv-execute archives applied packages by moving the whole directory to .vvoc/specs/archive/YYYY-MM-DD-<slug>-<timestamp>/.
Specs and plans are XML, so requirements, tasks, acceptance criteria, and dependencies stay grep-able. Identity lives in unique element names — tasks and waves as <TASK-T-001>…</TASK-T-001> and <WAVE-1>…</WAVE-1>, spec and plan components as <COMPONENT-CACHE-STORE>…</COMPONENT-CACHE-STORE> — so grep/sed extraction stays exact without a separate query language. Field names use snake_case; component references are bare slugs; plan architecture components always reuse the exact identities declared in spec.xml, so a plan component without a spec component is a lint error, not a convention breach:
grep '<TASK-T-' .vvoc/specs/*/plan.xml # task ids
grep '<criterion>' .vvoc/specs/*/plan.xml # acceptance criteria
grep '<task_id>' .vvoc/specs/*/plan.xml # dependency graph
grep '<COMPONENT-' .vvoc/specs/*/*.xml # component map across spec and plan
OpenCode routes managed skills through their descriptions and explicit user invocation: vv-spec, vv-plan, and vv-review cover specification, planning, and review; vv-execute, vv-reflect, and vv-handoff cover plan execution, environment reflection and durable repository memory, and end-of-session handoff notes. Native spec-package paths and lifecycle instructions live in the SDD skills.
What's inside
The server plugins and the native TUI
The server plugins run inside the OpenCode server process; ContextTuiPlugin runs in the terminal UI through the same pinned package's ./tui export.