DiaCode
A plan you and your coding agents share, in VS Code. (Cursor and Antigravity are forks of VS Code and should accept the extension; they have not been tried.)
A plan is a file in your repository, .diacode/plans/<name>.plan.json. You and your agents both edit it:
you drag a step or draw an arrow in the diagram, an agent adds one through MCP, and both land in the same file
under the same rules. A step's status comes from what the agents actually do (a step goes in progress when an
agent's tools edit its files), not only from what they say, and each step shows how it is known. A repository also
has one architecture (its services, components and stores, and what uses what), drawn in the same editor: the
Plan | Architecture switch, and a plan shows on it as what it adds, changes and removes. A running plan can be
paused or stopped, and its arrows can be checkpoints where you approve, answer or give input.
Get started
- Open a folder and trust it (the extension starts a local process and writes agent configuration into the
folder, so it waits for trust).
- Run DiaCode: Connect an agent to this repository… and pick your agent: Claude Code, OpenCode, Cursor
or Antigravity. It writes the agent's MCP entry, hooks and rules, and leaves your own settings alone.
- Start a new session of that agent in the folder (approve the
diacode MCP server if it asks) and give it the
task in your own words: "Add a --format flag to the CLI."
- Run DiaCode: Open the plan editor. The agent draws the architecture first; reshape it and press Approve architecture.
It then draws the plan: reshape it and press Approve plan. It checks the architecture against the plan and proposes
changes for you to accept; then press Start in the bar above the board (OpenCode and Claude Code are woken; for the others,
tell it yourself). What you change on either side while it runs reaches the agent, which proposes the matching change on the other.
What the extension does
- Starts the plan server for the open folder, on a free port (several folders can be open at once), and
stops it with the editor. Nothing to leave running in a terminal.
- Shows the editor beside your code, and opens any
*.plan.json as a diagram (Open With… → DiaCode
diagram). The file is still the plan: a change from the diagram, an agent or your own text edit all go
through the plan server and land in the same file.
- The DiaCode icon in the activity bar shows the plan in brief, in the sidebar: where it stands, who has what, what waits on you with
the button that answers it (answer a question, pass a checkpoint, accept a proposal or the architecture), Pause and Stop, and a way
to the full editor for the rest. A badge on the icon counts what waits on you.
- Status bar: how far the work has got, and who is working:
7/9 · build working.
- Commands: Show the compact view, Open the plan editor, Open a plan…, Connect an agent to this repository…, Check this
repository's setup (runs
diacode doctor and shows what it finds), Stop the plan server.
Settings
|
|
diacode.port |
The port the plan server starts from (default 7300). If another repository's server has it, the next free one is used |
diacode.reconcile |
manual (default): the re-plan buttons ask the agent you connected. auto: a separate OpenCode session also asks by itself about steps that need review, and about failures; each is a model call, and OpenCode must be installed and signed in |
diacode.serverPath |
A different diacode.js to run instead of the server that ships inside the extension |
Good to know
- Local only. The server listens on 127.0.0.1; there is no telemetry; a plan is plain files you commit.
- Claude Code and OpenCode have been run with real models on real plans. Cursor and Antigravity are built
to their documented formats and have not yet been run with their own agents. The extension itself was tested in real
VS Code, Cursor and Antigravity editors in 0.1.0; the compact view in the sidebar has been run in VS Code only, and
is built to the documented contribution points in the other two. If something is off, Check this repository's
setup is the first thing to run and the most useful output to report.
- Upgrading from 0.1.0: run Connect an agent to this repository… again (it adds the hooks Stop needs), and
restart the agent's session. A plan from 0.1.0 is read as it was and written in the new format when it next changes.
- The extension does not load in Cursor's Agents Window. The editor is also served by the plan server at
http://127.0.0.1:<port>/, so any browser tab works.
- Needs a trusted, real folder on disk (not a virtual workspace). Remote workspaces (SSH, containers, WSL) are
untested.
- Third-party licences for the editor are in
THIRD-PARTY-NOTICES.md.
Claude Code, Cursor, Antigravity and OpenCode are their owners' products; DiaCode is independent and not
affiliated with or endorsed by them.
| |