@cratis/pi 7.164.0 → 7.164.1

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.
Files changed (41) hide show
  1. package/package/corpus/skills/cratis-arc-react-page/references/from-screenplay.md +1 -1
  2. package/package/corpus/skills/cratis-chronicle-projection/SKILL.md +4 -0
  3. package/package/corpus/skills/cratis-chronicle-projection/references/dictionaries-set-once-ordering.md +47 -0
  4. package/package/corpus/skills/cratis-chronicle-reducer/SKILL.md +1 -0
  5. package/package/corpus/skills/cratis-lens-browser-extension/SKILL.md +2 -0
  6. package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +2 -0
  7. package/package/corpus/skills/cratis-screenplay-command-surface/references/policy-persona-seed.md +24 -0
  8. package/package/corpus/skills/cratis-screenplay-command-surface/verification.json +3 -1
  9. package/package/corpus/skills/cratis-screenplay-delivery-planning/SKILL.md +1 -1
  10. package/package/corpus/skills/cratis-screenplay-delivery-planning/verification.json +3 -1
  11. package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +2 -0
  12. package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +3 -3
  13. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +12 -2
  14. package/package/corpus/skills/cratis-screenplay-model-authoring/references/storylines.md +68 -0
  15. package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +9 -1
  16. package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +1 -0
  17. package/package/corpus/skills/cratis-screenplay-model-review/verification.json +2 -1
  18. package/package/corpus/skills/cratis-screenplay-projections/SKILL.md +1 -0
  19. package/package/corpus/skills/cratis-screenplay-projections/references/dictionaries-and-ordering.md +64 -0
  20. package/package/corpus/skills/cratis-screenplay-projections/references/graphs.md +96 -0
  21. package/package/corpus/skills/cratis-screenplay-projections/references/pdl-grammar.md +5 -0
  22. package/package/corpus/skills/cratis-screenplay-projections/verification.json +7 -1
  23. package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +4 -2
  24. package/package/corpus/skills/cratis-screenplay-read-surface/references/screen-levels.md +2 -2
  25. package/package/corpus/skills/cratis-screenplay-read-surface/verification.json +3 -1
  26. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +1 -0
  27. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +8 -0
  28. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/verification.json +5 -1
  29. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-catalogue.md +1 -1
  30. package/package/corpus/skills/cratis-screenplay-specifications/references/graph-steps.md +10 -0
  31. package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +5 -1
  32. package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet.md +1 -1
  33. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +52 -0
  34. package/package/corpus/skills/cratis-screenplay-toolchain/references/language-admission.md +14 -0
  35. package/package/corpus/skills/cratis-screenplay-toolchain/references/model-export-diff-rename.md +68 -0
  36. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +1557 -42
  37. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
  38. package/package/corpus/skills/cratis-screenplay-toolchain/references/verdicts.md +1 -2
  39. package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +14 -1
  40. package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +1 -1
  41. package/package.json +1 -1
@@ -80,6 +80,14 @@ generated values/responses Stage#175 (now render on the pinned bundle). Closed:
80
80
  Stage#178, ESM v7 Stage#201. Check that an issue is still open before citing
81
81
  it, and cite only numbers you have just read. A closed issue is a trigger to probe again.
82
82
 
83
+ ## CLI exports and diffs
84
+
85
+ - `screenplay diff <before> <after> --format json` finds what changed between two model versions; `screenplay export --scope <slice>` hands one slice's ESM to a builder ([CLI reference](../../cratis-screenplay-toolchain/references/model-export-diff-rename.md)).
86
+ - After a model change, read `slices` (MCP `semantic-diff`, `ModelDifference.Slices` or `screenplay diff --format json`) to choose the slices to re-render or re-gap-fill; a non-empty `modelWide` may affect every slice.
87
+ - A builder for another stack can read screens from an ESM v42 export (`screenplay export --screens`; .NET `UiContractBuilder.For(model)`); refresh, state, notifications and dialogs are not carried.
88
+ - A builder for another stack reads routes and payloads from `screenplay export --format openapi` and screens from `--format ui` instead of copying a renderer's conventions ([formats](../../cratis-screenplay-toolchain/references/model-export-diff-rename.md#openapi-and-ui-contract-formats)).
89
+ - A graph query that `collect`s nested rows is ESM v54: Stage must admit v54 before it renders it. A refusal is a drift event, so keep the query ([graphs](../../cratis-stage-rendering-and-sandbox/references/graphs.md)).
90
+
83
91
  ## Reference outcomes
