Skip to main content
GW
HomeWorkAI appsPapersAboutNotesStackLabPilotPlan↗ (opens in a new tab)INVST↗ (opens in a new tab)
Govind Waghmare

Finance systems and AI. Building in public from NYC.

Resume (PDF)Book 20 minEmail
HomeNotesWorkAboutStackPapersLabFor founders
XLinkedInGitHubllms.txt
© 2026 · New York City

Keyboard shortcuts

?
Open this list
g then h
Go to Home
g then w
Go to Work
g then n
Go to Notes
g then a
Go to About
c
Ask the AI guide
Esc
Close this list

Claude on a whiteboard: one canvas a person and an agent both edit

Nov 11, 2026 · By Govind Waghmare · 8 min read

27 diagram types1 freeform canvasCut on 2026-08-17

Short answer

In drawstack, a person and an AI edit the same scene graph, so there is no translation layer between what the AI writes and what you see. Three decisions made it work: the AI never does pixel math, AI output is checked shape by shape, and I cut 26 of 27 diagram types in one day.

26 of 27
diagram types cut in one day
7
operations in the schema
526
packages removed
29 of 489
commits authored as Claude

In this note

  1. What does it mean that a person and an agent edit the same canvas?
  2. Decision one: why does the AI never do pixel math?
  3. Decision two: why check AI output shape by shape?
  4. Decision three: why did I remove 26 of 27 diagram types in one day?
  5. What happens when I start from a photo of a whiteboard?
  6. Can a coding agent draw through MCP?
  7. Is multiplayer supported?
  8. How much of this did the agent write?
  9. What is not done yet?

drawstack started as a tool that turns a plain-text prompt into a diagram. It ended up as something different: one canvas that a person and an AI agent both edit. This note tells that story through three decisions, and then lists what is not done.

The code is public at github.com/gwaghmar/drawstack. The README lists a live app, but it did not respond when I checked on 2026-11-11 (HTTP 503), so I link only the repository.

The screenshots below come from my own machine, running the app locally with a mock database and mock sign-in. I did not make a model call for them. The canvas you see is a sample that ships with the app.

The drawstack editor with an AI chat on the left, a whiteboard canvas and a toolbar
The editor, running locally. The AI chat is on the left, the canvas is in the middle. The drawing is the app's built-in whiteboard sample, not one I generated.

What does it mean that a person and an agent edit the same canvas?

The canvas is a JSON scene graph. It is a list of shapes, each with an id, a type, a position and some styling. A person drags a shape, and the graph changes. An agent sends an edit, and the graph changes the same way. The renderer draws whatever the graph says.

This matters because many AI drawing tools make a picture and hand it to you. If you want to change one box, you ask again and hope.

With a shared graph, you can fix one box by hand, then ask the AI to add a database next to it, and the AI sees your fix because it is in the document.

You can read the graph yourself. The editor has a Source panel beside the canvas.

The editor with the Source panel open, showing the scene graph as JSON
The Source panel shows the same document as JSON. Edits made in the panel apply live.

An agent edits by sending operations that name shapes by id or by name. There are seven: add, update, delete, connect, place, layout and reorder. Here is a short example I wrote to match the format. It is a sample, not a log.

[
  { "op": "add", "shape": { "type": "rect", "name": "API", "text": "API" } },
  { "op": "add", "shape": { "type": "cylinder", "name": "DB", "text": "Database" } },
  { "op": "place", "target": "DB", "below": "API", "gap": 40, "align": "center" },
  { "op": "connect", "from": "API", "to": "DB", "label": "reads and writes", "routing": "orthogonal" }
]

The shape types and field names in that example are simplified. The seven operation names and the fields on place and connect are the real ones from the schema.

Decision one: why does the AI never do pixel math?

Language models are bad at coordinates. Ask one for x and y positions and you get boxes that overlap, arrows that cross text, and layouts that look drunk.

So I stopped asking. The AI says what goes where in relation to other things: this one below that one, this one inside that frame, these four in a row with a gap. The engine works out the numbers.

Below

place DB below API, gap 40

Inside

place a shape inside a frame

In a row

layout four shapes in a row, with a gap

  • The place operation takes a target and one of below, above, left of, right of or inside, plus an optional gap and alignment.
  • The layout operation arranges a set of shapes as a row, a column, a grid or a graph.

I did not invent this. It is how a person describes a layout to a colleague. The AI is good at relationships and the engine is good at arithmetic, so each does the part it is good at.

An early bug showed why this matters. A layout step produced NaN positions and the shapes vanished. I fixed the engine once, in one place, and every AI path got the fix. That is the other benefit. When the math lives in the engine, a bug fix reaches all the AI paths at once.

