@delurio/cli 0.13.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,38 @@
2
2
 
3
3
  While the version is 0.x, a release that can judge the same graphs differently (a new check, a stricter schema) bumps the minor; a fix that judges nothing differently bumps the patch.
4
4
 
5
+ ## 0.15.0 (2026-11-24)
6
+
7
+ This release adds what a binding can say that a replay could not check before (SPEC.md §7), a repeated control disabled by its row's place (§4), and how a tutorial shows the screen a failure leads to and reads a dialog (§7). The first five came from binding delurio's own in-page guide, whose walks could not go past one step, read the tab's storage, say where a box is drawn, check a flow drawn inside another, or hold a request the page sends to another server. The last three came from binding another app, which could not open a node's menu one way in one state and another way in another, pass over a notice shown only on some visits, or say that the first row's Move up is disabled. The two on tutorials came from another app's videos, in which the screen a failure leads to could not be shown and a dialog closed before it was read. The binding schema takes the new keys, and `check` holds a binding to them (rule `schema`); what they name in the graph is held when a replay loads the binding, as before.
8
+
9
+ - A scenario's `then: { <effect>: [ { <variable>: <value> }, .. ] }` says how each step that applies the effect comes out where its `havoc` leaves a variable to chance, one entry each time, in order, so that a walk goes on past such a step: a guide's second step that is its last. A variable an entry leaves out, and every variable once the list has run out, keeps its value, as before.
10
+ - `storage: { session: { <key glob>: <value> }, local: { .. } }` on a state says what the page's `sessionStorage` and `localStorage` hold when the state is checked: `absent`, no key the glob matches is there; any other value, a key it matches holds it (a text, or a regular expression between slashes).
11
+ - `near: <locator>` on a node says it is drawn beside the element the locator finds: within 24 CSS pixels of it, in every state that shows the node.
12
+ - `draws: { flow, bind, given, states }` on a node says it holds another flow's screen, drawn by something other than that flow's own page: the replay checks the drawn flow's nodes inside the node's element, for the state `states` maps each state to, or the drawn flow's first screen. The node gives a locator; the schema refuses one without. `affected` touches the binding's flow when the drawn flow's files change (rule `drawn`), or the binding `bind` names.
13
+ - A state that invokes none of the flow's actions may name a `call`: a request the page makes while the state is shown, held as an invoke's call is. `status` on the call, a number or a list, is the HTTP status its answer has.
14
+ - A node's `before` in a binding may be a map from states to lists of actions, where the node is reached another way in another state (a row's menu opened from the list, already open on the row's page); in a state the map leaves out, nothing is done. A list is done in every state, as before.
15
+ - `optional: true` on a `click`, a `fill` or an `attach`: the app may not ask for it (a notice shown on some visits only). Once the page is still, its element is looked for once; where it is not there, the action is passed over and the step's report says so. The schema refuses `optional` on any other action.
16
+ - A repeat node's `disabledWhen` may read its row's place among the rows it draws, `repeat.first`, `repeat.last` and `repeat.index` (from 1), so that the first row's Move up is disabled and the others are not (SPEC.md §4). A replay checks it on each element the node's locator finds, in the order of the page. `event-unhandled` reads the place as unknown, as the flow does not know how many rows the app draws: such a `disabledWhen` disables the node in a situation only where it holds in every row (`saving or repeat.first` where `saving` holds; `repeat.first` alone nowhere), and its message says "does not hold in every row". The place on a node without `repeat`, and `row.<field>` in any `disabledWhen`, keep the graph from loading. A graph that does not read the place is judged as before.
17
+ - A tutorial step's `after` may give a failure (`FAIL.<class>`), or another event, that a server step the step passes takes another way than its normal one, where the screen its normal way leads to does not handle it: the walk stops at that server step and takes it there (`{ press: send, after: FAIL.network }`), so a tutorial shows the screen a failure leads to; an opening card's first event is taken so at the server steps before the first screen. `check` accepts such a tutorial, and still stops one whose event neither the screen nor a server step on the way handles (`tutorial-mismatch`). A tutorial that did not give such an event is judged as before.
18
+ - On a screen that shows a dialog, a tutorial's press with no `at` comes once the step's narration has been said, and a step that focuses nothing shows the whole dialog; `at: <seconds>` gives a press its own moment. The video tool warns of a dialog shown for under 2 seconds, one no step focuses or shows whole, and a press that closes a dialog while its step is still said. `check` is unchanged by it.
19
+
20
+ ## 0.14.0 (2026-11-22)
21
+
22
+ - New rule of `check`, which fails `--strict`: `event-unhandled`, a node that sends an event (`emits`) in a state that shows it enabled and does not handle that event (SPEC.md §4), the part of [#3](https://github.com/delurio-labs/delurio/issues/3) that asks for events handled where they are shown. In every situation the checker reaches, a state that shows the node (`in`, `unless`, and its `when` over that situation's context) and does not disable it (`disabledIn`, `disabledWhen`) has a transition on the event in its `on`. Three are not held, by what SPEC.md §2 says of them: a node that sends `NAVIGATE`, the person leaving the page, which is always possible; an exit, which has no transitions, so what a node on its page does is outside the flow; and a state with `always`, which the flow passes at once. It is given once per node and state, at the node in `ui.yaml`; where the node's `when` or `disabledWhen` decides it, its notes, and in SARIF its code flow, give the way from a start to the first situation that shows it enabled. It reads the exploration `check` already makes, so no flow is explored twice. Before, a Save button left enabled while its step runs, an answer that a question's saving state does not handle, and a link back to the list shown in states that do not handle it all passed `--strict`; Medaris's graphs had all three. On delurio's own graphs it finds 24, each in a state that runs a server step. A graph whose screens leave no event unhandled is judged as before; a project can record what it finds with `--baseline` while it fixes it.
23
+ - `renderCheckScreens` in `@delurio/cli/wireframe` gives each expectation's `native` again: 0.13.0's JavaScript module dropped the kind the addon returns, so a replay or `kit check` built on the module could not find a `native` control among the controls of its kind. The command line was not affected.
24
+ - A node may say how it looks in a state: `tone`, one of `neutral`, `info`, `success`, `warning` and `danger`, or a map from these to expressions over the context, of which the first that holds wins, such as an exam's countdown that turns red in its last five minutes (`tone: { danger: "clock == 'lastFive'" }`, SPEC.md §4). It is how the node looks, never all it says (WCAG 2.2, 1.4.1): its words and its role say the same, and the accessibility tree, `kit check` and a replay are as they were. An expression of a `tone` that does not parse, or names what is not a variable, a guard or `state`, keeps the graph from loading, as `checked` does; a word that is not a tone is the `schema` rule's. The page draws a fixed tone and names it in the node's annotations, and names a map there as `tone danger when …`, as it names `when`; the fixed components draw a tone as the class `wf-tone-<word>`, red for `danger`, with styles the page adds only when a node of its flow has a tone (`TONE_CSS` in `@delurio/cli/wireframe`, for a video stage too). `renderStageScreen` takes the situation's context as its sixth argument and draws each node in the first tone of its map that holds there; without it, in its fixed tone only. Graphs without `tone` are drawn byte for byte as before.
25
+ - A kit draws a node's tone with the slot `{tone}` and `tones`, a map from each tone to the word the slot gives, with `default` for a node without one, at the top of kit.yaml and in a component, whose own is read first (SPEC.md §8). A kit that has `tones` gives an entry for every tone a node drawn with a `{tone}` template may take, any of a map included: one it lacks is `kit-uncovered`, as an intent is. A key of `tones` that is not a tone keeps the kit from loading.
26
+ - A kit may carry its fonts: `fonts`, a list of `{ family, file, weight, style, unicodeRange }`, each `file` a woff2, woff, ttf or otf file in the kit's folder, licensed for embedding (SPEC.md §8). The page and the video stage's CSS (`kitCss`) embed each as a data: URL in an `@font-face`, once per page, so a kit still fetches nothing and its screens are drawn in its own fonts on any machine. A file may be at most 2 MiB, and a kit's files at most 8 MiB together, room for four variable fonts of about 1.5 MB. New rule of `check`, which fails `--strict`: `kit-font`, at a font entry whose file is not in the kit's folder (an absolute path, `..`, or a link out of it, none of which is read), is not there, is not a file, is not by its first bytes the format its name says, or is too large; it is given once per kit, and `page` warns of it and draws without the font. New warning of `check`, which fails nothing: `kit-font-unembedded`, a family the kit's CSS draws in first (the first of a `font-family` or `font` stack, through the custom properties it reads from the tokens or the CSS) that is neither a family of `fonts` nor a generic one, where the tokens or the CSS write it. `kitFamilies(kit)` in `@delurio/cli/kit` lists the families a kit carries, so that a tool that draws the screens in a browser can ask whether it drew them. Kits without `fonts` are drawn as before, and the example kit leads with `system-ui`, so it is warned of nothing.
27
+ - A repeat's items may be given as rows (SPEC.md §4): `samples: { question.options: [ { id: a, text: "Four" }, { id: b, text: "Three" } ] }`, a list of maps under the repeat's data. A node with that `repeat` is then drawn once per row, on the page, on the tutorial stage and in `kit check`'s screens, which expect each element it draws with its `index`; a param that reads `row.<field>` (`params: { option: row.text }`) takes that row's field, and `nodeTexts` gives the texts of every row. A repeat node's `checked` may read its row (`checked: "row.id == answer"`), so the options of a radio group are written as one node again; `row.<field>` on a node without `repeat` keeps the graph from loading, as before. Without rows, a node is drawn once, as before. Before, Medaris's exam showed one option per question and could not draw the one chosen.
28
+ - `renderStageScreen(g, state, reveal, warn, kit, ctx)` in `@delurio/cli/wireframe` takes the context of the situation the stage shows, a map of the flow's variables to their values: each node's `checked` is read over it, for each row it is drawn for. Without it, or with `null`, only `checked: true` is drawn, as before; the page draws each state's screen once, for all the situations that show it, so it draws only that.
29
+ - An effect may set a variable from the row that was pressed, `set: { answer: row.id }`, on a transition whose event a repeat node sends (SPEC.md §4). The flow does not say which row is pressed, and the sample rows only illustrate the screens, so the checker lets such a variable take any of its values, as `havoc` does, whether rows are given or not. Before, `row.id` was set as the text it is.
30
+ - A tutorial's press says which row of a repeat node it presses, `{ press: option, row: 2 }`, counted from 1 (SPEC.md §7): the step takes the case in which every variable the transition sets from the row has that row's value. `check` gives `tutorial-mismatch` at a `row` that is not a whole number from 1, on a step that presses nothing or a node without `repeat`, past the rows the samples give, of a row without a field the effects read, and where no case of the press has the row's value. A press without `row` takes the first case, as before.
31
+ - Rows and tables in the wireframe (SPEC.md §4): adjacent nodes that share a `repeat` are drawn side by side, one row per item, on the page, on the stage and in `kit check`'s screens; a List holds those rows as its items, and a ListItem that begins a row holds the nodes beside it. A List whose role is `table` or `grid` draws its header cells (role `columnheader`) as its header row and its repeat nodes as its rows. With a kit each node keeps its template inside the rows, a table's row being an element of role `row`; the expected accessibility tree and `kit check`'s expectations follow the rows. Before, a table was drawn as one column, and the number and the state of one question in a list stood on separate lines. Screens without a table and with no nodes that share a repeat are drawn as before.
32
+ - The ui schema lets a sample be a list of rows, each a map of strings, numbers and booleans, with at least one row.
33
+ - A node's `when` that does not parse, or names what is not a variable, a guard or `state`, keeps the graph from loading (exit 1), at the `when` in `ui.yaml`, as a `checked` or a `disabledWhen` does (SPEC.md §4); decided on 22 Nov 2026. Before, such a `when` was passed over without a word: the page drew the node, `event-unhandled` decided nothing for it, and only a replay or a tutorial that read it stopped. It stops none of delurio's own graphs, whose nodes give 835 `when`s, nor of Medaris's, which give 3,954.
34
+ - A node may stay usable while a step runs: `duringStep: true` on it (SPEC.md §4) says that in a state that runs a step (`invoke`) the node may be pressed, and that its event is handled once the step ends, by the state the step's outcome leads to; decided on 22 Nov 2026. `event-unhandled` then does not hold the step's state to the event, but every situation that the step's `DONE` and `FAIL.<class>` lead to, past states with `always`, from each situation of the step that shows the node enabled: it handles the event, shows the node disabled or not at all, is an exit, or runs a step of its own that shows the node enabled, where the press waits again, onward, each situation walked once so that a cycle of steps ends. Where one does none of these, the error is given for the step's state, as before, and says the outcome and the state the press is left in; its notes, and in SARIF its code flow, give the way there through the step. The error for a node shown enabled in a step's state now says the marker too. A replay does not press a node while a step runs, so it is not changed. New warning of `check`, which does not fail `--strict`: `during-step-unused`, a node marked so where no state that runs a step shows it enabled (by `in`, `unless` and `disabledIn`), or that sends `NAVIGATE`; the `schema` rule refuses the marker on a node that sends no event. A graph without the marker is judged as before. Of the findings in a step's state, the marker would clear all 24 on delurio's own graphs and 725 of 945 on Medaris's, those whose step's outcomes already handle the event, disable the node or do not show it; Medaris's other 220 lead, mostly through a `FAIL.<class>`, to a state that shows the node enabled and does not handle it.
35
+ - SPEC.md §7 says what a draft and a maker's mark are beside the AI marks; nothing a tool does changes. A draft, a review copy of a video for the person who asked for it, is never published; it keeps the first card and the watermark in the sound, leaves out only the watermark in the picture, and carries in its place a visible stamp on every frame (the maker's mark, the word for draft, the time of the frame, the draft's id) and a draft assertion in its signed metadata. A maker may draw its own mark in a corner of the picture. Neither is the AI label, which is the first card, and nothing but the two is burnt into the picture; every published video keeps all three marks. Before, §7 said that nothing is burnt into the picture after the first card, that every video delurio makes carries all three marks, and that its video tool did not add the watermark or the metadata yet, which it does.
36
+
5
37
  ## 0.13.0 (2026-11-21)
6
38
 
7
39
  - A variant of a flow's binding written beside it, `binding.<variant>.yaml` (`binding.noSessions.yaml`, `binding.common.yaml`), is a binding (SPEC.md §7): `check` holds it to the binding schema, as it holds `binding.yaml` and a shared `<name>.binding.yaml`. Before, it was read as no graph file at all, and a value the schema refuses passed unseen; Medaris had 271 such files.
package/README.md CHANGED
@@ -62,7 +62,7 @@ Several folders may be given (`check graphs examples`); a graph under two of the
62
62
  |---|---|
63
63
  | 0 | every graph loads, and under `--strict` nothing is wrong |
64
64
  | 1 | a graph cannot be loaded, or is written for a newer format than this version reads |
65
- | 2 | under `--strict`: a guarantee is broken, a state cannot be reached or has no way out, a catalog key is missing from a locale or a sample is missing, the main story cannot be walked, a tutorial no longer matches its flow, a writing flow has no changes note, a domain names an entity or a field it does not have, a flow invokes an action or lists a failure code its domain does not have, a policy names one, a `source:` anchor names a file or a line that is not there, a need's evidence is not there or a product's gaps and its needs disagree… |
65
+ | 2 | under `--strict`: a guarantee is broken, a state cannot be reached or has no way out, a catalog key is missing from a locale or a sample is missing, the main story cannot be walked, a node is shown enabled where its event is not handled, a tutorial no longer matches its flow, a writing flow has no changes note, a domain names an entity or a field it does not have, a flow invokes an action or lists a failure code its domain does not have, a policy names one, a `source:` anchor names a file or a line that is not there, a need's evidence is not there or a product's gaps and its needs disagree… |
66
66
 
67
67
  ## What a product must have: needs and gaps
68
68
 
@@ -98,7 +98,7 @@ A kit (SPEC.md §8) says how the components of `ui.yaml` look in one product, so
98
98
  3. Put your design tokens in `tokens.json`, in the W3C Design Tokens format (2025.10): groups nest, a token has `$value`, `$type` is inherited from its group, and `"{color.accent}"` is an alias. Each token becomes a CSS custom property named by its path: `color.accent` is `--color-accent`, `font.size-body` is `--font-size-body`. `dark.json` gives the same names other values for a dark page; a name that `tokens.json` lacks is refused.
99
99
  4. Write the CSS in `kit.css`, from the tokens. It is scoped to the drawn screen: `&` is the screen itself, a rule never reaches the rest of the page, `:root`, `html` and `body` are refused as they never match there, and only `@media`, `@supports` and `@container` may wrap rules. Nothing is fetched: `url()` takes only `data:` addresses.
100
100
  5. Give each component its screens use a `template`, one HTML element or a few, filled per node:
101
- - slots: `{text}`, the node's visible text; `{name}`, its accessible name; `{id}`, the node's id; `{intent}`, the word `intents` gives its intent (`confirm`, `dismiss`, `secondary`, and `default` for a node with none); `{children}`, the items of a `List`;
101
+ - slots: `{text}`, the node's visible text; `{name}`, its accessible name; `{id}`, the node's id; `{intent}`, the word `intents` gives its intent (`confirm`, `dismiss`, `secondary`, and `default` for a node with none); `{children}`, the items of a `List`; `{tone}`, the word `tones` gives the node's tone (`neutral`, `info`, `success`, `warning`, `danger`, and `default` for a node with none), from the component's `tones` or else the kit's own, at the top of `kit.yaml`;
102
102
  - flags, each a section that opens and closes in the same place: `{?disabled}..{/disabled}` where the node is disabled, `{!disabled}..{/disabled}` where it is not, `{?named}` where the graph gives an accessible name other than the visible text (so `aria-label="{name}"` goes inside it), and `{?conditional}` where the node shows only when a flag holds;
103
103
  - `roles`: a template of its own for a node whose ARIA role differs, such as a `Button` drawn as a link or a `ListItem` that is a checkbox or a radio;
104
104
  - a `List`'s and a `ListItem`'s template is one element, which the page marks with the node it draws.
@@ -107,24 +107,34 @@ A kit (SPEC.md §8) says how the components of `ui.yaml` look in one product, so
107
107
 
108
108
  `Page` has no template: it is the screen itself, styled with `&`, and a dialog is a page node whose role is `dialog`, drawn as its screen. A component a screen uses that the kit has no template for, or an intent with no word in `intents`, is drawn with the fixed component and reported (`kit-uncovered`), which fails `--strict`. A kit that cannot be read, such as a template that is not well-formed or a token that refers to one no file defines, keeps every graph that names it from loading.
109
109
 
110
+ A kit fetches nothing, so the screens are drawn in the fonts its CSS names only where the machine that draws them has them installed, unless the kit carries them. List them in `fonts`, each a file in the kit's folder whose licence allows it to be embedded (the SIL Open Font License does), and the page and the video embed them:
111
+
112
+ ```yaml
113
+ fonts:
114
+ - { family: Instrument Sans, file: fonts/InstrumentSans.woff2, weight: "400 700" }
115
+ - { family: Literata, file: fonts/Literata.woff2, weight: "200 900" }
116
+ ```
117
+
118
+ A file is a woff2, woff, ttf or otf file of at most 2 MiB, and a kit's files are at most 8 MiB together. One that is not there, not in the kit's folder, or not a font is an error of `check` (`kit-font`); a family the kit's CSS draws in first that it does not carry is a warning (`kit-font-unembedded`), SPEC.md §8.
119
+
110
120
  ## Write a graph in an editor
111
121
 
112
122
  The npm package ships a JSON Schema (2020-12) for each kind of graph file in `schemas/`: `flow`, `ui`, `nav` (also `nav.extracted.yaml`), `domain`, `catalog`, `needs`, `gaps` (`needs.gaps.yaml`) and `binding` (`binding.yaml` and a shared `<name>.binding.yaml`). With them an editor completes keys, explains each one from SPEC.md on hover, and marks a typo, a value of the wrong kind, or a title cut short by a comma inside `{ }`. In VS Code, with the YAML extension, put this in `.vscode/settings.json`, with the version your project pins in
113
- place of 0.13.0 (a schema from an older release does not know the keys added since):
123
+ place of 0.15.0 (a schema from an older release does not know the keys added since):
114
124
 
115
125
  ```json
116
126
  {
117
127
  "yaml.schemas": {
118
- "https://unpkg.com/@delurio/cli@0.13.0/schemas/flow.schema.json": "**/flow.yaml",
119
- "https://unpkg.com/@delurio/cli@0.13.0/schemas/ui.schema.json": "**/ui.yaml",
120
- "https://unpkg.com/@delurio/cli@0.13.0/schemas/nav.schema.json": ["**/nav.yaml", "**/nav.extracted.yaml"],
121
- "https://unpkg.com/@delurio/cli@0.13.0/schemas/domain.schema.json": ["**/domain.yaml", "**/domain/*.yaml"],
122
- "https://unpkg.com/@delurio/cli@0.13.0/schemas/needs.schema.json": "**/needs.yaml",
123
- "https://unpkg.com/@delurio/cli@0.13.0/schemas/gaps.schema.json": "**/needs.gaps.yaml",
124
- "https://unpkg.com/@delurio/cli@0.13.0/schemas/binding.schema.json": ["**/binding.yaml", "**/binding.*.yaml", "**/*.binding.yaml"]
128
+ "https://unpkg.com/@delurio/cli@0.15.0/schemas/flow.schema.json": "**/flow.yaml",
129
+ "https://unpkg.com/@delurio/cli@0.15.0/schemas/ui.schema.json": "**/ui.yaml",
130
+ "https://unpkg.com/@delurio/cli@0.15.0/schemas/nav.schema.json": ["**/nav.yaml", "**/nav.extracted.yaml"],
131
+ "https://unpkg.com/@delurio/cli@0.15.0/schemas/domain.schema.json": ["**/domain.yaml", "**/domain/*.yaml"],
132
+ "https://unpkg.com/@delurio/cli@0.15.0/schemas/needs.schema.json": "**/needs.yaml",
133
+ "https://unpkg.com/@delurio/cli@0.15.0/schemas/gaps.schema.json": "**/needs.gaps.yaml",
134
+ "https://unpkg.com/@delurio/cli@0.15.0/schemas/binding.schema.json": ["**/binding.yaml", "**/binding.*.yaml", "**/*.binding.yaml"]
125
135
  },
126
136
  "json.schemas": [
127
- { "fileMatch": ["**/catalog/*.json"], "url": "https://unpkg.com/@delurio/cli@0.13.0/schemas/catalog.schema.json" }
137
+ { "fileMatch": ["**/catalog/*.json"], "url": "https://unpkg.com/@delurio/cli@0.15.0/schemas/catalog.schema.json" }
128
138
  ]
129
139
  }
130
140
  ```
package/SPEC.md CHANGED
@@ -175,14 +175,16 @@ rules: [ { id, rule } ]
175
175
  | `in`, `unless` | the flow states the node is shown in, and those it is not |
176
176
  | `when` | a guard or context flag that must hold for the node to show |
177
177
  | `disabledIn` | states where the node is shown but disabled |
178
- | `disabledWhen` | an expression over the context (§3): where it holds, the node is shown but disabled, in any state that shows it |
178
+ | `disabledWhen` | an expression over the context (§3): where it holds, the node is shown but disabled, in any state that shows it. A repeat node's may read its place among the rows (Rows of a repeat, below) |
179
179
  | `emits` | the event the node sends when pressed |
180
+ | `duringStep: true` | in a state that runs a step (`invoke`): the node stays usable while the step runs, and its event is handled once the step ends, by the state the step's outcome leads to (below) |
180
181
  | `initialFocus` | on a page: the node that has focus when it opens (Focus, below) |
181
- | `repeat` | the node is drawn once per item of this data (`request.scopes`) |
182
+ | `repeat` | the node is drawn once per item of this data (`request.scopes`): once per row the samples give it (Rows of a repeat, below) |
182
183
  | `frame` | for a page: whether it may be framed (`never`) |
183
184
  | `value` | on a field: what it holds when it is shown, until someone types in it: `{ key, params }`, `{ literal }` or `{ oneOf }`; `{ literal: "" }` is an empty field |
184
185
  | `holds` | the field of the flow's domain whose value the node shows, or a control takes: `<Entity>.<field>`. A node that holds a field whose `sensitivity` the binding's `mask` names, `credential` unless it says, is masked wherever the flow's screens are recorded (§7) |
185
186
  | `checked` | on a node whose role is `checkbox`, `menuitemcheckbox`, `menuitemradio`, `option`, `radio` or `switch`: whether it is checked (an `option`: selected) when it is shown, as an expression over the context (§3), or `true` or `false` |
187
+ | `tone` | how the node looks in a state: `neutral`, `info`, `success`, `warning` or `danger`, or a map from these to expressions over the context (§3), of which the first that holds wins (Tone, below) |
186
188
  | `script` | on a page: how much of it works without JavaScript. `optional`: the page and its actions; `actions`: the page is drawn and read without it, and only its actions need it. Without `script`, the page needs JavaScript |
187
189
  | `source` | the code that draws it |
188
190
 
@@ -196,7 +198,7 @@ An app may have no such message yet, and a captured graph describes the app as i
196
198
 
197
199
  A `role` is a WAI-ARIA 1.2 role, and `name` is the accessible name that Accessible Name and Description Computation 1.2 gives the node; `kit check` reads both from the browser's accessibility tree. A node of type `field` or `action` with no `role` is a warning of `check` (`role-missing`): a screen reader, a replay and `kit check` find a control by its role, and `kit check` holds such a node's name and state but cannot hold its role. Some HTML controls have no WAI-ARIA role at all (HTML-AAM gives them none): an `<input>` of type `date`, `time`, `datetime-local`, `month`, `week`, `file` or `color`, and a `<summary>`. A field or an action that is one says which with `native` (`native: date`) instead of a `role`: `role-missing` does not apply to it, a `role` beside it is an error of the schema, and a replay and `kit check` find it by its name among controls of that kind.
198
200
 
199
- A node is shown in a state when the state is in `in`, not in `unless`, and `when` holds. `edges` records relations the page and the checks use: a node labelled by another, an action that leads to a state, the node a dialog gives the focus back to. `rules` are written but no tool reads them yet; checking them, together with labelled dialogs, confirmation before a destructive action and events handled where shown, is [#3](https://github.com/delurio-labs/delurio/issues/3). The focus return of #3 is partly answered: a dialog says where the focus returns with `returnsFocus` (below), and `check` holds that it starts at a dialog and gives the focus to a node shown where the dialog closes. That every dialog says it is still #3.
201
+ A node is shown in a state when the state is in `in`, not in `unless`, and `when` holds. `edges` records relations the page and the checks use: a node labelled by another, an action that leads to a state, the node a dialog gives the focus back to. `rules` are written but no tool reads them yet; checking them, together with labelled dialogs and confirmation before a destructive action, is [#3](https://github.com/delurio-labs/delurio/issues/3). The focus return of #3 is partly answered: a dialog says where the focus returns with `returnsFocus` (below), and `check` holds that it starts at a dialog and gives the focus to a node shown where the dialog closes. That every dialog says it is still #3. Events handled where shown are answered: `check` holds that a node's event is handled wherever the node is shown enabled (`event-unhandled`, below).
200
202
 
201
203
  ### Focus
202
204
 
@@ -212,11 +214,15 @@ The node that opened a dialog is the one pressed to open it: a node shown in the
212
214
 
213
215
  A state that `focus` names that is not a state of the flow keeps the graph from loading. `check` gives an error (`focus-not-shown`) where `focus` gives the focus to a node its state does not show (by `in` and `unless`; a replay reads `when`), or a `returnsFocus` to a node no state the dialog closes into shows, and one (`returns-focus-not-dialog`) where a `returnsFocus` starts at a node that is not a dialog. For a list, each node it lists is held so; for `opener`, each node that opens the dialog, and a dialog that no node opens is `focus-not-shown` too.
214
216
 
217
+ `check` gives an error (`event-unhandled`) where a node that sends an event (`emits`) is shown and enabled in a state that does not handle it: in a situation the checker reaches (§2), the state is in the node's `in` and not in its `unless`, its `when` holds, the state is not in its `disabledIn` and its `disabledWhen` does not hold, and the state has no transition on the event in its `on`. Pressing the node there sends an event after which the flow says nothing, such as a Save button left enabled while the save runs. Each state that shows such a node disables it or handles its event. Three are not held, by what §2 says of them: a node that sends `NAVIGATE`, the person leaving the page, which is always possible; an exit (`type: final`), which has no transitions, so what a node on its page does is outside the flow (a new run of it, or another flow); and a state with `always`, which is passed at once, so nothing is pressed there. It is given once per node and state, at the node; where the node's `when` or `disabledWhen` decides it, its notes give the way from a start to the first situation that shows it enabled, as for a broken assertion.
218
+
219
+ A node may be meant to stay usable while a step runs, such as a link to sign out beside a form being saved, or a plan's other buttons while a payment is taken: the app lets it be pressed, and acts on the press once the step is over. `duringStep: true` on the node says so, and its event is handled after the step: in a state that runs a step (`invoke`), the state need not handle it, and the state the step's outcome leads to does. So `check` holds, from each situation of the step that shows the node enabled, every situation its `DONE` and its `FAIL.<class>` lead to, past states with `always`: there the state handles the event, or shows the node disabled or not at all, or is an exit; or it runs a step of its own and shows the node enabled, and the press waits again, for that step's outcome, and is held where that leads. A step that leads back to one already walked is not walked twice. Where none of these holds, the error (`event-unhandled`) is given for the step's state, as before, and says the outcome and the state the press is left in; its notes give the way to that state through the step. In a state the person is in, and in a step whose state handles the event, the marker changes nothing. It is what UML 2.5.1 calls a deferred event (a State's `deferrableTrigger`): each state that runs a step defers the node's event, until the flow stops in one that does not. A replay does not press a node while a step runs: in the step's state it checks what the state shows, a marked node enabled as the graph shows it, and then waits for the step's outcome (§7, `call`), so the marker changes nothing a replay does. A node marked so is a warning of `check` (`during-step-unused`) where the marker can change nothing: no state that runs a step shows it, by `in` and `unless`, or every one that does disables it (`disabledIn`), or it sends `NAVIGATE`. On a node that sends no event the `schema` rule refuses it.
220
+
215
221
  ### What a control holds, and pages without JavaScript
216
222
 
217
- `value` is what a field holds when it is shown, until someone types in it. It takes the forms of a node's words except `labelledBy`: `{ key, params }` from the catalog, `{ literal }`, or `{ oneOf }`, and `{ literal: "" }` is an empty field. A replay compares it in each state that shows the field, up to the step at which its walk types in that field. `checked` says whether a control is checked, or for an `option` selected, in each state that shows it: an expression over the context there (§3), or `true` or `false`. A control someone checks during the flow is checked by an event, and the expression reads what that event's effect sets; one that the flow finds already checked is said over the context, such as the radio of the role a member already has (`checked: "role == 'admin'"`). A replay compares it in each state that shows the node. On a node drawn more than once (`repeat`, or words given as `oneOf`), `value` and `checked` hold for each control it draws; controls that differ are written as separate nodes.
223
+ `value` is what a field holds when it is shown, until someone types in it. It takes the forms of a node's words except `labelledBy`: `{ key, params }` from the catalog, `{ literal }`, or `{ oneOf }`, and `{ literal: "" }` is an empty field. A replay compares it in each state that shows the field, up to the step at which its walk types in that field. `checked` says whether a control is checked, or for an `option` selected, in each state that shows it: an expression over the context there (§3), or `true` or `false`. A control someone checks during the flow is checked by an event, and the expression reads what that event's effect sets; one that the flow finds already checked is said over the context, such as the radio of the role a member already has (`checked: "role == 'admin'"`). A replay compares it in each state that shows the node. On a node drawn more than once (`repeat`, or words given as `oneOf`), `value` and `checked` hold for each control it draws; controls that differ are written as separate nodes, except the items of a repeat whose `checked` reads its row (`row.<field>`, below), such as the options of a radio group, one of which is chosen.
218
224
 
219
- `disabledIn` lists the states in which a node is shown but disabled. `disabledWhen` disables it by what the context holds, in every state that shows it: a Continue button disabled until a VAT number is typed (`disabledWhen: "not vatGiven"`, where typing it is an event whose effect sets `vatGiven`), or until a box is ticked (`disabledWhen: "not accepted"`, beside the box's `checked: accepted`). A node is disabled where either says so. A replay compares it in each situation it stops in, from the context it has walked to there. A `disabledWhen` that does not parse, or names anything but a variable, a guard or `state`, keeps the graph from loading, as `checked` does.
225
+ `disabledIn` lists the states in which a node is shown but disabled. `disabledWhen` disables it by what the context holds, in every state that shows it: a Continue button disabled until a VAT number is typed (`disabledWhen: "not vatGiven"`, where typing it is an event whose effect sets `vatGiven`), or until a box is ticked (`disabledWhen: "not accepted"`, beside the box's `checked: accepted`). A node is disabled where either says so. A replay compares it in each situation it stops in, from the context it has walked to there. A `disabledWhen` that does not parse, or names anything but a variable, a guard or `state`, keeps the graph from loading, as `checked` does, and so does such a `when`.
220
226
 
221
227
  `script` on a page says how much of it works without JavaScript. With `script: optional` the page and its actions work without it: its forms are posted and its links followed by the browser itself, and JavaScript only adds to them. With `script: actions` the page is drawn and can be read without JavaScript, as a page rendered on the server is, but its actions need it. Without `script` the page needs JavaScript, and the graph says nothing of it without. A replay with `--no-js` (§7) walks the flow a second time with JavaScript off. In a state whose page is `optional` it checks what the state shows, as on the first walk, and takes the next step there. In a state whose page is `actions` it checks what the state shows, and takes no step from it: the walk ends there, as it does where a step leads to a page without `script`.
222
228
 
@@ -224,7 +230,43 @@ While scripts do not run, an action of a page marked `actions` is not there, or
224
230
 
225
231
  `holds` says which field of the flow's domain (§5) a node holds: the value a text shows, such as a client's name in a heading, or the value a field takes, such as a password or an API key typed into it. It names an entity of the domain and one of its fields, `<Entity>.<field>`, as `references` names an entity. So the screens say where a value the domain marks with `sensitivity` is shown or typed, and a tool that records them knows what to keep out: a recording masks every node that holds a field whose `sensitivity` the binding's `mask` names, `credential` unless it says (§7). `check` holds each `holds` to the domain the flow names, found as for `invoke` (§5): an entity the domain does not have, a field the entity does not have, or a domain that is not found beside the flow, is an error (`holds-unknown`) at the `holds`; an entity none of whose files gives `fields` yet is not held to them. `maskedNodes(g, mask)` in `@delurio/cli/graph` names the nodes of a graph that a recording masks, in the order of `nodes`, for the binding's `mask` (`[credential]` when it is left out).
226
232
 
227
- The `schema` rule refuses `value` on a node that is not a field, `checked` on a node of another role, `script` on a node that is not a page, and a node called `opener`. A `checked` or a `disabledWhen` expression that names neither a variable, a guard nor `state` keeps the graph from loading. A `value` from the catalog is held as a node's text is (`catalog-key-missing`, `sample-missing`).
233
+ The `schema` rule refuses `value` on a node that is not a field, `checked` on a node of another role, `script` on a node that is not a page, and a node called `opener`. A `checked`, a `when` or a `disabledWhen` expression that does not parse, or names neither a variable, a guard nor `state`, keeps the graph from loading. A `value` from the catalog is held as a node's text is (`catalog-key-missing`, `sample-missing`).
234
+
235
+ ### Tone
236
+
237
+ `tone` says how a node looks in a state, beside what it says: `neutral`, `info`, `success`, `warning` or `danger`. It is one word in every state that shows the node, `tone: danger`, or a map from words to expressions over the context (§3), `tone: { danger: "clock == 'lastFive'", warning: "clock == 'lastQuarter'" }`: in each situation the node takes the first word, in the order written, whose expression holds there, and no tone where none holds. An exam's countdown that turns red in its last five minutes is the second form. The words are those design systems share for the weight of a message: Bootstrap names its colours for it info, success, warning and danger, and Carbon its notifications info, success, warning and error; `neutral` is a tone that stands out from none of them. WAI-ARIA has none, as how a node looks is not in the accessibility tree: a tone changes neither a node's role nor its name, and neither `kit check` nor a replay reads it. So a tone is never all a node says (WCAG 2.2, 1.4.1 Use of Color): what it shows in a colour, its words say too, such as "5 minutes left", and where it matters to someone who does not see it, so does its role, as `alert` and `status` do. A `tone` expression that does not parse, or names anything but a variable, a guard or `state`, keeps the graph from loading, as `checked` does; a word that is not a tone is an error of the schema.
238
+
239
+ The page draws a fixed tone and names it among the node's annotations (`tone danger`). A map is named there as `tone danger when clock == 'lastFive'`, as `when` is, and the page, which draws each state once rather than each situation, draws it in no tone. The video stage draws the tone of the situation it shows: `renderStageScreen` in `@delurio/cli/wireframe` takes that situation's context as its sixth argument, a name and its value each, and picks the first word that holds; without it, only a fixed tone is drawn. The fixed components draw a tone as the class `wf-tone-<word>`, whose styles (`TONE_CSS` of the same module) a page adds only when a node of its flow has a tone; a kit draws it with its `{tone}` slot (§8).
240
+
241
+ ### Rows of a repeat
242
+
243
+ A node with `repeat` stands for each item of its data. `samples` may give those items as rows, under the data's name: a list of maps, one per item, each holding the item's fields as strings, numbers or booleans.
244
+
245
+ ```yaml
246
+ samples:
247
+ question.options: [ { id: a, text: "Four" }, { id: b, text: "Three" } ]
248
+ nodes:
249
+ options: { type: list, component: List, role: radiogroup, name: { labelledBy: question }, in: [answering] }
250
+ option:
251
+ type: field
252
+ component: ListItem
253
+ role: radio
254
+ repeat: question.options
255
+ text: { key: Exam.option, params: { option: row.text } }
256
+ checked: "row.id == answer"
257
+ in: [answering]
258
+ emits: CHOOSE
259
+ ```
260
+
261
+ Such a node is drawn once per row, in their order: on the page, on the tutorial stage, and in the screens `kit check` draws, which expect each element it draws (`index` counts them, as it counts a ListItem's texts). A param that reads `row.<field>` (`params: { option: row.text }`) fills its placeholder with that field of each row; where the row has no such field, the placeholder takes the sample of its name, as it does on every other node. Only a repeat node reads rows: a node drawn once has no row of its own, so its placeholders take the samples by their names even when its params name a field of some data. Without rows the node is drawn once, as before.
262
+
263
+ A repeat node's `checked` may read its row as well, `checked: "row.id == answer"`: which option of a radio group is chosen, by what the context holds. A page draws each state's screen once, for all the situations that show it, so it draws only `checked: true`. A screen drawn for one situation, as the tutorial stage draws each step, reads `checked` over that situation's context and each row (`renderStageScreen`'s `ctx` in `@delurio/cli/wireframe`). `row.<field>` in the `checked` of a node without `repeat` keeps the graph from loading, as any other name that is not a variable or a guard does.
264
+
265
+ A repeat node's `disabledWhen` may read the place of the row it is drawn for among the rows it draws: `repeat.first` and `repeat.last`, true in the first row and in the last, and `repeat.index`, the row's number, from 1. So a list whose rows can be moved says that the first row's Move up is disabled and the other rows' are not (`disabledWhen: repeat.first`), and the same of the last row's Move down (`disabledWhen: repeat.last`), beside what the context says (`disabledWhen: "saving or repeat.first"`). A replay checks such a node on each element its locator finds, in the order of the page: the first is row 1, and the last is the last row. A row's fields are not read there: the rows the samples give illustrate the screens, and which of the app's rows holds which value only the app's data says, while a row's place is on the page. The flow does not know how many rows the app draws, so a press may come from any of them: where `check` holds a node's event to the states that show it enabled (`event-unhandled`, above), a `disabledWhen` that reads the place disables the node in a situation only where it holds in every row. The place is read as unknown there, and `not`, `and` and `or` keep what the rest decides, as in Kleene's three-valued logic: `saving or repeat.first` disables it where `saving` holds, and `repeat.first` alone nowhere. `repeat.first`, `repeat.last` or `repeat.index` in the `disabledWhen` of a node without `repeat`, and `row.<field>` in any `disabledWhen`, keep the graph from loading..
266
+
267
+ A transition whose event a repeat node sends may set a variable from the row that was pressed: `effects: { choose: { set: { answer: row.id } } }`, the effect of the transition on `CHOOSE`. The flow alone does not say which row is pressed, and the sample rows illustrate the screens: they are not the app's data and never decide what the flow can reach. So the checker lets such a variable take any of its values, as `havoc` does (§2), whether the samples give rows or not, and every row the app may draw is among the situations it explores. A tutorial says which row it presses (`row`, §7), and takes the case that row gives.
268
+
269
+ Adjacent nodes, in the order of `nodes`, that share the same `repeat` are drawn as one row per item, side by side: the number of an entry in a list of questions beside its state, or the cells of a table's row. A List holds, besides the ListItems after it, the rows of the nodes after it that share a repeat: each row is one item of the list, and a ListItem that begins a row is that item, with the other nodes beside its words. A List whose role is `table` or `grid` draws its items row by row: the header cells after it (role `columnheader`) form its header row, and the rows of the repeat nodes after them are the table's rows. The first node that is none of these ends the list, as before. A lone repeat node outside a list is drawn once per row, as it was drawn once. With a kit each node keeps its own template, and the rows are drawn around them; a table's row is an element of role `row`, so a kit draws a table with elements of roles `table` and `cell` (`<div role="table">`), not with `<table>`, out of which the HTML parser moves the rows. The expected accessibility tree gives the same rows. Decided on 22 Nov 2026, with rows in the samples and `checked` and effects that read the row.
228
270
 
229
271
  ### Catalog
230
272
 
@@ -367,7 +409,7 @@ notModeled: [ "..." ]
367
409
 
368
410
  ## 7. Binding (`kind: binding`) and tutorial (`kind: tutorial`)
369
411
 
370
- A **binding** ties a flow to a running app for replay and recording: `apps` (base addresses), `browser`, `data` (JSON or dotenv sources, read again after each command, secrets masked in reports), `signIn`, `accounts`, `scenarios` (each a `given` start, the account, the page to `open`, `setup` and `teardown`, `javaScript: false` for a walk with JavaScript off, and `enter`, the way the walk comes in), `events` (the actions that cause an event no node on screen sends), `effects` (the checks of what a step changes outside the screen), `states` (a URL glob or a text a state must show, the server `call` a step makes, the account `as` whose screen it is, and `before` actions) and `nodes` (a locator for a node that role and name cannot find, or `before` actions such as opening a menu, `count` for how many elements it finds, or `skip` with a reason). It may `extends` a shared binding. An action is one of `goto`, `reload`, `click`, `fill`, `attach`, `key`, `waitUrl`, `waitText`, `waitResponse`, `run` (a command, with `expect`), and any action may carry `as`. A locator is `frame`, `role`, `name`, `text`, `label`, `testId`, `css`, `hasText`, `within`, `nth`; `nth` takes one of what the rest finds, from 0 for the first, and a negative one counts from the end, -1 for the last (the row a step has just added); `frame` is the CSS selector of the iframe the element is drawn in, such as a payment provider's hosted form, and is looked in first; a string between slashes is a regular expression.
412
+ A **binding** ties a flow to a running app for replay and recording: `apps` (base addresses), `browser`, `data` (JSON or dotenv sources, read again after each command, secrets masked in reports), `signIn`, `accounts`, `scenarios` (each a `given` start, the account, the page to `open`, `setup` and `teardown`, `javaScript: false` for a walk with JavaScript off, `enter`, the way the walk comes in, and `then`, how a step that leaves a variable to chance comes out), `events` (the actions that cause an event no node on screen sends), `effects` (the checks of what a step changes outside the screen), `states` (a URL glob or a text a state must show, the server `call` a step makes or a request the page makes, `storage`, what the page's storage holds, the account `as` whose screen it is, and `before` actions) and `nodes` (a locator for a node that role and name cannot find, or `before` actions such as opening a menu, in every state or by state, `count` for how many elements it finds, `near`, the element it is drawn beside, `draws`, another flow's screen it holds, or `skip` with a reason). It may `extends` a shared binding. An action is one of `goto`, `reload`, `click`, `fill`, `attach`, `key`, `waitUrl`, `waitText`, `waitResponse`, `run` (a command, with `expect`), and any action may carry `as`; a `click`, a `fill` or an `attach` may be `optional`. A locator is `frame`, `role`, `name`, `text`, `label`, `testId`, `css`, `hasText`, `within`, `nth`; `nth` takes one of what the rest finds, from 0 for the first, and a negative one counts from the end, -1 for the last (the row a step has just added); `frame` is the CSS selector of the iframe the element is drawn in, such as a payment provider's hosted form, and is looked in first; a string between slashes is a regular expression.
371
413
 
372
414
  `schemas/binding.schema.json` gives every key a replay reads, of a flow's binding and of a navigation graph's (one with `nav`, `setup`, `personas`, `frames`, `pages` or `entries`). `check` holds `binding.yaml`, a variant of it beside it named `binding.<variant>.yaml` (`binding.noSessions.yaml`), and a shared binding named `<name>.binding.yaml`, to it, as it holds every graph file to its kind's schema (rule `schema`): a key that is not one, such as a misspelt `scenarios` that a replay would pass over, a value of the wrong kind, an action with two verbs or none, `expect` without `run`, a state's `fail` without its `call`, and a `setup` that does more than run commands. A file that `extends` another may leave out what that one gives, so the schema asks only for `kind`. What the binding names in the graph, a state, an event, a node, a context variable, an account, is held to it when a replay loads the binding: `replay --check` loads it and plans its walks with no browser and no app.
373
415
 
@@ -377,7 +419,17 @@ A **binding** ties a flow to a running app for replay and recording: `apps` (bas
377
419
 
378
420
  `as: <account>` on an action does it in that account's own browser, with its own cookies, opened and signed in the first time it is used: a step another person takes, such as a second member who approves or an invitee who accepts, is bound to actions `as` that person, and the walk goes on in the first browser after them. A state may carry `as` too: its screen is that person's, so it is checked, and its nodes are pressed, in their browser, while a state without `as` is the scenario's own account's. A state's `before: [actions]` runs when the walk reaches the state, before it is checked, such as that person opening the link an e-mail brought them. So a step another person takes after arriving by a mailed link is bound to its state: `as` the invitee, `before` opening the link. `effects: { <id>: [actions] }` checks what a step leaves outside the screen, such as an e-mail sent or a row written. `<id>` is an effect of the flow (§2) or an action of its domain (§5): the actions run after the walk takes a transition that applies that effect, or after a state that invokes that action ends with `DONE`. They are checks, typically a `run` with `expect` that reads a mail catcher's API or queries the database, and one that fails is a mismatch at that step.
379
421
 
380
- `count: <number | "{data.path}">` on a node says how many elements its locator finds, as a number or a value of the binding's data: for a `repeat` node (§4), how many items it shows, and for any other node, how many there are, such as four radios and no fifth. Without it a `repeat` node shows at least one item, and more are accepted. `call: <url glob>` on a state names the server call its `invoke` makes. The replay holds the call until it has checked what the state shows, so a step in progress (its status, the controls in `disabledIn`) is seen as it is, and then lets it go; on a walk through `FAIL.<class>` it compares the call's HTTP status with the `status` of the refusals that the class stands for (§2, `failures`; §5). A scenario with `javaScript: false` is walked with JavaScript off, through the pages marked `script` (§4).
422
+ `count: <number | "{data.path}">` on a node says how many elements its locator finds, as a number or a value of the binding's data: for a `repeat` node (§4), how many items it shows, and for any other node, how many there are, such as four radios and no fifth. Without it a `repeat` node shows at least one item, and more are accepted. `call: <url glob>` on a state names the server call its `invoke` makes. The replay holds the call until it has checked what the state shows, so a step in progress (its status, the controls in `disabledIn`) is seen as it is, and then lets it go; on a walk through `FAIL.<class>` it compares the call's HTTP status with the `status` of the refusals that the class stands for (§2, `failures`; §5). A state that invokes none of the flow's actions may name a `call` too: a request the page makes while the state is shown, such as one the browser sends to another server, or the one a script makes as the page loads. The replay holds it in the same way, until it has checked what the state shows, and then lets it go. `status` on it, a number or a list of numbers, is the HTTP status its answer has; an answer with another, or no such request while the walk is at the state, is a mismatch at that state.. A scenario with `javaScript: false` is walked with JavaScript off, through the pages marked `script` (§4).
423
+
424
+ A node's `before` is done before the node is pressed, such as opening the menu it sits in. It is a list of actions, done in every state that presses the node, or a map from states to such lists, where the node is reached another way in another state, such as a row's menu opened from the list and already open on the row's own page: `before: { listPage: [ { click: { role: button, name: Actions } } ], rowPage: [] }`. In a state the map names, its list is done; in a state it leaves out, nothing is. A key of the map that is not a state of the flow keeps the binding from loading..
425
+
426
+ `optional: true` on a `click`, a `fill` or an `attach` says that the app may not ask for it, such as a notice shown on some visits only, closed before the walk goes on. Once the page is still (the binding's `settle`), the walk looks for the action's element once, without waiting for it further. Where it is there, the action is done as any other, and a failure of it, such as the element disabled or an option that a `<select>` does not have, fails the step. Where it is not there, the action is passed over and the walk goes on. A passed-over action is never silent: the step's report lists it as passed over, naming its locator. `optional` on any other action is an error of the schema..
427
+
428
+ `storage` on a state says what the page's storage holds when the state is checked: `session`, the tab's `sessionStorage`, and `local`, its `localStorage`, each of the origin of the page the state is shown on, in the browser whose screen it is (`as`). Each is a map from a key glob (`*` stands for any run of characters) to what the keys it matches hold. `absent` says that no key it matches is there, such as the values a page wrote into a form and was to clear (`storage: { session: { 'rehber:*': absent } }`); any other value says that a key it matches is there and that each key it matches holds that value: a text, its `{placeholders}` filled in, or a regular expression between slashes. A stored value that is the word absent itself is matched by `/^absent$/`. What does not hold is a mismatch at that state; a storage that the state does not name is not read..
429
+
430
+ `near: <locator>` on a node says where it is drawn: beside the element the locator finds, such as a guide's box drawn at the button it points to. In every state that shows the node, each element its own locator finds is at most 24 CSS pixels from the element that `near` finds, measured between their border boxes as the page lays them out: the shortest distance between the two boxes, 0 where they overlap or one holds the other. `near` finds one element; finding none or several, or a node drawn farther away, is a mismatch at that state..
431
+
432
+ `draws: { flow: <flow dir>, bind: <its binding>, given: { .. }, states: { <state>: <its state> } }` on a node says that it holds another flow's screen, drawn by something other than that flow's own page, such as a guide that draws an app's form in a dialog of its own. The node's own locator, which it then gives, finds the one element that holds the screen, and the node's own role, name and text are not checked. In each state that shows the node, the replay checks inside that element the nodes of the drawn flow's state that `states` maps the state to, or, for a state that `states` leaves out, of the drawn flow's first screen: its initial state, past the states it leaves by itself. Each is checked as a replay of that flow checks it (§4: its role, name and text, whether it is disabled, what a field holds and whether a control is checked), over the drawn flow's context that `given` gives, read from that flow's catalog in the walk's language, and found through `bind`'s `nodes` where it gives them; which node has the focus is the drawing flow's to say, and is not checked there. Under `--absent`, a node of the drawn flow that the state does not show is not visible inside the element. The paths are relative to the binding's file. A drawn flow that does not load, a key of `states` that is not a state of this flow or a value that is not one of the drawn flow's, and a `given` that names what is not a variable of the drawn flow, keep the binding from loading..
381
433
 
382
434
  The binding's `data` is read when a walk starts, after its `setup`, and again after each `run`, so a command can hand the next action a value it has just written, such as the link or the code of an e-mail that it read from a mail catcher. A source whose file does not exist yet is allowed: the walk fails, naming the file, only when an action uses a value of it (`{<source>.<path>}`) while the file is still missing.
383
435
 
@@ -387,6 +439,8 @@ A walk reads every screen in one language: the binding's `browser.locale`, a BCP
387
439
 
388
440
  What a person types, or what a scenario's `setup` put in place, the graph may leave to chance (`havoc`, §2), while on the app it is what the scenario made it. So a walk keeps, through a `havoc`, the value its scenario's `given` gives each variable that starts from any value: a refusal is walked from a scenario that types the invalid value, and a way that needs the value changed there is not bound from that scenario (it is listed as not bound), rather than walked from one that set up the opposite. A variable that starts from a fixed value takes the values the `havoc` allows, as in the graph.
389
441
 
442
+ A scenario's `then` says how a step that leaves a variable to chance comes out on its walks, where the app decides it, such as which step of a guide is its last: `then: { <effect>: [ { <variable>: <value>, .. }, .. ] }`. The list is read in order, one entry each time the walk takes a transition that applies that effect (§2): with `then: { next: [ { lastStep: false }, { lastStep: true } ] }`, the first `next` leaves the guide short of its last step and the second brings it there. An entry gives values only to variables that the effect's `havoc` lists, each one of its values, and through that `havoc` those variables take them; a variable the entry leaves out, and every variable once the list has run out, keeps its value, as above. So a path is walked from the scenario only where each of its transitions agrees with the values the scenario gives, and one that needs other values is not bound from it, with that reason. A `then` that names an effect the flow does not have, a variable its `havoc` does not list, or a value that is not one of the variable's, keeps the binding from loading..
443
+
390
444
  Where several nodes on the screen send the event a step takes, such as two radios of one choice, the binding's `events.<EVENT>` says which is pressed, when it gives one; otherwise the first of them in `ui.yaml` that the state shows enabled is pressed.
391
445
 
392
446
  The **replay** walks a flow on the app through its binding and checks each state it stops in: the nodes the graph shows there (their role, name and text, whether they are disabled, which one has the focus, what a field holds and whether a control is checked, §4), the state's `url` and `text`, and the `effects` of the step that led there. `replay <flow dir> --bind <binding>` walks the main story (§2). `--to <state>` walks the shortest way to that state that the binding can drive. `--cover states` walks paths that together pass every reachable state, and `--cover transitions` paths that together take every reachable transition, from the binding's scenarios and through the steps it can drive (§2, `cover`). Under `--cover` every scenario of the binding is walked at least once. A path is walked from the first scenario, in the order of the file, that starts where it starts. A scenario that no path is walked from, as it starts where another does (the same `given`, with other data or another account) or reaches nothing the others do not, gets one walk of its own: of the paths that `cover` gives from its start alone, the one that covers the most, or its first screen when it can drive no step. That walk covers nothing new, and its id is that path's with the scenario's name. So one binding holds every scenario of a flow. `--scenario <name>`, given once or more, keeps the walks to those scenarios of the binding, with the other choices as they are (`--cover`, `--to`); a name the binding does not have is refused. The main story is walked from the scenario that starts where it starts, and when none of those given does, it is listed as not bound, with that reason. `--no-js` walks the pages marked `script` a second time with JavaScript off: those marked `optional` with their actions, those marked `actions` read only, their actions absent or disabled with a reason (§4). `--absent` also checks that a node the graph does not show in a state is not visible there; without it, the replay checks only what the graph shows, and a node it leaves out of a state may be there or not. An exit may open another page of the same frame: another address, not only another `#fragment`, or a document loaded anew since the screen checked before it. There `--absent` leaves out what that page draws as well, and the step's report names what it left out: the frame's chrome, the nodes that the screen before showed outside every page node it showed (a menu, a bar, a sidebar beside the page's main content), and a node found by a landmark's role alone, such as a bare `role: main`, which matches the next page's own. A node of the flow's page that is still there, its heading, a field, its dialog, or a landmark found by its name, is still a mismatch, and on an exit that stays on the page nothing is left out. A state or a node that only missing needs are drawn as is planned, not built: every walk leaves it out, and the replay lists it with those needs (§13).
@@ -405,15 +459,27 @@ A **tutorial** is written against a flow: `title`, `audience`, `locale`, `appNam
405
459
 
406
460
  `then { <variable>: <value> }` says how a step comes out where an effect leaves it to chance (`havoc`, §2): what the host answered, what a folder held. Of the cases the step's transitions can take, the step takes the one in which these variables have these values. A step without `then` takes the model's first case, and a `then` that no case of the step matches stops the tutorial at that step. So a tutorial can go the way a person meets most, such as a host that lists their repositories, when the graph also allows every other answer.
407
461
 
462
+ `row: <n>` on a step that presses a repeat node (§4) says which of the node's sample rows it presses, counted from 1: `{ press: option, row: 2 }` presses the second option. Of the cases the press can take, the step takes the one in which each variable that the transition's effects set from the row (`row.<field>`) has that row's value. `check` stops the tutorial at that step (`tutorial-mismatch`) when `row` is not a whole number from 1, the step presses no node, the node has no `repeat`, the samples give it no rows or fewer than `n`, the row lacks a field the effects read, or no case of the press has the row's value, such as a value its variable does not have. A press on a repeat node without `row` takes the model's first case, as a step without `then` does.
463
+
464
+ A press, or an event a step gives with `after`, may lead into server steps, states with no screen, which pass on their own along their normal way (a transition with no event, then `DONE`) to the next screen. Where the event the step gives next with `after` (its first, after the press; the next in its list, after one of its events) is one that screen does not handle, but one of the server steps on the way handles it another way than its normal one, such as a failure (`FAIL.<class>`, §2) or a refusal, the walk stops at the first server step that handles it and takes it there: `{ press: send, after: FAIL.network }` shows the screen a send that got no answer leads to, where the send's normal way ends on the screen that says it was sent. An opening card's (`intro`) first event is taken in the same way at the server steps the flow passes from its start, so a failure that comes before the first screen, such as a page whose data cannot be loaded, is given there. An event that the screen handles is taken there, as before, and one that neither the screen nor a server step on the way handles stops the tutorial (`tutorial-mismatch`). The video walks the flow the same way..
465
+
466
+ `at: <seconds>` on a step that presses a node says when the press comes, counted from the step's start. Without it, on a screen that shows a dialog (a node whose role is `dialog` or `alertdialog`, §4), the press comes once the step's `say` has been said, so that the dialog is read before the press closes it; elsewhere it comes early in the step. A step on a dialog's screen that focuses nothing shows the whole dialog: its title, its words and its buttons. Before a video is made, the video tool warns, on the narration's timings, of a dialog on screen for under 2 seconds, of one that no step focuses or shows whole, and of a press that closes a dialog while its step is still being said..
467
+
408
468
  `stage` says what the video shows: the flow's screens (`screen`, the default), or its diagram (`diagram`), for a flow with no screens, such as two programs talking or a job in the background. On the diagram the camera goes from state to state, and the tutorial's own way is drawn as the story, whether or not it is the flow's `main` story; the diagram holds every transition, failures included. No state is passed on its own there: `show <state>` and `end <state>` walk the flow to their state along its normal way (a transition with no event, then `DONE`) and stop the tutorial when that way does not reach it, and every other event is given with `after`. `press`, `reveal` and `focus` point at nodes a diagram does not have, and stop it too. An `end` on the diagram needs no `card`; one it has is shown after the ending.
409
469
 
410
- `check` reads the `tutorial.yaml` beside a flow and replays it on the flow as the video does, from the start its `scenario` gives: a value of its list for each variable that starts from any value, and none that differs from a fixed `initial`. On the screens, a step that shows no screen passes on its own along its normal way (a transition with no event, then `DONE`), and one with no such way waits for an event given with `after`; on the diagram, `show` and `end` walk as above. A tutorial that no longer matches its flow is an error (`tutorial-mismatch`) that fails `--strict`, at the step where it stops: its `flow` is not the flow beside it; a step names a state, a node, an event, a variable or a value the graph does not have, or a `{word}` that is neither a sample value nor a node with visible text; `show` names a state the flow is not in; `cut` names a state no reachable situation is in, with the nodes it `reveal`s shown; `press` names a node the state does not show, or disables, or that sends no event the state handles; `after` names an event the state does not handle; `reveal` or `focus` names a node the step's screen does not show, or `focus` one shown only `when` something holds and not revealed; `end` names a state the flow is not in, or, given no state, the flow is not at an exit; or a `then` matches no case of its step. Every name is looked for on every step, and the steps are replayed once all are found.
470
+ `check` reads the `tutorial.yaml` beside a flow and replays it on the flow as the video does, from the start its `scenario` gives: a value of its list for each variable that starts from any value, and none that differs from a fixed `initial`. On the screens, a step that shows no screen passes on its own along its normal way (a transition with no event, then `DONE`), and one with no such way waits for an event given with `after`; on the diagram, `show` and `end` walk as above. A tutorial that no longer matches its flow is an error (`tutorial-mismatch`) that fails `--strict`, at the step where it stops: its `flow` is not the flow beside it; a step names a state, a node, an event, a variable or a value the graph does not have, or a `{word}` that is neither a sample value nor a node with visible text; `show` names a state the flow is not in; `cut` names a state no reachable situation is in, with the nodes it `reveal`s shown; `press` names a node the state does not show, or disables, or that sends no event the state handles; `after` names an event the state does not handle, nor a server step the step passes (above); `reveal` or `focus` names a node the step's screen does not show, or `focus` one shown only `when` something holds and not revealed; `end` names a state the flow is not in, or, given no state, the flow is not at an exit; or a `then` matches no case of its step. Every name is looked for on every step, and the steps are replayed once all are found.
411
471
 
412
- A video is an MP4 file. Its captions are WebVTT (`tutorial.vtt`, what an HTML `<track>` plays, with `tutorial.srt` beside it), and its chapters a WebVTT chapters track (`chapters.vtt`). Every video delurio makes is marked as AI-made in three ways, none of which can be turned off: a first card that says the whole video is made with AI, an imperceptible watermark in the sound and the picture, and signed, time-stamped provenance metadata (C2PA is the candidate). The watermark and the metadata are the machine-readable marking that Art. 50(2) of the EU AI Act asks of a system that generates synthetic audio and video, and the Commission's Code of Practice of 10 June 2026 describes. The disclosure is there because every voice is made from real people's recordings and may resemble one of them, which Art. 50(4) treats as a deep fake to disclose; a catalogue voice is no different from a cloned one in that, and delurio cannot tell which listener would recognise which voice (Taha, 24 Oct 2026: "Klon olmayan sesler de gerçek insan sesinden"). It opens the video, since Art. 50(5) asks for it at the latest at the first exposure, and nothing is burnt into the picture after it (Taha, 25 Oct 2026: "en başta 'videonun tamamı' diye belirtip yazsak yetmez mi"); a clip cut from the middle loses the card but keeps the watermark and the metadata. A lawyer is to confirm this reading. The video tool does not add the watermark or the metadata yet; that is an open issue.
472
+ A video is an MP4 file. Its captions are WebVTT (`tutorial.vtt`, what an HTML `<track>` plays, with `tutorial.srt` beside it), and its chapters a WebVTT chapters track (`chapters.vtt`). Every video delurio publishes is marked as AI-made in three ways, none of which can be turned off: a first card that says the whole video is made with AI, an imperceptible watermark in the sound and the picture, and signed, time-stamped provenance metadata (C2PA). The watermark and the metadata are the machine-readable marking that Art. 50(2) of the EU AI Act asks of a system that generates synthetic audio and video, and the Commission's Code of Practice of 10 June 2026 describes. The disclosure is there because every voice is made from real people's recordings and may resemble one of them, which Art. 50(4) treats as a deep fake to disclose; a catalogue voice is no different from a cloned one in that, and delurio cannot tell which listener would recognise which voice (Taha, 24 Oct 2026: "Klon olmayan sesler de gerçek insan sesinden"). It opens the video, since Art. 50(5) asks for it at the latest at the first exposure, and no label is burnt into the picture after it (Taha, 25 Oct 2026: "en başta 'videonun tamamı' diye belirtip yazsak yetmez mi"); a clip cut from the middle loses the card but keeps the watermark and the metadata. A video's maker may draw its own mark in a corner of the picture, for the whole video. That mark is not the AI label, and neither is a draft's stamp (below): the first card is the disclosure, and nothing but that mark and the stamp is burnt into the picture. A lawyer is to confirm this reading. delurio's video tool adds both to every video it makes; the certificate that signs the metadata is not on the C2PA trust list yet.
473
+
474
+ A **draft** is a review copy of a video, made for the person who asked for it, and it is never published: no player, page or embed plays it. It keeps the first card and the watermark in the sound, and leaves out only the watermark in the picture. In its place a visible stamp on every frame shows the maker's mark, the word for draft in the video's language, the time of the frame in the video and the draft's id, and its signed metadata assert that it is a draft. A video published once its draft is approved carries all three marks, as every published video does, and no stamp.
413
475
 
414
476
  ## 8. Kit (`kind: kit`)
415
477
 
416
- A kit says how the components of `ui.yaml` look in one product: `tokens` and `dark` (design tokens files in the Design Tokens Format Module 2025.10 of the W3C Design Tokens Community Group), `css` (scoped to the screen), and per component a `template` with slots (`{text}`, `{name}`, `{intent}`, `{id}`, `{children}`), flags (`{?disabled}..{/disabled}`, `named`, `conditional`, `checked`: a node whose `checked` is `true`), `roles` and `intents`. A kit is data: nothing in it runs or is fetched. `kit check` proves that every node keeps the role, the name and the disabled state the graph expects.
478
+ A kit says how the components of `ui.yaml` look in one product: `tokens` and `dark` (design tokens files in the Design Tokens Format Module 2025.10 of the W3C Design Tokens Community Group), `css` (scoped to the screen), and per component a `template` with slots (`{text}`, `{name}`, `{intent}`, `{id}`, `{children}`, `{tone}`), flags (`{?disabled}..{/disabled}`, `named`, `conditional`, `checked`: a node whose `checked` is `true`), `roles`, `intents` and `tones`; and the kit's `tones` and `fonts`. A kit is data: nothing in it runs or is fetched. `kit check` proves that every node keeps the role, the name and the disabled state the graph expects.
479
+
480
+ **Tones.** A template's `{tone}` gives the node's tone (§4), as `{intent}` gives its intent. `tones` maps each tone to the word the slot gives: at the top of kit.yaml for every component, `tones: { danger: mds-text--danger, warning: mds-text--warning, default: "" }`, and in a component for its own, which it reads first. `default` is the word for a node without a tone, or whose map holds no word in the situation drawn. Without `tones` the slot gives the tone itself, `danger`, and nothing for a node without one. A kit that has `tones` gives an entry for every tone that a node drawn with a template that has `{tone}` may take, its fixed one or any of its map, whether or not the screen drawn shows it: one it lacks is drawn as `default`, and is an error of `check` (`kit-uncovered`), as an intent that `intents` lacks is. A template without `{tone}` draws no tone and is held to none. A key of `tones` that is neither a tone nor `default` keeps the kit from loading.
481
+
482
+ **Fonts.** As a kit fetches nothing, a font its CSS names is drawn only where the machine that draws the screens has it, unless the kit carries it. `fonts` lists the files it carries, `{ family, file, weight, style, unicodeRange }` each: `file` is a woff2, woff, ttf or otf file in the kit's folder, given relative to it; `weight` a number from 1 to 1000, a range of two (`100 900`, a variable font's), `normal` or `bold`; `style` `normal`, `italic` or `oblique`; `unicodeRange` the code points the file draws, as CSS writes them (`U+0000-00FF, U+0131`). The page and the video stage embed each file in an `@font-face`, as a data: URL, once whatever the number of screens. A font is carried only when its licence allows it to be embedded, as the SIL Open Font License does. A file is embedded when it is at most 2 MiB, and while the kit's files together are at most 8 MiB, which four variable fonts of about 1.5 MB each fit. A file that is not in the kit's folder (an absolute path, a path that climbs out of it with `..`, or a link to a file outside it) is not read; it, and one that is not there, is not a file, is not by its first bytes the format its name says, or is too large, is not embedded: an error of `check` (`kit-font`) at its entry, once however many flows draw with the kit, and a warning of `page`. An entry whose `family` is not a name a CSS string holds, or whose `weight`, `style` or `unicodeRange` is none of the above, keeps the kit from loading. `check` warns (`kit-font-unembedded`), once, of each family that the kit's CSS draws in first, the first of the stack a `font-family` or `font` declaration gives, through the custom properties it reads from the tokens or the CSS, that is neither a family of `fonts` nor a generic family (`serif`, `sans-serif`, `monospace`, `cursive`, `fantasy`, `system-ui`, `math`, `emoji`, `fangsong` and the `ui-` families): the screens are drawn in it only where the machine has it. The rest of a stack is its fallbacks, and is not held. `kitFamilies` in `@delurio/cli/kit` lists the families a kit carries, so that a tool that draws its screens in a browser can ask which it drew.
417
483
 
418
484
  ## 9. Source anchors
419
485
 
@@ -430,7 +496,7 @@ A kit says how the components of `ui.yaml` look in one product: `tokens` and `da
430
496
  - its own files: any file in the graph's folder, its bindings and catalogs included. `viz/`, `video/` and `anchors.lock.yaml` are written by the tools and touch nothing, nor do a product's gaps (`needs.gaps.yaml`), a hidden file, or words for people (`.md`, `.mdx`, `.txt`, `.rst`, `LICENSE`, `NOTICE`).
431
497
  - an anchor: a changed file that an anchor of the graph's files names. An anchor that names a line is touched when a hunk of the change covers that line on either side, or adds or removes lines right beside it: the reason is line-precise. An anchor that names a whole file, an anchor on a file that is added, deleted or renamed, and an anchor on a file whose changed lines are not known are touched at file level. An anchor of the domain touches the flows that invoke the action it is on; one on an entity, the flows that invoke an action naming the entity; one on a policy, the flows that invoke an action the policy lists; one on an invariant, the flows that invoke an action it names; any other, every flow of the domain. A citation in words is no anchor, and touches nothing.
432
498
  - its domain (§5): the flows that invoke an action the change adds, removes or changes, an action that names a changed entity or that a policy reading or writing it lists, an action that a changed policy lists, or an action that a changed invariant names. A change to another key of the domain (not its `title`, `summary`, `status`, `description`, `source`, `notes` or `decisions`) touches every flow of it, and so does a domain that is new or whose files before the change do not load.
433
- - a binding (§7), anywhere in the repository: its graph. A change to a binding that others `extends` touches each graph they bind. A helper of a binding touches the binding's graph: a file that its commands (`run`), its data sources (`json`, `dotenv`) or its attachments (`file`) name, else a file in the binding's folder, else a file in the folder its commands run from (`root`). Each graph is given the closest of these ties only. A binding whose scenario `enter`s through a graph is touched when that graph's own files change.
499
+ - a binding (§7), anywhere in the repository: its graph. A change to a binding that others `extends` touches each graph they bind. A helper of a binding touches the binding's graph: a file that its commands (`run`), its data sources (`json`, `dotenv`) or its attachments (`file`) name, else a file in the binding's folder, else a file in the folder its commands run from (`root`). Each graph is given the closest of these ties only. A binding whose scenario `enter`s through a graph, or one of whose nodes `draws` a flow (§7, proposed on 23 Nov 2026), is touched when that graph's own files change.
434
500
  - a shared file: a catalog or a kit that a graph names outside its own folder touches every graph that names it.
435
501
 
436
502
  What is not known touches every graph, and the answer says why: the base or the head is not a commit, or the two have no merge base; the list of changed files was cut short; a graph file does not load; or a file in the graphs folder belongs to no graph. A file of a graph that the change removes touches nothing. `--all` touches every graph. `--json` gives the answer as `delurio-affected/0`: `base` (the merge base) and `head`, `all` (why every graph is touched, or null), `graphs` (each with its `id`, `dir`, `kind`, `reasons` and `bindings`, the repository's bindings of it; a reason has its `rule`, the changed `file`, `precision` for an anchor, and what it `say`s), `untouched` (how many graphs are not touched), `unmapped` (the changed files that touch no graph) and `changed` (how many files changed). `affected` exits 0 when it answers, and 1 when it cannot run: no `--base`, an option without its value, a folder that is not a git checkout, or a graphs folder outside it.
@@ -441,7 +507,7 @@ What is not known touches every graph, and the answer says why: the base or the
441
507
  |---|---|
442
508
  | 0 | the graph loads and, under `--strict`, nothing is wrong |
443
509
  | 1 | the graph cannot be loaded: a YAML error, unsupported YAML (§1), an unknown state, an unknown name in an expression or one that does not parse, a non-exhaustive `always`, an unsupported construct, a `ui.yaml` that names no catalog or a catalog that is not there or not JSON (§4) |
444
- | 2 | under `--strict`: an assertion is violated, a state no situation reaches or a state that is no exit and has no way out (§2), a catalog key is missing from a locale's catalog or a sample value from the samples, a component has no renderer, the kit does not cover a component, the main story cannot be walked, the focus goes to a node that is not shown or a `returnsFocus` does not start at a dialog (§4), a domain's files clash, a server function has what only a route has, a domain names an entity or a field it does not have, a policy names an action or an entity its domain does not have, or a flow invokes an action its domain does not have, names a domain that is not found, or lists a failure code that is neither a refusal of its action nor a transport code, or a node holds a field its flow's domain does not have (§4), or a planned entity or action names its code (§5), a tutorial no longer matches its flow (§7), a state of a captured flow names no code or an anchor does not resolve (§9), or a need's evidence does not resolve, a need that is not missing names none, or a product's gaps and its needs disagree (§13) |
510
+ | 2 | under `--strict`: an assertion is violated, a state no situation reaches or a state that is no exit and has no way out (§2), a catalog key is missing from a locale's catalog or a sample value from the samples, a component has no renderer, the kit does not cover a component or a tone or a font file it lists cannot be embedded (§8), the main story cannot be walked, the focus goes to a node that is not shown or a `returnsFocus` does not start at a dialog, or a node is shown enabled in a state that does not handle its event (§4), a domain's files clash, a server function has what only a route has, a domain names an entity or a field it does not have, a policy names an action or an entity its domain does not have, or a flow invokes an action its domain does not have, names a domain that is not found, or lists a failure code that is neither a refusal of its action nor a transport code, or a node holds a field its flow's domain does not have (§4), or a planned entity or action names its code (§5), a tutorial no longer matches its flow (§7), a state of a captured flow names no code or an anchor does not resolve (§9), or a need's evidence does not resolve, a need that is not missing names none, or a product's gaps and its needs disagree (§13) |
445
511
 
446
512
  **Where the code is.** What a graph names of the application is read from the application's repository root: the folder `check --app <dir>` names, or else the folder `check` runs in, as a CI runs it at the root of the repository it checked out. That is every `source:` anchor and every citation in words (§9), and a need's `source`, `test` and `setting`, and a `scenario` whose binding is named by its path (§13). A check that has a project's graphs without its code, such as the panel's check of a graphs folder alone, says `--no-app`: none of these is looked for, and rather than a finding for each, the output says once how many were not, on a line before the summary in text and as a notification of the run (`toolExecutionNotifications`, at the level `note`) in SARIF, as `check examples --no-app` gives it:
447
513
 
@@ -471,7 +537,7 @@ graphs/product/flow.yaml:88:7: note: step 2: CODE_CHANGED from developing, with
471
537
  | a finding: its rule, level, message, file, line and column | `result`: `ruleId`, `level`, `message`, `locations[0].physicalLocation` with its `region` |
472
538
  | the graph element it is about: a state, a node, a page, an action | `logicalLocations`, e.g. `qauth.authorize/states/consent` |
473
539
  | the guard or the assertion involved, the app code a `source:` names | `relatedLocations`; the graph's files under the base `SRCROOT`, the app's under `APPROOT` |
474
- | the path that breaks an assertion: the start, each event, the context at each step, the steps inside an invoked flow | `codeFlows[].threadFlows[].locations`, with `state` for the context and `nestingLevel` for the invoked flow |
540
+ | the path that breaks an assertion, or reaches a node shown enabled where its event is not handled (§4): the start, each event, the context at each step, the steps inside an invoked flow | `codeFlows[].threadFlows[].locations`, with `state` for the context and `nestingLevel` for the invoked flow |
475
541
  | the flow itself, and the path drawn on it | `run.graphs` and `result.graphTraversals` |
476
542
  | the same finding in a later run, though its lines moved | `fingerprints` (`delurio/v1`: from the rule, the graph and the element, not the line) |
477
543
  | a finding dismissed with a reason (`finding.triage`) | `suppressions`, with `justification` |
package/js/graph.d.ts CHANGED
@@ -39,6 +39,7 @@ export interface ContextVar {
39
39
  say?: Record<string, string>;
40
40
  }
41
41
  export interface Effect {
42
+ /** Values the variables are given; `row.<field>` is a field of the row pressed, which the checker lets be any value of the variable. */
42
43
  set?: Record<string, Scalar>;
43
44
  havoc?: string[];
44
45
  }
@@ -96,14 +97,23 @@ export interface UiNode {
96
97
  disabledWhen?: string;
97
98
  emits?: string;
98
99
  initialFocus?: string;
100
+ /** Drawn once per item of this data: once per row the samples give it, else once. */
99
101
  repeat?: string;
100
102
  frame?: string;
101
103
  value?: Label;
102
104
  holds?: string;
105
+ /** Whether it is checked: an expression over the context (on a repeat node, also over its row, `row.<field>`), or true or false. */
103
106
  checked?: boolean | string;
104
107
  script?: 'optional' | 'actions';
105
108
  source?: string;
109
+ /** How the node looks, never all it says (SPEC.md §4): a fixed tone, or each tone with the expression over the context under which the node takes it; the first that holds wins. */
110
+ tone?: Tone | Partial<Record<Tone, string>>;
111
+ duringStep?: boolean;
106
112
  }
113
+ /** The tones a node may take (SPEC.md §4). */
114
+ export type Tone = 'neutral' | 'info' | 'success' | 'warning' | 'danger';
115
+ /** One item of a repeat's data in the samples: its fields and their values (SPEC.md §4). */
116
+ export type SampleRow = Record<string, Scalar>;
107
117
  export interface UiEdge {
108
118
  labelledBy?: [string, string];
109
119
  triggers?: [string, string];
@@ -117,7 +127,8 @@ export interface Ui {
117
127
  id: string;
118
128
  catalog: string;
119
129
  kit?: string;
120
- samples: Record<string, string>;
130
+ /** A sample value for each catalog parameter, or, under a repeat's data (`question.options`), its rows: each a map of the fields its nodes read as `row.<field>`. */
131
+ samples: Record<string, string | SampleRow[]>;
121
132
  nodes: Record<string, UiNode>;
122
133
  locales?: string[];
123
134
  changes?: {
package/js/kit.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export declare class KitError extends Error {
2
2
  }
3
- declare const SLOTS: readonly ['text', 'name', 'id', 'intent', 'children'];
3
+ declare const SLOTS: readonly ['text', 'name', 'id', 'intent', 'children', 'tone'];
4
4
  declare const FLAGS: readonly ['disabled', 'named', 'conditional', 'checked'];
5
5
  type Slot = (typeof SLOTS)[number];
6
6
  type Flag = (typeof FLAGS)[number];
@@ -22,6 +22,19 @@ export interface KitComponent {
22
22
  template: Template;
23
23
  roles: Record<string, Template>;
24
24
  intents?: Record<string, string>;
25
+ /** node tone -> the word {tone} gives, read before the kit's own `tones`; `default` for a node without one */
26
+ tones?: Record<string, string>;
27
+ }
28
+ /** A font the kit carries (`fonts:` in kit.yaml, SPEC.md §8). */
29
+ export interface KitFont {
30
+ family: string;
31
+ /** as kit.yaml gives it, relative to the kit's folder */
32
+ file: string;
33
+ weight?: string;
34
+ style?: 'normal' | 'italic' | 'oblique';
35
+ unicodeRange?: string;
36
+ /** the file as a data: URL; absent when it cannot be embedded */
37
+ src?: string;
25
38
  }
26
39
  export interface Kit {
27
40
  id: string;
@@ -32,6 +45,10 @@ export interface Kit {
32
45
  dark: Array<[string, string]>;
33
46
  css: string;
34
47
  zoom: number;
48
+ /** node tone -> the word {tone} gives, for a component that gives none of its own; `default` for a node without one */
49
+ tones?: Record<string, string>;
50
+ /** the fonts it carries, in the order of kit.yaml */
51
+ fonts?: KitFont[];
35
52
  }
36
53
  export interface Fill {
37
54
  id: string;
@@ -44,6 +61,8 @@ export interface Fill {
44
61
  named: boolean;
45
62
  conditional: boolean;
46
63
  checked: boolean;
64
+ /** the tone the node is drawn in (SPEC.md §4) */
65
+ tone?: string;
47
66
  }
48
67
  export declare function drawWith(kit: Kit, component: string, f: Fill, warn: (m: string) => void): string | null;
49
68
  export declare function mark(html: string, id: string, chips: string): string;
@@ -51,4 +70,6 @@ export declare function loadKit(path: string): Kit;
51
70
  export declare function resolveKit(graphDir: string, uiKit: string | undefined, flagValue: string | undefined): Kit | null;
52
71
  export declare function kitCss(kit: Kit, target: 'page' | 'stage'): string;
53
72
  export declare function kitStageScript(kit: Kit): string;
73
+ /** The families of the kit's own fonts (`fonts:`), each once, in the order of kit.yaml: what its screens should be drawn in. */
74
+ export declare function kitFamilies(kit: Kit): string[];
54
75
  export {};
package/js/kit.js CHANGED
@@ -4,10 +4,13 @@ import { KitError, Trap, call, json, native, nativeKit, rememberKit, warnings }
4
4
 
5
5
  export { KitError };
6
6
 
7
- // a kit as loadKit gave it: each component's `intents` is a key of its own, undefined when the kit gives none
7
+ // a kit as loadKit gave it: each component's `intents` is a key of its own, undefined when the kit gives none, and
8
+ // its `tones` one only when the kit gives them
8
9
  function kitOf(n) {
9
10
  const k = JSON.parse(n.json());
10
- for (const [name, c] of Object.entries(k.components)) k.components[name] = { template: c.template, roles: c.roles, intents: c.intents };
11
+ for (const [name, c] of Object.entries(k.components)) {
12
+ k.components[name] = { template: c.template, roles: c.roles, intents: c.intents, ...(c.tones === undefined ? {} : { tones: c.tones }) };
13
+ }
11
14
  return rememberKit(k, n);
12
15
  }
13
16
 
@@ -52,3 +55,9 @@ export function kitCss(kit, target) {
52
55
  export function kitStageScript(kit) {
53
56
  return native.kitStageScript(nativeKit(kit));
54
57
  }
58
+
59
+ // The families of the kit's own fonts (`fonts:`), each once, in the order of kit.yaml: what its screens should be
60
+ // drawn in, so that a tool can ask the browser whether it drew them.
61
+ export function kitFamilies(kit) {
62
+ return native.kitFamilies(nativeKit(kit));
63
+ }
package/js/native.d.cts CHANGED
@@ -162,6 +162,9 @@ export declare function kindOf(g: NativeGraph, name: string): string
162
162
  /** `kitCss(kit, target)` */
163
163
  export declare function kitCss(kit: NativeKit, target: string): string
164
164
 
165
+ /** `kitFamilies(kit)` */
166
+ export declare function kitFamilies(kit: NativeKit): Array<string>
167
+
165
168
  /** `kitStageScript(kit)` */
166
169
  export declare function kitStageScript(kit: NativeKit): string
167
170
 
@@ -262,8 +265,11 @@ export declare function renderCheckScreens(g: NativeGraph, kit: NativeKit | unde
262
265
  /** `renderScreens(g, warn, kit)` */
263
266
  export declare function renderScreens(g: NativeGraph, warn: (arg: string) => void, kit?: NativeKit | undefined | null): string
264
267
 
265
- /** `renderStageScreen(g, state, reveal, warn, kit)` */
266
- export declare function renderStageScreen(g: NativeGraph, state: string, reveal: Array<string>, warn: (arg: string) => void, kit?: NativeKit | undefined | null): string
268
+ /**
269
+ * `renderStageScreen(g, state, reveal, warn, kit, ctx)`: `ctx`, the situation's context as JSON (a map of the flow's
270
+ * variables to their values), or undefined
271
+ */
272
+ export declare function renderStageScreen(g: NativeGraph, state: string, reveal: Array<string>, warn: (arg: string) => void, kit?: NativeKit | undefined | null, ctx?: string | undefined | null): string
267
273
 
268
274
  /** `resolveKit(graphDir, uiKit, flagValue)` */
269
275
  export declare function resolveKit(graphDir: string, uiKit?: string | undefined | null, flagValue?: string | undefined | null): NativeKit | null
@@ -306,6 +312,9 @@ export declare function takeYamlWarnings(): string
306
312
  /** `titleOf(flow, state)` */
307
313
  export declare function titleOfState(flow: NativeValue, state: string): string
308
314
 
315
+ /** `TONE_CSS`: the styles of a tone the fixed components draw */
316
+ export declare function toneCss(): string
317
+
309
318
  /** `transitionPath(state, st, event, i)` */
310
319
  export declare function transitionPathOf(state: string, st: string, event: string | undefined | null, i: number): Array<string>
311
320
 
package/js/wireframe.d.ts CHANGED
@@ -1,8 +1,17 @@
1
- import type { Graph } from './graph.js';
1
+ import type { Graph, Scalar } from './graph.js';
2
2
  import type { Kit } from './kit.js';
3
3
  type Warn = (message: string) => void;
4
4
  export declare function renderScreens(g: Graph, warn: Warn, kit?: Kit | null): string;
5
- export declare function renderStageScreen(g: Graph, state: string, reveal: string[], warn: Warn, kit?: Kit | null): string;
5
+ /** The context a stage screen is drawn in: each name of the flow's expressions and its value. */
6
+ export type StageContext = Record<string, Scalar | null>;
7
+ /**
8
+ * One state's screen for the tutorial stage. `ctx`, the context of the situation it shows (each variable of the flow
9
+ * and its value), picks each node's tone from its map (SPEC.md §4) and draws each node's `checked` as it reads there,
10
+ * for each row it is drawn for; without it only a fixed tone and `checked: true` are drawn.
11
+ */
12
+ export declare function renderStageScreen(g: Graph, state: string, reveal: string[], warn: Warn, kit?: Kit | null, ctx?: StageContext | null): string;
13
+ /** The styles of a tone drawn by the fixed components (`wf-tone-<word>`): a page adds them where a node has a tone; a video stage adds them too. */
14
+ export declare const TONE_CSS: string;
6
15
  export interface Expectation {
7
16
  state: string;
8
17
  id: string;
package/js/wireframe.js CHANGED
@@ -1,6 +1,9 @@
1
1
  // A flow's screens as wireframes, drawn with the fixed components or with a kit. The checker is the Rust one
2
2
  // (crates/delurio-core/src/wireframe.rs).
3
- import { Trap, call, native, nativeGraph, nativeKit } from './internal.js';
3
+ import { Trap, call, json, native, nativeGraph, nativeKit } from './internal.js';
4
+
5
+ // The styles of a tone drawn by the fixed components (`wf-tone-<word>`), for the page and the video stage.
6
+ export const TONE_CSS = native.toneCss();
4
7
 
5
8
  export function renderScreens(g, warn, kit = null) {
6
9
  const t = new Trap();
@@ -8,9 +11,12 @@ export function renderScreens(g, warn, kit = null) {
8
11
  }
9
12
 
10
13
  // One state's screen for the tutorial stage. Nodes that depend on a flag (`when`) appear only when named in `reveal`.
11
- export function renderStageScreen(g, state, reveal, warn, kit = null) {
14
+ // `ctx`, the situation's context (each variable of the flow and its value), picks each node's tone from its map and draws
15
+ // `checked` as it reads there; without it only a fixed tone and `checked: true` are drawn.
16
+ export function renderStageScreen(g, state, reveal, warn, kit = null, ctx = null) {
12
17
  const t = new Trap();
13
- return call(t, () => native.renderStageScreen(nativeGraph(g), String(state), [...(reveal ?? [])].map(String), t.warner(warn), nativeKit(kit)));
18
+ const c = ctx === null || ctx === undefined ? undefined : json(ctx);
19
+ return call(t, () => native.renderStageScreen(nativeGraph(g), String(state), [...(reveal ?? [])].map(String), t.warner(warn), nativeKit(kit), c));
14
20
  }
15
21
 
16
22
  // For `kit check`: every screen with all its nodes (flags revealed, no annotations), and what each node must expose.
@@ -19,7 +25,7 @@ export function renderCheckScreens(g, kit, warn) {
19
25
  const out = JSON.parse(call(t, () => native.renderCheckScreens(nativeGraph(g), nativeKit(kit), t.warner(warn))));
20
26
  return {
21
27
  html: out.html,
22
- expected: out.expected.map((e) => ({ state: e.state, id: e.id, index: e.index, role: e.role, ...('roleGiven' in e ? { roleGiven: e.roleGiven } : {}), name: e.name, disabled: e.disabled })),
28
+ expected: out.expected.map((e) => ({ state: e.state, id: e.id, index: e.index, role: e.role, ...('roleGiven' in e ? { roleGiven: e.roleGiven } : {}), ...('native' in e ? { native: e.native } : {}), name: e.name, disabled: e.disabled })),
23
29
  };
24
30
  }
25
31
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@delurio/cli",
3
- "version": "0.13.0",
3
+ "version": "0.15.0",
4
4
  "description": "The open checker and page of delurio-graph/0: check every graph in a project's own CI, offline, with GNU error lines and SARIF.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -47,12 +47,12 @@
47
47
  "elkjs": "0.12.1"
48
48
  },
49
49
  "optionalDependencies": {
50
- "@delurio/cli-linux-x64-gnu": "0.13.0",
51
- "@delurio/cli-linux-x64-musl": "0.13.0",
52
- "@delurio/cli-linux-arm64-gnu": "0.13.0",
53
- "@delurio/cli-linux-arm64-musl": "0.13.0",
54
- "@delurio/cli-darwin-arm64": "0.13.0",
55
- "@delurio/cli-win32-x64-msvc": "0.13.0"
50
+ "@delurio/cli-linux-x64-gnu": "0.15.0",
51
+ "@delurio/cli-linux-x64-musl": "0.15.0",
52
+ "@delurio/cli-linux-arm64-gnu": "0.15.0",
53
+ "@delurio/cli-linux-arm64-musl": "0.15.0",
54
+ "@delurio/cli-darwin-arm64": "0.15.0",
55
+ "@delurio/cli-win32-x64-msvc": "0.15.0"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@napi-rs/cli": "3.10.12"
@@ -401,6 +401,41 @@
401
401
  },
402
402
  "description": "Values for the sample placeholders of the graph's texts, over the binding's samples."
403
403
  },
404
+ "then": {
405
+ "type": "object",
406
+ "description": "How the steps that leave a variable to chance (havoc) come out on this scenario's walks, by the effect: a list read in order, one entry each time the walk takes a transition that applies the effect, each entry a value for some of the variables the effect's havoc lists. A variable an entry leaves out, and every variable once the list has run out, keeps its value. Proposed on 23 Nov 2026.",
407
+ "examples": [
408
+ {
409
+ "next": [
410
+ {
411
+ "lastStep": false
412
+ },
413
+ {
414
+ "lastStep": true
415
+ }
416
+ ]
417
+ }
418
+ ],
419
+ "propertyNames": {
420
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
421
+ },
422
+ "additionalProperties": {
423
+ "type": "array",
424
+ "minItems": 1,
425
+ "items": {
426
+ "type": "object",
427
+ "minProperties": 1,
428
+ "additionalProperties": {
429
+ "type": [
430
+ "string",
431
+ "number",
432
+ "boolean",
433
+ "null"
434
+ ]
435
+ }
436
+ }
437
+ }
438
+ },
404
439
  "setup": {
405
440
  "type": "array",
406
441
  "description": "Commands run before the walk, such as seeding the database: run only.",
@@ -523,7 +558,7 @@
523
558
  "description": "A scenario whose shortest drivable path reaches this state, for a tutorial's `cut`."
524
559
  },
525
560
  "call": {
526
- "description": "The server call the state makes: its URL glob, or { url, method, action, code, returns }. Held while the state's own screen is checked, and its HTTP status compared with the refusal's on a FAIL.<class> walk.",
561
+ "description": "The server call the state makes: its URL glob, or { url, method, action, code, returns, status }. Held while the state's own screen is checked, and its HTTP status compared with the refusal's on a FAIL.<class> walk. On a state that invokes none of the flow's actions, a request the page makes while the state is shown, such as one to another server; status is then the HTTP status its answer has.",
527
562
  "anyOf": [
528
563
  {
529
564
  "type": "string",
@@ -588,6 +623,29 @@
588
623
  },
589
624
  "minProperties": 1
590
625
  }
626
+ },
627
+ "status": {
628
+ "description": "On a state that invokes none of the flow's actions: the HTTP status the call's answer has, or a list of those it may have. Proposed on 23 Nov 2026.",
629
+ "anyOf": [
630
+ {
631
+ "type": "integer",
632
+ "minimum": 100,
633
+ "maximum": 599
634
+ },
635
+ {
636
+ "type": "array",
637
+ "minItems": 1,
638
+ "uniqueItems": true,
639
+ "items": {
640
+ "type": "integer",
641
+ "minimum": 100,
642
+ "maximum": 599
643
+ }
644
+ }
645
+ ],
646
+ "examples": [
647
+ 404
648
+ ]
591
649
  }
592
650
  },
593
651
  "required": [
@@ -596,6 +654,45 @@
596
654
  }
597
655
  ]
598
656
  },
657
+ "storage": {
658
+ "type": "object",
659
+ "description": "What the page's storage holds when the state is checked: session (sessionStorage) and local (localStorage), of the origin of the page the state is shown on, in the browser whose screen it is. Proposed on 23 Nov 2026.",
660
+ "additionalProperties": false,
661
+ "minProperties": 1,
662
+ "properties": {
663
+ "session": {
664
+ "type": "object",
665
+ "minProperties": 1,
666
+ "description": "By key glob (* any run of characters): absent, no key it matches is there; any other value, a key it matches is there and each it matches holds that value (a text with {placeholders}, or a regular expression between slashes).",
667
+ "additionalProperties": {
668
+ "type": [
669
+ "string",
670
+ "number",
671
+ "boolean"
672
+ ]
673
+ }
674
+ },
675
+ "local": {
676
+ "type": "object",
677
+ "minProperties": 1,
678
+ "description": "By key glob (* any run of characters): absent, no key it matches is there; any other value, a key it matches is there and each it matches holds that value (a text with {placeholders}, or a regular expression between slashes).",
679
+ "additionalProperties": {
680
+ "type": [
681
+ "string",
682
+ "number",
683
+ "boolean"
684
+ ]
685
+ }
686
+ }
687
+ },
688
+ "examples": [
689
+ {
690
+ "session": {
691
+ "rehber:*": "absent"
692
+ }
693
+ }
694
+ ]
695
+ },
599
696
  "fail": {
600
697
  "type": "object",
601
698
  "description": "FAIL.<class> → how the held call is made to fail on a walk that leaves the state so, where the context does not cause it. Needs `call`.",
@@ -771,11 +868,28 @@
771
868
  "description": "Of what the rest finds, this one: from 0, the first; a negative one counts from the end, -1 the last."
772
869
  },
773
870
  "before": {
774
- "type": "array",
775
- "description": "Done before the node is pressed, such as opening the menu it sits in.",
776
- "items": {
777
- "$ref": "#/$defs/action"
778
- }
871
+ "description": "Done before the node is pressed, such as opening the menu it sits in: a list of actions, done in every state, or a map from states to lists, where the node is reached another way in another state; in a state the map leaves out, nothing is done. Proposed on 23 Nov 2026 (the map).",
872
+ "anyOf": [
873
+ {
874
+ "type": "array",
875
+ "items": {
876
+ "$ref": "#/$defs/action"
877
+ }
878
+ },
879
+ {
880
+ "type": "object",
881
+ "minProperties": 1,
882
+ "propertyNames": {
883
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
884
+ },
885
+ "additionalProperties": {
886
+ "type": "array",
887
+ "items": {
888
+ "$ref": "#/$defs/action"
889
+ }
890
+ }
891
+ }
892
+ ]
779
893
  },
780
894
  "skip": {
781
895
  "type": "string",
@@ -793,9 +907,91 @@
793
907
  "pattern": "^(?:\\{[^{}]+\\}|[0-9]+)$"
794
908
  }
795
909
  ]
910
+ },
911
+ "near": {
912
+ "$ref": "#/$defs/locator",
913
+ "description": "The element this node is drawn beside: in every state that shows the node, each element its locator finds is at most 24 CSS pixels from the one element this locator finds (0 where they overlap). Proposed on 23 Nov 2026."
914
+ },
915
+ "draws": {
916
+ "type": "object",
917
+ "description": "Another flow's screen that this node holds, drawn by something other than that flow's own page: the node's locator finds the one element that holds it, and the replay checks the drawn flow's nodes inside it, for the state that `states` maps each state to, or its first screen. Paths are relative to the binding's file. Proposed on 23 Nov 2026.",
918
+ "additionalProperties": false,
919
+ "properties": {
920
+ "flow": {
921
+ "type": "string",
922
+ "description": "The drawn flow's folder.",
923
+ "minLength": 1
924
+ },
925
+ "bind": {
926
+ "type": "string",
927
+ "description": "Its binding, where its nodes are found by its own `nodes`."
928
+ },
929
+ "given": {
930
+ "type": "object",
931
+ "description": "The drawn flow's context, for the variables its screens read that start from any value.",
932
+ "additionalProperties": {
933
+ "type": [
934
+ "string",
935
+ "number",
936
+ "boolean",
937
+ "null"
938
+ ]
939
+ }
940
+ },
941
+ "states": {
942
+ "type": "object",
943
+ "description": "By state of this flow that shows the node: the state of the drawn flow whose screen it holds.",
944
+ "additionalProperties": {
945
+ "type": "string",
946
+ "minLength": 1
947
+ }
948
+ }
949
+ },
950
+ "required": [
951
+ "flow"
952
+ ]
796
953
  }
797
954
  },
798
- "description": "Where the replay finds a node that its role and name cannot find, what it does before pressing it, how many elements it finds, or that it is skipped."
955
+ "description": "Where the replay finds a node that its role and name cannot find, what it does before pressing it, how many elements it finds, what it is drawn beside, another flow's screen it holds, or that it is skipped.",
956
+ "allOf": [
957
+ {
958
+ "$comment": "draws finds the element that holds the drawn screen by the node's own locator",
959
+ "if": {
960
+ "required": [
961
+ "draws"
962
+ ]
963
+ },
964
+ "then": {
965
+ "anyOf": [
966
+ {
967
+ "required": [
968
+ "role"
969
+ ]
970
+ },
971
+ {
972
+ "required": [
973
+ "text"
974
+ ]
975
+ },
976
+ {
977
+ "required": [
978
+ "label"
979
+ ]
980
+ },
981
+ {
982
+ "required": [
983
+ "testId"
984
+ ]
985
+ },
986
+ {
987
+ "required": [
988
+ "css"
989
+ ]
990
+ }
991
+ ]
992
+ }
993
+ }
994
+ ]
799
995
  }
800
996
  },
801
997
  "effects": {
@@ -1865,9 +2061,13 @@
1865
2061
  "as": {
1866
2062
  "type": "string",
1867
2063
  "description": "Done in this account's own browser context, opened and signed in on first use: a step another person takes."
2064
+ },
2065
+ "optional": {
2066
+ "const": true,
2067
+ "description": "On a click, a fill or an attach: one the app may not ask for, such as a notice shown on some visits only. Once the page is still, its element is looked for once: where it is not there, the action is passed over, and the step's report says so. Proposed on 23 Nov 2026."
1868
2068
  }
1869
2069
  },
1870
- "description": "One thing the replay does: one of goto, reload, click, fill, attach, key, waitUrl, waitText, waitResponse, download, resize and run, which may carry `as`.",
2070
+ "description": "One thing the replay does: one of goto, reload, click, fill, attach, key, waitUrl, waitText, waitResponse, download, resize and run, which may carry `as`; a click, a fill or an attach may be optional.",
1871
2071
  "anyOf": [
1872
2072
  {
1873
2073
  "required": [
@@ -2142,6 +2342,33 @@
2142
2342
  "run"
2143
2343
  ]
2144
2344
  }
2345
+ },
2346
+ {
2347
+ "$comment": "optional goes with click, fill or attach",
2348
+ "if": {
2349
+ "required": [
2350
+ "optional"
2351
+ ]
2352
+ },
2353
+ "then": {
2354
+ "anyOf": [
2355
+ {
2356
+ "required": [
2357
+ "click"
2358
+ ]
2359
+ },
2360
+ {
2361
+ "required": [
2362
+ "fill"
2363
+ ]
2364
+ },
2365
+ {
2366
+ "required": [
2367
+ "attach"
2368
+ ]
2369
+ }
2370
+ ]
2371
+ }
2145
2372
  }
2146
2373
  ]
2147
2374
  },
@@ -181,7 +181,7 @@
181
181
  "properties": {
182
182
  "set": {
183
183
  "type": "object",
184
- "description": "Variables and the values they are given.",
184
+ "description": "Variables and the values they are given. A value written `row.<field>` is the field of the row pressed, on a transition whose event a repeat node sends (SPEC.md §4): the checker lets the variable take any of its values, as `havoc` does.",
185
185
  "propertyNames": { "$ref": "#/$defs/identifier" },
186
186
  "additionalProperties": { "$ref": "#/$defs/scalar" }
187
187
  },
@@ -32,9 +32,18 @@
32
32
  "kit": { "type": "string", "description": "The kit the screens are drawn with (SPEC.md §8), relative to the graph; `--kit` wins.", "examples": ["../kit"] },
33
33
  "samples": {
34
34
  "type": "object",
35
- "description": "Values for catalog parameters, on the page and in videos: `{client}` in a message is filled with `samples.client`.",
36
- "additionalProperties": { "type": "string", "description": "The sample value." },
37
- "examples": [{ "client": "Acme Notes" }]
35
+ "description": "Values for catalog parameters, on the page and in videos: `{client}` in a message is filled with `samples.client`. A key that is a repeat's data (`question.options`) may give its rows instead: a list of maps, one per item, with the fields its nodes' params read as `row.<field>`; each such node is then drawn once per row (SPEC.md §4).",
36
+ "additionalProperties": {
37
+ "type": ["string", "array"],
38
+ "description": "The sample value, or the rows of a repeat's data.",
39
+ "minItems": 1,
40
+ "items": {
41
+ "type": "object",
42
+ "description": "One item of the data: its fields and their values.",
43
+ "additionalProperties": { "type": ["string", "number", "boolean"] }
44
+ }
45
+ },
46
+ "examples": [{ "client": "Acme Notes" }, { "question.options": [{ "id": "a", "text": "Four" }, { "id": "b", "text": "Three" }] }]
38
47
  },
39
48
  "task": {
40
49
  "type": "object",
@@ -264,8 +273,8 @@
264
273
  "disabledIn": { "$ref": "#/$defs/states", "description": "The states where the node is shown but disabled." },
265
274
  "disabledWhen": {
266
275
  "$ref": "#/$defs/expression",
267
- "description": "An expression over the flow's context (SPEC.md §3): where it holds, the node is shown but disabled, in any state that shows it, such as a button that waits until a VAT number is typed or a box is ticked. Beside disabledIn, the node is disabled where either says so. A replay compares it in each situation it stops in.",
268
- "examples": ["not vatGiven", "not accepted"]
276
+ "description": "An expression over the flow's context (SPEC.md §3): where it holds, the node is shown but disabled, in any state that shows it, such as a button that waits until a VAT number is typed or a box is ticked. Beside disabledIn, the node is disabled where either says so. A replay compares it in each situation it stops in. A repeat node's may also read its row's place among the rows it draws: repeat.first, repeat.last and repeat.index (from 1), such as the first row's Move up (proposed on 23 Nov 2026).",
277
+ "examples": ["not vatGiven", "not accepted", "repeat.first", "saving or repeat.last"]
269
278
  },
270
279
  "emits": {
271
280
  "type": "string",
@@ -273,7 +282,7 @@
273
282
  "pattern": "^[A-Z][A-Z0-9_]*$"
274
283
  },
275
284
  "initialFocus": { "$ref": "#/$defs/nodeRef", "description": "On a page: the node that has focus when it opens, at the flow's start or when a transition shows it." },
276
- "repeat": { "type": "string", "description": "The node is drawn once per item of this data.", "examples": ["request.scopes"] },
285
+ "repeat": { "type": "string", "description": "The node is drawn once per item of this data: once per row when the samples give its rows (`samples.<data>`), else once. Its params may read the item's fields as `row.<field>`, and so may its `checked`. Adjacent nodes with the same repeat are drawn side by side, one row per item.", "examples": ["request.scopes"] },
277
286
  "frame": {
278
287
  "description": "For a page: whether it may be framed; `never` (served with CSP frame-ancestors 'none').",
279
288
  "const": "never"
@@ -288,14 +297,31 @@
288
297
  "checked": {
289
298
  "type": ["boolean", "string"],
290
299
  "minLength": 1,
291
- "description": "On a checkbox, menuitemcheckbox, menuitemradio, option, radio or switch: whether it is checked (or selected) when it is shown, as an expression over the flow's context (SPEC.md §3), or true or false. A replay reads its checked state and compares it.",
292
- "examples": [true, "pinned", "plan == 'yearly'"]
300
+ "description": "On a checkbox, menuitemcheckbox, menuitemradio, option, radio or switch: whether it is checked (or selected) when it is shown, as an expression over the flow's context (SPEC.md §3), or true or false. On a repeat node it may read the item it is drawn for, `row.<field>`. A replay reads its checked state and compares it.",
301
+ "examples": [true, "pinned", "plan == 'yearly'", "row.id == answer"]
293
302
  },
294
303
  "script": {
295
304
  "description": "On a page: how much of it works without JavaScript. `optional`: the page and its actions (plain forms and links). `actions`: the page is drawn and read without it (rendered on the server), and only its actions need it. Without it, the page needs JavaScript. A replay's second walk with JavaScript off checks an `optional` page and takes its actions, and checks an `actions` page but its actions, and ends there.",
296
305
  "enum": ["optional", "actions"]
297
306
  },
298
- "source": { "$ref": "#/$defs/sourceAnchor" }
307
+ "source": { "$ref": "#/$defs/sourceAnchor" },
308
+ "tone": {
309
+ "description": "How the node looks, never all it says (WCAG 2.2, 1.4.1 Use of Color): its words and its role say the same (SPEC.md §4). One tone in every state that shows it, or each tone with the expression over the flow's context (SPEC.md §3) under which the node takes it, in order: the first whose expression holds wins, and none, no tone. A kit draws it with its {tone} slot and its `tones` (SPEC.md §8).",
310
+ "oneOf": [
311
+ { "$ref": "#/$defs/tone" },
312
+ {
313
+ "type": "object",
314
+ "minProperties": 1,
315
+ "propertyNames": { "$ref": "#/$defs/tone" },
316
+ "additionalProperties": { "$ref": "#/$defs/expression" }
317
+ }
318
+ ],
319
+ "examples": ["danger", { "danger": "clock == 'lastFive'", "warning": "clock == 'lastQuarter'" }]
320
+ },
321
+ "duringStep": {
322
+ "type": "boolean",
323
+ "description": "`true`: in a state that runs a step (`invoke`), the node stays usable while the step runs, and its event is handled once the step ends, by the state the step's outcome (DONE, FAIL.<class>) leads to, such as a link to sign out beside a form that is being saved. `check` then holds that state, not the step's, to the event (event-unhandled). A replay does not press a node while a step runs (SPEC.md §4)."
324
+ }
299
325
  },
300
326
  "allOf": [
301
327
  {
@@ -322,6 +348,11 @@
322
348
  "$comment": "a node that names its native control gives no role: WAI-ARIA gives that control none",
323
349
  "if": { "required": ["native"] },
324
350
  "then": { "properties": { "role": false } }
351
+ },
352
+ {
353
+ "$comment": "duringStep is only on a node that sends an event: it says where that event is handled",
354
+ "if": { "required": ["duringStep"], "properties": { "duringStep": { "const": true } } },
355
+ "then": { "required": ["emits"] }
325
356
  }
326
357
  ]
327
358
  },
@@ -362,6 +393,10 @@
362
393
  "maxItems": 2
363
394
  }
364
395
  }
396
+ },
397
+ "tone": {
398
+ "description": "A tone a node takes (SPEC.md §4): neutral, info, success, warning or danger.",
399
+ "enum": ["neutral", "info", "success", "warning", "danger"]
365
400
  }
366
401
  }
367
402
  }