Skip to content
Douwe de Vries edited this page Jul 2, 2026 · 3 revisions

Flow plugin for OpenCode

opencode-plugin-flow adds a durable planning and execution loop to OpenCode. The package is a TypeScript npm plugin that installs Flow commands, hidden worker agents, managed skills, and seven runtime tools while keeping workflow state in .flow/session.json.

What this project does

Flow turns a broad coding goal into an approved feature plan, runs one feature at a time, records validation and review evidence, and archives the session when it is done. The runtime in src/runtime/api.ts, src/runtime/transitions.ts, and src/runtime/workspace.ts enforces the hard rules. The skills under skills/ contain the judgment for planning, execution, validation, review, cleanup, UI checks, and commit preparation.

Quick links

TopicStart here
ArchitectureArchitecture
Local setupGetting started
Main user workflowFlow loop
Runtime toolsFlow tools
Session stateSession, plan, and feature
Release processDeployment

Video overview

Download the generated English video overview: overview.mp4.

English captions are available as captions.en.vtt.

Main source areas

PathPurpose
src/adapters/opencode/plugin.tsOpenCode plugin entrypoint, command preflight, tools, config hook, and optional compaction hook.
src/runtime/api.tsTool-facing runtime API and Zod input schemas.
src/runtime/transitions.tsPure state transitions for planning, running, completion, reset, and close.
src/runtime/workspace.ts.flow/ persistence, locks, atomic writes, archive, quarantine, and generated instructions.
src/config-shared.tsFlow command and hidden worker config injected into OpenCode.
src/distribution/sync.tsManaged skill sync, doctor, and uninstall behavior.
skills/Bundled skill instructions and references copied into the OpenCode skills root.

Reader map

New users should read Getting started, then Flow loop. Runtime maintainers should read Architecture, Runtime state machine, and Workspace persistence. Release maintainers should read Deployment and Tooling.


Generated by Factory

Clone this wiki locally