Recipe · Code

Draw the change together. It comes back to the repo as one pull request.

Copy the living map into a Proposed slate and review it on a call with the agent listening. Diagrams as code commits the slate as Mermaid to one pull request on a slatebox/ branch, and a person merges it.

Free on Slatebox Cloud and self-host. Listening in the review comes with Slatebox Pro.

Turn it on

Set it up in a few minutes.

  1. Start from the current map

    On the Living architecture Service map, choose Make a copy, name it “Proposed: refunds v2” and move it into the project. Or start from a Google Doc with Design doc to diagram.

  2. Add Diagrams as code

    Add a recipe, Diagrams as code, pick the repo. Folder docs/architecture/proposed/, branch slatebox/architecture. Map only the Proposed slate, as .mmd or as .md with one mermaid block.

  3. Allow the pull request

    Under Changes outside Slatebox, grant “Open pull requests on slatebox/ branches”. Without it, each change waits as an approval card with the .mmd files to download.

  4. Listen to the review

    In the review call: Listen to a call, Tell the room, Start listening.

On a self-hosted Slatebox, recipes stay off until a server admin turns them on in Admin, Recipes. A team admin can turn them off in Team settings.

How it runs

How do I keep Mermaid diagrams in my repo in sync with a whiteboard?

Review a proposed design on a slate, with the agent listening to the call. Slatebox commits the diagram as Mermaid to one pull request on a slatebox/ branch. A person merges it.

Good to know

  • Only flowchart Mermaid syncs.
  • Moving notes changes nothing in the file. Text, shape and line changes do.
  • The Decision log stays on the slate. Link the slate from your ADR or RFC; it is not written into the pull request.
  • The first sync of an existing file writes the canvas version.
  1. The current map stays the record of what is built: Living architecture keeps redrawing it from code. The Proposed slate is a copy people own, and the architecture recipe never redraws it.
  2. In the review the agent listens. Decisions go to the Decision log as Proposed and Agreed. When the call weighs two options, a Pros and cons board appears.
  3. People edit the proposed diagram directly. Only a person moves a decision to Final.
  4. Ten minutes after the last edit, or on Save to repo now, the slate is committed as Mermaid to the one open pull request on slatebox/architecture. Slatebox never pushes to the default branch, never merges and never force-pushes. A person’s commit on the branch is kept, and the next commit goes on top.
  5. A person reviews and merges. A merged edit to the file updates the slate in place. If the file and the canvas both changed, the canvas version is kept and a note on the slate says what the file had.
  6. A coding agent such as Claude Code, Cursor or Codex reads the Proposed slate and the Decision log over MCP (get_slate, export_mermaid) to carry out the change. Once it ships, the living map redraws from code and “What changed” shows the new service.

Where you decide

What runs by itself, and what waits for you.

Nothing outside Slatebox changes without a standing permission or an Approve.
Runs by itselfA person decides
Listening, after Tell the roomMarking decisions Final
Committing to the slatebox/ branch, only with the grantGranting the pull request permission
Importing merged edits to the fileMerging the pull request

What this recipe uses

Questions

What people ask.

Can it touch main?

No. It opens pull requests only on slatebox/ branches and changes only the mapped files. It never merges, deletes or force-pushes.

What if someone edits the .mmd file in the pull request?

Their commit is kept, and Slatebox adds its next commit on top. Merged file edits come back to the slate.

Do I need Live?

No. Without it you edit the diagram together. Live adds the Decision log and Pros and cons from the call.

Which diagrams sync?

Flowcharts. Layout stays on the canvas.

What is free here.

Free for everyone
Diagrams as code, Design doc to diagram, editing together, the pull request and the MCP server.
Slatebox Pro
The agent listening to the review call: included with Slatebox Pro, or paid from a balance. Your own key works too.
See pricing

For teams. Slatebox Business on Slatebox Cloud gives your team single sign-on, people added and removed automatically from your identity provider, the team activity log of recipe runs and changes outside Slatebox, and the agent and calls for every member. See Slatebox Business

More recipes

Plug in the next one.

Review the design where you draw it.

Start free, copy your map, and let the repo get one pull request.