Architecture diagrams go stale because someone has to remember to redraw them. The fix is to let an agent redraw the diagram from the code, every time the code changes, and to keep people in charge of what leaves the canvas.
In Slatebox that agent is a recipe: an agent that keeps some of a project's slates up to date, on a schedule or on GitHub's events. What it makes are real notes, lines and boards on the canvas, so your team keeps editing them as usual. Recipes are free on Slatebox Cloud and on a self-hosted Slatebox.
The short answer
- Open a project in Slatebox, then Recipes, Add a recipe, Living architecture.
- Choose Install Slatebox on GitHub and pick the repositories.
- Preview the first run, Turn on, then Keep all.
From then on, every push to the default branch redraws the map. The full walkthrough is in the recipe: Living architecture.
What the agent redraws, and when
The recipe's agent, the GitHub architect, keeps three slates per repository: a Service map, a Modules graph and an API surface, plus a What changed board that lists new services, connections and endpoints.
- When: every push to the default branch (after a 2-minute quiet time, so a burst of merges is one run), again every night at 03:00, and whenever you press Run now.
- What it reads: Compose, Kubernetes, Helm, Terraform, serverless, JS and TS, Python, Go, Java, Rust, Ruby, OpenAPI, GraphQL, proto, routes and CODEOWNERS. It flags dependency cycles.
- Big repositories: modules drill down into their own slates in a Modules folder, so the top-level map stays readable.
- Naming modules: by default the agent names modules. Turn off "Name modules with the agent" and the recipe names them by folder and uses no agent work at all. On Slatebox Cloud, agent naming is paid like any agent work: Slatebox Pro credits, Slatebox Business, a balance or your own model key.
People's edits win
A diagram an agent redraws is only useful if people can still mark it up. When a person rewords or restyles a note, that note becomes theirs, and the recipe never touches it again. Rename "worker" to "billing worker" and the next run keeps your wording. Stickies a reviewer adds stay where they are.
A diagram for every pull request
Add Pull request impact the same way. Every pull request with 3 or more changed files gets its own slate in a Pull requests folder: what it adds, removes and touches. A changed manifest or infrastructure file counts even below 3. Drafts and pull requests labeled no-slatebox are skipped.
With your permission ("Comment on pull requests" under Changes outside Slatebox), the pull request also gets one diagram comment, edited in place on each push, so reviewers see the architecture diff where they already review.
If you only want the pull request comment and no Slatebox account, the architecture GitHub Action is a free, MIT-licensed action that posts the same kind of Mermaid diagram comment from a workflow, built on the same extractors. Its README lists the inputs.
Keeping Mermaid files in the repo in step
If you want the diagram to live in the repository too, add Diagrams as code. Map the slates you want, and they are kept as Mermaid files (by default in docs/architecture/):
- Ten minutes after the last edit to a synced slate, it is written as Mermaid and committed to one open pull request on a
slatebox/branch (by defaultslatebox/architecture). - Slatebox never pushes to the default branch, never merges and never force-pushes. 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.
- Only flowchart Mermaid syncs, and moving notes changes nothing in the file. Text, shape and line changes do.
Without the permission to open pull requests, each change waits as an approval card with its .mmd files to download. Diagrams as code.
Your coding agents can read the map too
Before a big change, a coding agent such as Claude Code, Cursor or Codex can read the current architecture instead of guessing. Connect it to Slatebox's MCP server and it can call get_slate and export_mermaid, or read the committed .mmd files from the repo. The MCP server is free for every registered account. Your agents on the canvas and Connect your agent.
What runs by itself, and what waits for you
Nothing outside Slatebox changes without a standing permission or an Approve.
- Runs by itself: redrawing the map on each push and every night, once you keep the first run; drawing each pull request's slate.
- A person decides: keeping the first run; granting the pull request comment and the neutral "Slatebox architecture" check; merging any pull request Slatebox opens.
- Anything a person edited stays theirs.
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.
Read more
- Living architecture: set it up in a few minutes.
- Diagrams as code: edit on the canvas, merge a Mermaid pull request.
- Every recipe: the other agents that keep slates up to date from Slack, Linear and your own systems.
- Mermaid in Slatebox: any slate out as Mermaid text, and Mermaid in as notes.
- Free and open source: the licenses, the repositories and how versions work.