# Graff authoring reference

Compiler 0.1.3. Syntax 0.1 and 0.2 are alpha; Graff 1 is experimental.

[HTML](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/) · [Language catalog](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/language.json)

<a id="choose-a-language-version"></a>

## Choose a language version

A Graff file defines a diagram and can add ordered explanations using the same named objects. Pick an authoring surface before choosing syntax. Use 0.1 or 0.2 for transactional source edits, reference resolution and context slices. Use Graff 1 for typed statements, evidence-bearing causal claims and chronological sequence fragments. Each example in this reference includes editable source and an SVG produced by the compiler.

| Source | First statement | Status | How to choose |
| --- | --- | --- | --- |
| 0.1 | `system id "Title" {` or `sequence id "Title" {` | Alpha | Small flow and sequence diagrams, named steps and authored motion effects. |
| 0.2 | `profile id "Title" {` with `version 0.2` | Alpha | Specialized model, architecture, board, timeline, chart, grid, MCP and Skills profiles. System and sequence also accept 0.2. |
| Graff 1 | `graff 1` then `diagram leaf id "Title" {` | Experimental | Each leaf has a closed typed vocabulary. Compiler and language versions are independent. |

To try the script below in a browser, sign in to Diagraff, create a blank Graff diagram, and paste it into **Diagram code**. The preview updates as you edit. To follow along with a local compiler, save the same script as `shelf.graff`. It uses the 0.1 defaults. [Open Diagraff](https://diagraff.com/)

```graff
system shelf "Return a book" {
  node desk "Desk"
  node shelf_space "Shelf" kind store
  edge return_book desk -> shelf_space "Shelve the book"

  story walk "Follow the return" {
    step receive focus desk
    step shelve flow return_book duration 700
  }
}
```

```sh
diagraff validate shelf.graff
diagraff compile shelf.graff -o shelf.svg --artifact shelf.json
diagraff compile shelf.graff --state walk/shelve -o shelved.svg
```

The base SVG works as a static image. A named state SVG shows exactly where the explanation has reached. The JSON artifact carries the outline, evidence, states and motion used by a compatible reader.

<a id="writing-and-formatting-source"></a>

## Writing and formatting source

Graff scripts use literal values and named references. If your generator needs variables, arithmetic, or loops, compute the values in the calling program and emit Graff declarations with durable IDs. In a sequence, a guard such as `case approved "Payment approved"` supplies the text the reader sees. The author chooses which messages an explanation follows.

Each declaration occupies one line. A block opens with `{` at the end of the header. Close it with `}` on a separate line. A document has one ID and an optional quoted display title. A missing title or entity label uses the ID. A missing ordinary relationship label is empty. Use stable IDs, 1–128 ASCII letters, digits, dots, underscores or hyphens. Keep them when changing text. Declaration IDs share a document namespace. Step or stage IDs need only be unique inside their story or explanation.

| Rule | Alpha formats 0.1 / 0.2 | Graff 1 |
| --- | --- | --- |
| Document | `profile id ["Title"] {`. Omit version for the profile default. `kind` chooses a family variant. | `graff 1` as the first statement, after any UTF-8 BOM, blank lines or `#` comments. `diagram leaf id ["Title"] {` directly names a type. |
| Entity | `keyword id ["Label"] [key value …]` | Same head. Move properties to a trailing block when useful. Each property is written once, inline or inside the block. |
| Relationship | `keyword id source -> target ["Label"] [key value …]` | Same head. Fixed relationship types omit the quoted label. |
| Comments | `#` and `//` at a token boundary. `#> id "text"` is a visible bottom annotation. | `#` comments only. Write `annotation` for a visible note. |
| Property values | Bare or quoted text, numbers, booleans, comma-separated `actors` / `values`. Quote text that looks numeric to preserve characters. | Words for names/enums, quoted free text, bracketed lists such as `[read, write]`, numbers, booleans and durations with units. |
| Quoting | Both readers support `\\`, `\"`, `\n` and `\t` inside quoted strings. Escape quotes and backslashes. An unknown escape fails with a location. | A display-text property can additionally accept a bare name or number. `"007"` preserves leading zeroes and `007` renders as a number. |
| Canonical format | Writes defaults and preserves comment text. Reformatting can move comments away from their original lines. | Organizes properties/declarations and preserves chronological sequence order. Canonical formatting is a fixed point. |

A source keyword and the attributed IR are separate contracts. The 0.x reader recognizes a fixed vocabulary of element and relationship property names. Some have meaning in only a particular profile and others carry metadata. An arbitrary property in an interchange JSON map can be unrepresentable in source. Source-preserving edits validate representability. Document options are closed and profile-checked. Graff 1 rejects unknown properties on the actual declaration with the permitted alternatives.

<a id="sequence-branches-and-notes"></a>

## Sequence branches and notes

In a Graff 1 `sequence`, declare actors and participants first. The events beneath them form one top-to-bottom chronology. `message` is a synchronous call, `reply` is a return and `signal` is asynchronous. An edge points from sender to receiver. A guard describes an alternative in ordinary quoted text. It is never evaluated as code.

| Form | Scope and arguments |
| --- | --- |
| `alt id {` | Opens a frame containing one or more `case` blocks, in declared order. |
| `case id "guard" {` | Direct child of `alt`. Each case has a stable unique ID. Guard text can repeat. A case can contain messages, notes and nested `alt` / `opt` frames. |
| `opt id "guard" {` | An optional, guarded group of events. Use it at the sequence timeline level, in a case or in another optional frame. |
| `note id "text" over actor [second_actor]` | Place a chronological note over one lifeline or span two distinct lifelines. |
| `note id "text" left_of actor` / `right_of actor` | Attach a note to one side of one lifeline. |
| `stage choose activate [frame_id]` | Focus a frame, case or note by ID. `reveal` can introduce it. A message or note highlights its enclosing frame and case. `trace` takes relationships. |

A note-only Graff 1 sequence can have a single lifeline. Close each frame, case and optional block separately. At most 32 sequence blocks may be open. Reference declared lifelines in every note. Contextual color, outlines and guard text survive static SVG output. A compiler artifact exposes an ordered `outline.sequence` list with message, note, alt, case, opt and end events. The flattened relationship list alone cannot reconstruct branches.

[Open the complete reservation source](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-sequence.graff) · [View its compiled sequence](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-sequence.svg)

<a id="explanations-motion-and-evidence"></a>

## Explanations, motion and evidence

| Meaning | 0.x step action | Graff 1 stage action | Targets and persistent result |
| --- | --- | --- | --- |
| Introduce | `reveal` | `reveal` | An ID first targeted by reveal stays pending until that step. Related endpoints and containing entities remain meaningful. |
| Focus | `focus` | `activate` | Emphasize the addressed concepts. |
| Follow a connection | `flow` | `trace` | Address existing relationship IDs and show their path. |
| Name a state | `state` | `set` | Address concepts and optionally supply a nonempty `value "text"`. A missing value uses active. |
| Compare | `compare` | `compare` | Emphasize related targets and optionally supply comparison text. |
| Frame a view | `camera` | `frame` | Fit the selected targets into the viewer's viewport. |

0.x uses `story id ["Title"] {` and `step id action target[,target…] [value "text"] [duration N]`. A step lasts 550 ms by default. Duration accepts a whole number from 80 to 60,000 ms. Optional trailing `motion "draw_on,pulse" delay 120 direction reverse repeat 2` configures one to four unique simultaneous effects. Options follow the quoted effects. `draw_on` and `flow` need relationships. `blink` and `pulse` emphasize supported targets. `delay` is 0–60,000 ms (default 0), `direction` is `forward` by default or `reverse`, and `repeat` is 1–100 (default 1) or `continuous`. Finite playback advances after delay + duration × count. Continuous effects allow playback to advance after the first cycle. Reduced motion resolves to the same held state.

Graff 1 uses `explain id ["Title"] {` and `stage id [after previous_id] action [targets] [value "text"] [duration 700ms]`. The bracketed target list is source syntax. Steps need at least one target and each ID occurs once. A comparison needs at least two distinct targets. `after` names the immediately preceding stage. Use `ms`, `s`, `min`, `h` or `d`. A stage duration must resolve to an exact whole number of milliseconds in the same 80–60,000 range. A bare number lacks the required unit. Graff 1 has no custom authored-effects clause.

An explanation has a start state `story_id` and stable step states `story_id/step_id`. The runtime also accepts an index alias when the canonical state ID does not match. Held state and accessible outline work without playing a transition. `--static-only` omits playback metadata. Omit that flag when exporting a specific state which depends on it.

| Form | Inputs and output |
| --- | --- |
| 0.x `cite "uri" ["label"] [target id] [hash "digest"]` | Target an element or relationship, including one declared later. Without a target the citation belongs to the document. Duplicate and unresolved target clauses fail. |
| Graff 1 `reference id "uri" [label "…"] [integrity "…"]` | Cite by `evidence [ref_id, …]` on a supported declaration. References without a citing declaration belong to the document. |
| `annotation id "text" [tone info] [placement bottom]` | Visible note band. Accepted tones are info, success, warning and danger. The defaults are info and bottom. In Graff 1 sequence, use `note` for a chronological lifeline note. |
| Graff 1 `provenance id { … }` | Required fields `activity migration`, `from_syntax`, `source_hash` and `migrator` record a migration. The record is inert and omitted from the drawing. |
| Graff 1 causal claims | `cause`, `enable`, `prevent` and `depend` require evidence. `correlate` permits missing evidence with a warning and excludes `mechanism`. The SVG labels and semantic outline carry the asserted meaning. |

Compiled evidence includes declared source lines and ownership. A URI and integrity string record what the author supplied. The compiler never fetches a citation, computes its trustworthiness or verifies the remote content. A host can attach a separate verification status to the viewer.

<a id="diagraff-host-notes"></a>

## Diagraff host notes

Diagraff reads optional `# @fact` and `# @caption` lines immediately before a named 0.x `step` inside a `story`. Consecutive note lines belong to the next step. Intervening ordinary lines end the association. The host keys the result by `story_id/step_id`. A fact states the author's key observation. A caption supplies fuller spoken or written explanation. Both are author-provided text.

This complete example includes both notes. It works in Graff because the two lines are comments. A generic compiler preserves comment text and does not assign the host meanings. Formatting can change comment placement. For native semantics use `cite`, `reference`, an annotation, or Graff 1 `note`. The runtime's revision-specific `captions` map is a separate host input.

[Read the annotated library lookup](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.1-system.graff) · [View its compiled diagram](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.1-system.svg)

<a id="appearance-and-layout"></a>

## Appearance and layout

Alpha documents accept `theme`, `direction right` or `direction down` and scoped `option name value` lines. A bare family follows the host. A `-light` or `-dark` suffix fixes its appearance. An unknown 0.x theme falls back to Aurora. Graff 1 recognizes only built-in themes and specifies document presentation directly, such as `layout down` or `border_width 1.5`. Each leaf below lists its accepted document controls. A per-item override takes priority over its document default.

A 0.x `node` defaults to `kind service`. `actor` and `group` imply their respective kinds. `edge` defaults to `kind flow`. `message`, `reply` and `signal` imply a message with call, return and asynchronous delivery. A separate `kind` changes the domain meaning while preserving delivery. `icon registry:id` names an approved glyph. `in parent_id` establishes containment. `description "text"` adds detail. Optional `pin x y` uses two finite scene coordinates in SVG user units. Text and citations never execute. A supported relationship can have a durable ID even when it has no label.

A strict route treats unresolved layout warnings as errors. Routing checks compare at most 256 connectors in the full pair analysis. Dense graphs can reach deterministic layout budgets. A graph with too many crossings can be split without changing object identity. State, model, hierarchy, board, event timelines and static agent maps have structural checks with varying attribute coverage. Unused metadata may survive an alpha round trip without altering the picture.

<a id="document-controls"></a>

## Document controls

Alpha documents use `option name value`. Graff 1 uses direct properties. Each leaf lists its permitted controls.

| Control | Values | Scope in 0.x | When omitted |
| --- | --- | --- | --- |
| `border_width` | `finite number 0.5…3` | visible system, sequence, model, state, architecture, hierarchy, board, block-grid, MCP and Skills boxes, plus packet fields | profile-specific |
| `node_style` | `simple \| card` | visible system, sequence, model, state, architecture, hierarchy, board, block-grid, MCP and Skills boxes | profile-specific |
| `connector_style` | `orthogonal \| rounded \| curved` | explicit system, model, state, architecture, block-grid, MCP and Skills links | curved for flow/state/causal/MCP/Skills, rounded for architecture, orthogonal for model/block |
| `routing_quality` | `best_effort \| strict` | system, model, state, architecture, MCP and Skills routing | best_effort |
| `architecture_style` | `graff \| azure \| google_cloud` | architecture | graff |
| `timeline_style` | `cards \| simple` | events timeline | cards |
| `show_bit_numbers` | `true \| false` | packet grid | false |
| `radar_grid` | `circle \| polygon` | radar chart | circle |
| `map_spacing` | `compact \| comfortable \| spacious` | MCP and Skills maps | comfortable |

<a id="alpha-profiles"></a>

## Alpha profiles and kinds

Select the family in the document header. Where listed, select its variant with `kind`. `annotation` is a common visible band. Each link opens a working source.

| Profile / kind | Declarations and links | Behavior |
| --- | --- | --- |
| [`system`](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.1-system.graff) | `node` `actor` `group` `edge` `message` `reply` `signal` | At least one visible node. A node defaults to service and accepts a custom kind. Use kind link for an undirected physical link. |
| [`sequence`](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.1-sequence.graff) | `actor` `participant` `message` `reply` `signal` | At least two lifelines. Calls, returns and async signals run in source order. Self-messages loop. A reply with kind unobserved uses a dotted line and open endpoint. Fragments and chronological notes require Graff 1. |
| [`model` `class`](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-class.graff) | `entity` `field` `operation` `relation` | Field and operation rows belong in their class. Use quoted UML visibility symbols. Relationships labelled inherits or contains receive their specialized notation. |
| [`model` `er`](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-er.graff) | `entity` `field` `relation` | Field rows can carry key and data_type. Set source_cardinality and target_cardinality independently. |
| [`model` `requirements`](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-requirements.graff) | `requirement` `component` `relation` | Use variant, external_id, risk and verify on requirements. Component role and docref describe the implementation. The relationship label supplies the stereotype. |
| [`architecture` `context`](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-context.graff) | `participant` `component` `container` `connect` | Set role person, system, external, container or component and optional technology. Ports belong on connections. A participant defaults to person and other visible nodes to system. |
| [`architecture` `deployment`](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-deployment.graff) | `group` `component` `connect` | Nest actual boundaries with in. Only visible components are connection endpoints. |
| [`hierarchy`](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-hierarchy.graff) | `item` | Use in parent_id to express hierarchy. A branch is produced by containment. |
| [`state`](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-state.graff) | `state` `pseudo` `group` `transition` | Use pseudo with kind initial or final for endpoints, and in for nested states. A transition label names the event. |
| [`timeline` `gantt`](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-gantt.graff) | `section` `task` | Task start/end use calendar dates, end exclusive; duration counts days and overrides an explicit end. An undated task follows preceding work. after names one other task, and dependencies must be acyclic. One day is the default task length. |
| [`timeline` `events`](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-events.graff) | `section` `event` | Group events in sections. date is a display label. option timeline_style chooses cards or simple. |
| [`timeline` `journey`](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-journey.graff) | `section` `event` `task` | Score is optional, 1 through 5 when present. actors is a comma-separated list of labels. |
| [`timeline` `git`](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-git.graff) | `branch` `commit` `connect` | Use branch, order, status highlight and note on commits. A commit defaults to the first branch or implicit main. Link commits to show branch and merge history. |
| [`board`](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-board.graff) | `lane` `card` | Assign each card to a lane with in. Cards can show a description. |
| [`chart` `pie`](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-pie.graff) | `slice` | At least one slice. Every value is required and nonnegative, and the total must be positive. |
| [`chart` `quadrant`](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-quadrant.graff) | `axis` `cell` `point` | One or more points with x and y in 0…1. A cell has row and column 0 or 1. Each axis accepts role x or y. Without role the next free axis is used, x first. |
| [`chart` `xy`](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-xy.graff) | `axis` `series` | Explicit axes have role x or y. X values are category labels, y minimum and maximum are numeric. Each series needs numeric values of matching length. First series defaults to bar, remaining series to line. See XY in Graff 1 for scale and curve defaults. |
| [`chart` `radar`](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-radar.graff) | `axis` `series` | At least three axes and one series. Bounds default to 0…100. One value per axis in range. Series defaults are fill true, interpolation linear and tension 0.7. |
| [`chart` `sankey`](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-sankey.graff) | `entity` `flow` | Every flow requires a nonnegative weight; both endpoints must be entities and the graph must be acyclic. |
| [`grid` `block`](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-block.graff) | `cell` `connect` | row 0…999 and column ≥ 0 required. span defaults to 1, columns to 3 (range 1…64). Cells must fit without overlap. |
| [`grid` `packet`](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-packet.graff) | `bit` | Inclusive start_bit and end_bit lie in 0…8191 with no overlaps. An absent end_bit equals start_bit. Fields wrap at 32 bits. sample is 1…120 printable characters. Named color affects the border. |
| [`mcp`](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-mcp.graff) | `boundary` `host` `client` `server` `tool` `resource` `prompt` `service` `connect` `relation` | Static topology. A host owns clients, each client connects to exactly one server. A server owns tools, resources and prompts. Server or tool uses service. Each connection and relation needs a quoted purpose label. Nodes can name inert endpoint or command metadata. |
| [`skills`](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-skills.graff) | `boundary` `catalog` `skill` `trigger` `instruction` `script` `reference` `asset` `tool` `output` `relation` | Static authored map. Every skill owns an instruction. A trigger activates a skill; a skill, instruction or script uses an instruction, script, reference, asset or tool. A skill, instruction, script or tool produces an output. A skill requires another skill; dependency cycles fail. |

<a id="alpha-attributes"></a>

## Alpha attributes and free text

In addition to the structural keys `kind`, `icon`, `in`, `description`, `pin`, these are the complete named semantic keys recognized on an alpha element or relationship line. Some names parse into metadata outside their visual scope. Profile validation may reject them on a particular owner. Omission leaves an attribute unset unless its profile defines a default. An unknown source key is rejected.

| Property | Scope | Value and behavior |
| --- | --- | --- |
| `variant` | requirement | Requirement subtype such as functional or performance. |
| `data_type` | class/ER field | Displayed type, typically a bare or quoted name. |
| `visibility` | class field/operation | Quoted UML marker +, -, # or ~. |
| `key` | ER field | PK, FK or UK. |
| `cardinality` | semantic metadata | Retained scalar when supported by the operation/source profile. Use the end-specific properties for ER notation. |
| `source_cardinality` | model relation | End-specific multiplicity. ER uses one, zero_one, one_many or zero_many. Class multiplicities can be text. |
| `target_cardinality` | model relation | End-specific multiplicity. ER uses one, zero_one, one_many or zero_many. Class multiplicities can be text. |
| `risk` | requirement | Risk is low/medium/high. Verification is analysis/inspection/test/demonstration. external_id names the external record. |
| `verify` | requirement | Risk is low/medium/high. Verification is analysis/inspection/test/demonstration. external_id names the external record. |
| `external_id` | requirement | Risk is low/medium/high. Verification is analysis/inspection/test/demonstration. external_id names the external record. |
| `docref` | requirement component | Supporting document identifier. |
| `status` | task, commit or semantic metadata | Gantt planned/active/done/critical/milestone; highlight for Git emphasis. Other accepted metadata may have no visual effect. |
| `start` | Gantt task | Real YYYY-MM-DD dates, end exclusive. after is a task ID. duration is nonnegative days, with one day when both duration and end are omitted. |
| `end` | Gantt task | Real YYYY-MM-DD dates, end exclusive. after is a task ID. duration is nonnegative days, with one day when both duration and end are omitted. |
| `after` | Gantt task | Real YYYY-MM-DD dates, end exclusive. after is a task ID. duration is nonnegative days, with one day when both duration and end are omitted. |
| `duration` | Gantt task | Real YYYY-MM-DD dates, end exclusive. after is a task ID. duration is nonnegative days, with one day when both duration and end are omitted. |
| `date` | timeline event/section | Date label as authored. Quote numeric-looking text to preserve exact characters. |
| `score` | journey event/task | Numeric score 1…5 or absent. actors takes comma-separated names. |
| `actors` | journey event/task | Numeric score 1…5 or absent. actors takes comma-separated names. |
| `branch` | Git commit | Owning branch ID and numeric order. |
| `order` | Git commit | Owning branch ID and numeric order. |
| `value` | pie slice | Required finite numeric amount ≥ 0. |
| `values` | series or XY x axis | Comma-separated numeric series, or category names for the axis. Quote numeric-looking category labels. |
| `series` | semantic metadata | Scalar retained where accepted. Has no general visual, scripting or arbitrary-shape contract. |
| `shape` | semantic metadata | Scalar retained where accepted. Has no general visual, scripting or arbitrary-shape contract. |
| `minimum` | XY y axis / radar axis | Finite bounds, maximum greater than minimum. Radar defaults to 0 and 100. |
| `maximum` | XY y axis / radar axis | Finite bounds, maximum greater than minimum. Radar defaults to 0 and 100. |
| `x` | quadrant point | Required numbers 0…1. |
| `y` | quadrant point | Required numbers 0…1. |
| `x_min` | semantic metadata | Scalar retained where accepted. Use minimum/maximum on the supported axes to control chart scales. |
| `x_max` | semantic metadata | Scalar retained where accepted. Use minimum/maximum on the supported axes to control chart scales. |
| `y_min` | semantic metadata | Scalar retained where accepted. Use minimum/maximum on the supported axes to control chart scales. |
| `y_max` | semantic metadata | Scalar retained where accepted. Use minimum/maximum on the supported axes to control chart scales. |
| `weight` | Sankey flow | Required nonnegative flow amount. |
| `columns` | block cell, quadrant cell | Zero-based coordinates. Block columns 1…64, row 0…999, span ≥ 1. Quadrant row and column are 0 or 1. |
| `row` | block cell, quadrant cell | Zero-based coordinates. Block columns 1…64, row 0…999, span ≥ 1. Quadrant row and column are 0 or 1. |
| `column` | block cell, quadrant cell | Zero-based coordinates. Block columns 1…64, row 0…999, span ≥ 1. Quadrant row and column are 0 or 1. |
| `span` | block cell, quadrant cell | Zero-based coordinates. Block columns 1…64, row 0…999, span ≥ 1. Quadrant row and column are 0 or 1. |
| `start_bit` | packet bit | Zero-based inclusive bit positions 0…8191. Optional quoted printable sample, up to 120 characters. |
| `end_bit` | packet bit | Zero-based inclusive bit positions 0…8191. Optional quoted printable sample, up to 120 characters. |
| `sample` | packet bit | Zero-based inclusive bit positions 0…8191. Optional quoted printable sample, up to 120 characters. |
| `from_port` | graph relationship | left, right, top or bottom. Unset lets layout choose. Sequence messages follow chronology and reject ports. |
| `to_port` | graph relationship | left, right, top or bottom. Unset lets layout choose. Sequence messages follow chronology and reject ports. |
| `role` | context node, axis, series, component | C4 person/system/external/container/component; XY axis x/y; XY series bar/line; requirement component display role. |
| `technology` | context node | Bare or quoted implementation technology. |
| `color` | packet bit | Safe named border slot: teal, violet/purple, orange, blue, rose/red, lime/green, gold/yellow or indigo. |
| `note` | task/commit/link or metadata | Displayed or retained annotation text according to profile. |
| `interpolation` | chart series | XY linear/smooth/step; radar linear/smooth. tension 0…1 defaults 0.7. Radar fill is boolean and defaults true. |
| `tension` | chart series | XY linear/smooth/step; radar linear/smooth. tension 0…1 defaults 0.7. Radar fill is boolean and defaults true. |
| `fill` | chart series | XY linear/smooth/step; radar linear/smooth. tension 0…1 defaults 0.7. Radar fill is boolean and defaults true. |
| `show_kind` | visible node | Boolean kind caption and metadata rows. Participant kind captions default off. Available detail rows normally display. |
| `show_details` | visible node | Boolean kind caption and metadata rows. Participant kind captions default off. Available detail rows normally display. |
| `border_width` | supported visible boxes | See document control scopes. Local values override document values. A packet field accepts border_width only. |
| `node_style` | supported visible boxes | See document control scopes. Local values override document values. A packet field accepts border_width only. |
| `connector_style` | supported relationship | orthogonal, rounded or curved. Local value overrides the document. |
| `placement` | annotation | bottom (default) and info/success/warning/danger (default info). |
| `tone` | annotation | bottom (default) and info/success/warning/danger (default info). |
| `transport` | MCP connect | transport stdio or streamable_http is required. Optional auth none or oauth; oauth requires HTTP. scope is nonempty quoted text with oauth. |
| `auth` | MCP connect | transport stdio or streamable_http is required. Optional auth none or oauth; oauth requires HTTP. scope is nonempty quoted text with oauth. |
| `scope` | MCP connect | transport stdio or streamable_http is required. Optional auth none or oauth; oauth requires HTTP. scope is nonempty quoted text with oauth. |
| `endpoint` | MCP server | Quoted HTTP(S) endpoint or nonempty quoted process description. Both are inert metadata. Use the field appropriate to the selected transport. |
| `command` | MCP server | Quoted HTTP(S) endpoint or nonempty quoted process description. Both are inert metadata. Use the field appropriate to the selected transport. |
| `path` | Skills artifact | Quoted package-relative path. The map never reads or runs the target. |
| `map_spacing` | MCP/Skills document option | compact, comfortable or spacious. Authored as a document option. |

<a id="value-types"></a>

## Graff 1 property values

Each row is a value contract used by the leaf tables. Entries with a contextual name cover the corresponding property on that specific declaration. An optional value without a listed default stays unspecified.

| Property or context | Accepted value | Meaning and default |
| --- | --- | --- |
| `theme` | `aurora \| paper \| blueprint \| editorial \| playful` | Append -light or -dark for fixed paint. Bare themes follow the host. Graff 1 checks the name. Default: aurora. |
| `layout` | `right \| down` | Preferred reading direction. The state renderer currently uses the same geometry for either value. Default: right. |
| `border_width` | `finite number 0.5…3` | Stroke thickness on supported boxes and packet fields. A local override wins over the document. Unit: SVG user units. Default: profile-specific. |
| `node_style` | `simple \| card` | Box treatment on supported nodes or boundaries. Default: profile-specific. |
| `connector_style` | `orthogonal \| rounded \| curved` | Sharp corners, compact rounded corners, or broad curves. Local relationship overrides the document. Default: curved for flow/state/causal/MCP/Skills, rounded for architecture, orthogonal for model/block. |
| `routing_quality` | `best_effort \| strict` | Keep routed results with warnings or promote unresolved routing warnings to errors. Default: best_effort. |
| `architecture_style` | `graff \| azure \| google_cloud` | Architecture presentation preset. Default: graff. |
| `timeline_style` | `cards \| simple` | Events timeline presentation. Default: cards. |
| `show_bit_numbers` | `true \| false` | Print inclusive positions with packet labels. Default: false. |
| `radar_grid` | `circle \| polygon` | Radar grid geometry. Default: circle. |
| `map_spacing` | `compact \| comfortable \| spacious` | Spacing for MCP or Skills maps. Default: comfortable. |
| `flow_kind` | `actor \| service \| process \| input \| output \| store \| database \| decision \| note` | Semantic node role. Default: service. |
| `in` | `ID` | Parent container or owner. The statement table marks required parents. |
| `description` | `"text"` | Plain-language description. |
| `evidence` | `[id, …]` | List of reference IDs. Causal claims require at least one. Unset elsewhere means no attached references. Default: . |
| `icon` | `registry:name` | Inert icon identifier. Emoji and available registries are host dependent. Unknown local glyphs use a fallback. |
| `show_details` | `true \| false` | Include metadata and member rows when the renderer supports them. Default: true. |
| `show_kind` | `true \| false` | Display a kind caption. Participant boxes normally show their label alone. Default: profile-specific. |
| `factor_role` | `metric \| event \| condition \| behavior` | How the factor participates in the model. |
| `polarity` | `positive \| negative \| mixed \| unknown` | Direction of association or causal influence. |
| `confidence` | `finite number 0…1` | Authored strength of belief, including both endpoints. |
| `lag` | `nonnegative duration` | Time before an influence takes effect. Unit: ms, s, min, h, d. Default: unspecified. |
| `condition` | `"text"` | Plain-language guard on an asserted relation. |
| `mechanism` | `"text"` | Explanation of how the influence occurs. |
| `visibility` | `public \| private \| protected \| package` | Member visibility, drawn as +, −, # or ~. |
| `display` | `"text" \| bare name \| finite number` | Quoted characters remain literal. Bare numbers format canonically. Quote numeric-looking labels to preserve leading zeroes or precision. |
| `data_type` | `"text" \| bare name \| finite number` | Displayed type of a field. |
| `key` | `PK \| FK \| UK` | Primary, foreign or unique field key. |
| `source_cardinality` | `one \| zero_one \| one_many \| zero_many` | Cardinality at the source entity. |
| `target_cardinality` | `one \| zero_one \| one_many \| zero_many` | Cardinality at the target entity. |
| `type` | `requirement \| functional \| interface \| performance \| physical \| design_constraint` | Requirement classification. |
| `external_id` | `"text" \| bare name \| finite number` | Human or external identifier. The diagram ID remains the edit target. |
| `risk` | `low \| medium \| high` | Requirement risk. |
| `verify` | `analysis \| inspection \| test \| demonstration` | Verification method. |
| `docref` | `"text" \| bare name \| finite number` | Supporting document reference carried in the outline. |
| `technology` | `"text" \| bare name` | Implementation technology displayed in a C4 node. |
| `from_port` | `top \| right \| bottom \| left` | Requested source exit side. Default: automatic. |
| `to_port` | `top \| right \| bottom \| left` | Requested target entry side. Default: automatic. |
| `task_status` | `planned \| active \| done \| critical \| milestone` | Task classification. |
| `start` | `YYYY-MM-DD` | Real calendar start date. |
| `end` | `YYYY-MM-DD` | Exclusive calendar end date. |
| `after` | `ID` | Predecessor task in a Gantt schedule. |
| `days` | `finite number ≥ 0` | Gantt task length. Zero permits a milestone. Unit: days. Default: one day when end and duration are both omitted. |
| `score` | `finite number 1…5` | Journey rating. Default: unscored. |
| `actors` | `["label", …]` | Nonempty list of participant labels. |
| `branch` | `ID` | Owning branch. Default: first declared branch, otherwise main. |
| `order` | `whole number ≥ 0` | Relative commit order. |
| `commit_status` | `highlight` | Emphasize a commit. |
| `amount` | `finite number ≥ 0` | Slice amount. The total must be positive. |
| `binary` | `0 \| 1` | Zero-based quadrant row or column. |
| `fraction` | `finite number 0…1` | Normalized position. |
| `categories` | `["label", …]` | Nonempty x-axis category labels. Default: 1 through the longest series. |
| `minimum` | `finite number` | Lower axis bound. Default: radar 0; XY extends from 0 down to the lowest series value. |
| `maximum` | `finite number` | Upper bound, greater than minimum. Default: radar 100; XY covers the data, at least 1 and minimum + max(1, abs(minimum)/10). |
| `mark` | `bar \| line` | Series drawing style. Default: bar for first series, line thereafter. |
| `values` | `[number, …]` | Nonempty list of finite data values in axis/category order. |
| `xy_curve` | `linear \| smooth \| step` | Interpolation between XY points. Default: linear. |
| `radar_curve` | `linear \| smooth` | Interpolation around radar axes. Default: linear. |
| `tension` | `finite number 0…1` | Curvature when interpolation is smooth. Default: 0.7. |
| `fill` | `true \| false` | Fill the radar series polygon. Default: true. |
| `weight` | `finite number ≥ 0` | Amount carried by the flow. Default: required; no assumed weight. |
| `block_row` | `whole number 0…999` | Zero-based block row. |
| `whole` | `whole number ≥ 0` | Zero-based position. |
| `span` | `whole number ≥ 1` | Number of occupied columns. Unit: columns. Default: 1. |
| `columns` | `whole number 1…64` | Common grid width. Unit: columns. Default: 3. |
| `start_bit` | `whole number 0…8191` | First bit, inclusive. Unit: bits. |
| `end_bit` | `whole number start_bit…8191` | Last bit, inclusive. Unit: bits. Default: start_bit. |
| `sample` | `"text"` | Sample field value, 1–120 printable characters. |

<a id="type-flow"></a>

## Flow

A directed graph of work, people and decisions.

`diagram flow id ["Title"] {` · [Example source](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-flow.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-flow.svg)

Document controls: `theme`, `layout`, `border_width`, `node_style`, `connector_style`, `routing_quality`.

| Declaration | Accepted properties |
| --- | --- |
| `node id ["label"]` | `kind` · `actor \| service \| process \| input \| output \| store \| database \| decision \| note`<br>`in` · `ID`<br>`description` · `"text"`<br>`icon` · `registry:name`<br>`border_width` · `finite number 0.5…3`<br>`node_style` · `simple \| card`<br>`evidence` · `[id, …]` |
| `group id ["label"]` | `in` · `ID`<br>`description` · `"text"`<br>`icon` · `registry:name`<br>`border_width` · `finite number 0.5…3`<br>`node_style` · `simple \| card`<br>`evidence` · `[id, …]` |
| `edge id source -> target ["label"]` | `connector_style` · `orthogonal \| rounded \| curved`<br>`evidence` · `[id, …]` |

Semantic format `graff.flow/1-experimental`. Renderer `system`.

<a id="type-sequence"></a>

## Sequence

Lifelines follow declaration order. Events run from top to bottom in source order.

`diagram sequence id ["Title"] {` · [Example source](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-sequence.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-sequence.svg)

Document controls: `theme`, `border_width`, `node_style`.

| Declaration | Accepted properties |
| --- | --- |
| `actor id ["label"]` | `description` · `"text"`<br>`icon` · `registry:name`<br>`border_width` · `finite number 0.5…3`<br>`node_style` · `simple \| card`<br>`evidence` · `[id, …]` |
| `participant id ["label"]` | `description` · `"text"`<br>`icon` · `registry:name`<br>`border_width` · `finite number 0.5…3`<br>`node_style` · `simple \| card`<br>`evidence` · `[id, …]` |
| `message id source -> target ["label"]` | `evidence` · `[id, …]` |
| `reply id source -> target ["label"]` | `evidence` · `[id, …]` |
| `signal id source -> target ["label"]` | `evidence` · `[id, …]` |
| `alt <id> {` | — |
| `case <id> "guard" {` | — |
| `opt <id> "guard" {` | — |
| `note <id> "text" over <lifeline> [<second_lifeline>] \| left_of <lifeline> \| right_of <lifeline>` | — |

Semantic format `graff.sequence/1-experimental`. Renderer `sequence`.

<a id="type-state"></a>

## State

States and transitions. Initial and final marks can carry evidence and descriptions.

`diagram state id ["Title"] {` · [Example source](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-state.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-state.svg)

Document controls: `theme`, `layout`, `border_width`, `node_style`, `connector_style`, `routing_quality`.

| Declaration | Accepted properties |
| --- | --- |
| `state id ["label"]` | `in` · `ID`<br>`description` · `"text"`<br>`icon` · `registry:name`<br>`border_width` · `finite number 0.5…3`<br>`node_style` · `simple \| card`<br>`evidence` · `[id, …]` |
| `initial id ["label"]` | `in` · `ID`<br>`description` · `"text"`<br>`evidence` · `[id, …]` |
| `final id ["label"]` | `in` · `ID`<br>`description` · `"text"`<br>`evidence` · `[id, …]` |
| `transition id source -> target ["label"]` | `connector_style` · `orthogonal \| rounded \| curved`<br>`evidence` · `[id, …]` |

Semantic format `graff.state/1-experimental`. Renderer `state`.

<a id="type-causal"></a>

## Causal

Use an explicit claim and cite its evidence. A correlation remains an association.

`diagram causal id ["Title"] {` · [Example source](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-causal.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-causal.svg)

Document controls: `theme`, `layout`, `border_width`, `node_style`, `connector_style`, `routing_quality`.

| Declaration | Accepted properties |
| --- | --- |
| `factor id ["label"]` | `role` · `metric \| event \| condition \| behavior`<br>`in` · `ID`<br>`description` · `"text"`<br>`icon` · `registry:name`<br>`border_width` · `finite number 0.5…3`<br>`node_style` · `simple \| card`<br>`evidence` · `[id, …]` |
| `outcome id ["label"]` | `in` · `ID`<br>`description` · `"text"`<br>`icon` · `registry:name`<br>`border_width` · `finite number 0.5…3`<br>`node_style` · `simple \| card`<br>`evidence` · `[id, …]` |
| `intervention id ["label"]` | `in` · `ID`<br>`description` · `"text"`<br>`icon` · `registry:name`<br>`border_width` · `finite number 0.5…3`<br>`node_style` · `simple \| card`<br>`evidence` · `[id, …]` |
| `group id ["label"]` | `in` · `ID`<br>`description` · `"text"`<br>`icon` · `registry:name`<br>`border_width` · `finite number 0.5…3`<br>`node_style` · `simple \| card`<br>`evidence` · `[id, …]` |
| `cause id source -> target ["label"]` | `polarity` · `positive \| negative \| mixed \| unknown`<br>`confidence` · `finite number 0…1`<br>`lag` · `nonnegative duration`<br>`condition` · `"text"`<br>`mechanism` · `"text"`<br>`evidence` **required** · `[id, …]`<br>`connector_style` · `orthogonal \| rounded \| curved` |
| `enable id source -> target ["label"]` | `confidence` · `finite number 0…1`<br>`lag` · `nonnegative duration`<br>`condition` · `"text"`<br>`mechanism` · `"text"`<br>`evidence` **required** · `[id, …]`<br>`connector_style` · `orthogonal \| rounded \| curved` |
| `prevent id source -> target ["label"]` | `confidence` · `finite number 0…1`<br>`lag` · `nonnegative duration`<br>`condition` · `"text"`<br>`mechanism` · `"text"`<br>`evidence` **required** · `[id, …]`<br>`connector_style` · `orthogonal \| rounded \| curved` |
| `depend id source -> target ["label"]` | `confidence` · `finite number 0…1`<br>`condition` · `"text"`<br>`evidence` **required** · `[id, …]`<br>`connector_style` · `orthogonal \| rounded \| curved` |
| `correlate id source -> target ["label"]` | `polarity` · `positive \| negative \| mixed \| unknown`<br>`confidence` · `finite number 0…1`<br>`lag` · `nonnegative duration`<br>`condition` · `"text"`<br>`evidence` · `[id, …]`<br>`connector_style` · `orthogonal \| rounded \| curved` |

Semantic format `graff.causal/1-experimental`. Renderer `system`.

<a id="type-class"></a>

## Class

Classes contain field and operation rows. Generalization runs from general to specialized; composition from whole to part.

`diagram class id ["Title"] {` · [Example source](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-class.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-class.svg)

Document controls: `theme`, `border_width`, `node_style`, `connector_style`, `routing_quality`.

| Declaration | Accepted properties |
| --- | --- |
| `class id ["label"]` | `description` · `"text"`<br>`show_details` · `true \| false`<br>`show_kind` · `true \| false`<br>`icon` · `registry:name`<br>`border_width` · `finite number 0.5…3`<br>`node_style` · `simple \| card`<br>`evidence` · `[id, …]` |
| `field id ["label"]` | `in` **required** · `ID`<br>`visibility` · `public \| private \| protected \| package`<br>`data_type` · `"text" \| bare name \| finite number`<br>`evidence` · `[id, …]` |
| `operation id ["label"]` | `in` **required** · `ID`<br>`visibility` · `public \| private \| protected \| package`<br>`evidence` · `[id, …]` |
| `generalize id source -> target` | `connector_style` · `orthogonal \| rounded \| curved`<br>`evidence` · `[id, …]` |
| `compose id source -> target` | `source_cardinality` · `"text" \| bare name \| finite number`<br>`target_cardinality` · `"text" \| bare name \| finite number`<br>`connector_style` · `orthogonal \| rounded \| curved`<br>`evidence` · `[id, …]` |
| `associate id source -> target ["label"]` | `source_cardinality` · `"text" \| bare name \| finite number`<br>`target_cardinality` · `"text" \| bare name \| finite number`<br>`connector_style` · `orthogonal \| rounded \| curved`<br>`evidence` · `[id, …]` |

Semantic format `graff.class/1-experimental`. Renderer `model class`.

<a id="type-er"></a>

## Entity–relationship

Entities contain fields. Relationships connect entities and can show cardinality at each end.

`diagram er id ["Title"] {` · [Example source](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-er.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-er.svg)

Document controls: `theme`, `border_width`, `node_style`, `connector_style`, `routing_quality`.

| Declaration | Accepted properties |
| --- | --- |
| `entity id ["label"]` | `description` · `"text"`<br>`show_details` · `true \| false`<br>`show_kind` · `true \| false`<br>`icon` · `registry:name`<br>`border_width` · `finite number 0.5…3`<br>`node_style` · `simple \| card`<br>`evidence` · `[id, …]` |
| `field id ["label"]` | `in` **required** · `ID`<br>`data_type` · `"text" \| bare name \| finite number`<br>`key` · `PK \| FK \| UK`<br>`evidence` · `[id, …]` |
| `relation id source -> target ["label"]` | `source_cardinality` · `one \| zero_one \| one_many \| zero_many`<br>`target_cardinality` · `one \| zero_one \| one_many \| zero_many`<br>`connector_style` · `orthogonal \| rounded \| curved`<br>`evidence` · `[id, …]` |

Semantic format `graff.er/1-experimental`. Renderer `model er`.

<a id="type-requirements"></a>

## Requirements

Write a typed requirement, then link a component or another requirement to it.

`diagram requirements id ["Title"] {` · [Example source](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-requirements.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-requirements.svg)

Document controls: `theme`, `border_width`, `node_style`, `connector_style`, `routing_quality`.

| Declaration | Accepted properties |
| --- | --- |
| `requirement id ["label"]` | `description` · `"text"`<br>`type` · `requirement \| functional \| interface \| performance \| physical \| design_constraint`<br>`external_id` · `"text" \| bare name \| finite number`<br>`risk` · `low \| medium \| high`<br>`verify` · `analysis \| inspection \| test \| demonstration`<br>`show_kind` · `true \| false`<br>`icon` · `registry:name`<br>`border_width` · `finite number 0.5…3`<br>`node_style` · `simple \| card`<br>`evidence` · `[id, …]` |
| `component id ["label"]` | `description` · `"text"`<br>`role` · `"text" \| bare name \| finite number`<br>`docref` · `"text" \| bare name \| finite number`<br>`show_kind` · `true \| false`<br>`icon` · `registry:name`<br>`border_width` · `finite number 0.5…3`<br>`node_style` · `simple \| card`<br>`evidence` · `[id, …]` |
| `contains id source -> target` | `connector_style` · `orthogonal \| rounded \| curved`<br>`evidence` · `[id, …]` |
| `copies id source -> target` | `connector_style` · `orthogonal \| rounded \| curved`<br>`evidence` · `[id, …]` |
| `derives id source -> target` | `connector_style` · `orthogonal \| rounded \| curved`<br>`evidence` · `[id, …]` |
| `satisfies id source -> target` | `connector_style` · `orthogonal \| rounded \| curved`<br>`evidence` · `[id, …]` |
| `verifies id source -> target` | `connector_style` · `orthogonal \| rounded \| curved`<br>`evidence` · `[id, …]` |
| `refines id source -> target` | `connector_style` · `orthogonal \| rounded \| curved`<br>`evidence` · `[id, …]` |
| `traces id source -> target` | `connector_style` · `orthogonal \| rounded \| curved`<br>`evidence` · `[id, …]` |

Semantic format `graff.requirements/1-experimental`. Renderer `model requirements`.

<a id="type-context"></a>

## C4 context

Map people and software systems using C4 roles.

`diagram context id ["Title"] {` · [Example source](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-context.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-context.svg)

Document controls: `theme`, `layout`, `border_width`, `node_style`, `connector_style`, `routing_quality`, `architecture_style`.

| Declaration | Accepted properties |
| --- | --- |
| `person id ["label"]` | `description` · `"text"`<br>`technology` · `"text" \| bare name`<br>`show_kind` · `true \| false`<br>`icon` · `registry:name`<br>`border_width` · `finite number 0.5…3`<br>`node_style` · `simple \| card`<br>`evidence` · `[id, …]` |
| `system id ["label"]` | `description` · `"text"`<br>`technology` · `"text" \| bare name`<br>`show_kind` · `true \| false`<br>`icon` · `registry:name`<br>`border_width` · `finite number 0.5…3`<br>`node_style` · `simple \| card`<br>`evidence` · `[id, …]` |
| `external id ["label"]` | `description` · `"text"`<br>`technology` · `"text" \| bare name`<br>`show_kind` · `true \| false`<br>`icon` · `registry:name`<br>`border_width` · `finite number 0.5…3`<br>`node_style` · `simple \| card`<br>`evidence` · `[id, …]` |
| `container id ["label"]` | `description` · `"text"`<br>`technology` · `"text" \| bare name`<br>`show_kind` · `true \| false`<br>`icon` · `registry:name`<br>`border_width` · `finite number 0.5…3`<br>`node_style` · `simple \| card`<br>`evidence` · `[id, …]` |
| `component id ["label"]` | `description` · `"text"`<br>`technology` · `"text" \| bare name`<br>`show_kind` · `true \| false`<br>`icon` · `registry:name`<br>`border_width` · `finite number 0.5…3`<br>`node_style` · `simple \| card`<br>`evidence` · `[id, …]` |
| `connect id source -> target ["label"]` | `connector_style` · `orthogonal \| rounded \| curved`<br>`evidence` · `[id, …]` |

Semantic format `graff.context/1-experimental`. Renderer `architecture context`.

<a id="type-deployment"></a>

## Deployment

Place components inside deployment boundaries and connect components.

`diagram deployment id ["Title"] {` · [Example source](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-deployment.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-deployment.svg)

Document controls: `theme`, `layout`, `border_width`, `node_style`, `connector_style`, `routing_quality`, `architecture_style`.

| Declaration | Accepted properties |
| --- | --- |
| `group id ["label"]` | `in` · `ID`<br>`icon` · `registry:name`<br>`border_width` · `finite number 0.5…3`<br>`node_style` · `simple \| card`<br>`evidence` · `[id, …]` |
| `component id ["label"]` | `in` · `ID`<br>`description` · `"text"`<br>`show_kind` · `true \| false`<br>`icon` · `registry:name`<br>`border_width` · `finite number 0.5…3`<br>`node_style` · `simple \| card`<br>`evidence` · `[id, …]` |
| `connect id source -> target ["label"]` | `from_port` · `top \| right \| bottom \| left`<br>`to_port` · `top \| right \| bottom \| left`<br>`connector_style` · `orthogonal \| rounded \| curved`<br>`evidence` · `[id, …]` |

Semantic format `graff.deployment/1-experimental`. Renderer `architecture deployment`.

<a id="type-hierarchy"></a>

## Hierarchy

Each item can belong to a parent item.

`diagram hierarchy id ["Title"] {` · [Example source](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-hierarchy.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-hierarchy.svg)

Document controls: `theme`, `border_width`, `node_style`.

| Declaration | Accepted properties |
| --- | --- |
| `item id ["label"]` | `in` · `ID`<br>`icon` · `registry:name`<br>`border_width` · `finite number 0.5…3`<br>`node_style` · `simple \| card`<br>`evidence` · `[id, …]` |

Semantic format `graff.hierarchy/1-experimental`. Renderer `hierarchy`.

<a id="type-board"></a>

## Board

Place each card in a lane. Lanes keep their declared order.

`diagram board id ["Title"] {` · [Example source](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-board.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-board.svg)

Document controls: `theme`, `border_width`, `node_style`.

| Declaration | Accepted properties |
| --- | --- |
| `lane id ["label"]` | `border_width` · `finite number 0.5…3`<br>`node_style` · `simple \| card`<br>`evidence` · `[id, …]` |
| `card id ["label"]` | `in` **required** · `ID`<br>`description` · `"text"`<br>`border_width` · `finite number 0.5…3`<br>`node_style` · `simple \| card`<br>`evidence` · `[id, …]` |

Semantic format `graff.board/1-experimental`. Renderer `board`.

<a id="type-gantt"></a>

## Gantt

Schedule at least one task. An undated task starts at the running cursor. Without a duration or end it lasts one day. An explicit duration determines length. When start, end and duration are all given, the dates and duration must agree. An explicit start overrides after with a warning. Dependencies must be acyclic. Maximum span is 100,000 days.

`diagram gantt id ["Title"] {` · [Example source](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-gantt.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-gantt.svg)

Document controls: `theme`.

| Declaration | Accepted properties |
| --- | --- |
| `section id ["label"]` | `evidence` · `[id, …]` |
| `task id ["label"]` | `in` · `ID`<br>`status` · `planned \| active \| done \| critical \| milestone`<br>`start` · `YYYY-MM-DD`<br>`end` · `YYYY-MM-DD`<br>`after` · `ID`<br>`duration` · `finite number ≥ 0`<br>`note` · `"text" \| bare name \| finite number`<br>`evidence` · `[id, …]` |

Semantic format `graff.gantt/1-experimental`. Renderer `timeline gantt`.

<a id="type-events"></a>

## Events

Group dated events under optional sections. Dates here are display labels.

`diagram events id ["Title"] {` · [Example source](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-events.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-events.svg)

Document controls: `theme`, `timeline_style`.

| Declaration | Accepted properties |
| --- | --- |
| `section id ["label"]` | `evidence` · `[id, …]` |
| `event id ["label"]` | `in` · `ID`<br>`date` · `"text" \| bare name \| finite number`<br>`evidence` · `[id, …]` |

Semantic format `graff.events/1-experimental`. Renderer `timeline events`.

<a id="type-journey"></a>

## Journey

Group events by section. Each event can name participants and a satisfaction score. An omitted score is unscored.

`diagram journey id ["Title"] {` · [Example source](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-journey.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-journey.svg)

Document controls: `theme`.

| Declaration | Accepted properties |
| --- | --- |
| `section id ["label"]` | `date` · `"text" \| bare name \| finite number`<br>`evidence` · `[id, …]` |
| `event id ["label"]` | `in` · `ID`<br>`score` · `finite number 1…5`<br>`actors` · `["label", …]`<br>`date` · `"text" \| bare name \| finite number`<br>`evidence` · `[id, …]` |

Semantic format `graff.journey/1-experimental`. Renderer `timeline journey`.

<a id="type-git"></a>

## Git history

Commits use an explicit branch, the first declared branch, or an implicit main branch. Fork and merge connect distinct commits.

`diagram git id ["Title"] {` · [Example source](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-git.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-git.svg)

Document controls: `theme`.

| Declaration | Accepted properties |
| --- | --- |
| `branch id ["label"]` | `evidence` · `[id, …]` |
| `commit id ["label"]` | `branch` · `ID`<br>`order` · `whole number ≥ 0`<br>`status` · `highlight`<br>`note` · `"text" \| bare name \| finite number`<br>`evidence` · `[id, …]` |
| `fork id source -> target` | `note` · `"text" \| bare name \| finite number`<br>`evidence` · `[id, …]` |
| `merge id source -> target` | `note` · `"text" \| bare name \| finite number`<br>`evidence` · `[id, …]` |

Semantic format `graff.git/1-experimental`. Renderer `timeline git`.

<a id="type-pie"></a>

## Pie

Each slice needs a nonnegative amount. The total must be positive and drawable.

`diagram pie id ["Title"] {` · [Example source](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-pie.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-pie.svg)

Document controls: `theme`.

| Declaration | Accepted properties |
| --- | --- |
| `slice id ["label"]` | `value` **required** · `finite number ≥ 0`<br>`evidence` · `[id, …]` |

Semantic format `graff.pie/1-experimental`. Renderer `chart pie`.

<a id="type-quadrant"></a>

## Quadrant

A point has normalized x and y coordinates. One cell label per quadrant and one axis of each kind.

`diagram quadrant id ["Title"] {` · [Example source](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-quadrant.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-quadrant.svg)

Document controls: `theme`.

| Declaration | Accepted properties |
| --- | --- |
| `x_axis id ["label"]` | `evidence` · `[id, …]` |
| `y_axis id ["label"]` | `evidence` · `[id, …]` |
| `cell id ["label"]` | `row` **required** · `0 \| 1`<br>`column` **required** · `0 \| 1`<br>`evidence` · `[id, …]` |
| `point id ["label"]` | `x` **required** · `finite number 0…1`<br>`y` **required** · `finite number 0…1`<br>`evidence` · `[id, …]` |

Semantic format `graff.quadrant/1-experimental`. Renderer `chart quadrant`.

<a id="type-xy"></a>

## XY chart

Each series has one value per category. Without category labels, columns use 1 through n. The first series defaults to bar and later series to line. Values must fit the declared y range. Interpolation and tension on bars warn. Tension only affects smooth lines.

`diagram xy id ["Title"] {` · [Example source](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-xy.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-xy.svg)

Document controls: `theme`.

| Declaration | Accepted properties |
| --- | --- |
| `x_axis id ["label"]` | `categories` · `["label", …]`<br>`evidence` · `[id, …]` |
| `y_axis id ["label"]` | `minimum` · `finite number`<br>`maximum` · `finite number`<br>`evidence` · `[id, …]` |
| `series id ["label"]` | `mark` · `bar \| line`<br>`values` **required** · `[number, …]`<br>`interpolation` · `linear \| smooth \| step`<br>`tension` · `finite number 0…1`<br>`evidence` · `[id, …]` |

Semantic format `graff.xy/1-experimental`. Renderer `chart xy`.

<a id="type-radar"></a>

## Radar

Use at least three axes and one series. Values follow axis order. Each axis defaults to 0 through 100 and the maximum must exceed the minimum.

`diagram radar id ["Title"] {` · [Example source](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-radar.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-radar.svg)

Document controls: `theme`, `radar_grid`.

| Declaration | Accepted properties |
| --- | --- |
| `axis id ["label"]` | `minimum` · `finite number`<br>`maximum` · `finite number`<br>`evidence` · `[id, …]` |
| `series id ["label"]` | `values` **required** · `[number, …]`<br>`interpolation` · `linear \| smooth`<br>`tension` · `finite number 0…1`<br>`fill` · `true \| false`<br>`evidence` · `[id, …]` |

Semantic format `graff.radar/1-experimental`. Renderer `chart radar`.

<a id="type-sankey"></a>

## Sankey

Flow weights are nonnegative and required. Flows form an acyclic directed graph. Intermediate column crossings are bounded to 20,000.

`diagram sankey id ["Title"] {` · [Example source](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-sankey.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-sankey.svg)

Document controls: `theme`.

| Declaration | Accepted properties |
| --- | --- |
| `node id ["label"]` | `evidence` · `[id, …]` |
| `flow id source -> target ["label"]` | `weight` **required** · `finite number ≥ 0`<br>`evidence` · `[id, …]` |

Semantic format `graff.sankey/1-experimental`. Renderer `chart sankey`.

<a id="type-block"></a>

## Block grid

Cell positions are zero-based and cannot overlap. One consistent grid width, default three columns.

`diagram block id ["Title"] {` · [Example source](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-block.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-block.svg)

Document controls: `theme`, `border_width`, `node_style`.

| Declaration | Accepted properties |
| --- | --- |
| `cell id ["label"]` | `row` **required** · `whole number 0…999`<br>`column` **required** · `whole number ≥ 0`<br>`span` · `whole number ≥ 1`<br>`columns` · `whole number 1…64`<br>`icon` · `registry:name`<br>`border_width` · `finite number 0.5…3`<br>`node_style` · `simple \| card`<br>`evidence` · `[id, …]` |

Semantic format `graff.block/1-experimental`. Renderer `grid block`.

<a id="type-packet"></a>

## Packet grid

Use inclusive bit numbers. A missing end makes a one-bit field. Fields cannot overlap and span 32-bit display rows.

`diagram packet id ["Title"] {` · [Example source](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-packet.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-packet.svg)

Document controls: `theme`, `border_width`, `show_bit_numbers`.

| Declaration | Accepted properties |
| --- | --- |
| `field id ["label"]` | `start_bit` **required** · `whole number 0…8191`<br>`end_bit` · `whole number start_bit…8191`<br>`sample` · `"text"`<br>`border_width` · `finite number 0.5…3`<br>`evidence` · `[id, …]` |

Semantic format `graff.packet/1-experimental`. Renderer `grid packet`.

<a id="editing-migration-and-limits"></a>

## Editing, migration and limits

Typed operations act on 0.x stable IDs. Apply an ordered JSON array to a base source. The compiler validates the whole candidate, including profile rules, then returns source or an error. With default source preservation, an unchanged region keeps its spacing, comments and newlines. The response records `patched` or a full `formatted` fallback. `--canonical` requests full formatting. Preview first and use `--write` for an explicit file update. Deleting a node also cleans dependent edges and step targets. Review references to deleted concepts in the surrounding material.

The exact operation schema below describes nested elements, relationships, citations, steps, semantic values, and motion. The SDK's optional proposal workflow carries a base revision, actor, disposition, rationale and operations. A host checks revision identity and decides when to store a reviewed candidate. A language model or completion response has no direct write effect.

Migration targets `1` and returns `migrated`, `refused` or `already_current`. A migrated candidate includes its canonical text, diff, diagnostics and provenance. Some accepted 0.x facts or presentation settings have no faithful Graff 1 equivalent. Examples include MCP/Skills maps, manual pins, authored motion effects and packet border colors. A refused migration reports the affected field or declaration. Preserve the original and inspect the report. No Graff 1 typed mutation, source patch, slice, 0.x intent inspection or phrase resolution is available. Compiling, validating, formatting, state rendering and explicit migration work across the published dialects. Mermaid import is a host conversion flow.

The source limit is 1,048,576 UTF-8 bytes or 20,000 lines. The core bounds each document to 2,000 elements and 5,000 relationships, each story to 2,000 steps, and ordinary containment to 128 levels. MCP/Skills maps limit containment to 16. Specialized profiles add their own range and scheduling checks. Diagnostics carry a stable code, severity, message and available location or semantic ID. Validation can return warnings. Compilation must succeed before an example is considered drawable.

<a id="operation-schema"></a>

## Typed edit operations

The 0.x operation union is closed. Each JSON object includes `type`. Required fields below exclude that discriminator. The linked JSON Schema specifies complete nested values and disallows extra keys on the operation.

| Operation | Required arguments | Optional arguments |
| --- | --- | --- |
| `add_element` | `element` | — |
| `update_element` | `id` | `description`, `icon`, `kind`, `label`, `parent` |
| `pin_element` | `id`, `point` | — |
| `unpin_element` | `id` | — |
| `remove_element` | `id` | — |
| `add_relationship` | `relationship` | — |
| `update_relationship` | `id` | `delivery`, `kind`, `label`, `source`, `target` |
| `remove_relationship` | `id` | — |
| `set_element_attribute` | `id`, `name`, `value` | — |
| `unset_element_attribute` | `id`, `name` | — |
| `set_relationship_attribute` | `id`, `name`, `value` | — |
| `unset_relationship_attribute` | `id`, `name` | — |
| `set_document_option` | `name`, `value` | — |
| `unset_document_option` | `name` | — |
| `add_story` | `story` | — |
| `add_story_step` | `story_id`, `step` | — |
| `remove_story_step` | `story_id`, `step_id` | — |
| `set_theme` | `theme` | — |
| `attach_citation` | `citation` | `target_id` |

[diagram-intent schema](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/schemas/diagram-intent.json) · [scene-observation schema](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/schemas/scene-observation.json) · [artifact-manifest schema](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/schemas/artifact-manifest.json) · [diagram-patch schema](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/schemas/diagram-patch.json) · [diagram-operation schema](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/schemas/diagram-operation.json) · [comparison-report schema](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/schemas/comparison-report.json) · [audit-report schema](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/schemas/audit-report.json) · [graff1-document schema](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/schemas/graff1-document.json)

<a id="command-line"></a>

## Command line

Run `diagraff --version` to identify your binary. Most source commands read a UTF-8 file. Output goes to stdout unless a destination or explicit write mode is selected.

### `diagraff export`

Export animation kits to a bundle of stills, GIF, transcript and browser timeline

`diagraff export [OPTIONS] <INPUT>`

```text
<INPUT>  A graff.animation/1 kit or a pinned graff.plugin/1 descriptor
```

| Option | Meaning |
| --- | --- |
| `--out <OUT>` | Bundle directory. Existing Graff exports may be rebuilt |
| `-o, --output <OUTPUT>` | Single file to write with --format |
| `--format <FORMAT>` | [possible values: bundle, gif, png, svg, timeline, json, transcript] |
| `--no-gif` | Export stills, timeline and transcript only |
| `--step <STEP>` | Named held step for PNG or SVG |
| `--at <AT>` | Timeline time in milliseconds. |
| `--fps <FPS>` | Integer 1–50 frames/second. GIF default 12. |
| `--loop <LOOP>` | GIF repeat count. Default 0 (indefinite), -1 plays once. |
| `--width <WIDTH>` | Positive viewport width, ≤8,192 pixels. |
| `--height <HEIGHT>` | Positive viewport height, ≤8,192 pixels. Defaults to derived aspect. |
| `--hold-scale <HOLD_SCALE>` | Scale authored holds, default 1. |
| `--hold-ms <HOLD_MS>` | Override hold time, 0–120,000 milliseconds. |
| `--captions` | Include supplemental step text in each frame |
| `--no-captions` | Omit visible captions from exported frames |
| `--reduced-motion` | Export settled frames for viewers who prefer reduced motion |
| `-h, --help` | Print help |

### `diagraff schema`

Export a versioned JSON Schema for interchange consumers

`diagraff schema [OPTIONS] <KIND>`

```text
<KIND>
          Possible values:
          - diagram-intent
          - scene-observation
          - artifact-manifest
          - diagram-patch
          - diagram-operation
          - comparison-report
          - audit-report
          - graff1-document:   The experimental typed Graff 1 document (`DocumentV1`)
```

| Option | Meaning |
| --- | --- |
| `-o, --output <OUTPUT>` | Destination. Defaults to stdout |
| `-h, --help` | Print help (see a summary with '-h') |

### `diagraff inspect`

Inspect source as the versioned semantic intent representation

`diagraff inspect <INPUT>`

```text
<INPUT>
```

| Option | Meaning |
| --- | --- |
| `-h, --help` | Print help |

### `diagraff analyze`

Compile source and emit versioned intent, scene, hashes, SVG, and diagnostics

`diagraff analyze [OPTIONS] <INPUT>`

```text
<INPUT>
```

| Option | Meaning |
| --- | --- |
| `--theme <THEME>` | Override the source theme family or mode-suffixed family. |
| `--mode <MODE>` | light or dark. Omit to follow the chosen theme/host. |
| `--static-only` | Compile a standalone drawing without the playback track. |
| `-h, --help` | Print help |

### `diagraff validate`

Parse and validate a .graff document

`diagraff validate [OPTIONS] <INPUT>`

```text
<INPUT>
```

| Option | Meaning |
| --- | --- |
| `--json` | Print diagnostics as JSON |
| `-h, --help` | Print help |

### `diagraff format`

Produce the canonical, deterministic source representation

`diagraff format [OPTIONS] <INPUT>`

```text
<INPUT>
```

| Option | Meaning |
| --- | --- |
| `--write` | Replace the input file (atomically, with the same canonical LF, BOM-free text stdout would show) instead of writing to stdout |
| `-h, --help` | Print help |

### `diagraff apply`

Apply typed semantic operations, changing only the statements they touch

`diagraff apply [OPTIONS] --operations <OPERATIONS> <INPUT>`

```text
<INPUT>
```

| Option | Meaning |
| --- | --- |
| `--operations <OPERATIONS>` | JSON array of operations (`diagraff schema diagram-operation`); `-` reads standard input |
| `--write` | Replace the input file instead of writing to stdout |
| `--canonical` | Write the whole candidate in canonical form instead of patching |
| `--json` | Print `{"source","mode","fallback_reason"?}` JSON instead of source |
| `-h, --help` | Print help |

### `diagraff compile`

Compile source to accessible SVG and, optionally, a complete artifact

`diagraff compile [OPTIONS] <INPUT>`

```text
<INPUT>
```

| Option | Meaning |
| --- | --- |
| `-o, --output <OUTPUT>` | SVG destination. Defaults to stdout |
| `--artifact <ARTIFACT>` | JSON artifact destination for runtime hydration and inspection |
| `--theme <THEME>` | Override the source theme family or mode-suffixed family. |
| `--mode <MODE>` | light or dark. Omit to follow the chosen theme/host. |
| `--viewport-width <VIEWPORT_WIDTH>` | Positive viewport width in pixels for responsive layout. |
| `--static-only` | Omit authored motion behavior from rendering consumers |
| `--state <STATE>` | Write the truthful static view of one explanation state (for example `story/step`) as the SVG output. The artifact is unchanged |
| `-h, --help` | Print help |

### `diagraff migrate`

Preview an explicit 0.x → Graff 1 migration; `--write` accepts it.

`diagraff migrate [OPTIONS] <INPUT>`

```text
<INPUT>
```

| Option | Meaning |
| --- | --- |
| `--to <TO>` | Migration target language version. Defaults to 1. |
| `--write` | Replace the input file (atomically) with the migrated source |
| `--json` | Print the full migration report as JSON |
| `-h, --help` | Print help (see a summary with '-h') |

### `diagraff capabilities`

Report supported syntax versions, leaf types, schema hashes and migration paths

`diagraff capabilities [OPTIONS]`

| Option | Meaning |
| --- | --- |
| `--json` | Print JSON (the same body as `GET /v1/capabilities`) |
| `-h, --help` | Print help |

### `diagraff slice`

Return a deterministic, token-budgeted neighborhood for RAG

`diagraff slice [OPTIONS] <INPUT>`

```text
<INPUT>
```

| Option | Meaning |
| --- | --- |
| `--root <ROOT>` | Repeat for semantic root IDs. Omit to start from the whole diagram. |
| `--depth <DEPTH>` | Neighborhood distance in graph hops. Default 1. |
| `--token-budget <TOKEN_BUDGET>` | Deterministic estimated token budget. Default 2,000. |
| `--revision <REVISION>` | Citation revision label, default head. |
| `-h, --help` | Print help |

<a id="http-api"></a>

## HTTP compiler API

These routes belong to a compiler server you operate or that your host exposes. The public reference URLs serve static files. Send JSON with Content-Type application/json. The server limits request bodies to 1,200,000 bytes. A diagram error returns HTTP 422. A busy worker pool returns 503 with Retry-After 1.

| Route | Body fields | Result |
| --- | --- | --- |
| `GET /health` | — | Service status, name and compiler version. Remains available when compiler workers are busy. |
| `GET /v1/capabilities` | — | Syntax versions, leaf contracts, migration paths and schema fingerprints. |
| `GET /v1/schema/operations` | — | JSON Schema for each supported 0.x typed operation, with all nested definitions. |
| `POST /v1/compile` | `source`, `options?` | Compiled artifact including SVG, outline, state data, hashes and diagnostics. The x-graff-compiler-version response header identifies the compiler. |
| `POST /v1/state` | `source`, `state_id`, `options?` | Static result with canonical state_id, story_id, index, state_count, summary, present, pending, named_states, state and svg. An unknown state returns 422 with valid IDs. |
| `POST /v1/validate` | `source` | Object containing diagnostics. Examine severity even when parsing succeeds. |
| `POST /v1/format` | `source` | Object containing canonical source. |
| `POST /v1/migrate` | `source`, `to?` | Stateless migration preview. All three outcomes return HTTP 200. Review status, diagnostics and candidate before saving. |
| `POST /v1/diff` | `before_source`, `after_source` | Semantic changes to validated documents in the same syntax family. Graff 1 comparisons use the full typed document. Use migration equivalence for cross-family review. |
| `POST /v1/operations/apply` | `source`, `operations`, `preserve_source?`, `report_mode?` | 0.x only. Returns source. The x-graff-apply-mode header reports patched or formatted. With report_mode, the body also includes mode and any fallback_reason. |
| `POST /v1/slice` | `source`, `request` | 0.x only. Returns the neighborhood document, outline, citation_uris, estimated_tokens, truncated, budget_exceeded and unresolved_roots. |
| `POST /v1/resolve` | `source`, `phrase`, `selection?`, `state_id?`, `recent?`, `max_candidates?` | 0.x only. Returns resolved, ambiguous or not_found with candidate IDs and an explanation, all HTTP 200. Invalid request parameters return 422. |

### Request fields

| Field | Type | Contract |
| --- | --- | --- |
| `source, before_source, after_source` | string | UTF-8 .graff source. POST sends a JSON object. |
| `options` | object | Optional compile controls. theme is a string override; render_mode is light or dark (omit for automatic behavior); viewport_width is a positive number in pixels; static_only defaults false. |
| `state_id` | string | Narrative start ID or story/step. For static rendering the limit is 300 bytes. In resolve the value is optional. |
| `to` | string | Migration target, default 1 expressed as a string. |
| `operations` | array of DiagramOperation | Transaction over one base source. See each operation's typed argument schema. |
| `preserve_source, report_mode` | boolean | Default true for preserve_source and false for report_mode. |
| `request` | object | Slice request: roots is a required array of IDs (up to 7,000, each ≤128 bytes); depth defaults to 1, token_budget to 2,000, revision to head in citation URIs (≤512 bytes). An empty HTTP revision also maps to head. Estimates are ceil(compact UTF-8 JSON bytes ÷ 4). |
| `phrase` | string | Typed or transcribed reference up to 500 Unicode characters. The resolver considers up to the last 64 words. |
| `selection, recent` | array of IDs | Optional viewer selections and recent references, default empty. At most 100 each, 1–300 bytes per ID. |
| `max_candidates` | integer | Requested candidate limit 1–10, default 5. |

<a id="browser-sdk-and-runtime"></a>

## Browser, SDK and runtime

Use `createHttpTransport(baseUrl)` or `createWasmTransport(bindings)` from `@diagraff/sdk`. The included transports support `compile`, `validate`, `format`, `applyOperations`, `applyOperationsReport`, `slice`, `stateSvg`, `resolveReference`, `diff`, `migrate` and `capabilities`. Legacy custom transports may omit the latter optional methods. Methods return promises and take source, plus an options object, state ID, operations, slice or reference request as appropriate. `compile(source, {theme, render_mode, viewport_width, static_only})` returns the artifact. The `stateSvg` result includes one persistent state and its SVG.

```js
import { createHttpTransport } from "@diagraff/sdk";

const compiler = createHttpTransport("http://127.0.0.1:7373");
const source = await (await fetch("./shelf.graff")).text();
const artifact = await compiler.compile(source, { render_mode: "light" });
document.querySelector("diagraff-diagram").artifact = artifact;
```

`@diagraff/browser` exposes `createWorkerCompiler` for background compilation and `createInThreadCompiler` for direct execution. Use the packaged worker and WASM URLs or supply their resolved URLs. Await the worker's readiness, pass a request signal or timeout to cancel, and dispose of it when the host closes. WASM `invoke(method, source, payloadJson)` supports compile, validate, format, diff, apply_operations, apply_operations_report, slice, state, resolve, migrate and capabilities. `version_info()` and `operation_schema()` expose compatibility data.

Load `@diagraff/runtime` to register `<diagraff-diagram>` and use `src` for a compiled JSON URL or assign `element.artifact`. `theme-mode` accepts auto (default), light or dark. `fit` accepts scroll (default) or contain. `story` and `state` address the narrative, `controls` toggles its controls, `view` selects the reading view, and `proposal` / `proposed-ids` show a host proposal. Reading and control state stay local to an element.

| Interface | Use |
| --- | --- |
| `play()`, `pause()`, `restart()`, `nextStep()`, `previousStep()` | Control the playback clock. `playbackRate` and `loop` configure playback. `state` and `states` provide direct navigation and the available explanation states. |
| `showView()`, `zoomBy()`, `fitDiagram()`, `actualSize()`, `focusSelected()` | Read a diagram at intrinsic size or fit an overview. The outline provides a text view at narrow widths. `selectConcept(id)` and `selectedConcept` address the current object. |
| `captions`, `readingHolds`, `evidenceVerification` | Host-supplied, revision-specific caption text, reading time and separate verification records. Reset or reapply them when replacing an artifact. |
| `diagraff-ready`, `diagraff-scenechange`, `diagraff-select`, `diagraff-deselect`, `diagraff-evidence`, `diagraff-stateerror`, `diagraff-error` | Listen for readiness, state changes, selection, evidence requests and errors. Enter/Space select focusable items. Reduced-motion settings preserve semantic endpoints. |

For rendered Markdown, embed the compiled SVG as an image with meaningful alternative text. Hosts with the Graff Markdown or Obsidian integration can compile a fenced `graff` block. A plain Markdown viewer needs an image fallback.

### SDK methods and WASM bindings

| SDK call | Result | Dialect | Direct WASM binding |
| --- | --- | --- | --- |
| `compile(source, options?)` | CompiledArtifact | 0.1, 0.2, 1 | `compile_source(source, options_json)` |
| `validate(source)` | Diagnostic[] | 0.1, 0.2, 1 | `validate_source(source)` |
| `format(source)` | canonical source | 0.1, 0.2, 1 | `format_source(source)` |
| `applyOperations(source, operations)` | candidate source | 0.1, 0.2 | `apply_source_operations(source, operations_json)` |
| `applyOperationsReport(source, operations, options?)` | source, mode, optional fallback_reason | 0.1, 0.2 | `apply_source_operations_report(source, operations_json, options_json)` |
| `slice(source, request)` | SliceResult | 0.1, 0.2 | `slice_source(source, request_json)` |
| `resolveReference(source, request)` | ReferenceResolution | 0.1, 0.2 | `resolve_reference_source(source, request_json)` |
| `stateSvg(source, stateId, options?)` | StateRender | 0.1, 0.2, 1 | `compile_state(source, state_id, options_json)` |
| `diff(beforeSource, afterSource)` | DocumentDiff | same syntax family | `diff_sources(before_source, after_source)` |
| `migrate(source, options?)` | MigrationReport | 0.1, 0.2, 1 | `migrate_source(source, options_json)` |
| `capabilities()` | CompilerCapabilities | all | `capabilities()` |

WASM also exports `state_svg(artifact_json, state_id)` for a previously compiled artifact, `operation_schema()`, `version_info()` and the versioned request envelope `invoke(method, source, payload_json)`. Browser instances add `exportSvg`, `ready()` and `dispose()`.

### Browser worker options

| Option | Type | Behavior |
| --- | --- | --- |
| `createWorker` | function | Required factory for a module worker. The client invokes it again after a crash. |
| `wasm` | WasmSource | Required bytes, module, response or resolved WASM URL. |
| `expectedSha256` | hex string | Optional lowercase SHA-256 for exact WASM bytes. |
| `timeoutMs, initTimeoutMs` | milliseconds | 15,000 per request and 20,000 for initialization. Zero or Infinity disables the relevant timer. |
| `maxQueue, maxSourceLength` | integers | Defaults to 16 waiting requests and 1,000,000 UTF-16 code units per source. |
| `maxRestarts, restartWindowMs` | integer, milliseconds | Defaults to 3 worker restarts per 60,000 ms. |
| `cancelInFlight` | discard \| terminate | Default discard drops the eventual response. Terminate restarts the worker. |
| `signal, timeoutMs, document` | per-request options | Optional AbortSignal, timer override, or {key,version} for cancelling stale queued revisions. |

A worker handles cancellation, superseded document versions and restart budgets. The in-thread compiler runs synchronously inside each WASM call. Its running compilation cannot be interrupted.

<a id="animation-kits-and-exports"></a>

## Animation kits and exports

A `graff.animation/1` JSON scene is a separate timed export format. Its nodes, ports, edges, travelers, marks and steps use stable IDs. A `graff.timeline/1` result stores settled steps and timed motion. The animation package can produce SVG, PNG, GIF, a JSON transcript and a browser bundle offline. Select a named step or a millisecond with the export CLI below. An SVG or PNG can be embedded from a held step. Browser and GIF output share the same timeline.

Steps specify `motionMs` and `holdMs` in milliseconds. An edge can carry forward, reverse or simultaneous flow relative to its source and target. A `link` is a physical connection. An `unobserved` edge marks a missing arrival and cannot carry a traveler. Node pulses and labelled warning/error statuses are explicit step data. A status persists until changed or cleared. A traveler can use a local symbol, and device nodes can select a symbol ID. Rectangles, circles and polylines in `graff.symbols/1` use a 24 × 24 coordinate system. A relative pack path and SHA-256 pin identify its exact bytes. Preserve supplied notices when redistributing assets.

`@diagraff/animation` provides `compileKit`, `transcript`, `gifFrames`, `renderPng`, `renderGif` and `writeBundle`. Its browser player renders compiled data. Optional pinned `graff.plugin/1` descriptors run at build time to produce a validated kit. Public readers receive compiled scene data. The native language parser treats no part of a `.graff` file as an executable plugin.

[Explore the public timed examples](https://graff.fyi/#walkthroughs) · [Download the icon pack and license notices](https://graff.fyi/icons/)

| Owner | Fields | Contract |
| --- | --- | --- |
| `kit` | `format, id, title, description?, width?, height?, posterStep?` | graff.animation/1, stable ID and title. Description defaults to title. Canvas width 96–4096, default 900; height 80–4096, default 450. Poster defaults to the last named step. |
| `kit` | `nodes?, edges?, marks?, symbols?, packs?, notices?, steps` | Collections default empty. A scene requires named steps totaling 10–600,000 ms. IDs start with an ASCII letter, followed by letters, digits, underscores or dashes, at most 96 characters. |
| `node` | `id, label, x, y, w, h, detail?, kind?, symbol?` | x/y in −8192…8192 scene units, w/h in 1…8192. kind device (default), data or decision. A node symbol must name a declared or imported symbol. |
| `edge` | `id, from, to, points, label?, labelAt?, kind?` | Endpoints are node IDs. At least two route points with positive path length, maximum 512. labelAt is [x,y]. kind solid (default), reply, link or unobserved. |
| `mark` | `id, kind, label, when?, geometry` | Line takes points. Text takes x/y. Bar takes x/y/w/h and optional role neutral (default), waiting or running. when always (default) or focused. |
| `symbol` | `id, label, parts` | 1–32 rect {x,y,w,h}, circle {x,y,r}, or line {points}. All coordinates are 0…24. Global traveler symbols envelope, dot and job also exist. |
| `pack` | `path, sha256` | At most 24 relative symbol-pack imports. Each requires the SHA-256 of the exact local bytes. Source-relative paths remain inside the kit directory. |
| `step` | `id, title, note, motionMs?, holdMs?, focus?, travelers?, arrivals?, context?, flows?, pulse?, statuses?` | motionMs defaults to 850, holdMs to 1400. Each is an integer 0…120,000 ms. A noninstant step lasts at least 10 ms. Optional lists default empty. focus contains existing semantic IDs and arrivals/pulse contain node IDs. |
| `traveler` | `id, edge, symbol, label?, parent?` | Unique traveler ID and observed route. Optional parent must reference a traveler from a prior step. Unobserved edges cannot carry travelers. |
| `flow` | `edge, direction` | One per observed edge per step. forward, reverse or both refers to the edge's endpoint order. |
| `status` | `node, kind, label?` | One change per node per step. warning/error require a label. clear removes a persistent status. |
| `context` | `id, label, value` | Label up to 100 characters and value up to 600, carried with the corresponding step. |
| `notices` | `string[]` | Up to 64 complete notices, ≤16,384 characters each and ≤65,536 total. Downloaded assets retain the applicable notices. |
| `plugin` | `format, plugin, input, packs?, notices?` | graff.plugin/1 contains a plugin {path,sha256,api} with api graff.wasm/1 and JSON input. Compilation runs the build-time module in isolation with no host imports. |
| `compileKit` | `baseDir?, holdScale?, holdMs?` | baseDir resolves relative assets and defaults to the kit's directory for file input. holdScale 0…20 defaults to 1. holdMs 0…120,000 overrides the individual holds. |
| `frame/export` | `width?, height?, captions?, reducedMotion?, fps?, loop?, gif?` | Viewport dimensions are pixels, up to 8,192. GIF sampling accepts 1–50 fps, default 12. Loop defaults to 0 for indefinite or −1 for one play. Frame time is a millisecond or {step,progress?} with default progress 1. |

<a id="examples"></a>

## Compiled example index

Open the source to edit it or inspect the SVG as a static image. The diagrams use illustrative public material. Each pair was generated from the same source bytes.

| Diagram | Syntax | Download |
| --- | --- | --- |
| Library sequence | `0.1` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.1-sequence.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.1-sequence.svg) |
| Library system | `0.1` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.1-system.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.1-system.svg) |
| Library block | `0.2` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-block.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-block.svg) |
| Library board | `0.2` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-board.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-board.svg) |
| Library class | `0.2` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-class.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-class.svg) |
| Library context | `0.2` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-context.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-context.svg) |
| Library deployment | `0.2` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-deployment.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-deployment.svg) |
| Library er | `0.2` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-er.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-er.svg) |
| Library events | `0.2` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-events.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-events.svg) |
| Library gantt | `0.2` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-gantt.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-gantt.svg) |
| Library git | `0.2` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-git.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-git.svg) |
| Library hierarchy | `0.2` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-hierarchy.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-hierarchy.svg) |
| Library journey | `0.2` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-journey.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-journey.svg) |
| Library mcp | `0.2` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-mcp.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-mcp.svg) |
| Library packet | `0.2` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-packet.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-packet.svg) |
| Library pie | `0.2` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-pie.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-pie.svg) |
| Library quadrant | `0.2` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-quadrant.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-quadrant.svg) |
| Library radar | `0.2` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-radar.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-radar.svg) |
| Library requirements | `0.2` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-requirements.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-requirements.svg) |
| Library sankey | `0.2` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-sankey.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-sankey.svg) |
| Library skills | `0.2` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-skills.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-skills.svg) |
| Library state | `0.2` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-state.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-state.svg) |
| Library xy | `0.2` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-xy.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/0.2-xy.svg) |
| Request pipeline | `1` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-block.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-block.svg) |
| Sprint board | `1` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-board.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-board.svg) |
| Why checkouts fail | `1` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-causal.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-causal.svg) |
| Shape model | `1` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-class.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-class.svg) |
| Online shop - System context | `1` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-context.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-context.svg) |
| Web deployment | `1` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-deployment.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-deployment.svg) |
| Library data model | `1` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-er.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-er.svg) |
| School garden | `1` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-events.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-events.svg) |
| Release review | `1` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-flow.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-flow.svg) |
| Release plan | `1` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-gantt.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-gantt.svg) |
| Feature branch | `1` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-git.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-git.svg) |
| Launch plan | `1` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-hierarchy.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-hierarchy.svg) |
| Morning commute | `1` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-journey.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-journey.svg) |
| UDP header | `1` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-packet.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-packet.svg) |
| Monthly budget | `1` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-pie.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-pie.svg) |
| Effort vs impact | `1` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-quadrant.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-quadrant.svg) |
| Team skills | `1` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-radar.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-radar.svg) |
| Library catalogue requirements | `1` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-requirements.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-requirements.svg) |
| Household energy | `1` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-sankey.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-sankey.svg) |
| Reserve a reading room | `1` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-sequence.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-sequence.svg) |
| Door | `1` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-state.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-state.svg) |
| Quarterly sales | `1` | [.graff](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-xy.graff) · [Compiled SVG](https://graff.fyi/r/ef353f475830ec88c03aa8699c3f0345caab31661c045531c1dacc8fb8d9d5c7/authoring/examples/1-xy.svg) |