84
92
  - The complete marina model of `cratis-stage-rendering-and-sandbox` `references/render-example.md`:
85
93
  admission ok, Debug build ok and its tests passed on the public CLI.
@@ -52,6 +52,10 @@
52
52
  { "kind": "skill-contains", "value": "responsible tool version" },
53
53
  { "kind": "skill-contains", "value": "`GraphSinks` into its render input, or a changed `sink` line never triggers a re-render" },
54
54
  { "kind": "skill-contains", "value": "unknown-preserving-reader.md" },
55
- { "kind": "skill-contains", "value": "not a constructor-order promise" }
55
+ { "kind": "skill-contains", "value": "not a constructor-order promise" },
56
+ {"kind":"skill-contains","value":"screenplay diff"},
57
+ {"kind":"skill-contains","value":"ESM v42"},
58
+ {"kind":"skill-contains","value":"--format ui"},
59
+ {"kind":"skill-contains","value":"modelWide"}
56
60
  ]
57
61
  }
@@ -243,7 +243,7 @@ rules, gates, mappings or contracts to make an example pass.
243
243
  and booleans, quoted declared enum members. Dates are concrete ISO dates in the story's
244
244
  future, instants offset-qualified; fix `given clock` when asserting occurrence-time values.
245
245
  No `{uuid}`/`{now}` placeholders. No real personal data.
246
- - Structured values: single-line JSON with quoted keys and required members; empty, single and
246
+ - Structured values: indented `item` blocks (no JSON, `PLAY0833`) with every required member; empty, single and
247
247
  several items where that changes behaviour.
248
248
  - Competing claim: different source ids, same constrained value. Retry: same source id and inputs.
249
249
  Removal: an existing target, plus a second row that must survive. Branch: inputs that flip the
@@ -5,6 +5,7 @@
5
5
  - Steps
6
6
  - Example
7
7
  - Asserting a graph query
8
+ - Asserting collected rows
8
9
  - Rules
9
10
 
10
11
  ## Steps
@@ -161,6 +162,15 @@ module Organization
161
162
  since = "2026-10-05T07:00:00Z"
162
163
  ```
163
164
 
165
+ ## Asserting collected rows
166
+
167
+ Requires Screenplay 6.29.0 or later (`screenplay --version`). A query that `collect`s nested rows
168
+ (see [collect nested rows](../../cratis-screenplay-projections/references/graphs.md#collect-nested-rows))
169
+ is asserted under `then query` with structured values (an indented `item` block per row; Screenplay has no JSON, `PLAY0833`): the collected
170
+ property on its own line, one `item` block per row, in order; `<property> none` asserts an empty
171
+ list and `<property> = null` an absent optional row. List rows compare in order: the reached node's
172
+ key, then the edge's `identified by` value.
173
+
164
174
  ## Rules
165
175
 
166
176
  - Keys are the values of the node's `key` property, written as literals.
@@ -88,7 +88,7 @@ Independent results, not a ladder. Read `references/verdicts.md` for the command
88
88
  | --- | --- | --- |
89
89
  | V1 | authorable (compiles, warnings as errors) | the folder command above |
90
90
  | V2 | executable diagnostics read | MCP `open-workspace`, then `read-workspace view=executable-diagnostics` |
91
- | V3 | binding-ready (binds, no blocking executable diagnostics) | `executableReady` true and no error-severity diagnostic in V2; informational PLAY0269/0270 are reported separately |
91
+ | V3 | binding-ready (binds, no blocking executable diagnostics) | `executableReady` true and no error-severity diagnostic in V2; informational PLAY0269/0270 are reported separately; screens are deferred by default and admitted on request as ESM v42 (`export --screens`) |
92
92
  | V4 | reference specifications run | `screenplay test` or MCP `run-specifications`; unsupported/unbound is not a pass; rendered Debug tests are V5.tests, never V4 |
93
93
  | V5 | rendered and target-verified | `cratis render`, then Debug build and tests; report admission, publication, build and tests separately |
94
94
 
@@ -236,6 +236,10 @@ unresolved questions: the standalone tool has `--open-questions fail`; `cratis s
236
236
  does through `--open-questions report|fail`. It is separate from compilation and `--warnaserror`.