Decision two: why check AI output shape by shape?

The AI's output is wrong in small, boring ways, and the app must not fall over each time.

At first I validated the whole document as a single schema. If one shape was invalid, the app rejected the entire result. In production that threw away 10 to 20 good shapes over one bad one. The most common failure was a truncated last shape. The model had hit its output limit in the middle of an object.

Sample

One bad shape no longer rejects the whole drawing

Checked as one schema

Whole drawing rejected

Checked shape by shape

  • kept 7
  • dropped 1

Only the bad shape is dropped

Eight shapes is an illustration. In production one bad shape threw away 10 to 20 good ones. This is a sample figure, not real data.

Now each shape is validated by itself, and only the failing one is dropped. Dropping a shape can orphan other things.

A child may point at a frame that is gone, or an arrow may end at a missing shape. A cleanup pass handles that. It ungroups the orphaned child instead of deleting it, and it drops an arrow with a dangling end.

Some output errors happen so reliably that I fix them before validation.

  • The model often writes a shape's text as a plain string where the schema wants an object. The validator coerces the string.
  • It writes null for optional fields. The validator strips the null.
  • It leaves out a position. The validator defaults the position to the origin.

A shape at the origin is better than a lost shape.

I found six real bugs in this validator, and I found every one by generating output against the live model and watching it fail. No unit test caught any of them.

The pattern was the same each time: my validator was stricter than the renderer needed. So the rule I keep is to check whether the renderer really needs a field before I tighten a schema.

Decision three: why did I remove 26 of 27 diagram types in one day?

On 2026-08-17 I deleted every diagram engine except the freeform canvas. Mermaid, Excalidraw, ReactFlow, charts, BPMN, graph libraries and all twelve social-card types went in one day. The type system now has a single member, "freeform".

I had spent months building them. That is the sunk cost, and it is exactly why the decision was hard. Each engine carried its own renderer, its own AI prompt, its own validator and its own share wiring.

One canvas means the person and the agent edit the same thing, and each feature is built once. I kept a git tag and a backup branch called all-27-diagram-types in case I ever need anything back. I also pruned the unused dependencies afterward, which removed 526 packages.

I am not sure the cut was right for every user. Someone who wanted a Mermaid flowchart has lost something. My bet is that a tool which does one thing well, and that an agent can edit, beats a tool that does 27 things and that an agent cannot edit.

What happens when I start from a photo of a whiteboard?

There is a route for it. The app takes a whiteboard photo, an architecture screenshot or a UI sketch, asks a vision model to rebuild it as a canvas document, and runs the result through the same per-shape validator.

I have no screenshot of this for you. I did not run it for this note, because it needs a live model call and a photo that I would have to stage. I do not want to show a staged success. The code path exists in the repository, and you can read it.

Can a coding agent draw through MCP?

The app has two MCP servers. One is an HTTP endpoint inside the web app with two tools, one that generates a diagram and one that lists what is available. The other is a standalone stdio server for local AI tools. With either, a coding agent can ask for a diagram of the system it is working on.

The two servers were out of step with the rest of the app after the cut to one engine. I brought both in line the same day. One of them was reading a field that had become empty.

Is multiplayer supported?

Yes, with Yjs, a library for shared documents. Two people can edit the canvas at once. The connection setup uses a signaling server that I host myself instead of a public one.

How much of this did the agent write?

I cannot answer that cleanly. Git shows 29 of 489 commits authored as Claude. But Antigravity, a Google coding agent, also edits this repository, and its commits land under my name. So the log cannot tell you how much an agent wrote.

I specify the rules, I run the tests, and I read what comes back. A lot of the code was written by agents.

What is not done yet?

The repository keeps a list of pending items. In plain words:

Real

Pending items from the repository list

  • UntestedSign-up, then generate, then checkout has not been click-tested in production. It needs a click-test before any public launch.
  • Stale checkThe public validation endpoint still checks Mermaid source, even though the app no longer renders Mermaid.
  • Lower riskSome edits, such as small patches to a single shape, are applied in the browser and are not validated again on the server. I rate that risk as lower.
  • GapThe connect operation does not yet accept waypoints or junction markers. They are reachable through add and update.
  • File sizePDF export embeds a high-resolution image, so files can reach about 10 MB.
  • UpgradesSeveral dependencies still carry known vulnerabilities and need version upgrades with real testing.
  • CleanupOne orphaned file is safe to delete and I have not deleted it.

I would rather publish that list than a polished page. If you are a technical person deciding whether to trust this project, the list tells you more than a demo would.

Related

  • How I build AI apps
  • From a finance question to a live app: my whole workflow
  • Giving an AI a safe door into the ERP
Ask a follow-up about this note
$