{
 "note": "Ids are stable within UJN 0.1 and may change before 1.0. The module does not write them yet.",
 "version": "UJN 0.1 draft, spec revision 23",
 "warnings": [
  {
   "id": "action-exit-no-trigger",
   "message": "an exit from an action takes no trigger",
   "when": "An exit out of an action, meaning any arrow that is not a call into a system or a write into a data store, has a `[trigger]`.",
   "why": "An action is the system acting, not the user, so its exits are picked by guards, or all fire when unguarded, never by a user's trigger.",
   "fix": "Drop the brackets: write the condition as a guard, `act --> a : valid`, or leave the exit unlabeled. The user's trigger belongs on the arrow into the action.",
   "sections": "14.4, 13.5, 21",
   "example": "@startujn\njourney J \"Journey\"\naction act\nview a\nact --> a : [Go]\n@endujn"
  },
  {
   "id": "action-timeout-needs-timeout-exit",
   "message": "has a timeout but no exit guarded timeout",
   "when": "An action has a valid `timeout` and at least one exit, but no exit whose guard is exactly `timeout`.",
   "why": "A timeout means the action can run out of time, so one exit must say where the user goes when it does; without it that outcome is missing from the journey.",
   "fix": "Add an exit guarded `timeout` (`check -x-> slow : timeout`), or remove the `timeout` key if the action cannot time out.",
   "sections": "14.3, 21",
   "example": "@startujn\njourney J \"Journey\"\naction check { timeout: 10 s }\nview done\ncheck --> done\n@endujn"
  },
  {
   "id": "actor-and-ref-have-no-type",
   "message": "<a|an> <kind> has no type",
   "when": "An actor or a journey reference has a `type` key; the message reads \"an actor has no type\" or \"a ref has no type\".",
   "why": "Actors and references have no type menu, so the value cannot change the drawing; the key is ignored.",
   "fix": "Remove the `type` key. To say what kind of person an actor is, use `role`.",
   "sections": "4.5, 12.1, 18.1, 21",
   "example": "@startujn\njourney J \"Journey\"\nactor user { type: admin }\n@endujn"
  },
  {
   "id": "arrow-key-known",
   "message": "key <key> does not apply to an arrow",
   "when": "An arrow's block holds a key other than `flags`, `payload`, `returns`, `trace`, `context`, `a11y`, `tooltip`, `arrow_spacing`, `color_line`, `color_text` or `color_background`.",
   "why": "An arrow has its own short set of keys, and a node key such as `route` or `type` means nothing on it. The value is kept in the model under `extra`, so a tool can try out a new field.",
   "fix": "Remove the key, or move it to the node it belongs to.",
   "sections": "13.9, 4.4, 21",
   "example": "@startujn\njourney J \"Journey\"\nview a\nview b\na --> b : [Go] { route: /b }\n@endujn"
  },
  {
   "id": "arrow-spacing-is-pixels",
   "message": "arrow_spacing is a number of pixels, 0 or more, or default, not <value>; the render block's is used",
   "when": "An arrow's `arrow_spacing` is neither a number of 0 or more (with or without `px`) nor `default`; quotes and case do not matter.",
   "why": "The room along an arrow must be a size in pixels for the layout to use. The arrow falls back to the `render` block's value, or to the layout's own room when the `render` block has none.",
   "fix": "Write a number of pixels, 0 or more, such as `arrow_spacing: 40` or `40px`, or write `default`.",
   "sections": "19.8, 13.9, 21",
   "example": "@startujn\njourney J \"Journey\"\nview a\nview b\na --> b : [Go] { arrow_spacing: wide }\n@endujn"
  },
  {
   "id": "arrow-written-once",
   "message": "the same arrow twice",
   "when": "Two arrows have the same source, target, kind (navigation, negative or return), trigger and guard; it is raised on each later copy. A direction hint does not tell arrows apart, and `..>` and `.x.>` are the same kind.",
   "why": "Two such arrows say the same thing twice, which is usually a copy-and-paste slip.",
   "fix": "Delete one copy, or, if they are two real exits, tell them apart with a different trigger or guard.",
   "sections": "21, 13.2",
   "example": "@startujn\njourney J \"Journey\"\nview a\nview b\nb ..> a\nb ..> a\n@endujn"
  },
  {
   "id": "boolean-is-true-or-false",
   "message": "<key> must be true or false, not <value>",
   "when": "`auto` in the `increment` block, `collapsed` on a view, or `blocks` on a modal, drawer, popover or toast has a value other than `true` or `false` (any case, without quotes; a quoted `\"true\"` also raises it).",
   "why": "The key is a switch, and a value that is neither is ignored. For `auto`, display id assignment stays as it was, which is off unless an earlier entry turned it on; for `collapsed` and `blocks`, the view keeps its default and may not behave as the writer meant.",
   "fix": "Write `true` or `false` without quotes, or the key alone for `true` (`auto`, `collapsed`).",
   "sections": "5, 6, 11.3, 11.4, 21",
   "example": "@startujn\njourney J \"Journey\"\nview a { collapsed: maybe }\n@endujn"
  },
  {
   "id": "call-no-label",
   "message": "a call takes no trigger and no guard; its payload says what is sent",
   "when": "An arrow from an action into a system (a call) has a trigger or a guard.",
   "why": "A call is part of the action and happens while it runs; it is not an exit that someone picks or a condition selects, so a label has no meaning on it.",
   "fix": "Remove the label and put what is sent in the payload: `act --> s { payload: [email] }`.",
   "sections": "14.5, 14.4, 21",
   "example": "@startujn\njourney J \"Journey\"\naction act\nsystem s\nact --> s : ok\n@endujn"
  },
  {
   "id": "color-block-holds-color-keys",
   "message": "not a color key in <block>: <key>",
   "when": "An entry in a color block is not a color key of its kind: `color_frame`, `color_icon`, `color_title`, `color_description` or `color_background` for a node kind; `color_line`, `color_text` or `color_background` for `arrow_color`.",
   "why": "Color blocks hold only color defaults; any other key, or a color key of the other family, is skipped.",
   "fix": "Use a color key of the block's kind, or move the entry to the node or arrow it belongs to.",
   "sections": "10.2, 13.9, 21",
   "example": "@startujn\nview_color { color_line: #887788 }\njourney J \"Journey\"\nview a\n@endujn"
  },
  {
   "id": "color-block-type-known",
   "message": "unknown type in <block>",
   "when": "A typed color block, `<kind>_color_<type>`, names a type its kind does not have, or `arrow_color_<kind>` names an arrow kind other than `navigation`, `negative` or `return`. An actor and a reference have no types, so any `actor_color_<type>` or `ref_color_<type>` raises it.",
   "why": "No node or arrow can have that type, so the block colors nothing; usually the type is misspelled.",
   "fix": "Use a type of that kind (11.2, 12.1, 14.2, 15.2, 16.2, 17.2) or an arrow kind (13.9), or use the untyped block `<kind>_color`.",
   "sections": "10.2, 13.9, 21",
   "example": "@startujn\nview_color_dialog { color_frame: #887788 }\njourney J \"Journey\"\nview a\n@endujn"
  },
  {
   "id": "color-is-hex-or-name",
   "message": "not a color: <value>",
   "when": "A color key on a node, on an arrow or in a color block has a value that is neither `#` with 3, 6 or 8 hex digits nor a color name PlantUML knows.",
   "why": "PlantUML would draw an unknown name as white, so the value is ignored and the color comes from the color blocks or the theme instead.",
   "fix": "Use a hex color (`#5555d0`) or a PlantUML color name (`LightBlue`).",
   "sections": "5, 10.1, 10.2, 13.9, 21",
   "example": "@startujn\njourney J \"Journey\"\nview login { color_frame: blue-ish }\n@endujn"
  },
  {
   "id": "data-store-only-actions",
   "message": "a data store connects only to actions",
   "when": "An arrow joins a data store, at either end, to a node that is not an action.",
   "why": "Only an action reads or writes a store: the system does the work, and a view or any other node does not touch storage directly. Reads and writes are worked out from arrows between actions and stores.",
   "fix": "Go through an action: the view leads to an action, and the action writes to the store or reads from it.",
   "sections": "16.4, 21",
   "example": "@startujn\njourney J \"Journey\"\nview a\ndata d\na --> d : [Save]\n@endujn"
  },
  {
   "id": "dismiss-from-list",
   "message": "dismiss takes escape, outside, close, timeout, or none alone: <value>",
   "when": "A `dismiss` on a modal, drawer, popover or toast lists something other than `escape`, `outside`, `close`, `timeout` or `none`, lists `none` together with another item, has no value, or opens a list and never closes it. Case counts: `Escape` also raises it.",
   "why": "`dismiss` tells the platform how the user can close an overlay without taking an exit. A way of closing that does not exist cannot be built, and `none` next to another way contradicts itself. The value is ignored and the type's default stays.",
   "fix": "List only `escape`, `outside`, `close` and `timeout`, or write `dismiss: [none]` alone, and close the brackets.",
   "sections": "11.4, 5, 21",
   "example": "@startujn\njourney J \"Journey\"\nview a { type: modal; dismiss: [escape, sideways] }\n@endujn"
  },
  {
   "id": "duration-is-number-and-unit",
   "message": "not a duration: <value>",
   "when": "`timeout` on an action (of type action, wait, event or auth) or a handoff, or `duration` on a toast, is not a number followed by `ms`, `s`, `min`, `h` or `d`, with one optional space.",
   "why": "The timeout is drawn on the meta line; on an action it also decides which exit is taken when time runs out (14.3), on a handoff it says how long the link stays valid (15.3). A value that is not a duration is ignored, so the node has no timeout. A toast's `duration` says how long it stays before it closes by itself (11.4); a value that is not a duration is ignored, and the toast keeps its 5 s default.",
   "fix": "Write a number and a unit, for example `timeout: 5 min`, `timeout: 24h` or `duration: 500ms`.",
   "sections": "5, 11.4, 14.3, 15.3, 21",
   "example": "@startujn\njourney J \"Journey\"\naction a { timeout: soon }\n@endujn"
  },
  {
   "id": "end-has-no-exits",
   "message": "an end has no exits",
   "when": "An arrow leaves an end node (one warning per end, at the line of the first such arrow).",
   "why": "An end is where the journey stops; an arrow out of it means the journey goes on, so the node is not an end.",
   "fix": "Remove the arrow out of the end, or replace the end with the node the flow really goes through.",
   "sections": "17.4, 13.5, 21",
   "example": "@startujn\njourney J \"Journey\"\nend done\nview home\ndone --> home\n@endujn"
  },
  {
   "id": "every-node-reached-from-start",
   "message": "no path from a start reaches it",
   "when": "The journey has at least one start and one arrow, and a node other than an actor or a data store is reached from no start through exits, resumes, calls, writes or reads (other returns do not count).",
   "why": "A node the user can never get to is a missing arrow or a leftover; either way the journey as drawn is not the journey as meant.",
   "fix": "Add the arrow that leads to the node from the flow, or remove the node.",
   "sections": "17.5, 21, 23.23",
   "example": "@startujn\njourney J \"Journey\"\nstart open_app\nview home\nview help\nopen_app --> home\n@endujn"
  },
  {
   "id": "exit-needs-trigger",
   "message": "an exit from <a|an> <kind> needs a trigger, written after a colon: [Trigger]",
   "when": "A `-->` or `-x->` arrow out of a view or an actor has no `[trigger]`; returns and arrows into a start are not checked.",
   "why": "The user leaves a view by doing something, such as a button, a link or a gesture, and an inline actor by picking an outcome; the trigger names it. Without it a reader cannot tell what leads where.",
   "fix": "Add the trigger after a colon, `a --> b : [Next]`, or write the arrow as `..>` if it is a return.",
   "sections": "13.5, 12.3, 21",
   "example": "@startujn\njourney J \"Journey\"\nview a\nview b\na --> b\n@endujn"
  },
  {
   "id": "exits-all-guarded-or-none",
   "message": "guarded and unguarded exits on one <kind>",
   "when": "An action or a start has both guarded and unguarded exits; calls into systems and writes into stores do not count. <kind> is action or start.",
   "why": "All unguarded exits fire, while exactly one guarded exit fires, so mixing the two on one node leaves it unclear what happens. A start is left as an action is, so the same rule applies. Whether to allow the mix is still open (23.18).",
   "fix": "Guard every exit or none. To run something next to a guarded outcome, send that exit into a fork, whose unguarded exits all fire.",
   "sections": "14.4, 13.5, 17.4, 21, 23.18",
   "example": "@startujn\njourney J \"Journey\"\naction act\nview a\nview b\nact --> a : ok\nact --> b\n@endujn"
  },
  {
   "id": "flag-known",
   "message": "unknown flag <flag>",
   "when": "A `flags` list on a node or an arrow holds a name that is not one of the eleven flags.",
   "why": "Only the eleven flags have a meaning and a glyph; an unknown one, often a typo, is ignored, so the flag the writer meant is lost.",
   "fix": "Use one of the eleven flags, in lowercase with hyphens: idea, future, not-implemented, out-of-scope, deprecated, experiment, risk, security, needs-decision, needs-updates, legacy.",
   "sections": "8, 21",
   "example": "@startujn\njourney J \"Journey\"\nview login { flags: [later] }\n@endujn"
  },
  {
   "id": "flag-written-once",
   "message": "flag written twice: <flag>",
   "when": "The same flag appears twice on one node or arrow, in one `flags` list or across two `flags` entries (which also warn that the key is written twice).",
   "why": "A flag is either set or not, so the second copy adds nothing and usually hides a copy-and-paste slip.",
   "fix": "Remove the repeated flag.",
   "sections": "8, 21",
   "example": "@startujn\njourney J \"Journey\"\nview login { flags: [future, future] }\n@endujn"
  },
  {
   "id": "flags-is-a-list",
   "message": "flags is a list: [future, risk]",
   "when": "A `flags` key on a node or an arrow has no value, or its value opens with `[` and does not close with `]`.",
   "why": "Flags are read as a list; a bare key or an unclosed bracket gives no flags at all, so the node or arrow is drawn as if it had none.",
   "fix": "Write the flags as a closed list (`flags: [future, risk]`), or one flag bare (`flags: future`).",
   "sections": "8, 5, 13.8, 21",
   "example": "@startujn\njourney J \"Journey\"\nview login { flags: [future }\n@endujn"
  },
  {
   "id": "focus-from-list",
   "message": "focus is trap, move or stay, not <value>",
   "when": "A view's `focus` is not exactly `trap`, `move` or `stay`. The check is case-sensitive and does not remove quotes, so `Trap` and `\"trap\"` also raise it.",
   "why": "Focus handling is part of what the platform builds for a view, and only these three behaviors exist. The value is ignored and the type's default stays.",
   "fix": "Write `focus: trap`, `focus: move` or `focus: stay`, in lowercase and without quotes.",
   "sections": "11.4, 21",
   "example": "@startujn\njourney J \"Journey\"\nview a { focus: grab }\n@endujn"
  },
  {
   "id": "fork-exits-unguarded",
   "message": "a fork has only unguarded exits",
   "when": "An action of type `fork` has at least one exit with a guard.",
   "why": "Every exit of a fork fires at the same time; a guard suggests a choice, which a fork never makes.",
   "fix": "Remove the guards from the fork's exits; to choose one path, use a plain action with guarded exits instead.",
   "sections": "14.4, 14.2, 21",
   "example": "@startujn\njourney J \"Journey\"\naction split { type: fork }\nview next\nsplit --> next : ok\n@endujn"
  },
  {
   "id": "friendly-id-is-handle-like",
   "message": "unique_id_friendly is letters, digits and _, not <value>",
   "when": "A `unique_id_friendly` on a node or on the journey is not letters, digits and `_`, starting with a letter.",
   "why": "A friendly id is read across files as `namespace.name`, so it uses the same characters as a handle. The value is ignored: a node falls back to its handle, and the journey to its id in lowercase.",
   "fix": "Use only letters, digits and `_`, starting with a letter: `forgot_password`, not `forgot-password`.",
   "sections": "7.4, 21",
   "example": "@startujn\njourney J \"Journey\"\nview a { unique_id_friendly: my-page }\n@endujn"
  },
  {
   "id": "handoff-left-by-resume-only",
   "message": "a handoff is left only by its resume arrows (..>)",
   "when": "A `-->` or `-x->` arrow leaves a handoff.",
   "why": "A handoff is where the user leaves the app; the only ways out of it are the user coming back, which are resume arrows. A `-->` would mean the flow moves on while the user is away.",
   "fix": "If the user comes back here, make the arrow a `..>` resume with a trigger, `h ..> a : [Open link]`, on a handoff of type `returns` (the default). If the user does not come back (`no-return`), remove the arrow: the journey ends out there.",
   "sections": "15.4, 21",
   "example": "@startujn\njourney J \"Journey\"\nhandoff h { type: no-return }\nview a\nh --> a\n@endujn"
  },
  {
   "id": "handoff-resume-matches-start-route",
   "message": "the handoff's resume <resume> differs from the start's route <route>",
   "when": "A handoff with a `resume` has a resume arrow into a `handoff-return` start whose `route` has a different value.",
   "why": "Both keys name the link the user comes back through; two different values for one link leave readers and tools unsure which is right.",
   "fix": "Make the two values the same, or write the link in one place only: the handoff's `resume` or the start's `route`.",
   "sections": "17.4, 15.3, 21, 23.19",
   "example": "@startujn\njourney J \"Journey\"\nstart back { type: handoff-return; route: /checkout/return }\nview checkout\nhandoff bank { resume: /checkout/back }\nback --> checkout\ncheckout --> bank : [Pay]\nbank ..> back : [Approve]\n@endujn"
  },
  {
   "id": "id-position-from-list",
   "message": "id_position is outside, inside, inside-top, inside-bottom or hidden, not <value>; the render block's is used",
   "when": "A node's `id_position` value is not `outside`, `inside`, `inside-top`, `inside-bottom` or `hidden` (quotes and case do not matter).",
   "why": "The node then draws its display id where the `render` block says (`outside` by default), whatever an earlier entry for the key said, so the id may not be where the author meant.",
   "fix": "Use one of the five values, or remove the key to take the `render` block's.",
   "sections": "4.6, 21",
   "example": "@startujn\njourney J \"Journey\"\nview a { id_position: top }\n@endujn"
  },
  {
   "id": "increment-key-known",
   "message": "unknown increment key <key>",
   "when": "A key in the `increment` block is neither `auto` nor `<kind>_prefix`, `<kind>_delimiter`, `<kind>_start` or `<kind>_digits` for one of the nine node kinds.",
   "why": "A misspelled setting or kind (`view_suffix`, `views_prefix`) is ignored, so the display ids would keep their defaults without notice.",
   "fix": "Use a key of the `increment` block (6): `auto`, or `<kind>_prefix`, `<kind>_delimiter`, `<kind>_start` or `<kind>_digits`, with kind view, actor, system, action, handoff, data, start, end or ref.",
   "sections": "6, 21",
   "example": "@startujn\nincrement { view_suffix: x }\njourney J \"Journey\"\nview a\n@endujn"
  },
  {
   "id": "increment-number-is-digits",
   "message": "<key> must be a number, not <value>",
   "when": "A `<kind>_start` or `<kind>_digits` key in the `increment` block has a value that is not digits only, once quotes are removed.",
   "why": "The counter's first number and its zero padding are whole numbers; another value is ignored, and the default (start 1, 3 digits) or an earlier entry is used.",
   "fix": "Write digits only, for example `view_start: 2` or `view_digits: 3`.",
   "sections": "6, 5, 21",
   "example": "@startujn\nincrement { view_start: two }\njourney J \"Journey\"\nview a\n@endujn"
  },
  {
   "id": "join-has-one-exit",
   "message": "a join has one exit",
   "when": "An action of type `join` has more than one exit.",
   "why": "A join waits for every path coming in and then goes on along one path; a second exit splits the flow again, which is a fork's job.",
   "fix": "Keep one exit on the join; to split the flow after it, lead that exit into a fork.",
   "sections": "14.4, 21",
   "example": "@startujn\njourney J \"Journey\"\naction meet { type: join }\nview one\nview two\nmeet --> one\nmeet --> two\n@endujn"
  },
  {
   "id": "journey-key-known",
   "message": "key <key> does not apply to the journey",
   "when": "An entry directly under the journey line uses a key other than `description`, `context`, `trace`, `a11y`, `unique_id` or `unique_id_friendly`.",
   "why": "The journey takes only those keys; any other key (a node key such as `route`, or a typo) is ignored, so the author would lose it without notice.",
   "fix": "Fix the key's spelling, move the entry into the block of the node it belongs to, or remove it.",
   "sections": "3, 21",
   "example": "@startujn\njourney J \"Journey\"\nroute: /home\nview a\n@endujn"
  },
  {
   "id": "key-fits-node-type",
   "message": "<key> does not apply to type <type>",
   "when": "A view has `blocks` or `dismiss` on a type other than modal, drawer, popover or toast, `duration` on a type other than toast, or `target` on a type other than new-window; or an action has `timeout` on a type other than action, wait, event or auth, or `channel` on a type other than message.",
   "why": "The key means nothing for that type (a plain view is never dismissed, only a toast closes by itself); its value is kept under `extra` in the model but not used.",
   "fix": "Remove the key, or change the type to one it applies to, for example `type: toast` for `duration`.",
   "sections": "11.4, 14.3, 21",
   "example": "@startujn\njourney J \"Journey\"\nview a { duration: 3 s }\n@endujn"
  },
  {
   "id": "key-written-once",
   "message": "key written twice: <key>; the last one wins",
   "when": "The journey's entries, a node's block or an arrow's block hold the same key more than once, for any key except the list keys `trace` and `a11y`.",
   "why": "A single-value key holds one value, so the earlier line is overridden without anything else showing it; usually one of the two lines is a leftover or a typo. `flags` and `payload` are the exception: the module adds both lists up, although the message says the last one wins.",
   "fix": "Delete the entry you do not mean. Only `trace` and `a11y` may be repeated; their values add up. For `flags` or `payload`, write one list that holds every item.",
   "sections": "5, 21",
   "example": "@startujn\njourney J \"Journey\"\nview a { title: \"One\"; title: \"Two\" }\n@endujn"
  },
  {
   "id": "label-needs-free-place",
   "message": "no free place by the arrow for its label, which is drawn where it is least in the way",
   "when": "After the layout is made again with more room along the arrow, the arrow's label (its pill) still finds no free place by its line.",
   "why": "The label is then drawn off its line, where it covers the least, so it can look as if it belongs to another arrow; the warning names the arrow to check. It is in the drawing's warnings box only, never in the model, so `warnings: hide` leaves it out entirely.",
   "fix": "Give the label room: shorten it and the labels beside it, or leave a return unlabeled when it needs no label (in the example, `[Back]` and `[Open]`, or a bare `orders ..> orders`, draw no warning).",
   "sections": "13.10, 19.6, 20.6, 21",
   "example": "@startujn\njourney J \"Journey\"\nview orders\norders ..> orders : [Back to orders]\norders --> orders : [Open details]\n@endujn"
  },
  {
   "id": "no-return-handoff-never-resumes",
   "message": "a no-return handoff has a way back",
   "when": "A handoff of type `no-return` has an arrow into it with `returns`, or a resume arrow (`..>` or `.x.>`) out of it.",
   "why": "The type says the journey ends out there; a way back contradicts it, so the drawing says both that the user returns and that they do not.",
   "fix": "Remove the `returns` key and the resume arrows, or change the type to `returns` (the default) if the user does come back.",
   "sections": "15.4, 21",
   "example": "@startujn\njourney J \"Journey\"\nview help\nhandoff call_us { type: no-return }\nhelp --> call_us : [Call us] { returns }\n@endujn"
  },
  {
   "id": "node-key-known",
   "message": "key <key> does not apply to <a|an> <kind>",
   "when": "A node's block holds a key that is not defined for its keyword, such as `host` on a view or `role` on a system. <kind> is the keyword (view, actor, system, action, handoff, data, start, end, ref), with \"an\" before actor, action and end.",
   "why": "An unknown key is usually a typo or a key of another kind. Its value is kept under `extra` in the model, so tools can try out a field before the language adopts it, but it is not drawn or checked.",
   "fix": "Fix the spelling, move the key to the kind of node it belongs to, or remove it.",
   "sections": "4.4, 12.2, 21",
   "example": "@startujn\njourney J \"Journey\"\nview a { host: example.com }\n@endujn"
  },
  {
   "id": "node-type-known",
   "message": "unknown <kind> type <value>; drawn as <type>",
   "when": "The `type` of a view, system, action, handoff, data store, start or end is not one of that keyword's types. <type> is the keyword's default type.",
   "why": "The type sets the icon and the type name drawn and, for a view, its default behavior; an unknown type falls back to the default, so the node may look and behave unlike what the author meant.",
   "fix": "Use a listed type, lowercase with hyphens: view (11.2), system (12.1), action (14.2), handoff (15.2), data (16.2), start and end (17.2).",
   "sections": "4.5, 21",
   "example": "@startujn\njourney J \"Journey\"\nview a { type: dialog }\n@endujn"
  },
  {
   "id": "one-increment-block",
   "message": "a second increment block; its entries are added to the first",
   "when": "A diagram holds a second `increment` block. The warning is raised once, at the second block.",
   "why": "A journey has at most one `increment` block; a second one can quietly change the prefixes, starts or padding the first one set, because its entries are read as if they were in the first.",
   "fix": "Merge the entries into one `increment` block.",
   "sections": "6, 21",
   "example": "@startujn\nincrement { auto }\nincrement { view_digits: 2 }\njourney J \"Journey\"\nview a\n@endujn"
  },
  {
   "id": "one-render-block",
   "message": "a second render block; its entries are added to the first",
   "when": "A diagram holds a second `render` block, before or after the journey line. The warning is raised once, at the second block.",
   "why": "Drawing settings are meant to sit in one place, often a shared file brought in with `!include`; a second block can quietly change what the first one set, because its entries are read as if they were in the first.",
   "fix": "Merge the entries into one `render` block.",
   "sections": "19.1, 21",
   "example": "@startujn\nrender { legend }\nrender { corners: square }\njourney J \"Journey\"\nview a\n@endujn"
  },
  {
   "id": "only-action-calls-system",
   "message": "only an action calls a system",
   "when": "An arrow goes into a system from any node that is not an action.",
   "why": "A system is never reached by a screen or a person directly: only an action, something the system does, calls it, with the request as the call's payload.",
   "fix": "Put an action between them: the node leads to the action, and the action calls the system with `-->`.",
   "sections": "14.5, 13.5, 21",
   "example": "@startujn\njourney J \"Journey\"\nview a\nsystem s\na --> s : [Go]\n@endujn"
  },
  {
   "id": "parent-is-a-handle",
   "message": "parent must be a handle, not <value>",
   "when": "A view's `parent` value is not a handle (letters, digits and `_`, starting with a letter), for example a name that starts with a digit, or quoted text.",
   "why": "`parent` links a view to the view it belongs to by handle; a value that cannot be a handle names no node, so it is ignored.",
   "fix": "Write the parent view's handle bare, for example `parent: new_claim`.",
   "sections": "11.3, 4.2, 5, 21",
   "example": "@startujn\njourney J \"Journey\"\nview a { parent: 2nd_step }\n@endujn"
  },
  {
   "id": "parent-is-a-view",
   "message": "parent <handle> is not a view of this journey",
   "when": "A view's `parent` names a handle that no node of this journey declares, or a node that is not a view.",
   "why": "`parent` tells the tools that read the model which view a step, tab or overlay belongs to (its wizard, its tabs view, or the one view it always opens over); a link to a missing node or a non-view cannot be grouped, so the module drops it and the model's `parent` is null.",
   "fix": "Name the handle of a view declared in this journey, for example the wizard the step belongs to, or remove the `parent` key.",
   "sections": "11.3, 21",
   "example": "@startujn\njourney J \"Journey\"\nview a { parent: b }\n@endujn"
  },
  {
   "id": "payload-is-a-list",
   "message": "payload is a list: [a, b]",
   "when": "An arrow's `payload` has no value, or opens a list with `[` and never closes it.",
   "why": "The payload says what crosses the arrow and is drawn in braces with its label. A payload without a list says nothing, so it is ignored.",
   "fix": "Give it a list with the closing bracket, `payload: [email, password]`, or a single item, `payload: email`.",
   "sections": "13.6, 5, 21",
   "example": "@startujn\njourney J \"Journey\"\nview a\nview b\na --> b : [Go] { payload }\n@endujn"
  },
  {
   "id": "point-from-list",
   "message": "point is auto, up, down, left or right, not <value>; auto is used",
   "when": "A reference's `point` value is not `auto`, `up`, `down`, `left` or `right` (quotes and case do not matter).",
   "why": "`point` turns the reference's shape; a value it cannot read falls back to `auto`, so the point faces away from the node its first arrow comes from, which may not be the side the author meant.",
   "fix": "Use one of the five values, or remove the key for `auto`.",
   "sections": "18.2, 21",
   "example": "@startujn\njourney J \"Journey\"\nref r { journey: REG; point: north }\n@endujn"
  },
  {
   "id": "read-write-no-label",
   "message": "a read or a write takes no trigger and no guard; its payload says what moves",
   "when": "An arrow between an action and a data store (a write into the store or a read out of it) has a trigger or a guard.",
   "why": "A read or a write is part of its action, not an exit that someone picks or a condition selects, so a label has no meaning on it.",
   "fix": "Remove the label and put what moves in the arrow's payload: `act --> d { payload: [claim] }`.",
   "sections": "16.4, 21",
   "example": "@startujn\njourney J \"Journey\"\naction act\ndata d\nact --> d : saved\n@endujn"
  },
  {
   "id": "ref-exit-no-trigger",
   "message": "an arrow out of a journey reference takes no trigger: the other journey ends",
   "when": "An arrow out of a journey reference has a `[trigger]`.",
   "why": "When the other journey ends, nobody clicks anything here, so there is nothing for a trigger to name; a guard names the outcome instead.",
   "fix": "Remove the trigger, and name the outcome as a guard when there is more than one way back: `r ..> a : registered`.",
   "sections": "18.3, 13.5, 21",
   "example": "@startujn\njourney J \"Journey\"\nref r { journey: OTHER }\nview a\nr ..> a : [Done]\n@endujn"
  },
  {
   "id": "ref-exits-need-guards",
   "message": "<count> arrows leave the journey reference; each needs a guard naming an outcome",
   "when": "More than one arrow leaves one journey reference and at least one of them has no guard. It is raised on the reference, at the first arrow's line.",
   "why": "Each arrow out of a reference is one outcome of the other journey. With more than one, a guard must say which outcome leads where.",
   "fix": "Name the outcome as a guard on each arrow: `r ..> a : registered` and `r ..> b : canceled`.",
   "sections": "18.3, 13.5",
   "example": "@startujn\njourney J \"Journey\"\nref r { journey: OTHER }\nview a\nview b\nr ..> a\nr ..> b\n@endujn"
  },
  {
   "id": "ref-journey-is-an-id",
   "message": "journey is the id of another journey, not <value>",
   "when": "A reference's `journey` value is not a journey id (a letter or digit, then letters, digits, `.`, `_` or `-`), for example quoted text with a space.",
   "why": "The reference stands for the journey with that id, and tools follow the id to it; a value that cannot be an id is ignored, so the model's `journey` for the reference is null.",
   "fix": "Write the id from the other journey's journey line, bare, for example `journey: REG`.",
   "sections": "18.2, 3, 21, 22",
   "example": "@startujn\njourney J \"Journey\"\nref r { journey: \"Other journey\" }\n@endujn"
  },
  {
   "id": "ref-left-by-resume-only",
   "message": "only ..> arrows leave a journey reference",
   "when": "A `-->` or `-x->` arrow leaves a journey reference.",
   "why": "Arrows out of a reference say where this journey resumes once the other journey ends, so they are `..>` resume arrows, as out of a handoff.",
   "fix": "Write the arrow as `..>`: `r ..> a`.",
   "sections": "18.3, 21",
   "example": "@startujn\njourney J \"Journey\"\nref r { journey: OTHER }\nview a\nr --> a\n@endujn"
  },
  {
   "id": "ref-needs-journey",
   "message": "a journey reference needs journey: <ID>, the id of the journey it stands for",
   "when": "A `ref` node has no `journey` key.",
   "why": "A reference stands for another journey; without that journey's id, neither readers nor tools can tell where the user goes.",
   "fix": "Add `journey:` with the id from the other journey's journey line (`journey: REG`).",
   "sections": "18.2, 21",
   "example": "@startujn\njourney J \"Journey\"\nref registration\n@endujn"
  },
  {
   "id": "render-arrow-spacing-is-pixels",
   "message": "arrow_spacing is a number of pixels, 0 or more, or default, not <value>; the default is used",
   "when": "`arrow_spacing` in the `render` block is neither `default` nor a number of 0 or more, with or without `px` (quotes and case do not matter).",
   "why": "The value sets the room the layout counts along every arrow; a value it cannot read falls back to the layout's own spacing (70 px), so the drawing differs from what the author asked for.",
   "fix": "Write a number of pixels such as `arrow_spacing: 10`, `10px` or `7.5`, or `default`.",
   "sections": "19.8, 19.1, 21",
   "example": "@startujn\nrender { arrow_spacing: wide }\njourney J \"Journey\"\nview a\n@endujn"
  },
  {
   "id": "render-key-known",
   "message": "unknown render key <key>",
   "when": "The `render` block holds a key other than `colors`, `corners`, `direction`, `legend`, `warnings`, `id_position` or `arrow_spacing`.",
   "why": "A misspelled or invented drawing setting is ignored, so the drawing would keep its default without notice.",
   "fix": "Use one of the keys of the `render` block (19.1), or remove the entry.",
   "sections": "19.1, 21",
   "example": "@startujn\nrender { theme: dark }\njourney J \"Journey\"\nview a\n@endujn"
  },
  {
   "id": "render-value-from-list",
   "message": "<key> is <choices>, not <value>; the default is used",
   "when": "A `render` key `colors`, `corners`, `direction`, `legend`, `warnings` or `id_position` has a value outside its list (quotes and case do not matter). <choices> lists the values, for example `color or mono`.",
   "why": "The key's default (`color`, `rounded`, `right`, `false`, `show`, `outside`) is used instead, whatever an earlier entry for the key said, so the drawing differs from what the author meant.",
   "fix": "Use one of the listed values, for example `colors: mono`.",
   "sections": "19.1, 4.6, 21",
   "example": "@startujn\nrender { colors: sepia }\njourney J \"Journey\"\nview a\n@endujn"
  },
  {
   "id": "resume-needs-trigger",
   "message": "a resume arrow needs a trigger: what the user does out there",
   "when": "A `..>` or `.x.>` arrow out of a handoff has no `[trigger]`.",
   "why": "Coming back from a handoff is something the user does out there, such as opening a link or approving in a bank app, and the trigger says which, as for a view's exits.",
   "fix": "Add what the user does as the trigger: `h ..> a : [Open link]`.",
   "sections": "15.4, 13.5",
   "example": "@startujn\njourney J \"Journey\"\nhandoff h\nview a\nh ..> a\n@endujn"
  },
  {
   "id": "returning-handoff-needs-way-back",
   "message": "a returning handoff needs a way back: { returns } on the arrow into it, or a ..> out of it",
   "when": "A handoff of type `returns` (the default) has no arrow into it with `returns` and no resume arrow (`..>` or `.x.>`) out of it.",
   "why": "The type says the user comes back, so the journey must show where they come back to; otherwise the return is missing from the drawing and the model.",
   "fix": "Add `{ returns }` to the arrow into the handoff, add a resume arrow out of it (`bank ..> paid : [Approve]`), or set `type: no-return` if the user does not come back.",
   "sections": "15.4, 21",
   "example": "@startujn\njourney J \"Journey\"\nhandoff bank\n@endujn"
  },
  {
   "id": "returns-into-ref-or-handoff",
   "message": "returns only applies to an arrow into a journey reference or a handoff",
   "when": "An arrow with `returns`, on its own or with a label, goes into anything other than a journey reference or a handoff (`returns: false` does not count).",
   "why": "`returns` asks the renderer to draw the way back from another journey or from outside the app; on any other arrow there is nothing to come back from. It is ignored and nothing extra is drawn.",
   "fix": "Remove `returns`, and write an explicit `..>` arrow if there is a way back.",
   "sections": "13.7, 21",
   "example": "@startujn\njourney J \"Journey\"\nview a\nview b\na --> b : [Go] { returns }\n@endujn"
  },
  {
   "id": "shared-prefix-same-start",
   "message": "kinds that share the prefix <prefix><delimiter> have different starts",
   "when": "`increment` has `auto`, and a node without a display id belongs to a kind whose prefix and delimiter match a kind numbered earlier, but whose `<kind>_start` is different. It is raised once for each such node.",
   "why": "Kinds that share a prefix share one counter so their ids never collide, and a counter can start only once. The module keeps the start of the first kind it numbered, so the later kind's start has no effect.",
   "fix": "Give every kind that shares the prefix the same `<kind>_start`, or give those kinds different prefixes or delimiters.",
   "sections": "6, 21",
   "example": "@startujn\njourney J \"Journey\"\nincrement { auto; view_prefix: P; action_prefix: P; action_start: 5 }\nview a\naction b\n@endujn"
  },
  {
   "id": "shared-trigger-needs-guards",
   "message": "<count> exits share [<trigger>]; each needs a guard",
   "when": "Two or more exits from one view or actor, or resume arrows from one handoff, have the same trigger and at least one has no guard. It is raised once per group, on the source node, at the first arrow's line.",
   "why": "When one trigger leads to several places, the guards tell the outcomes apart. If one exit has no guard, nobody can tell which one is taken.",
   "fix": "Give every exit that shares the trigger a guard, such as `[Sign in] valid` and `[Sign in] wrong password`, or give them different triggers.",
   "sections": "13.5, 15.4, 21",
   "example": "@startujn\njourney J \"Journey\"\nview a\nview b\nview c\na --> b : [Go]\na --> c : [Go]\n@endujn"
  },
  {
   "id": "special-characters-quoted",
   "message": "quote text that holds ; } or an apostrophe: <value>",
   "when": "A text value written without quotes holds `;`, `}` or an apostrophe, or a quoted value is not closed properly (a bare `\"` inside it, or a backslash before the closing quote).",
   "why": "Unquoted, these characters end an entry, close a block or start a trailing comment, so the same text placed elsewhere would be cut short; here the module keeps the value as written.",
   "fix": "Put the text in double quotes: `title: \"Customer's claims\"`.",
   "sections": "5, 2",
   "example": "@startujn\njourney J \"Journey\"\nview claims { title: Customer's claims }\n@endujn"
  },
  {
   "id": "start-entered-by-actor-or-resume",
   "message": "only the actor who starts the journey, or a handoff's resume into a handoff-return start, leads into a start",
   "when": "An arrow leads into a start, and it is neither from an actor nor a handoff's resume arrow (`..>` or `.x.>`) into a start of type `handoff-return`.",
   "why": "A start is where the journey begins, so only the person who begins it, or a user coming back from a handoff, enters it; any other arrow into a start is a loop inside the journey drawn as a new beginning.",
   "fix": "Lead the arrow to the node after the start instead; to show who begins the journey, draw the arrow into the start from an actor; for a return from a handoff, use a `..>` from the handoff into a `handoff-return` start.",
   "sections": "17.4, 21",
   "example": "@startujn\njourney J \"Journey\"\nstart open_app\nview home\nopen_app --> home\nhome --> open_app\n@endujn"
  },
  {
   "id": "start-exit-no-trigger",
   "message": "an exit from a start takes no trigger",
   "when": "An arrow out of a start has a `[trigger]`.",
   "why": "A start is left as an action is: the journey simply begins and nobody chooses anything, so there is nothing for a trigger to name.",
   "fix": "Remove the trigger; a choice the user makes belongs on an exit from the first view.",
   "sections": "17.4, 13.5",
   "example": "@startujn\njourney J \"Journey\"\nstart s\nview a\ns --> a : [Go]\n@endujn"
  },
  {
   "id": "start-needs-exit",
   "message": "a start with no exit",
   "when": "The journey has at least one arrow, and a start has no arrow leaving it.",
   "why": "A start is where the journey begins; with no exit nothing follows from it, so the flow it should begin is missing.",
   "fix": "Add an arrow from the start to the first node of the journey (`open_app --> home`), or remove the start.",
   "sections": "17.4, 21",
   "example": "@startujn\njourney J \"Journey\"\nactor customer\nstart open_app\ncustomer --> open_app\n@endujn"
  },
  {
   "id": "system-only-replies",
   "message": "a system only replies, with ..>, to an action that calls it",
   "when": "An arrow leaves a system and is not a `..>` (or `.x.>`) into an action that has an arrow into that system.",
   "why": "A system answers the action that called it and cannot move the flow on by itself. A reply to an action that never calls the system has no request to answer.",
   "fix": "Make the arrow a `..>` reply to the action that calls the system, and continue the flow from that action.",
   "sections": "14.5, 13.5, 21",
   "example": "@startujn\njourney J \"Journey\"\nsystem s\nview a\ns --> a\n@endujn"
  },
  {
   "id": "target-from-list",
   "message": "target is tab or window, not <value>",
   "when": "A new-window view's `target` is not exactly `tab` or `window` (case-sensitive, quotes not removed).",
   "why": "A new window opens either in a browser tab or in a separate window. Anything else cannot be built, so the value is ignored and the default, `tab`, stays.",
   "fix": "Write `target: tab` or `target: window`, in lowercase and without quotes.",
   "sections": "11.4, 21",
   "example": "@startujn\njourney J \"Journey\"\nview a { type: new-window; target: popup }\n@endujn"
  },
  {
   "id": "text-needs-value",
   "message": "<key> needs a value",
   "when": "A text key (`title`, `description`, `context`, `route`, `role`, `host`, `channel`, `resume`, `location`, `tooltip`, `a11y`, or a `returns` label) is written alone or with nothing after the colon (for `returns`, only `returns:` with nothing after the colon; `returns` alone means true).",
   "why": "A text key with no text says nothing, so the entry is ignored and the node keeps its default, such as the handle as its title.",
   "fix": "Give the key its text (`title: \"Login\"`), or remove the entry.",
   "sections": "5, 4.4, 21",
   "example": "@startujn\njourney J \"Journey\"\nview login { title: }\n@endujn"
  },
  {
   "id": "timeout-guard-needs-action-timeout",
   "message": "an exit is guarded timeout, but the action has no timeout",
   "when": "An action has an exit guarded exactly `timeout` but no valid `timeout` (none written, not a duration, or on a type it does not apply to).",
   "why": "The `timeout` guard only means something when the action says how long it may take; without it a reader cannot tell when that exit is taken.",
   "fix": "Give the action a `timeout` (`timeout: 10 s`) on a type that takes one (action, wait, event, auth), or rename the guard if the exit is not about time running out.",
   "sections": "14.3, 21",
   "example": "@startujn\njourney J \"Journey\"\naction check\nview slow\ncheck --> slow : timeout\n@endujn"
  },
  {
   "id": "trace-is-a-list",
   "message": "trace is a list: [req:AUTH-01, test:login.spec.ts]",
   "when": "A `trace` key on the journey, a node or an arrow has no value, or its value opens with `[` and does not close with `]`.",
   "why": "Trace links are read as a list; a bare key or an unclosed bracket gives no links, so the thread from requirement to code is lost.",
   "fix": "Write a closed list of `kind:reference` links: `trace: [req:AUTH-01, test:login.spec.ts]`.",
   "sections": "9.2, 5, 21",
   "example": "@startujn\njourney J \"Journey\"\nview login { trace: [req:AUTH-01 }\n@endujn"
  },
  {
   "id": "trace-link-is-kind-reference",
   "message": "a trace link is kind:reference, not <link>",
   "when": "An item of a `trace` list is not `kind:reference`: a lowercase kind, a colon, then the reference with no space after the colon.",
   "why": "Tools sort and follow trace links by their kind (req, test, code and others); a link without one cannot be followed and is dropped.",
   "fix": "Put the kind in front of the reference: `trace: [req:AUTH-01]`.",
   "sections": "9.2, 21",
   "example": "@startujn\njourney J \"Journey\"\nview login { trace: [AUTH-01] }\n@endujn"
  },
  {
   "id": "traced-node-has-unique-id",
   "message": "has trace links but no unique_id, so other files cannot link back to it",
   "when": "A node has at least one valid trace link (`kind:reference`) but no `unique_id`, neither a value nor `{{auto}}`.",
   "why": "Trace links point out of the diagram; the requirement, test or code they name can link back only through the node's unique id, because the handle and the display id may change.",
   "fix": "Add `unique_id: {{auto}}` to the node and run `java -jar plantuml.jar -populate_ids <file>` to fill it in.",
   "sections": "7.1, 9.2, 21",
   "example": "@startujn\njourney J \"Journey\"\nview a { trace: [req:AUTH-01] }\n@endujn"
  },
  {
   "id": "unique-id-is-auto-or-hex",
   "message": "unique_id <value> is neither {{auto}} nor 11 lowercase hex digits",
   "when": "A `unique_id` on a node or on the journey is neither `{{auto}}` nor exactly 11 lowercase hex digits.",
   "why": "A unique id is what tests, code, requirements and other diagrams link to. Only `-populate_ids` makes ids that are random and well formed, so a hand-typed or damaged id may collide or break those links. The value is still kept as written.",
   "fix": "Write `unique_id: {{auto}}` and run `java -jar plantuml.jar -populate_ids <file>`, or restore the original id if an existing one was damaged.",
   "sections": "7.5, 7.1, 21",
   "example": "@startujn\njourney J \"Journey\"\nview a { unique_id: 12345 }\n@endujn"
  },
  {
   "id": "unique-id-populated-before-commit",
   "message": "unique_id is still {{auto}}. Generate it before your first commit: java -jar plantuml.jar -populate_ids <file>",
   "when": "A node or the journey still has `unique_id: {{auto}}`, because the file was drawn without `-populate_ids`. <file> is the file that holds the placeholder (an `!include`d file when it came from one), relative to the folder PlantUML runs in when it is inside that folder; it reads `<file>` when there is no source file (`-pipe`).",
   "why": "Until the placeholder is filled, the node has no permanent identity for other files to link to, and every `{{auto}}` must be filled before the file's first commit. The model marks the id as pending (`uniqueId` null, `uniqueIdPending` true).",
   "fix": "Run the command the warning prints (`java -jar plantuml.jar -populate_ids <file>`); it writes a generated id over the placeholder in the file.",
   "sections": "7.1, 7.2, 7.5, 21",
   "example": "@startujn\njourney J \"Journey\"\nview a { unique_id: {{auto}} }\n@endujn"
  }
 ]
}