237
237
  Requires Cratis CLI 3.60.0 or later (`cratis --version`) for that option; older CLIs lack it.
238
238
 
239
+ Read [language admission](references/language-admission.md#esm-json-schemas) for the published ESM JSON Schemas (shape, not admission).
240
+
241
+ Read [export, compare and rename](references/model-export-diff-rename.md) for `screenplay export`, `diff` and `rename` and persisted identities.
242
+
239
243
  Read [fast path](references/fast-path.md) for the ordered requirements-to-running-app checklist (validate, `render --check`, render, build, run, check in a browser, run the specs).
240
244
 
241
245
  ## Route near misses
@@ -99,7 +99,7 @@ remain unadmitted. Compile and test each relevant fixture with the chosen tool.
99
99
  at most once. Canonical printing may place it first, but the parser does not
100
100
  require that position. Source preambles precede declarations.
101
101
  - Strings: `"..."`, escapes `\" \\ \n \r \t`; other backslashes kept (regex `"^INV-\d{6}$"` works).
102
- - Structured values: single-line JSON, quoted keys (`[{"sku": "A-1", "quantity": 2}]`).
102
+ - Structured values: the property name, then an indented `item` block per list row; `<property> none` for an empty list. Screenplay has no JSON (`PLAY0833`).
103
103
  - Literal property/concept text rules use `contains`, `not contains`, `starts with`,
104
104
  `ends with` with quoted operands (v24, ordinal UTF-16). Portable `matches` refuses
105
105
  nonportable constructs with PLAY0699; exact Studio patterns warn PLAY0787.
@@ -22,6 +22,10 @@
22
22
  - Sinks (PLAY0931-PLAY0939)
23
23
  - Passive read models (PLAY0858-PLAY0860)
24
24
  - Graph queries and `foreach` (PLAY0878-PLAY0886)
25
+ - Graph query `collect` (PLAY1144-PLAY1147)
26
+ - Set once, dictionary keys and children ordering (PLAY0956-PLAY0963)
27
+ - Development users (PLAY0888-PLAY0889)
28
+ - Storylines (PLAY0940-PLAY0943)
25
29
  - Screen visuals and slice placements (PLAY0950-PLAY0955)
26
30
  - Structural completeness and timeline checks
27
31
  - Editor versus C# verdicts
@@ -440,6 +444,54 @@ codes PLAY0862-PLAY0877 are listed there too.
440
444
  | PLAY0885 | E | It uses variable-length paths, `or`, ranges, functions or aggregates; none exist. |
441
445
  | PLAY0886 | E | A graph handler's `foreach` names a collection inside another, or something that is not a list of a composite type of the event. |
442
446
 
447
+ ## Graph query `collect` (PLAY1144-PLAY1147)
448
+
449
+ Requires Screenplay 6.29.0 or later (`screenplay --version`); a collecting query selects ESM v54.
450
+ Both compilers report these codes. The rules are in
451
+ `../../cratis-screenplay-projections/references/graphs.md#collect-nested-rows`.
452
+
453
+ | Code | Severity | Meaning / fix |
454
+ | --- | --- | --- |
455
+ | `PLAY1144` | E | A `collect` is malformed: not `<property> = collect <root> -[alias:]TYPE-> [alias:]Label` (or `<-[alias:]TYPE-`), not starting at the query's root, without row lines, or a row line that is not `<property> = <alias>.<property>`. |
456
+ | `PLAY1145` | E | A `collect` does not fit the read model: the property is not `Row[]` or `Row optional` of a composite type, or a row assigns an unknown, duplicate or mistyped property or leaves a required one out. |
457
+ | `PLAY1146` | E | A `collect` is nested inside another; collect from the root in a collect of its own. |
458
+ | `PLAY1147` | E | The query does not have the shape of a view: one `match <alias>:<Label>` of the root alone, scalar returns from the root, and no `where` condition on a collected edge. |
459
+
460
+ ## Set once, dictionary keys and children ordering (PLAY0956-PLAY0963)
461
+
462
+ Requires Screenplay 6.9.0 or later (`screenplay --version`). Rules and fixes: `../../cratis-screenplay-projections/references/dictionaries-and-ordering.md`.
463
+
464
+ | Code | Severity | Meaning / fix |
465
+ | --- | --- | --- |
466
+ | PLAY0956 | E | `remove <target>` without a dynamic key; end the target in `.$eventContent.<property>`, `.$eventContext.<path>` or `.$causedBy.<member>`, or use `clear` to empty the property. |
467
+ | PLAY0957 | E | `.$eventContent` names no event property, or `.$causedBy` names a member other than `subject`, `name`, `userName`. |
468
+ | PLAY0958 | E | A children ordering line is malformed, has indented lines, or stands outside `children`. |
469
+ | PLAY0959 | E | A `children` block declares more than one ordering line. |
470
+ | PLAY0960 | W | `sort by` names a property the child type does not declare. |
471
+ | PLAY0961 | W | A `.$eventContent` path the handled event does not have. |
472
+ | PLAY0962 | W | A dynamic key writes into a declared read-model property; Screenplay has no dictionary type. |
473
+ | PLAY0963 | E | `clear` with a dynamic key; write `remove`. |
474
+
475
+ ## Development users (PLAY0888-PLAY0889)
476
+
477
+ Requires Screenplay 5.11.0 or later (`screenplay --version`). See `../../cratis-screenplay-command-surface/references/policy-persona-seed.md#users`.
478
+
479
+ | Code | Severity | Meaning / fix |
480
+ | --- | --- | --- |
481
+ | `PLAY0888` | E | A `user` plays a persona that no `persona` declaration names. |
482
+ | `PLAY0889` | E | Two `user` declarations carry the same name. |
483
+
484
+ ## Storylines (PLAY0940-PLAY0943)
485
+
486
+ Requires Screenplay 6.6.0 or later (`screenplay --version`). Authoring metadata; see `../../cratis-screenplay-model-authoring/references/storylines.md`.
487
+
488
+ | Code | Severity | Meaning / fix |
489
+ | --- | --- | --- |
490
+ | `PLAY0940` | E | A `storyline` declaration is not `storyline <Name> ["<title>"]`. |
491
+ | `PLAY0941` | E | A step is not `<kind> <reference> ["<note>"]`, has an unknown kind, or has a nested line. |
492
+ | `PLAY0942` | W | A step names an element that no declaration of that kind matches; remove it or point it at its replacement. An ambiguous step is `PLAY0198`: qualify it. |
493
+ | `PLAY0943` | E | Two storylines carry the same name. |
494
+
443
495
  ## Screen visuals and slice placements (PLAY0950-PLAY0955)
444
496
 
445
497
  Requires Screenplay 6.7.0 or later (`screenplay --version`). Both are presentation-only; neither
@@ -6,6 +6,7 @@
6
6
  ## Contents
7
7
 
8
8
  - Version selection
9
+ - ESM JSON Schemas
9
10
  - Compiler and target minimums
10
11
  - Construct guidance
11
12
  - Stage admission and execution
@@ -33,13 +34,20 @@ exact language/semantic pairs; binding, reference execution and rendering are se
33
34
  | v34 | A specification `then invokes <Command>` (decision 0115; PLAY0815/PLAY0816) | Writes `thenInvocations` only when present. When one is stated, the slice's recorded invocations must match in count and order, comparing only stated values; a refused invocation counts | Stage spec runner compares it; the Cratis renderer refuses models after v33 with `STAGE-ESM-016` |
34
35
  | v35 | Reserved for handler result contract v2 (decision 0119); no construct selects it | | |
35
36
  | v36 | `statemachine` and `workflow` declarations (decision 0124; PLAY0834-PLAY0851) | Serializes `stateMachines` and `workflows`; specifications run them; earlier models keep their version and bytes | Stage refuses v36 models with `STAGE-ESM-016` |
37
+ | v42 | Screens admitted on request with `screenplay export --screens` (decision 0149) | Adds optional `screens` to each slice (data, actions, navigation, layout); screens are not a version selector by default and earlier models keep their bytes | Admission by Stage is separate; screens are not evidence a target renders them |
38
+ | v43 | `set once` or a `children` ordering line (PLAY0956-PLAY0963) | Serializes the `setOnce` operation and `ordering`; earlier models keep their version and bytes | Admission by Stage is separate; a refusal means the model is not renderable yet |
36
39
  | v53 | `audience`, `availability` and `available` gates (decision 0162; PLAY1130-PLAY1141) | Serializes the gates; specifications and the reference evaluator treat every gate as available and report opaque `provide` sources as unsupported; earlier models keep their version and bytes | Admission by Stage is separate: a refusal such as `STAGE-ESM-016` means the model is not renderable yet, never a reason to drop the gate. See `../../cratis-screenplay-availability/SKILL.md` |
40
+ | v54 | A graph query `collect` (decision 0163; PLAY1144-PLAY1147) | Serializes the collects on the query; earlier models keep their version and bytes | Admission by Stage is separate: a refusal means the model is not renderable yet, never a reason to drop the collect. Check `cratis render` |
37
41
 
38
42
  Constructs of decision 0098 with no executable-model content need no version: application-level hooks in a layout's actions outlet (`default <id> title "..." slice <Slice>` with an optional indented `authorize <Policy>`), and a capture over events that copies a list (`lines = $.lines`) or fans out with `children lines identified by sku`. Check `screenplay --version` against the release that admitted v29 and v30 before relying on them. Decision 0115 withdrew 0098's command specification that states the public event its outbound Translate slice publishes: a specification runs only its own slice, so the Translate slice states the public event in its own `when append` specification.
39
43
 
40
44
  Read-model property order is opt-in ESM 37.1 metadata: see
41
45
  [read-model property order](read-model-property-order.md).
42
46
 
47
+ ## ESM JSON Schemas
48
+
49
+ Requires Screenplay 6.2.0 or later (`screenplay --version`). A JSON Schema (draft 2020-12) is published per released ESM version from 1.0 (v39 was never released) at `https://raw.githubusercontent.com/Cratis/Screenplay/main/Documentation/screenplay/esm/esm-v<major>.schema.json` (`.0` versions) or `.../esm-v<major>.<minor>.schema.json` (minors); pick it from the document's `semanticVersion`. A schema checks shape, not admission: a document that validates is well-formed, but only the Screenplay reader (and a consumer's admission rules) accepts it. Ajv needs `allowUnionTypes`. In .NET, `EsmJsonSchema.For(version)` returns the same text.
50
+
43
51
  ## Compiler and target minimums
