# UJN: the full text for language models
> UJN 0.1 draft, spec revision 23 (November 29, 2026). UJN (UI Journey Notation) writes a UI journey as text between @startujn and @endujn. This file holds the primer (a short introduction) and then the whole spec. Where the two differ, the spec wins; where the spec's prose and its grammar summary or the model schema differ, the prose wins.
Nothing is public yet: the PlantUML module that draws UJN runs only in the project's local build and in a test build for invited testers, so most readers cannot run the commands in this file. Section 23 of the spec lists the questions still open.
---
# The primer
> UJN 0.1 draft. UI Journey Notation in five minutes, for people and for language models.
> This is a summary of the spec (revision 21, November 27, 2026). Where the two differ, the spec
> wins: `llms-full.txt` (markdown), or the Docs page of the site. Names and rules may still change.
UJN writes a UI journey as text: the screens a user sees, what the system does between them, where
the user leaves the app and comes back, and how it ends. A PlantUML module (not public yet) draws the
text, checks it (warnings are listed under the drawing) and writes a model JSON for tools.
## 1. File and statements
A diagram runs from `@startujn` to `@endujn` and holds one journey. One statement per line; a block
`{ … }` may run over several lines. The journey line comes before every node and arrow. Only
preprocessor lines, `increment`, color blocks and `render` may come before it. Sections 9 and 10
are complete examples.
| Statement | Form |
|---|---|
| Journey line | `journey ID "Title"`, then `key: value` lines directly under it: `description`, `context`, `trace`, `a11y`, `unique_id`, `unique_id_friendly` |
| Node | `keyword handle [DISPLAY-ID] { key: value; key: value }`. Only keyword and handle are required: `view register` is complete |
| Arrow | `from TOKEN to : [Trigger] guard { key: value }` |
| Blocks | `increment { … }` (display ids), `render { … }` (drawing switches), color blocks such as `view_color { … }` and `view_color_modal { … }` |
- **Handles** are letters, digits and `_`, starting with a letter. Arrows use them. Not drawn, except
as the title when there is no `title`.
- **Values:** text is bare, or in double quotes when it holds `;`, `}`, `'` or a comma inside a list.
Lists are `[a, b]` (brackets optional for one item). A key on its own means `true`. Durations are
`5 s`, `30 min`, `24 h`. Colors are `#hex` or a PlantUML color name.
- **Comments:** a line that starts with `'`, a `/' … '/` block, or a `'` after a space or a tab outside quotes.
- **Order:** references are worked out after the whole file is read, but the layout reads the order of
the nodes as the order of the journey. Write nodes in the order the journey goes.
## 2. The nine kinds
| Keyword | What it is | Types (default first) | Its own keys |
|---|---|---|---|
| `view` | anything the user sees as a window | `plain`, `modal`, `drawer`, `popover`, `toast`, `tabs`, `wizard`, `embedded`, `new-window`, `waiting` | `route`, `collapsed`, `parent`; behavior overrides `blocks`, `dismiss`, `focus`, `duration`, `target` |
| `action` | something the system does between views | `action`, `message`, `wait`, `event`, `auth`, `permission`, `fork`, `join` | `timeout` (action, wait, event, auth), `channel` (message) |
| `handoff` | the user leaves the app or its channel (email link, bank app, identity provider) | `returns`, `no-return` | `channel`, `timeout`, `resume` |
| `data` | a store an action reads or writes | `server-database`, `file`, `folder`, `browser-cache`, `browser-storage`, `api` | `location` |
| `actor` | a person: who starts the journey, or an agent inline doing a manual task | none | `role` |
| `system` | a service the flow calls while the user stays in the app | `internal`, `external` | `host` |
| `start` | where the journey begins | `plain`, `deep-link`, `notification`, `handoff-return` | `route` |
| `end` | how it ends | `success`, `failure`, `abandoned` | none |
| `ref` | another journey, drawn in its own diagram | none | `journey` (required), `point` |
Every node also takes `type`, `title` (default: the handle), `flags`, `description`, `trace`,
`a11y`, `context`, `tooltip`, `unique_id`, `unique_id_friendly`, `id_position` and the colors
`color_frame`, `color_icon`, `color_title`, `color_description`, `color_background`. A key that does
not apply is a warning, and its value is kept under `extra` in the model.
## 3. Arrows
| Token | Kind | Drawn | Use it for |
|---|---|---|---|
| `-->` (or `->`) | navigation | solid | the flow moves on |
| `-x->` | negative | solid, with a cross | a failure path: an error, a rejection |
| `..>` (or `.>`) | return | dashed | going back: a modal closes, Back, a toast goes away |
| `.x.>` | failed return | dashed, with a cross | going back because something failed |
- **Label:** `: [Trigger] guard`. The trigger is what the user does; the guard says when this exit is
the one taken. The pill shows `Trigger · guard`.
- **Direction hints** sit in the token: `-down->`, `-up-x->`, `.left.>`, `-r->`. A hint is a wish,
never an error.
- **Arrow block keys:** `payload` (what crosses), `returns` (draws the way back of a call into a `ref`
or a `handoff`), `flags`, `trace`, `context`, `a11y`, `tooltip`, `arrow_spacing`, `color_line`,
`color_text`, `color_background`.
**Exit rules**, by what the arrow leaves:
- **A view:** every `-->` and `-x->` needs a trigger. Exits that share a trigger each need a guard. A
`..>` may stay unlabeled.
- **An actor inline:** the outcome is the trigger: `[Approve]`, `[Reject]`.
- **An action:** no trigger. Exits without a guard all fire; among guarded exits exactly one fires.
Do not mix the two on one action (put a `fork` after the guarded exit instead). An action with a
`timeout` needs an exit guarded `timeout`.
- **Calls and data:** only an action calls a system (`-->`, no label); the system replies with `..>`.
A write goes from the action into the store, a read from the store into the action, no label.
- **A handoff:** left only by resume arrows (`..>`, or `.x.>` for a failed resume), each with a trigger;
or write `{ returns }` on the arrow into it. A `no-return` handoff has neither.
- **A start:** as an action. Into a start: only the actor who starts the journey (no trigger), or a
handoff's resume into a `handoff-return` start. Nothing leaves an `end`.
- **A ref:** `{ returns }` on the arrow in makes it a call that comes back. Only `..>` arrows leave a
ref, with no trigger; when there are several, a guard names each outcome.
- **Reachability:** once a journey has a start, every node needs a path from a start (actors and data
stores aside).
## 4. Flags
`flags: [future, risk]` in the block of a node or an arrow. A flag never changes a shape: the border
goes dotted and a glyph tab shows the flag.
- **Delivery flags** propagate to everything reachable only through the flagged node: `idea`,
`future`, `not-implemented`, `out-of-scope`, `deprecated`.
- **Review flags** stay where they are set: `experiment`, `risk`, `security`, `needs-decision`,
`needs-updates`.
- **Pending:** `legacy` (the proposal: it stays where it is set). Never write inherited flags.
## 5. Ids and trace links
| Id | Written | Use |
|---|---|---|
| handle | `view login` | inside the file only; may be renamed |
| display id | `view login [AUTH-10]`, or assigned by `increment { auto; view_prefix: "AUTH" }` | for viewing only; it may change; never link to it |
| unique id | `unique_id: {{auto}}`, filled once by `-populate_ids` with 11 random lowercase hex digits | permanent: tests, code and other diagrams link to it |
| friendly id | `namespace.name`: `unique_id_friendly` of the journey (else the journey id in lowercase), then `unique_id_friendly` of the node (else the handle) | readable; changes when edited |
- Fill every `{{auto}}` before the file's first commit: `java -jar plantuml.jar -populate_ids file.puml`.
- **Trace links** point out of the diagram: `trace: [req:AUTH-01, test:e2e/login.spec.ts]`. Kinds:
`req`, `story`, `design`, `component`, `test`, `code`, `doc`; other kinds are passed on. A node with
trace links and no `unique_id` gets a warning.
## 6. The render block
| Key | Values (default first) |
|---|---|
| `colors` | `color`, `mono` (black and white) |
| `corners` | `rounded`, `square` |
| `direction` | `right`, `down` |
| `legend` | `false`, `true` |
| `warnings` | `show`, `hide` |
| `id_position` | `outside`, `inside`, `inside-top`, `inside-bottom`, `hidden` |
| `arrow_spacing` | `default` (70 px), or pixels |
`render { direction: down; legend }`: one per diagram; it changes the drawing, never the model.
## 7. The model JSON
`java -jar plantuml.jar -tsvg --ujn-model file.puml` writes `file.ujn.json` beside the drawing. Its
JSON Schema is `ujn-model-v5.schema.json`. Every key is always there (`null` or `[]` when not written),
except `extra`, which appears only when the text has keys the language does not define.
```json
{
"language": "ujn-parts-1-4",
"journey": { "id": "SIGNUP", "title": "Sign up", "uniqueId": null, "friendlyNamespace": "signup", "…": "…" },
"nodes": [ { "key": "signup", "kind": "view", "type": "plain", "title": "Create account", "id": "SU-001",
"idAssigned": true, "uniqueId": "5c1e9a07b3d", "friendlyId": "signup.signup", "flags": [],
"inherited": [], "route": "/signup", "…": "…" } ],
"arrows": [ { "from": "signup", "to": "create", "kind": "navigation", "negative": false, "role": "exit",
"trigger": "Create account", "guard": null, "payload": ["email", "password"], "…": "…" } ],
"warnings": [ { "message": "…", "handle": "…", "line": 12 } ]
}
```
- Nodes and arrows are in the order written. Keys are camelCase.
- Worked out for you: assigned display ids, inherited flags, a view's effective behavior, arrow
roles (`exit`, `call`, `reply`, `resume`, `write`, `read`), colors after the cascade, warnings.
- Across versions of a file, key a node on `uniqueId`; never on the display id `id`.
## 8. Common warnings and how to fix them
A warning lets the diagram draw; it is listed under it as `line N · handle: message`. A syntax error
(no journey line, an arrow to an undeclared handle, a block never closed) stops the drawing.
| Warning | Fix |
|---|---|
| `an exit from a view needs a trigger, written after a colon: [Trigger]` | Add what the user does: `a --> b : [Next]` |
| `2 exits share [Go]; each needs a guard` | Tell them apart: `: [Go] valid` and `: [Go] invalid` |
| `an exit from an action takes no trigger` | Write a guard or nothing: `check --> done : valid` |
| `guarded and unguarded exits on one action` | Guard every exit, or put a `fork` after the guarded one |
| `a handoff is left only by its resume arrows (..>)` | Use `..>` out of a handoff, with a trigger |
| `a returning handoff needs a way back: …` | Add `{ returns }` on the arrow into it, a `..>` out of it, or `type: no-return` |
| `only an action calls a system` | Put an action between the view and the system |
| `a data store connects only to actions` | Read and write through an action |
| `has trace links but no unique_id, so other files cannot link back to it` | Add `unique_id: {{auto}}` and run `-populate_ids` |
| `unique_id is still {{auto}}. Generate it before your first commit: …` | Run the command the warning prints |
| `no path from a start reaches it` | Add an arrow from a node that is reached, or remove the node |
| `has a timeout but no exit guarded timeout` | Add `: timeout` on one exit of the action |
| `unknown flag futur` | Use one of the eleven flags in section 4 |
| `key channel does not apply to a view` | Use the keys of that kind (section 2); the value is kept under `extra` |
## 9. Example: sign up with an email link
```ujn
@startujn
journey SIGNUP "Sign up"
description: "Create an account and confirm the email address"
unique_id_friendly: signup
increment { auto; view_prefix: "SU" }
start open { type: deep-link; route: /signup }
view signup
{
title: "Create account"
description: "Email and password"
route: /signup
trace: [req:SU-01, test:e2e/signup.spec.ts]
' -populate_ids wrote this id from unique_id: {{auto}}; in a new file write {{auto}}
unique_id: 5c1e9a07b3d ' AUTO GENERATED - DO NOT CHANGE
}
view with_google { title: "Sign up with Google"; flags: [future] }
action create { title: "Create account" }
system accounts { title: "Account service"; host: accounts.internal }
action send_mail { type: message; title: "Send confirmation"; channel: email }
view check_mail { title: "Check your email"; route: /signup/sent }
handoff inbox { title: "Confirmation link"; channel: email; timeout: 24 h }
view welcome { title: "Welcome"; route: /welcome }
end done { type: success; description: "Account confirmed" }
open --> signup
signup --> create : [Create account] { payload: [email, password] }
signup --> with_google : [Use Google]
create --> accounts { payload: [email, password] }
accounts ..> create { payload: [account_id] }
create --> send_mail : created
create .x.> signup : email taken
send_mail --> check_mail
send_mail --> inbox
inbox ..> welcome : [Open link] valid
inbox .x.> signup : [Open link] expired
welcome --> done : [Continue]
@endujn
```
The `unique_id` above was generated by `-populate_ids`. Never type one yourself: write
`unique_id: {{auto}}` and run the command.
## 10. Example: a return approved by an agent
```ujn
@startujn
render { direction: down }
journey RETURNS "Return an item"
description: "A customer asks to return an item; an agent approves or rejects it"
actor customer { title: "Customer" }
start from_orders { description: "From the order list" }
view order { title: "Order details"; route: /orders/:id }
view return_form { type: modal; title: "Return item"; description: "Reason and photos" }
action submit { title: "Submit return" }
data returns_db { title: "Returns"; location: table returns }
actor agent { title: "Support agent"; role: Back office }
view label { title: "Return label"; route: /returns/:id/label }
view rejected { type: toast; title: "Return rejected" }
ref refund { journey: REFUND; title: "Refund" }
end done { type: success; description: "Label sent" }
customer --> from_orders
from_orders --> order
order --> return_form : [Return item]
return_form ..> order : [Cancel]
return_form --> submit : [Send] { payload: [reason, photos] }
submit --> returns_db { payload: [return] }
submit --> agent
agent --> label : [Approve]
agent -x-> rejected : [Reject]
label --> refund : [Track refund] { returns }
label --> done : [Done]
@endujn
```
The full spec covers what this primer leaves out: view behavior per type, colors and themes, how
arrows are routed, the palette, and every rule in its errors and warnings table (section 21).
---
# UJN language
UJN 0.1 draft · revision 23 · November 29, 2026
UJN (UI Journey Notation) writes a UI journey as text: the screens a user sees, what the system does between them, where the user leaves the app and comes back, and how the journey ends. A journey file is a PlantUML diagram that runs from `@startujn` to `@endujn` and holds one journey, one statement per line: the journey line, the nodes and the arrows between them, and blocks that set display ids, colors and the drawing. A PlantUML module reads the file and gives up to three outputs: a **drawing** of the journey, as SVG or PNG; **warnings** for the rules the journey breaks, listed under the drawing; and, when PlantUML runs with `--ujn-model`, a **model**, a JSON file with every node and arrow and its meaning worked out, for tools to read.
## About this spec
**Who it is for.** People who write or read journeys, people who build tools that read or write UJN, and AI assistants that write journeys or answer questions about them. It defines the whole language: every statement, key, default and warning.
**What it is not.** It is not a tutorial. It states each rule in full where it belongs and does not teach step by step; the primer is the short introduction. It is not a PlantUML manual either. Where UJN relies on PlantUML, as for the preprocessor and the output formats, PlantUML works as it does for its other diagrams.
**Which text wins.** Where two texts disagree, this spec's prose wins. Next come the grammar summary in section 22, then the model schema, version 5 (`ujn-model-v5.schema.json`), then the primer and the examples.
**Two terms.** "The module" is the PlantUML module that draws UJN, checks it and writes the model. "The platform" is the wider AI development platform UJN is part of.
**How it is organized.**
- **Sections 1 to 10**, the file and the statement: a complete example at a glance, the file layout, the journey line, the node statement, values, display ids, unique ids, flags, the attributes any node may carry, and colors.
- **Sections 11 to 18**, the kinds of node, with arrows in section 13: view (11), actor and system (12), action (14), handoff (15), data (16), start and end (17), and journey reference (18). Each of these sections has the same subsections, as far as they apply: the statement, the types, the attributes, the rules for that kind, what is drawn where, examples, and what goes into the model.
- **Sections 19 and 20**, the drawing and the model: the `render` block and what it switches, the palette, the legend and the warnings box, then the model JSON in full.
- **Section 21**, errors and warnings, all in one table.
- **Section 22**, a summary of the grammar.
- **Section 23**, the questions still open.
- **Appendix A**, how the drawing is laid out: how the module places what direction hints ask for (13.3), routes arrows and places their labels (13.10), and spaces the text along an arrow (19.8). It is part of the spec: its rules bind the module as they did in those sections.
**A draft.** UJN 0.1 is a draft. Names, keys and rules may still change; section 23 lists the questions still open.
**This revision.** Revision 23 is editorial: no rule, key, value, default, type, warning, grammar line or example changes. It changes wording only, and moves the module's layout detail into Appendix A. Its changes, and those of the earlier revisions, are listed in the changes file, "UJN language: changes".
---
## 1. At a glance
```
@startujn
!include theme.puml
journey AUTH "Authentication"
description: "Login, registration, recovery, SMS and email links, MFA"
context: "Customer · Web"
unique_id_friendly: auth
increment
{
auto
view_prefix: "AUTH"
view_delimiter: "-"
view_start: 2
view_digits: 3 ' 001 instead of 1
}
view_color
{
color_frame: #887788
color_icon: #887788
color_title: #000000
color_description: #070707
}
' a modal sets only these; frame, description and background come from view_color
view_color_modal
{
color_icon: #5b3d8f
color_title: #000000
}
actor customer [ACT-001]
{
title: "Customer"
role: Policyholder
}
' an explicit display id can be anything
view login [AUTH-10]
{
type: plain
title: "Login"
flags: [legacy]
description: "Email and password\nor a passkey"
route: /login
trace: [req:AUTH-01, test:e2e/login.spec.ts]
color_frame: #5555d0
unique_id: 6f2f4d29ca5 ' AUTO GENERATED - DO NOT CHANGE
}
' gets AUTH-002
view forgot_login
{
title: "Forgot password"
description: "Enter your email"
route: /forgot
unique_id: {{auto}} ' run java -jar plantuml.jar -populate_ids auth.puml
}
' gets AUTH-003
view bad_login
{
type: toast
title: "Incorrect credentials"
description: "Try again"
}
' gets AUTH-004
view passkey
{
title: "Passkey prompt"
flags: [future, idea]
route: /login/passkey
}
' gets AUTH-005, drawn with its handle as the title
view register
' gets AUTH-006
view sms
' arrows: section 13
login --> forgot_login : [Forgot password]
login --> passkey : [Use passkey]
bad_login ..> login
@endujn
```
Every node statement has the same shape:
```
keyword handle [DISPLAY-ID] ← the header line; only keyword and handle are required
{ ← may also end the header line
type: … ← the type menu; the keyword's default when left out
title: "…" ← shown title; the handle when left out
flags: [ … ]
description: "…"
… ← everything else: meta, behavior, trace, ids, colors
}
```
The block is optional. `view register` alone declares a plain view titled "register".
---
## 2. File layout
- A UJN diagram runs from **`@startujn`** to **`@endujn`**. It is its own PlantUML diagram type,
like `@startchen` or `@startmindmap`.
- **One journey per diagram.** The journey line (section 3) comes before every node and arrow. Only
preprocessor lines, `increment`, color blocks and `render` may come before it, so a shared file of
settings can be included first. Other journeys are referenced by id and
never drawn here.
- **One statement per line.** A block `{ … }` may run over several lines. Blank lines and
indentation are free.
- **The opening brace** ends the header line (`view login {`) or stands alone on the next line.
PlantUML already accepts both for its own blocks.
- **Comments:**
- a line whose first non-blank character is `'`;
- a block between `/'` and `'/`, which may also sit inside or at the end of a line;
- a **trailing comment**: a `'` outside double quotes, after a space or a tab, runs to the end
of the line (`view_digits: 3 ' 001 instead of 1`). Text that holds an apostrophe must
therefore be quoted: `title: "Customer's claims"`.
PlantUML itself removes only the first two kinds; the UJN statements remove trailing comments
themselves.
- **The PlantUML preprocessor works as everywhere.** `!include theme.puml` brings in shared color
blocks (section 10), and a shared file can declare the actors and systems every journey uses.
Python lines and `!python` blocks work too, with one limit: a `unique_id: {{auto}}` that a loop
or a macro produces cannot be filled by `-populate_ids` (section 7).
- **Keywords are lowercase.** Sections 1 to 12 define `journey`, `increment`, `view`, `actor` and `system`,
and the color blocks `view_color`, `actor_color` and `system_color` (with a type suffix:
`view_color_modal`); section 13.9 adds `arrow_color`. Sections 14 and 15 add `action` and
`handoff`, with `action_color` and `handoff_color`. Sections 16 to 18 add `data`, `start`, `end` and
`ref`, with `data_color`, `start_color`, `end_color` and `ref_color`. Section 19 adds `render`.
- **Order does not matter** for nodes, arrows, `increment` and color blocks: references and
display ids are worked out after the whole diagram is read. An arrow to a handle that no
statement declares is an error; a node is never created implicitly, because it needs a shape.
---
## 3. The journey line
```
journey ""
: :
```
```
journey AUTH "Authentication"
description: "Login, registration, recovery, SMS and email links, MFA"
context: "Customer · Web"
trace: [req:EPIC-AUTH]
unique_id: 3c90e1d5a7b ' AUTO GENERATED - DO NOT CHANGE
unique_id_friendly: auth
```
- The **journey id** is required and always written by the designer, never assigned: other
journeys and the tools that read the model refer to it. A short name in capitals: `AUTH`, `CLAIM`. (The sample
journeys use the longer form `JRN-AUTH`; both are valid.)
- The **title** is required, in double quotes; the renderer uses it as the diagram's title.
- **Journey entries** are `key: value` lines **directly under the journey line**, before any other
statement. The same line further down would read as if it belonged to the node above it, so it
is an error there.
- Journey keys: the common attributes `description`, `context`, `trace`, `a11y` (section 9), and
`unique_id` and `unique_id_friendly` (section 7). Here `unique_id_friendly` is the namespace for
the friendly ids of the journey's nodes.
---
## 4. The node statement
### 4.1 Header line
```
[]
```
### 4.2 Handle
The name a node is known by inside the diagram: arrows and `parent:` use it.
- Letters, digits and `_`, starting with a letter: `login`, `forgot_login`, `step2`.
- Case-sensitive, unique within the journey across every kind of node.
- Not a keyword (`view`, `actor`, `system`, `journey`, `increment`, or a reserved word).
- Not drawn, except as the title when the block has no `title`. It becomes `key` in the model,
and the default name in the node's friendly id (section 7.4).
- A handle may be renamed freely: arrows in the same file follow it, and links from other files
use `unique_id`, which does not change.
### 4.3 Display id
- Optional, in square brackets after the handle: `[AUTH-10]`.
- **Anything except `]`**: the designer chooses it. Unique within the journey.
- Drawn in a tab under the node's bottom edge, or on its type line (4.6). Nothing else: **a display
id is for viewing only**. It may change, and nothing should link to it.
- A node without one gets an assigned display id when `increment` has `auto` (section 6), and no
id tab otherwise.
### 4.4 Block
```
view forgot_login { title: "Forgot password"; route: /forgot }
```
is the same statement as
```
view forgot_login
{
title: "Forgot password"
route: /forgot
}
```
- It opens with `{` at the end of the header line or alone on the next line, and closes with `}`.
- Entries are `key: value`, one per line, or separated by `;` on one line.
- The key ends at the first colon, so values may hold colons (`route: /policy/:id`,
`trace: [req:AUTH-01]`).
- **A key on its own means `true`**: `collapsed` is `collapsed: true`.
- Keys are lowercase letters, digits and `_`: `route`, `a11y`, `color_frame`, `unique_id`.
- A key that is not defined for this keyword or type is a warning. Its value is kept in the model
under `extra`, so tools can try out a field before the language adopts it.
### 4.5 Keys every node takes
| Key | Value | Default | Section |
|---|---|---|---|
| `type` | a type of this keyword | `plain` for a view and a start, `internal` for a system, `action` for an action, `returns` for a handoff, `server-database` for a store, `success` for an end; an actor and a reference have none | 11.2, 12.1, 14.2, 15.2, 16.2, 17.2 |
| `title` | text | the handle | below |
| `flags` | list of flags | none | 8 |
| `description`, `trace`, `a11y`, `context` | | | 9 |
| `unique_id`, `unique_id_friendly` | | | 7 |
| `color_frame`, `color_icon`, `color_title`, `color_description`, `color_background` | color | the color blocks, then the theme | 10 |
| `id_position` | `outside`, `inside`, `inside-top`, `inside-bottom`, `hidden` | the `render` block's, else `outside` | 4.6 |
| `tooltip` | text | none | 9.3 |
**Title.** The name drawn in the node's body. `\n` breaks the line, and the renderer breaks lines
only where `\n` is written; the node grows to fit. It takes the same markup as a description
(section 9.1).
**Type.** Lowercase, with hyphens for two words (`new-window`). The type changes the icon and the
type name in the drawing, never the frame. For a view it also sets default behavior that one view
may override (section 11.4). An unknown type is a warning, and the node is drawn with its default
type.
### 4.6 Where the display id is drawn
| `id_position` | Drawn |
|---|---|
| `outside` | In a tab under the bottom edge, right-aligned. The default |
| `inside`, `inside-top` | On a badge at the right of the type line ("View", "Action", "End, failure"), left of any flag tabs |
| `inside-bottom` | On a badge at the right of the last line: after the route or meta line (`/login`, `SMS · 5 min`, `table users`, a reference's journey id), or after a start's or an end's description. A node with no such line gets a row for it |
| `hidden` | Not drawn. The node still has its display id |
```
render { id_position: inside }
view login [AUTH-10] { title: "Login" } ' inside, from the render block
system idp [SYS-1] { title: "Identity provider"; id_position: outside } ' in a tab under it
view forgot [AUTH-11] { title: "Forgot password"; route: /forgot; id_position: inside-bottom } ' after the route
end locked [END-1] { type: failure; id_position: hidden } ' not drawn
```
- `id_position` goes in the `render` block for every node (19.1), or on one node; the node's own wins.
- Outside or inside, the id is dark bold text on the node's light tint, outlined in the node's frame
color (19.3), so it stands out from the node's own text and its outline follows a `color_frame`. On
a view's title bar, which already has that tint, the chip is white. In black and white it is
near-black on light gray (19.4).
- `inside` and `inside-top` are the same. The type line has the most room and an id there never makes
the node taller; `inside-bottom` keeps the type line clear and puts the id beside the route, but a
node with no route, meta line or description gets a row for it.
- A fork or join bar has no type line, so any inside value draws its id where `outside` does, past the
bar's far end (14.2).
- An id drawn inside, or not drawn, hangs nothing under the node: arrows may meet the whole of that
side (13.10).
- As in the `render` block, quotes and case do not matter: `id_position: "Inside"` is `inside`.
- A value other than these five is a warning: a node then uses the `render` block's, and the
`render` block uses `outside`.
- `id_position` is a drawing setting, like `point` (18.2): the model leaves it out (section 20).
---
## 5. Values
| Kind | Written as | Examples |
|---|---|---|
| Text | bare to the end of the entry, trimmed; in double quotes when it holds `;`, `}`, `'`, a `,` inside a list, or should keep leading or trailing spaces. In quotes, `\"` is a quote; every other backslash reads as in any PlantUML label: `\n` is a line break, `\\` a backslash, `\t` a tab | `Email and password`, `"Step 2; documents"`, `"Line one\nline two"` |
| List | `[` items separated by commas `]`; quote an item that holds a comma. For one item the brackets may be left out | `[escape, close]`, `[legacy]`, `legacy` |
| True or false | `true` or `false`, in any case; a key on its own means `true` | `blocks: false`, `collapsed` |
| Number | digits | `view_start: 2` |
| Duration | a number and a unit: `ms`, `s`, `min`, `h`, `d`; the space is optional | `5 s`, `30 min`, `24h` |
| Color | `#` and 3, 6 or 8 hex digits, or a PlantUML color name; any other name is a warning | `#887788`, `#fff`, `LightBlue` |
| Handle | a handle declared in the journey | `parent: new_claim` |
| Trace link | `kind:reference` | `req:AUTH-01`, `component:LoginForm` |
| Placeholder | `{{auto}}`, for `unique_id` only | `unique_id: {{auto}}` |
**A key written twice.** For a list key (`trace`, `a11y`) the values add up. For any other key
the last one wins, with a warning.
---
## 6. Display ids: `increment`
```
increment
{
auto
view_prefix: "AUTH"
view_delimiter: "-"
view_start: 2
view_digits: 3 ' 001 instead of 1
}
```
- **`auto`** turns assignment on. Without it, or without an `increment` block, a node with no
`[ID]` has no display id and no id tab.
- With `auto`, every node written without `[ID]` gets **prefix + delimiter + counter**, the
counter padded with zeros to `digits`.
- The other keys are per kind: `_prefix`, `_delimiter`, `_start`,
`_digits`, where kind is `view`, `actor`, `system`, `action`, `handoff`, `data`,
`start`, `end` or `ref`.
| Key | Default |
|---|---|
| `_prefix` | `VIEW`, `ACT`, `SYS`, `ACTN`, `HND`, `DAT`, `START`, `END`, `REF` |
| `_delimiter` | `-` |
| `_start` | `1` |
| `_digits` | `3` |
**How the counter runs.**
- One counter per prefix, in the order the statements appear. Kinds that share a prefix share
the counter, so their ids never collide; give them the same start (different starts are a
warning).
- It skips every number an explicit id already takes: an explicit id that reads as prefix,
delimiter and a number takes that number, whatever its padding. With the block above,
`[AUTH-10]` takes 10, so the counter never gives out AUTH-010.
**Display ids move, and that is fine.** An assigned display id depends on the node's position:
insert a view above it and it is renumbered. `-populate_ids` never writes display ids into the file
(section 7), and nothing links to them; links use `unique_id`.
At most one `increment` block per journey. A second one is a warning, and its entries are added to
the first.
---
## 7. Unique ids
A **unique id** is a node's permanent identity: 11 random lowercase hex digits such as
`6f2f4d29ca5`. It does not depend on anything people edit (the handle, the title, the display id,
the position), so it is what tests, code, requirements and other diagrams link to.
### 7.1 Writing one
Before:
```
unique_id: {{auto}} ' run java -jar plantuml.jar -populate_ids auth.puml
```
After `-populate_ids`:
```
unique_id: 6f2f4d29ca5 ' AUTO GENERATED - DO NOT CHANGE
```
- The designer writes the placeholder **`{{auto}}`**. `-populate_ids` replaces it with a new random
id, once, and from then on the id never changes.
- **The rule: every `{{auto}}` is populated before the file's first commit.**
- The hint comment on the `{{auto}}` line is optional: the warning prints the same command with
the real path (7.2). A literal `{{this_file}}` in that comment is only text.
- `unique_id` may be written on any node and on the journey (section 3).
- A node without `unique_id` is allowed, so a quick sketch stays short. A node with trace links
but no `unique_id` gets a warning: other files cannot link back to it.
### 7.2 Rendering without `-populate_ids`
The node is drawn normally, the model marks its unique id as pending (`"uniqueId": null`,
`"uniqueIdPending": true`), and a warning names the command:
```
forgot_login: unique_id is still {{auto}}. Generate it before your first commit:
java -jar plantuml.jar -populate_ids src/journeys/auth.puml
```
### 7.3 Rendering with `-populate_ids`
```
java -jar plantuml.jar -populate_ids auth.puml
```
- **Only for a file rendered locally.** With `-pipe`, on the PlantUML server, or for any source
that is not a file, the flag is an error and nothing is written.
- Each `{{auto}}` is replaced in **the file and line it came from**. PlantUML keeps the file and
line of every line it reads, so a placeholder in an `!include`d file is filled in that file.
- On that line, the value becomes the new id and **the trailing comment becomes
`' AUTO GENERATED - DO NOT CHANGE`**, replacing any comment that was there. The indentation and
the column where the comment starts stay as they were.
- **Nothing else in the file changes**: other lines, line endings and encoding stay as they were.
Display ids are never written.
- A `{{auto}}` that a `!python` loop or a macro produced has no single spot to write back to: that
is an error, asking for the id to be written in literally.
- After writing, the diagram is drawn as usual.
- `-populate_ids` is a new command-line flag, added next to `-pipe` and `-tsvg` in the module's
copy of PlantUML (`cli/CliFlag.java`).
**Before the first commit.** The viewer can only warn. A git pre-commit hook can enforce the rule
by refusing staged `.puml` files that still contain `{{auto}}`, with the same message; it belongs in
the repository that holds the diagrams.
### 7.4 Friendly ids
A **friendly id** is a readable name for a node across files: the journey's namespace, a period,
and the node's name.
| Where | Key | Default |
|---|---|---|
| journey entry | `unique_id_friendly` = the namespace | the journey id in lowercase (`auth`) |
| node block | `unique_id_friendly` = the node's name | the handle |
```
journey AUTH "Authentication"
unique_id_friendly: auth
view forgot_login
{
unique_id_friendly: forgot_password ' auth.forgot_password instead of auth.forgot_login
}
```
- Letters, digits and `_`, like a handle. Unique within the journey.
- Write the node key only to keep a friendly id when the handle is renamed, or to choose a
different one.
- A friendly id is for people to read; it changes whenever someone edits it. A link that must
survive edits uses the unique id.
### 7.5 Checks
| Problem | Result |
|---|---|
| Two nodes with the same `unique_id` (usually a pasted block) | syntax error |
| Two nodes with the same friendly id | syntax error |
| A `unique_id` that is neither `{{auto}}` nor 11 lowercase hex digits | warning |
| `{{auto}}` still in the file | warning with the command (7.2) |
"DO NOT CHANGE" cannot be checked from one file: the parser cannot see what the id used to be. The
guard is a check across files, later: a test, code comment or requirement that links to a unique
id no diagram declares is reported as a broken link.
---
## 8. Flags
```
flags: [future, idea]
```
Eleven flags, in the `flags` list of a node's block. A flag never changes a shape: the node keeps
its frame, its border goes dotted, and the flag's glyph sits in a tab inside the right edge (filled
= set here, outlined = inherited).
- Several are allowed, in any order. A flag written twice is a warning.
- Only flags **set here** are written. Inherited flags are worked out by the module, never
written; writing one sets it on that node.
- An unknown flag is a warning and is ignored.
**Delivery flags** say where a part of the journey stands. They **propagate**: everything
reachable only through the flagged node inherits the flag.
| Flag | Meaning |
|---|---|
| `idea` | A concept to consider, not approved |
| `future` | Planned for a later release |
| `not-implemented` | Defined but absent from the product today |
| `out-of-scope` | Explicitly excluded |
| `deprecated` | Existing behavior being retired |
**Review flags** ask for attention. They **stay where they are set**.
| Flag | Meaning |
|---|---|
| `experiment` | An A/B test or pilot |
| `risk` | A known issue or dependency |
| `security` | Needs a security control or review |
| `needs-decision` | An open product question |
| `needs-updates` | Exists, but its design or code is out of date |
**Pending**
| Flag | Meaning |
|---|---|
| `legacy` | Old but staying, as opposed to deprecated, which is being retired. Whether it propagates is still open; the proposal is that it stays where it is set. See 23.3 and 23.4. |
`legacy` and `needs-updates` have no glyph yet. They will be designed in the shape set before the
renderer draws them. See 23.3 and 23.4.
---
## 9. Attributes any node may carry
Every node and the journey accept these four. `description` is drawn; the other three live only in
the model.
| Key | Value | Drawn | Meaning |
|---|---|---|---|
| `description` | text | in the body, under the title | A short line or two about the node |
| `trace` | list of trace links | no | What this node implements or is tested by |
| `a11y` | text; repeatable | no | An accessibility note for the implementer: focus order, announcements, labels |
| `context` | text | no | Background for the implementer: who uses it, business rules, why it exists |
### 9.1 Markup in titles and descriptions
Titles and descriptions take PlantUML's own text markup, which the renderer already draws:
| Markup | Gives |
|---|---|
| `\n` | a line break (the only place a line breaks) |
| `…`, `**…**` | bold |
| `…`, `//…//` | italic |
| `…`, `__…__` | underline |
| `…`, `--…--` | strike-through |
| `…` | a color |
| `…` | a size |
It is not full HTML: no `
`, `
` or links. The model keeps the text as written, markup
included.
### 9.2 Trace links
The thread from requirement to code: Requirement → Journey → View → Component → Test → Code. Each
link is `kind:reference`.
| Kind | Points at | Example |
|---|---|---|
| `req` | a requirement or epic | `req:AUTH-01` |
| `story` | a user story or ticket | `story:B2B-1432` |
| `design` | a design file or frame | `design:figma/login-v3` |
| `component` | a UI component | `component:LoginForm` |
| `test` | a test case or file | `test:e2e/login.spec.ts` |
| `code` | a source file or module | `code:src/auth/login.tsx` |
| `doc` | a document | `doc:confluence/AUTH` |
Other kinds are accepted and passed on to the tools that read the model; the validator may warn about kinds it does
not know. Trace links point **out** of the diagram; links from other files **into** it use the
unique id (section 7).
```
view login [AUTH-10]
{
title: "Login"
trace: [req:AUTH-01, component:LoginForm, test:e2e/login.spec.ts]
a11y: "Focus starts in the email field"
a11y: "Errors are announced with role=alert"
context: "Most traffic comes from the mobile app's web view"
unique_id: 6f2f4d29ca5 ' AUTO GENERATED - DO NOT CHANGE
}
```
---
### 9.3 Hover text
In an SVG drawing, resting the pointer on a node or an arrow shows what it is, then what the drawing
shortens or leaves out:
| On | Shown |
|---|---|
| A node | Its title and type; its `tooltip`; its whole description; its route, role, host, channel, timeout, resume, location or journey, spelled out; its context; its flags and inherited flags, each with what it means; its trace links; its accessibility notes; its display id and unique id |
| An arrow | Its trigger and guard; its kind, its role when it is not an exit, and the nodes it joins; its `tooltip`; its payload; `returns`; its context, flags, trace links and accessibility notes |
```
view login [AUTH-10]
{
title: "Login"
route: /login
tooltip: "The only way in for customers"
}
action validate { title: "Validate credentials" }
login --> validate : [Sign in] { tooltip: "Sends the form over TLS" }
```
- `tooltip` is text, on any node or arrow. It comes first, after the line that says what it is.
- Titles, descriptions, triggers, guards, payloads and return labels, which the drawing reads as
creole, show the words the drawing shows: `**Save**` shows as Save, `` as é, and
`price < 10` stays. A table, a tree or code shows as written. Every other key, `tooltip` included,
shows as written, its backslashes read as in a label (`\n` starts a new line); so does the title of a
start, an end or a bar, which the drawing leaves out.
- An id that `id_position: hidden` keeps out of the drawing still shows on hover.
- PNG has no hover; open the SVG in a browser. Other formats ignore it.
- `tooltip` is part of the model (20.4, 20.5); the rest of the hover text is worked out from the other
keys.
## 10. Colors
Colors are presentation only. They never carry meaning: flags are glyphs and a dotted border, and
every diagram must read in black and white (section 19.4).
### 10.1 On a node
| Key | Colors |
|---|---|
| `color_frame` | the outline |
| `color_icon` | the type icon |
| `color_title` | the title |
| `color_description` | the description |
| `color_background` | the fill |
### 10.2 Defaults blocks
```
view_color
{
color_frame: #887788
color_icon: #887788
color_title: #000000
color_description: #070707
}
view_color_modal
{
color_icon: #5b3d8f
}
```
- `_color` sets the defaults for every node of a kind: `view_color`, `actor_color`,
`system_color`, `action_color`, `handoff_color`, `data_color`, `start_color`, `end_color`,
`ref_color`.
- `_color_` sets them for one type: `view_color_modal`, `view_color_toast`,
`system_color_external`.
- Both take only `color_*` keys.
### 10.3 The cascade
For each part, the first color found wins:
1. the node's own `color_*` key;
2. its type's block (`view_color_modal`);
3. its kind's block (`view_color`);
4. the palette (section 19.3).
A plain view therefore takes from `view_color`, never from `view_color_modal`. A `view_color_plain`
block is allowed when plain views should differ from the other types.
### 10.4 Themes
A theme is an ordinary file of color blocks, brought in with PlantUML's `!include theme.puml`. A
journey's own blocks, written after the include, add to it, and for the same key the later one
wins.
---
## 11. View
Anything the user sees as a window: a page, a modal, a drawer, a popover, a toast, a set of tabs,
a wizard, embedded content, a new browser window, a waiting state. Every view is its own node; a
modal is not drawn inside the page that opens it but linked to it by an arrow in and a return out.
### 11.1 Statement
```
view [] [{ block }]
```
### 11.2 Types
| Type | Type name drawn | What it is |
|---|---|---|
| `plain` (default) | View | A screen of its own, usually with a route |
| `modal` | Modal | A dialog that blocks the view that opened it until closed |
| `drawer` | Drawer | A panel attached to an edge; the view behind stays live |
| `popover` | Popover | A small panel anchored to a control; closes on a click outside |
| `toast` | Toast | A transient message; no interaction |
| `tabs` | Tabs | A view whose children are shown one at a time, each tab its own view |
| `wizard` | Wizard | A view whose children are shown in order, each step its own view |
| `embedded` | Embedded | Third-party content inside the app, sandboxed (a payment widget, a map) |
| `new-window` | New window | Opens in a separate browser tab or window |
| `waiting` | Waiting | A loading state; the user waits while the system works |
The name of the default type, `plain` or `normal`, is still open. See 23.6.
### 11.3 View attributes
On top of the keys every node takes (section 4.5):
| Key | Value | Drawn | Meaning |
|---|---|---|---|
| `route` | text | the meta line, bottom left, monospace | The URL path or full URL; `:name` marks a parameter (`/policy/:id`) |
| `collapsed` | true or false | a chevron in the title bar | The content stays hidden until the user opens it (an accordion section); any type |
| `parent` | handle of a view | no | The view this one belongs to: a step to its wizard, a tab to its tabs view, or an overlay to the one view it always opens over |
| `blocks`, `dismiss`, `focus`, `duration`, `target` | see 11.4 | no | Behavior overrides |
**Children of tabs and wizards.** Each tab or step is a view of its own, linked by arrows in
order. Nothing is drawn inside anything. `parent:` records which wizard or tabs view a step
belongs to, so the tools that read the model know how to group them:
```
view new_claim [CLAIM-007] { type: wizard; title: "New claim"; description: "3 steps"; route: /claims/new }
view details [CLAIM-050] { title: "Details"; description: "Step 1"; parent: new_claim }
view documents [CLAIM-051] { title: "Documents"; description: "Step 2"; parent: new_claim }
view review [CLAIM-052] { title: "Review"; description: "Step 3"; parent: new_claim }
' arrows: section 13
new_claim --> details : [Start]
details --> documents : [Next]
documents --> review : [Next]
```
### 11.4 Type behavior and overrides
A type is a bundle of behavior that the platform implements: every modal blocks the view under
it, traps focus, and closes on Escape. One view may override part of its bundle with a key in its
block.
| Key | Values | Meaning |
|---|---|---|
| `blocks` | true, false | While it is open, the view underneath cannot be used |
| `dismiss` | list of `escape`, `outside`, `close`, `timeout`, or `none` | How the user can close it without taking an exit: the Escape key, a click outside, a close button, by itself after `duration` |
| `focus` | `trap`, `move`, `stay` | trap: focus moves in and cannot leave until it closes. move: focus moves to the start of the view. stay: focus stays where it was |
| `duration` | duration | How long it stays before it closes by itself |
| `target` | `tab`, `window` | Where a new window opens |
The defaults per type (a dash means the key does not apply, and writing it is a warning):
| Type | `blocks` | `dismiss` | `focus` | `duration` | `target` |
|---|---|---|---|---|---|
| `plain` | – | – | move | – | – |
| `modal` | true | escape, close | trap | – | – |
| `drawer` | false | escape, close | move | – | – |
| `popover` | false | escape, outside | move | – | – |
| `toast` | false | timeout | stay | 5 s | – |
| `tabs` | – | – | move | – | – |
| `wizard` | – | – | move | – | – |
| `embedded` | – | – | move | – | – |
| `new-window` | – | – | move | – | tab |
| `waiting` | – | – | stay | – | – |
Plain, tabs, wizard, embedded and waiting are left only by an exit, so `blocks` and `dismiss` do not
apply to them. A wait's time limit belongs to the action the user is waiting for (section 14.3), not
to the view.
**Overrides in use:**
```
' this drawer locks the list behind it
view filters { type: drawer; title: "Filters"; blocks }
' no Escape and no close button: the user must choose an exit
view confirm_pay { type: modal; title: "Confirm payment"; dismiss: [none] }
view saved { type: toast; title: "Saved"; duration: 3 s }
view help { type: new-window; title: "Help center"; target: window; route: https://help.example.com }
```
In the model, a view carries its effective behavior (the defaults merged with the overrides) and
the list of keys that were overridden, so a generator never needs the defaults table.
### 11.5 What is drawn where
| Part of the frame | From |
|---|---|
| Title bar: the type icon in its cell, the type name, a chevron when collapsed | `type`, `collapsed` |
| Body: the title, then the description | `title` (or the handle), `description` |
| Meta line, bottom left, monospace | `route` |
| Flag tabs, inside the right edge under the title bar | `flags`, plus the inherited ones |
| Id tab, under the bottom edge, right-aligned | `[DISPLAY-ID]` or the assigned display id; none without either |
| Dotted border | any flag, set or inherited |
| Colors | `color_*` keys and the cascade (section 10) |
### 11.6 Examples
```
view login [VIEW-001] { title: "Login"; description: "Email and password"; route: /login }
view dashboard [VIEW-002] { title: "Dashboard"; description: "Signed-in home"; route: /home }
view delete_claim [VIEW-041]
{
type: modal
title: "Delete claim"
flags: [risk]
description: "Cannot be undone"
unique_id: a41c09e7b2d ' AUTO GENERATED - DO NOT CHANGE
}
view deleted [VIEW-042] { type: toast; title: "Claim deleted"; description: "Closes after 5 s" }
view account { type: tabs; title: "Account"; description: "Overview · Claims · Settings"; route: /account }
view card
{
type: embedded
title: "Card payment"
flags: [security, experiment]
description: "Stripe Elements"
color_background: #f4f8ff
}
view signing_in { type: waiting; title: "Signing in"; description: "Checking credentials…" }
view advanced { title: "Advanced options"; collapsed }
view intake_v2 { type: wizard; title: "Claim intake v2"; flags: [future, needs-decision]; description: "Guided, 4 steps" }
view register
```
### 11.7 In the model
```json
{
"key": "delete_claim",
"kind": "view",
"type": "modal",
"title": "Delete claim",
"id": "VIEW-041",
"idAssigned": false,
"uniqueId": "a41c09e7b2d",
"uniqueIdPending": false,
"friendlyId": "claim.delete_claim",
"flags": ["risk"],
"inherited": [],
"description": "Cannot be undone",
"route": null,
"collapsed": false,
"parent": null,
"behavior": { "blocks": true, "dismiss": ["escape", "close"], "focus": "trap" },
"overrides": [],
"trace": [],
"a11y": [],
"context": null,
"style": { "frame": "#887788", "icon": "#5b3d8f", "title": "#000000", "description": "#070707" }
}
```
- `id` is the display id, assigned or written; `idAssigned` says which. It may change between
versions of the file.
- `uniqueId` is `null` with `uniqueIdPending: true` while the file still says `{{auto}}`, and
`null` with `uniqueIdPending: false` for a node without `unique_id`.
- `style` holds the colors the text sets for the node after the cascade (node, type block, kind
block). Colors left to the theme are not listed.
The model schema, version 5 (`ujn-model-v5.schema.json`), uses the names above.
---
## 12. Actor and System
Who or what the flow talks to. An **actor** is a person: the customer who starts a journey, or an
agent inline in the flow doing a manual task. A **system** is a service inside the solution; an
**external** system is a third party the flow calls while the user stays in the app. When the user
is sent to the third party's own pages, that is a handoff (section 15), not a system.
Both are drawn with the participant frame: a box with
its four corners cut and a filled band down its left side, so a participant is never mistaken for a
step.
### 12.1 Statements
```
actor [] [{ block }]
system [] [{ block }]
```
| Statement | Type name drawn | Icon | Default prefix |
|---|---|---|---|
| `actor` | Actor | a person | ACT |
| `system`, or `system` with `type: internal` | System | a server | SYS |
| `system` with `type: external` | System, external | a cloud | SYS |
An actor has no type menu, so `type` on an actor is a warning. A system's type is `internal` (the
default) or `external`.
### 12.2 Attributes
On top of the keys every node takes (section 4.5):
| Key | On | Value | Drawn | Meaning |
|---|---|---|---|---|
| `role` | actor | text | the meta line | The person's role: `Policyholder`, `Back office`, `Senior adjuster` |
| `host` | system | text | the meta line | Where the service lives: `identity.internal`, `api.pay.example` |
`role` on a system or `host` on an actor is a warning.
### 12.3 How actors and systems take part
Section 13.5 gives the exit rules; in short:
- **The actor who starts a journey** points at the journey's start node (section 17.4), with no
trigger. There are no
swimlanes: the actor is a node like any other.
- **An actor inline in the flow** is a manual task: an arrow comes in, and the person picks one
outcome. Each arrow out carries that outcome as its label (`[Approve]`, `[Reject]`), the way a
view's exits carry a trigger. UJN has no decision diamond, so this is how a person's decision is drawn.
- **A system** is called by an action (section 14.5), with the payload on the arrow. The user stays in
the app.
### 12.4 What is drawn where
| Part of the frame | From |
|---|---|
| Top left, inside the band: the icon white in a filled circle, the type name | `actor` or `system` and its `type` |
| Body: the title, then the description | `title` (or the handle), `description` |
| Meta line, bottom left, monospace | `role` or `host` |
| Flag tabs, inside the right edge, from under the top-right cut | `flags`, plus the inherited ones |
| Id tab, on the straight part of the bottom edge | `[DISPLAY-ID]` or the assigned display id |
| Dotted outline, over the band too | any flag, set or inherited |
| Colors | `color_*` keys, `actor_color`, `system_color`, `system_color_` |
### 12.5 Examples
```
actor customer [ACT-001] { title: "Customer"; role: Policyholder }
actor agent [ACT-002] { title: "Claims agent"; role: Back office; description: "Reviews claims over 10k" }
actor senior { title: "Senior adjuster"; flags: [needs-decision]; description: "Who reviews above 10k?" }
system identity [SYS-001] { title: "Identity service"; host: identity.internal; description: "Issues and checks tokens" }
system payments [SYS-002]
{
type: external
title: "Payment provider"
host: api.pay.example
description: "Cards and bank transfers"
unique_id: 0b7e2c4f19d ' AUTO GENERATED - DO NOT CHANGE
}
system bank_gw { type: external; title: "Bank gateway"; flags: [deprecated]; host: gw.bank.example }
system bureau { type: external; title: "Credit bureau"; flags: [risk, security]; host: api.bureau.example }
system_color_external
{
color_icon: #2f6f9f
}
' an agent inline as a manual task (section 13.5)
view review_q { title: "Review queue"; route: /claims/review }
view approved { type: toast; title: "Claim approved" }
view rejected { title: "Rejection letter"; route: /claims/:id/rejection }
review_q --> agent : [Open claim]
agent --> approved : [Approve]
agent -x-> rejected : [Reject]
```
### 12.6 In the model
```json
{
"key": "payments",
"kind": "system",
"type": "external",
"title": "Payment provider",
"id": "SYS-002",
"idAssigned": false,
"uniqueId": "0b7e2c4f19d",
"uniqueIdPending": false,
"friendlyId": "claim.payments",
"flags": [],
"inherited": [],
"description": "Cards and bank transfers",
"host": "api.pay.example",
"trace": [],
"a11y": [],
"context": null,
"style": { "icon": "#2f6f9f" }
}
```
An actor has `"kind": "actor"`, `"type": "actor"`, and `role` in place of `host`.
---
## 13. Arrows
An arrow says how the flow moves from one node to the next: which way, why, and what
crosses with it. The shapes are the ones on the arrow page of the shape set; this section gives their text.
### 13.1 Statement
```
[: