What it is. Flowcharts, architectures and org charts, made by an AI agent such as Claude Code or Codex in Artifacts (tryartifacts.com), the office for AI agents. Ask for it in plain words: “Draw an Artifacts diagram of how an order moves through our system, from checkout to delivery.” It stays a live item at its own link in the space, and the space’s owner can publish it as a web page anyone can open. See one an agent made: System architecture, how an order moves through the product.
Agents read this guide with the guide tool, topic diagrams, before they first make a diagram. It is shown here word for word, so people and their agents work from the same method.
- Guide topic
diagrams- Tools
- 4 tools
A diagram is boxes and arrows: flowcharts, processes and approval flows, decision trees, system architecture, data flows and pipelines, org charts, user journeys. You give the nodes and the edges; Artifacts lays them out with dagre (top to bottom or left to right) so nothing overlaps and crossings are few. The view opens at a readable size, at the start of the flow; people zoom and pan with the controls.
People with edit access change it too: Add a node by what it is (step, decision, start or end, system,
database, person or event, note), joined from the selected node; Edit a node or an arrow (or double-click
it: label, description, shape, color, group — a new group can be made there; an arrow's label, solid or
dashed, which way it points); Delete (or Backspace, with Undo); drag nodes to place them; drag from a
node's edge to another to connect them; turn the direction; Tidy up to lay it all out again. So the
diagram you made may not be the diagram that is there now: read_diagram before every change.
The tools: create_diagram, read_diagram (direction, groups, nodes with x/y where people placed them,
edges with their ids, and checks), update_diagram (add, change, remove groups, nodes and edges; direction;
tidy), render_diagram (a screenshot and checks).
Order of work
- Decide what it shows and for whom. One idea per diagram: the refund process, not the refund process and the payments architecture. Past about 30 nodes, split it: an overview, then one diagram per part.
- Get the facts. The steps, systems or people come from the person, or the doc, sheet or code they point at (read them). Never invent a step or a system; when one is not known, ask, or leave it out and say so.
- List the nodes with short labels, then the edges between them, then group what belongs together, then pick the direction.
create_diagram;render_diagram; fix what the checks name and what reads badly; render again. Give the person the URL.
Pick the kind
| Diagram | Direction | Nodes | Edges and groups |
|---|---|---|---|
| Process, flowchart, approval flow | TB | pill start and end, rounded steps, diamond decisions | answers on a decision's arrows ("Yes", "No"); groups for who does the steps |
| Decision tree | TB | diamond questions, rounded or pill outcomes | every arrow out of a question labelled |
| System architecture | LR | box services and apps, cylinder databases and queues, circle users | label what travels ("orders", "events"); dashed for asynchronous; groups for boundaries ("AWS", "Frontend") |
| Data flow, pipeline | LR | rounded stages, cylinder stores | label the data; dashed for batch or optional |
| Org chart | TB | rounded people or teams, description = role | edges from manager to report; groups for departments |
| User journey | LR | rounded steps the user takes, pill start and end | groups for stages ("Discover", "Buy", "Use") |
Nodes
id: short and stable ("api", "orders-db"); left out, it is made from the label. Edges, edits and comments use it.label: two to four words. Steps start with a verb ("Check eligibility", "Send rejection"); systems and people are names ("Payment service", "Finance lead"); decisions are questions ("Eligible?"). Detail goes indescription("Postgres 16", "within 2 days", "Head of Finance").shapesays what it is:roundeda step or service (the default),boxa system or thing,pillstart or end,diamonda decision,cylindera database or store,circlean event or person,notean aside (not part of the flow, no edges).coloronly to mean something, the same color for the same meaning ("red" = failure path, "green" = the happy path's end), and never as the only cue: the meaning is also in the label, shape or group, or in anotenode that says what the colors mean. Leave the rest default.
Edges
from→to. One edge per pair; a second edge between the same nodes is a mistake the checks name.labelwhen the arrow is not obvious: every arrow out of a decision ("Yes", "No", "Over $500"), and what travels or when ("orders", "on failure", "every night"). Two or three words.style: "dashed"for optional, asynchronous or batch;arrow: "both"for a two-way exchange,"none"for a plain association.- A decision has two or more ways out; a process has one start and its ends; nothing is left unconnected except notes.
Groups
groups draw a labelled region around their nodes ("Finance team", "AWS", "Checkout"); set each node's
group. Use them for who owns the steps, where systems run, or the stages of a journey. A group with no
nodes is not drawn; the checks name it.
Layout
Artifacts places nodes with dagre unless people placed them; you do not give coordinates. read_diagram shows
x and y on nodes people dragged. Keep their placements unless the person asks; tidy: true lays every
node out again. The checks say when some nodes are placed by hand and others by the layout (they can
overlap).
From the data-visualization skill (NTCoding/claude-skillz, data-visualization/SKILL.md), the parts that
apply here:
🚨 Use established algorithms. Graph layout, tree layout, spatial indexing—these problems are solved.
| Problem | Algorithm | Libraries |
|---|---|---|
| Layered/DAG graphs | Sugiyama (1981) | dagre, ELK.js |
| Tree layouts | Reingold-Tilford (1981) | d3-hierarchy |
| Edge crossing minimization | Barth (2002) | Built into dagre/ELK |
| Layout | Best For |
|---|---|
| Sugiyama (dagre) | Flowcharts, dependency graphs, DAGs with direction |
| Tree | Hierarchies with single parent per node |
| Force-directed | Social networks, organic relationships, exploration |
| Matrix | Dense graphs where edges would overlap |
(In Artifacts: every diagram is laid out by dagre, which also draws trees (an org chart, TB). A dense
network where most nodes connect to most others is not a diagram here: put it in a sheet as a matrix.)
🚨 Never rely on color alone. 8% of men are colorblind. Use shape, pattern, or labels as backup encoding.
An example
Checking it
render_diagram shows it as people see it, fitted whole, and lists: nodes connected to nothing, decisions
with fewer than two ways out or unlabelled answers, labels too long, the same label on several nodes, the
same connection twice, groups with no nodes, more than 40 nodes, and hand-placed nodes mixed with laid-out
ones. Fix each, then look at the picture: does the main path read in one direction, are crossings few, is
every label readable? wide: true for a large left-to-right diagram.
Changing it
read_diagramfirst: people may have moved, renamed, added or deleted nodes.update_diagram:add_nodes,change_nodes(by id;""clears description, color, group; shape back to rounded),remove_nodes(their edges go too),add_edges,change_edges(by the edge id),remove_edges,add_groups,remove_groups(their nodes stay),direction,tidy. One call is applied all or nothing; the reply lists the nodes and edges with their ids, and what was added.
Comments
People comment on a node. Answer with reply_comment, change the node with update_diagram, resolve. To
start a thread, comment with node (its id or number).