44
52
 
45
53
  Requires Screenplay 4.181.0 or later (`screenplay --version`) for atomic batches; older compilers cannot admit the preamble.
@@ -58,8 +66,14 @@ Requires Screenplay 4.204.0 (ESM v27; `screenplay --version`) for composite read
58
66
 
59
67
  Requires Screenplay 4.205.0 (ESM v28; `screenplay --version`) for Uuid equality in command conditions; older binders report PLAY0268.
60
68
 
69
+ Requires Screenplay 6.8.0 (ESM v42; `screenplay --version`) for screens in the executable model via `export --screens`.
70
+
71
+ Requires Screenplay 6.9.0 (ESM v43; `screenplay --version`) for `set once` and children ordering.
72
+
61
73
  Requires Screenplay 6.26.0 (ESM v53; `screenplay --version`) for audiences, availabilities and gates, and 6.25.0 for `provide`; older compilers report the lines as unknown.
62
74
 
75
+ Requires Screenplay 6.29.0 (ESM v54; `screenplay --version`) for graph query `collect`; older compilers do not admit it.
76
+
63
77
  Current renderer versus semantic-execution support is owned by
64
78
  [Stage target boundaries](../../cratis-stage-rendering-and-sandbox/references/current-boundaries.md),
65
79
  at the product inventory's reviewed baseline; the CLI still applies its independent version gate.
@@ -0,0 +1,68 @@
1
+ <!-- Copyright (c) Cratis. All rights reserved. -->
2
+ <!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
3
+
4
+ # Export, compare and rename from the CLI
5
+
6
+ Read this when a script or a builder needs a model's executable bytes, the difference between two model versions, or an identity-preserving rename without an MCP session.
7
+ Requires Screenplay 6.1.0 or later (`screenplay --version`).
8
+
9
+ ## Export
10
+
11
+ `screenplay export [PATH] [--format esm|openapi|ui] [--screens] [--scope <Module>[.<Feature>[.<Slice>]]] [--output <path>]`
12
+
13
+ - `esm` (the default) writes the executable semantic model, byte-identical to `SemanticModelSerializer.Serialize`, including `schemaVersion` and `revision`. `PATH` defaults to the current folder; without `--output` the bytes go to stdout; an identical existing file is left untouched.
14
+ - `--scope` keeps one module, feature or slice plus the application-wide declarations (concepts, types, policies, triggers, event sources, lifecycles, graphs). The excerpt's `revision` identifies the excerpt.
15
+
16
+ | Exit | Meaning |
17
+ | --- | --- |
18
+ | 0 | Written |
19
+ | 1 | No executable model for the sources, or `--screens` refused |
20
+ | 2 | Invalid arguments or scope, or unreadable sources |
21
+
22
+ ### OpenAPI and UI contract formats
23
+
24
+ Requires Screenplay 6.5.0 or later (`screenplay --version`).
25
+
26
+ | `--format` | Output | Needs an executable model | Exit |
27
+ | --- | --- | --- | --- |
28
+ | `openapi` | OpenAPI 3.1 of every command and query | Yes | 1 without one; `--scope` narrows |
29
+ | `ui` | Stack-neutral `screenplay-ui/1` JSON: data, actions, navigation, layout, optional Scene layer | No, only sources | 0 even without one (identities and routes are then absent and stderr says so); `--scope` keeps that module, feature or slice's screens |
30
+
31
+ `--format openapi`: a command is a `POST` with its inputs as the JSON body plus `POST <route>/validate`; a query is a `GET` with the `by` key and filters in the query string, and list queries take `page`, `pageSize`, `sortBy`, `sortDirection`. Observable queries carry `x-screenplay-observable` (open them as a WebSocket). `x-screenplay-authorization` is `anonymous: true` when nothing applies, else `requires` with the policy names; `x-screenplay-policies` lists the policies; each operation has `x-screenplay-kind` (`command`, `query`, `validation`), `x-screenplay-id` and `x-screenplay-slice`. Responses use the `CommandResult` and `QueryResult` envelopes, `info.version` is the executable-model revision, and the same model gives the same bytes.
32
+
33
+ MCP `read-workspace` `view: "api-description"` (format `openapi-3.1.0`) and `"ui-contract"` (`screenplay-ui/1`) page the decoded bytes like `executable-model` (`limit` 1 to 196608, `expectedRevision`, `expectedModelRevision`). `api-description` reports `available: false` without bytes when there is no executable model; `ui-contract` stays available with `modelRevision: null`.
34
+
35
+ ### Screens in the export
36
+
37
+ Requires Screenplay 6.8.0 or later (`screenplay --version`). Screens are deferred from the executable model by default (`PLAY0269`, information) and an export keeps its version and bytes. `screenplay export --screens` (ESM format only; with another format it is rejected) admits them as ESM v42 (language and semantic `42.0`, `schemaVersion: 42`); a screen that places an extension component makes it ESM v52 and lists the extensions needed. MCP `read-workspace` with `view: "executable-model"` and `screens: true` does the same (pass it on every page so `modelRevision` stays pinned).
38
+
39
+ Each slice then carries an optional final `screens` member: `id`, `name`, `title`, optional `description`, ordered `data` (query identity, optional `by`, shown `fields`), `actions` (command identity, `label`, `subject`, every command input as a property identity with optional `from`, optional `when`, optional `then` screen), `navigation` (target screen, `trigger`, optional `by`, `opens`) and a `layout` of `fits` and nested `regions`. Refresh, state, notifications and dialogs are not carried.
40
+
41
+ A reference the executable model does not hold refuses admission: CLI exit 1 with the reasons on stderr, MCP `ScreensRefused`. A model without an executable model has nothing to admit. In .NET, `ExecutableScreens.Admit(workspace)` admits them and `UiContractBuilder.For(ExecutableSemanticModel)` in `Cratis.Screenplay.Ui` reads them.
42
+
43
+ ## Compare two model versions
44
+
45
+ `screenplay diff <before> <after> [--format text|json]` over `.play` files or folders. It reports added, removed, renamed and moved elements, member changes, event-contract changes (marked `[contract-breaking]`), enumeration changes, specification-outcome changes, and identity changes with their direct dependants.
46
+
47
+ - Elements match by persisted identity when both folders hold `.screenplay/identities.json` for the same application; otherwise by address. The report says which.
48
+ - `--format json` carries `before` and `after` (path, source revision, persisted identities used, model revision) and a `difference` object.
49
+ - Exit 0 compared; exit 2 could not run (including identities of two different applications).
50
+ - `--format json` also carries `difference.slices`, the per-slice change summary: `slices` (each with `change`, `changes`, `beforeAddress`, `afterAddress`, `semanticId`, `declarations`, `dependentSlices`; change kinds `added`, `removed`, `renamed`, `moved`, `changed`), `modelWide` (changed declarations no slice owns: modules, features, concepts, types, policies, personas) and `affectedSlices` (unchanged slices that directly reference a changed slice or a model-wide declaration). Renames and moves appear only under identity matching; address matching reports one removed and one added slice. Dependencies are direct, not transitive: rebuild everything when `modelWide` is not empty.
51
+ - To compare two commits, `git worktree add` each into its own folder and diff the folders.
52
+
53
+ ## Rename
54
+
55
+ `screenplay rename <address> <new-name> [<folder>] [--kind <Command|EventContract|ReadModel|...>]` is the scriptable form of MCP `propose-rename` plus `apply`: it repairs references across files, keeps the element's semantic identity, pins a renamed event's stored type name with `id`, and writes (creating on the first rename) `.screenplay/identities.json`. Exit 0 renamed, 1 refused, 2 could not run.
56
+
57
+ ## Trace a value's lineage
58
+
59
+ Requires Screenplay 6.6.0 or later (`screenplay --version`) for command, event and screen-field addresses and the direction option.
60
+
61
+ `screenplay lineage <address> [PATH] [--direction upstream|downstream|both] [--format json]` prints the tree MCP `trace-lineage` pages, all at once: `->` is where the value goes, `<-` where it comes from, and a break (missing mapping, ambiguous name, code the trace cannot read) appears in brackets with its reason. `--format json` prints every hop. Exit 0 complete, 1 with breaks, 2 cannot run (for example the address names nothing).
62
+
63
+ ## Persisted identities
64
+
65
+ `test`, `export`, `diff` and `rename` open a folder with `.screenplay/identities.json` when one exists, so the CLI and the MCP server report the same persisted identities the MCP server uses.
66
+
67
+ - `export` and `diff` refuse a source that drifted from the identities (`IdentityReconciliationRequired`, `IdentityMappingConflict`). Restore the names, then rename through the CLI or MCP.
68
+ - `test` falls back to address-derived ids and never refuses; any printed semantic id is accepted by `--filter`. A single file, a folder without identities or a drifted folder use address ids.