@cratis/pi 7.65.0 → 7.66.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.
@@ -171,9 +171,9 @@
171
171
  }
172
172
  ],
173
173
  "synced": {
174
- "version": "4.199.0",
174
+ "version": "4.201.0",
175
175
  "date": "2026-10-16",
176
- "by": "Cratis/AI#735"
176
+ "by": "Cratis/AI#733"
177
177
  },
178
178
  "covers": {
179
179
  "skills": [
@@ -201,7 +201,7 @@
201
201
  ],
202
202
  "rules": []
203
203
  },
204
- "notes": "Standalone 4.199.0 and byte-identical compiler contract pinned. Cratis/AI#735: chronological Date/DateTime ordering in command conditions and command/property literal validation (ESM v26), UTC tick precision and pre-rule offset validation; then matching remains ordinal. Source-checked Screenplay v4.199.0 commands, diagnostics, interoperability and specifications documentation plus decision 0087. Stage v4.127.1 still refuses v26 with STAGE-ESM-016 (stage-rendering.md and SemanticVersionFeatures.Supports); no render/runtime probe. Cratis/AI#576: prior mechanical compiler catch-up. Language batch #717/#722/#723/#724/#720/#728/#734 teaches atomic reaction batches (v22), described payload handlers (v23), portable linear matching, ordinal text rules (v24), protected command reads (v25), diagnostic arguments and event-source invokes mappings. Facts read at Screenplay v4.198.0 and introducing tags; Stage v4.127.0 admits exact v1-v21 and v23-v25 pairs but refuses v22/v26 and mixed pairs (STAGE-ESM-016), protected reads (044), atomic mode (043) and described handlers (STAGE-IMPL-002), even Stub mode. Stage text rules execute/render; no new renderer/runtime probe or Stage pin uplift. Cratis/AI#706: application navigation regions (module inherit, extend or override), toolbar slice buttons, blueprint template references and sample data packs in cratis-screenplay-ui-composition (references/application-shell.md), with the canonical shell vector and the rejection codes PLAY0710-PLAY0722 and PLAY0740-PLAY0765. Examples moved to the executable-state rules since 4.164: translator reactions in an Automation slice beside the Translate slice (PLAY0694) and the first record of a capture key appended with `when added`. Earlier: Standalone 4.164.0 and byte-identical compiler contract pinned. Cratis/AI#663: one origin per capture (PLAY0687). #668: executable no-event/redelivery v17. #684: concept query-argument validation in every version and query-error assertions v18. #681: executable refusal branches and refusal values v19. #666: proposal summary/severity counts and exact structural source proposals. Generated-concept rules select v20 with PLAY0688/0689 proofs and derived-matches repair; generated secrets and preview strategies remain refused. Release-baseline from-esm admission reads storedName. Standalone binding is not renderer admission: Stage 4.103.0 admits v1-v17 and v19; CLI 3.62.0 bundles Screenplay 4.159.0 / Stage 4.99.0 and renders through v16. Prior evidence remains unless superseded; no new renderer, Docker or browser probe."
204
+ "notes": "Standalone 4.201.0 and byte-identical compiler contract pinned. Cratis/AI#733: the ui profile root template, shell options, appearance and new screens default (PLAY0788-PLAY0799, quick fix for the legacy layout line, ui-profiles MCP tool, 44 tools). Cratis/AI#735: chronological Date/DateTime ordering in command conditions and command/property literal validation (ESM v26), UTC tick precision and pre-rule offset validation; then matching remains ordinal. Source-checked Screenplay v4.199.0 commands, diagnostics, interoperability and specifications documentation plus decision 0087. Stage v4.127.1 still refuses v26 with STAGE-ESM-016 (stage-rendering.md and SemanticVersionFeatures.Supports); no render/runtime probe. Cratis/AI#576: prior mechanical compiler catch-up. Language batch #717/#722/#723/#724/#720/#728/#734 teaches atomic reaction batches (v22), described payload handlers (v23), portable linear matching, ordinal text rules (v24), protected command reads (v25), diagnostic arguments and event-source invokes mappings. Facts read at Screenplay v4.198.0 and introducing tags; Stage v4.127.0 admits exact v1-v21 and v23-v25 pairs but refuses v22/v26 and mixed pairs (STAGE-ESM-016), protected reads (044), atomic mode (043) and described handlers (STAGE-IMPL-002), even Stub mode. Stage text rules execute/render; no new renderer/runtime probe or Stage pin uplift. Cratis/AI#706: application navigation regions (module inherit, extend or override), toolbar slice buttons, blueprint template references and sample data packs in cratis-screenplay-ui-composition (references/application-shell.md), with the canonical shell vector and the rejection codes PLAY0710-PLAY0722 and PLAY0740-PLAY0765. Examples moved to the executable-state rules since 4.164: translator reactions in an Automation slice beside the Translate slice (PLAY0694) and the first record of a capture key appended with `when added`. Earlier: Standalone 4.164.0 and byte-identical compiler contract pinned. Cratis/AI#663: one origin per capture (PLAY0687). #668: executable no-event/redelivery v17. #684: concept query-argument validation in every version and query-error assertions v18. #681: executable refusal branches and refusal values v19. #666: proposal summary/severity counts and exact structural source proposals. Generated-concept rules select v20 with PLAY0688/0689 proofs and derived-matches repair; generated secrets and preview strategies remain refused. Release-baseline from-esm admission reads storedName. Standalone binding is not renderer admission: Stage 4.103.0 admits v1-v17 and v19; CLI 3.62.0 bundles Screenplay 4.159.0 / Stage 4.99.0 and renders through v16. Prior evidence remains unless superseded; no new renderer, Docker or browser probe."
205
205
  },
206
206
  {
207
207
  "id": "scene",
@@ -25,7 +25,7 @@
25
25
  - Formatting and recovery limits
26
26
  - Code attachments
27
27
 
28
- The standalone MCP server lists 43 tools (including the MCP-Apps visualization tool); `tools/list` is the authority for the installed server.
28
+ The standalone MCP server lists 44 tools (including the MCP-Apps visualization tool); `tools/list` is the authority for the installed server.
29
29
 
30
30
  The supported CLI launch is `cratis screenplay mcp <model-root>`, or `cratis screenplay mcp`
31
31
  alone inside a project, where the CLI locates the model (the project's `.play` files, else
@@ -51,7 +51,7 @@ the [MCP loop](mcp-loop.md).
51
51
  | --- | --- | --- |
52
52
  | Understanding | `describe-application`, `search-declarations`, `find-declaration`, `declaration-details` | Navigate logical hierarchy and inspect bounded details |
53
53
  | References and examples | `find-references`, `dependencies`, `dependency-graph`, `find-fixtures`, `find-assertion-gaps`, `find-specification-obligations`, `find-modeling-smells`, `semantic-diff` | Inspect declared relationships and authored examples, not executed coverage |
54
- | Source and validation | `diagnostics`, `read-document`, `merged-document`, `syntax-schema` | Read exact source or typed structure and diagnose problems |
54
+ | Source and validation | `diagnostics`, `ui-profiles`, `read-document`, `merged-document`, `syntax-schema` | Read exact source or typed structure and diagnose problems |
55
55
  | Workspace inspection | `open-workspace`, `read-workspace`, `read-ast`, `workspace-state`, `export-workspace`, `repair-capabilities` | Obtain current identities, handles, readiness, code attachment requirements, source-map locations, durable-state status and the repair catalog |
56
56
  | Visual (MCP-Apps hosts only) | `visualize-model` | Draw the board for the model or a `proposalId`; its `sketch` argument previews a what-if of whole documents. Reads only |
57
57
  | Planning | `propose-source`, `propose-ast`, `propose-rename`, `propose-move`, `propose-repair`, `propose-property`, `propose-number-enum-members`, `propose-extract-inline-event`, `propose`, `recommend-layout`, `expand-layout` | Produce validated, reviewable candidates without writing them |
@@ -170,6 +170,19 @@ open, read, propose, review, apply, reopen loop; the syntax and rules are in
170
170
  5. Switching a module from inherit to override copies the application's items; retarget each copy to the module's own
171
171
  features first or the proposal is refused.
172
172
 
173
+ ### The profile's shell
174
+
175
+ `ui-profiles` (Screenplay 4.201.0 or later) reads each `ui profile`'s root template, shell options, appearance, new screens default and
176
+ shell diagnostics, and lists the own templates that could be the root template (`applicableRootTemplates`) or the new screens
177
+ default (`applicableNewScreenTemplates`); pick from those instead of guessing. Edit `RootTemplateSyntax` (`name`, `blueprint`,
178
+ `version`), `ShellOptionSyntax` (`add` to the root's `options`; `syntaxKind` is `Word`, `Text`, `Number` or `Flag`),
179
+ `ProfileAppearanceSyntax` (`colorScheme`, `accent`) and `NewScreenTemplateSyntax` with `propose-ast`. A refusal is the answer:
180
+ `PLAY0790` (a template nothing declares), `PLAY0792` (a blueprint the profile does not list), `PLAY0794` (a template that cannot
181
+ be the shell), `PLAY0795` (no `content` slot), `PLAY0797` (a bad color scheme or accent), `PLAY0799` (a new screens default that
182
+ cannot start a screen). `PLAY0796` (an option the shell does not expose) and `PLAY0791` (the legacy `layout` line) are warnings:
183
+ the proposal is accepted and `ui-profiles` shows them. Replay against the `ui-profile-root-positive` vector and its rejection
184
+ vectors (`ui-profile-root-unknown`, `ui-profile-root-not-a-shell`, `ui-profile-root-invalid`) in `Cratis.Screenplay.CanonicalCorpus`.
185
+
173
186
  Requires Screenplay 4.188.0 or later (`screenplay --version`) to `add` the first region, button or sub-item to a member
174
187
  the node JSON omits while empty; an older MCP server answers "Unknown typed syntax member".
175
188
 
@@ -49,6 +49,13 @@ a separate `case` names an expansion. Argument order is immaterial.
49
49
  | PLAY0524 | `specification` (declaration), `step` (keyword), `stepIndex` (index), `property`, `type`, `example?`, `case?`, `parameter?` |
50
50
  | PLAY0525, PLAY0526 | `example` |
51
51
  | PLAY0583 | `case?`, `parameter?`, `type?`, `text?` |
52
+ | PLAY0790, PLAY0794, PLAY0799 | `profile`, `template`, `blueprint?` |
53
+ | PLAY0791 | `profile`, `template` (the layout name) |
54
+ | PLAY0792 | `profile`, `template`, `blueprint` |
55
+ | PLAY0793 | `profile`, `template`, `blueprint`, `version` |
56
+ | PLAY0795 | `profile`, `template`, `blueprint?`, `outlet` |
57
+ | PLAY0796 | `profile`, `template`, `blueprint?`, `option` |
58
+ | PLAY0797 | `profile`, `value` |
52
59
 
53
60
  For PLAY0524, `step` is given, given readmodel, when, when append or then.
54
61
  `stepIndex` counts every authored given/when/then clause once across all forms,
@@ -11,6 +11,7 @@
11
11
  - Caller identity, compliance and routes
12
12
  - Specification metadata, callers, cases and locators
13
13
  - Guarded interaction diagnostics
14
+ - UI profile shell: root template, options, appearance
14
15
  - Structural completeness and timeline checks
15
16
  - Editor versus C# verdicts
16
17
  - Consistency errors (V1: the model contradicts itself)
@@ -248,6 +249,26 @@ comment loss and do not support pinned evidence. TypeScript diagnoses but does
248
249
  not offer these repairs. Preview through MCP `propose-repair`, never text-patch
249
250
  around a refusal. Condition/subject errors also use guarded-action PLAY0341–0348.
250
251
 
252
+ ## UI profile shell: root template, options, appearance
253
+
254
+ Requires Screenplay 4.200.0 or later (`screenplay --version`); 4.197.0 reads the syntax without the checks. The fix for each is in
255
+ `../../cratis-screenplay-ui-composition/references/ui-profile-and-theme.md`.
256
+
257
+ | Code | Severity | Meaning / fix |
258
+ | --- | --- | --- |
259
+ | PLAY0788 | E | A `root template` / `new screens use template` line is malformed, or pins a version on an own template. |
260
+ | PLAY0789 | E | A malformed or repeated `appearance` line, or a second `appearance` block. |
261
+ | PLAY0790 | E | The template is not declared (or the blueprint does not ship it). Declare it or take it from a blueprint. |
262
+ | PLAY0791 | W | The profile selects its shell with the legacy `layout <Name>`. Write `root template <Name>`; the quick fix rewrites it (or removes the ignored line beside a `root template`). |
263
+ | PLAY0792 | E | The blueprint is not in the profile's `packages` (or not installed). |
264
+ | PLAY0793 | W | The pinned `version` range is not satisfied by the installed blueprint (catalog hosts only). |
265
+ | PLAY0794 | E | The root template cannot be the shell (not a layout or application-scope template, fits a slot, `scopes` without `application`). |
266
+ | PLAY0795 | E | The root template has no `content` slot. |
267
+ | PLAY0796 | W | An `option` the shell does not expose. |
268
+ | PLAY0797 | E | Color scheme is not `light`, `dark` or `system`, or the accent is not a hex colour. |
269
+ | PLAY0798 | E | More than one `root template` in a profile. |
270
+ | PLAY0799 | E | `new screens use template` cannot start a screen in a feature. |
271
+
251
272
  ## Structural completeness and timeline checks
252
273
 
253
274
  Opt in with `--check <names>` or MCP diagnostics `checks`, then treat warnings
@@ -5,7 +5,7 @@
5
5
 
6
6
  Use these forms when writing or reviewing `.play`. Acceptance of an older
7
7
  spelling is not a recommendation to teach it. Information diagnostics do not
8
- fail `--warnaserror`; the corpus verification gate rejects the eleven style codes
8
+ fail `--warnaserror`; the corpus verification gate rejects the twelve style codes
9
9
  below even when a fence declares `expect`, unless an exact, reasoned migration
10
10
  exception exists in the verifier's preferred-syntax allowlist. That allowlist also
11
11
  covers deliberate legacy explanations in prose; stale entries fail.
@@ -24,6 +24,7 @@ covers deliberate legacy explanations in prose; stale entries fail.
24
24
  | Interaction guard | Block-form `when` alternatives | Opaque interaction `where` on click, double click or select | PLAY0564 (warning or information) |
25
25
  | Projection transition cardinality | Source binding emits `One` | Constructed/deserialized ESM v1–v3 `ZeroOrOne` / `Many` | PLAY0445 (warning; ESM-only, not a source spelling) |
26
26
  | Command decision reads | `command reads protected` after reviewing every read's admission, absence and conflict semantics | Eligible legacy command reads without the application-root preamble | PLAY0786 (information; individual typed repair review, never fix-all) |
27
+ | Profile shell | `root template <Name>` in a `ui profile` | `layout <Name>` in a `ui profile` | PLAY0791 (warning; quick fix) |
27
28
  | Literal text rules | `starts with`, `ends with`, `contains`, `not contains` or equality, preserving message and severity | Exact deprecated Studio `matches` shapes | PLAY0787 (warning; not arbitrary regex rewriting) |
28
29
 
29
30
  `query Q => observable?` is not a legacy optional type suffix and has no keyword
@@ -79,6 +79,7 @@
79
79
  "count",
80
80
  "criminal",
81
81
  "csharp",
82
+ "dark",
82
83
  "data",
83
84
  "day",
84
85
  "days",
@@ -184,6 +185,7 @@
184
185
  "legalObligation",
185
186
  "legitimateInterests",
186
187
  "length",
188
+ "light",
187
189
  "literal",
188
190
  "load",
189
191
  "locale",
@@ -26070,6 +26072,10 @@
26070
26072
  "minimumSemanticVersion": "1.0",
26071
26073
  "diagnostic": "PLAY0269",
26072
26074
  "diagnostics": [
26075
+ {
26076
+ "code": "PLAY0791",
26077
+ "severity": "warning"
26078
+ },
26073
26079
  {
26074
26080
  "code": "PLAY0720",
26075
26081
  "severity": "warning"
@@ -34238,6 +34244,260 @@
34238
34244
  "reserved": false,
34239
34245
  "retired": false
34240
34246
  },
34247
+ {
34248
+ "code": "PLAY0790",
34249
+ "name": "UnknownRootTemplate",
34250
+ "severity": "error",
34251
+ "severities": [
34252
+ "error"
34253
+ ],
34254
+ "title": "A ui profile\u0027s root template, or its new screens use template default, names an own template the document does not declare.",
34255
+ "reserved": false,
34256
+ "retired": false,
34257
+ "arguments": [
34258
+ {
34259
+ "name": "profile",
34260
+ "kind": "text",
34261
+ "optional": false,
34262
+ "meaning": "The ui profile that names the template."
34263
+ },
34264
+ {
34265
+ "name": "template",
34266
+ "kind": "text",
34267
+ "optional": false,
34268
+ "meaning": "The template name that nothing declares, or the blueprint does not ship."
34269
+ },
34270
+ {
34271
+ "name": "blueprint",
34272
+ "kind": "text",
34273
+ "optional": true,
34274
+ "meaning": "The blueprint a template was expected from."
34275
+ }
34276
+ ]
34277
+ },
34278
+ {
34279
+ "code": "PLAY0791",
34280
+ "name": "LegacyProfileLayout",
34281
+ "severity": "warning",
34282
+ "severities": [
34283
+ "warning"
34284
+ ],
34285
+ "title": "A ui profile selects its shell with the legacy layout line instead of root template.",
34286
+ "reserved": false,
34287
+ "retired": false,
34288
+ "arguments": [
34289
+ {
34290
+ "name": "profile",
34291
+ "kind": "text",
34292
+ "optional": false,
34293
+ "meaning": "The ui profile that uses the legacy \u0060layout\u0060 line."
34294
+ },
34295
+ {
34296
+ "name": "template",
34297
+ "kind": "text",
34298
+ "optional": false,
34299
+ "meaning": "The layout name the line selects."
34300
+ }
34301
+ ]
34302
+ },
34303
+ {
34304
+ "code": "PLAY0792",
34305
+ "name": "UnknownRootBlueprint",
34306
+ "severity": "error",
34307
+ "severities": [
34308
+ "error"
34309
+ ],
34310
+ "title": "A ui profile\u0027s root template, or its new screens use template default, comes from a blueprint the profile does not list in its packages, or one the host\u0027s installed catalog does not contain.",
34311
+ "reserved": false,
34312
+ "retired": false,
34313
+ "arguments": [
34314
+ {
34315
+ "name": "profile",
34316
+ "kind": "text",
34317
+ "optional": false,
34318
+ "meaning": "The ui profile that names the blueprint."
34319
+ },
34320
+ {
34321
+ "name": "template",
34322
+ "kind": "text",
34323
+ "optional": false,
34324
+ "meaning": "The template that was taken from the blueprint."
34325
+ },
34326
+ {
34327
+ "name": "blueprint",
34328
+ "kind": "text",
34329
+ "optional": false,
34330
+ "meaning": "The blueprint the profile does not list or the host has not installed."
34331
+ }
34332
+ ]
34333
+ },
34334
+ {
34335
+ "code": "PLAY0793",
34336
+ "name": "RootTemplateVersionNotSatisfied",
34337
+ "severity": "warning",
34338
+ "severities": [
34339
+ "warning"
34340
+ ],
34341
+ "title": "A ui profile\u0027s root template pins a blueprint version range the installed blueprint does not satisfy.",
34342
+ "reserved": false,
34343
+ "retired": false,
34344
+ "arguments": [
34345
+ {
34346
+ "name": "profile",
34347
+ "kind": "text",
34348
+ "optional": false,
34349
+ "meaning": "The ui profile that names the root template."
34350
+ },
34351
+ {
34352
+ "name": "template",
34353
+ "kind": "text",
34354
+ "optional": false,
34355
+ "meaning": "The root template."
34356
+ },
34357
+ {
34358
+ "name": "blueprint",
34359
+ "kind": "text",
34360
+ "optional": false,
34361
+ "meaning": "The blueprint whose installed version does not satisfy the pin."
34362
+ },
34363
+ {
34364
+ "name": "version",
34365
+ "kind": "text",
34366
+ "optional": false,
34367
+ "meaning": "The version range that is pinned, or the default \u0060^\u0060 pin of the installed version."
34368
+ }
34369
+ ]
34370
+ },
34371
+ {
34372
+ "code": "PLAY0794",
34373
+ "name": "RootTemplateNotApplicable",
34374
+ "severity": "error",
34375
+ "severities": [
34376
+ "error"
34377
+ ],
34378
+ "title": "A ui profile\u0027s root template cannot be the application\u0027s shell: it is not a layout or an application-scope root screen template.",
34379
+ "reserved": false,
34380
+ "retired": false,
34381
+ "arguments": [
34382
+ {
34383
+ "name": "profile",
34384
+ "kind": "text",
34385
+ "optional": false,
34386
+ "meaning": "The ui profile that names the root template."
34387
+ },
34388
+ {
34389
+ "name": "template",
34390
+ "kind": "text",
34391
+ "optional": false,
34392
+ "meaning": "The template that cannot be the application\u0027s shell."
34393
+ },
34394
+ {
34395
+ "name": "blueprint",
34396
+ "kind": "text",
34397
+ "optional": true,
34398
+ "meaning": "The blueprint the template comes from."
34399
+ }
34400
+ ]
34401
+ },
34402
+ {
34403
+ "code": "PLAY0795",
34404
+ "name": "RootTemplateWithoutContentOutlet",
34405
+ "severity": "error",
34406
+ "severities": [
34407
+ "error"
34408
+ ],
34409
+ "title": "A ui profile\u0027s root template has no outlet for the screens\u0027 content.",
34410
+ "reserved": false,
34411
+ "retired": false,
34412
+ "arguments": [
34413
+ {
34414
+ "name": "profile",
34415
+ "kind": "text",
34416
+ "optional": false,
34417
+ "meaning": "The ui profile that names the root template."
34418
+ },
34419
+ {
34420
+ "name": "template",
34421
+ "kind": "text",
34422
+ "optional": false,
34423
+ "meaning": "The root template that has no content outlet."
34424
+ },
34425
+ {
34426
+ "name": "blueprint",
34427
+ "kind": "text",
34428
+ "optional": true,
34429
+ "meaning": "The blueprint the template comes from."
34430
+ },
34431
+ {
34432
+ "name": "outlet",
34433
+ "kind": "text",
34434
+ "optional": false,
34435
+ "meaning": "The outlet the screens\u0027 content is placed in."
34436
+ }
34437
+ ]
34438
+ },
34439
+ {
34440
+ "code": "PLAY0796",
34441
+ "name": "UnknownShellOption",
34442
+ "severity": "warning",
34443
+ "severities": [
34444
+ "warning"
34445
+ ],
34446
+ "title": "A ui profile sets a shell option the root template does not expose.",
34447
+ "reserved": false,
34448
+ "retired": false,
34449
+ "arguments": [
34450
+ {
34451
+ "name": "profile",
34452
+ "kind": "text",
34453
+ "optional": false,
34454
+ "meaning": "The ui profile that sets the option."
34455
+ },
34456
+ {
34457
+ "name": "template",
34458
+ "kind": "text",
34459
+ "optional": false,
34460
+ "meaning": "The root template that does not expose the option."
34461
+ },
34462
+ {
34463
+ "name": "blueprint",
34464
+ "kind": "text",
34465
+ "optional": true,
34466
+ "meaning": "The blueprint the template comes from."
34467
+ },
34468
+ {
34469
+ "name": "option",
34470
+ "kind": "text",
34471
+ "optional": false,
34472
+ "meaning": "The option name."
34473
+ }
34474
+ ]
34475
+ },
34476
+ {
34477
+ "code": "PLAY0797",
34478
+ "name": "InvalidAppearanceValue",
34479
+ "severity": "error",
34480
+ "severities": [
34481
+ "error"
34482
+ ],
34483
+ "title": "A ui profile appearance block has a color scheme that is not light, dark or system, or an accent that is not a hex colour.",
34484
+ "reserved": false,
34485
+ "retired": false,
34486
+ "arguments": [
34487
+ {
34488
+ "name": "profile",
34489
+ "kind": "text",
34490
+ "optional": false,
34491
+ "meaning": "The ui profile whose appearance is invalid."
34492
+ },
34493
+ {
34494
+ "name": "value",
34495
+ "kind": "text",
34496
+ "optional": false,
34497
+ "meaning": "The color scheme or accent as authored."
34498
+ }
34499
+ ]
34500
+ },
34241
34501
  {
34242
34502
  "code": "PLAY0798",
34243
34503
  "name": "DuplicateProfileRootTemplate",
@@ -34248,6 +34508,37 @@
34248
34508
  "title": "A ui profile declares more than one root template.",
34249
34509
  "reserved": false,
34250
34510
  "retired": false
34511
+ },
34512
+ {
34513
+ "code": "PLAY0799",
34514
+ "name": "NewScreenTemplateNotApplicable",
34515
+ "severity": "error",
34516
+ "severities": [
34517
+ "error"
34518
+ ],
34519
+ "title": "A ui profile\u0027s new screens use template default names a template that cannot start a screen in a feature.",
34520
+ "reserved": false,
34521
+ "retired": false,
34522
+ "arguments": [
34523
+ {
34524
+ "name": "profile",
34525
+ "kind": "text",
34526
+ "optional": false,
34527
+ "meaning": "The ui profile that names the template."
34528
+ },
34529
+ {
34530
+ "name": "template",
34531
+ "kind": "text",
34532
+ "optional": false,
34533
+ "meaning": "The template that cannot start a screen in a feature."
34534
+ },
34535
+ {
34536
+ "name": "blueprint",
34537
+ "kind": "text",
34538
+ "optional": true,
34539
+ "meaning": "The blueprint the template comes from."
34540
+ }
34541
+ ]
34251
34542
  }
34252
34543
  ],
34253
34544
  "mcpTools": [
@@ -40019,6 +40310,23 @@
40019
40310
  "additionalProperties": false
40020
40311
  }
40021
40312
  },
40313
+ {
40314
+ "name": "ui-profiles",
40315
+ "requiredParameters": [],
40316
+ "optionalParameters": [
40317
+ "name"
40318
+ ],
40319
+ "inputSchema": {
40320
+ "type": "object",
40321
+ "properties": {
40322
+ "name": {
40323
+ "type": "string"
40324
+ }
40325
+ },
40326
+ "required": [],
40327
+ "additionalProperties": false
40328
+ }
40329
+ },
40022
40330
  {
40023
40331
  "name": "visualize-model",
40024
40332
  "requiredParameters": [],
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cratis-screenplay-ui-composition
3
- description: Compose the user interface of a Cratis Screenplay `.play` model — `layout` and responsive `arrangement`, screen/dialog templates, component data-context bindings, exposed template configuration, command forms and columns, navigation contributions, application navigation regions (topbar/sidebar, module inherit/extend/override), toolbar slice buttons, blueprint template references, sample data packs, hierarchical outlets/routes, toolbar dialogs, package/icon selection, interaction `behavior`/`on`/`uses` wiring, `ui profile`, `theme`, localized `$strings`, and `file` references. Use when declaring the application shell, reusable screen shapes, component/package configuration, command forms, navigation/toolbars, click or submit behavior, or theming. Do not use for a screen's own data and actions.
3
+ description: Compose the user interface of a Cratis Screenplay `.play` model — `layout` and responsive `arrangement`, screen/dialog templates, component data-context bindings, exposed template configuration, command forms and columns, navigation contributions, application navigation regions (topbar/sidebar, module inherit/extend/override), toolbar slice buttons, blueprint template references, sample data packs, hierarchical outlets/routes, toolbar dialogs, package/icon selection, interaction `behavior`/`on`/`uses` wiring, `ui profile` (root template, shell options, appearance, new screens default), `theme`, localized `$strings`, and `file` references. Use when declaring the application shell, reusable screen shapes, component/package configuration, command forms, navigation/toolbars, click or submit behavior, or theming. Do not use for a screen's own data and actions.
4
4
  license: MIT
5
5
  ---
6
6
 
@@ -81,7 +81,7 @@ Read `references/worked-flow.md` when a complete example is needed before compos
81
81
 
82
82
  ## `layout` — the application shell
83
83
 
84
- One per application, declared at the top level and selected by a `ui profile`.
84
+ One or more per application, declared at the top level; a `ui profile` selects the shell with `root template <Name>`.
85
85
  A complete example:
86
86
 
87
87
  ```screenplay
@@ -267,7 +267,7 @@ precedence, PLAY0485 and examples.
267
267
 
268
268
  ## `ui profile` and `theme`
269
269
 
270
- A `ui profile` selects the layout, theme and `packages`, listed in override-priority order (a later package shadows an earlier one); `target platform` and `target size` accept any identifier, so a typo is silent. Read [references/ui-profile-and-theme.md](references/ui-profile-and-theme.md) when writing a profile or theme.
270
+ A `ui profile` selects the application shell with `root template` (an own layout or application-scope screen template, or `blueprint <B> <Name>` with an optional `version` pin), its shell `option` lines, an `appearance` block (`color scheme`, `accent`), the template new screens start from (`new screens use template`), the theme and the `packages`, listed in override-priority order (a later package shadows an earlier one); `target platform` and `target size` accept any identifier, so a typo is silent. The legacy `layout <Name>` line inside a profile still reads but warns `PLAY0791`: write `root template`. `PLAY0790` to `PLAY0799` check the shell. Read [references/ui-profile-and-theme.md](references/ui-profile-and-theme.md) when writing a profile or theme, or fixing a shell diagnostic.
271
271
 
272
272
  ## Localized strings
273
273
 
@@ -288,6 +288,7 @@ Localized text lives in companion `.strings` files and is referenced unquoted as
288
288
  - [ ] Every slot a `contribute` targets is declared `contributes <Point>` somewhere
289
289
  that encloses it.
290
290
  - [ ] No `dialog template` declares `fits slot`.
291
+ - [ ] Each `ui profile` names its shell with `root template`, not the legacy `layout` line (`PLAY0791`); a blueprint shell is listed under `packages` and its `version` pin is deliberate.
291
292
  - [ ] `packages` are ordered deliberately — later shadows earlier.
292
293
  - [ ] Every theme a profile selects is `compatible with` one of its packages.
293
294
  - [ ] `target platform` and `target size` values are spelled correctly; nothing
@@ -41,7 +41,7 @@ layout AppShell
41
41
 
42
42
  ui profile Desktop
43
43
  target platform web
44
- layout AppShell
44
+ root template AppShell
45
45
 
46
46
  packages
47
47
  core
@@ -200,7 +200,7 @@ field.
200
200
  ```screenplay excerpt
201
201
  ui profile Desktop
202
202
  target platform web
203
- layout AppShell
203
+ root template AppShell
204
204
  packages
205
205
  Product.DesignSystem
206
206
  Cratis.Components
@@ -1,6 +1,124 @@
1
1
  # UI profile and theme
2
2
 
3
- This reference holds the `ui profile` and `theme` excerpt and its rules for platforms, sizes, package order and theme compatibility.
3
+ ## Contents
4
+
5
+ - The shell: `root template`
6
+ - `ui profile` and `theme`
7
+ - Reading and editing the shell
8
+
9
+ This reference holds the `ui profile` and `theme` excerpts and their rules: the root template that names the application shell, shell options, appearance, the new screens default, platforms, sizes, package order and theme compatibility. Requires Screenplay 4.200.0 or later (`screenplay --version`) for the diagnostics `PLAY0790` to `PLAY0799`; 4.197.0 reads the syntax.
10
+
11
+ ## The shell: `root template`
12
+
13
+ A `ui profile` names the template the whole application is drawn in with `root template`. Every screen's template chain is placed in the
14
+ shell's primary outlet (`content`). The reference is the one a `template` assignment uses: an own `layout` or application-scope
15
+ screen template by name, or a template a blueprint ships, `blueprint <Blueprint> <Name>`, with an optional `version "<range>"` pin.
16
+ `ui profile` is the only place that selects the shell; a screen never names it.
17
+
18
+ ```screenplay
19
+ layout AppShell
20
+ category application
21
+ topbar
22
+ side
23
+ content
24
+
25
+ exposure for AppShell
26
+ property topbar.showFooter label "Footer"
27
+
28
+ module Workspaces
29
+ screen template Sheet
30
+ category Page
31
+ scopes feature
32
+ content
33
+
34
+ ui profile Desktop
35
+ target platform web
36
+ target size regular
37
+ theme Nordic
38
+
39
+ root template AppShell
40
+ option showFooter true
41
+
42
+ appearance
43
+ color scheme dark
44
+ accent "#4F46E5"
45
+
46
+ new screens use template Sheet
47
+
48
+ packages
49
+ Cratis.Components
50
+
51
+ theme Nordic
52
+ compatible with Cratis.Components
53
+ ```
54
+
55
+ A shell from a blueprint lists the blueprint under `packages` (the blueprint's name is a package) and may pin a version:
56
+
57
+ ```screenplay
58
+ ui profile Web
59
+ packages
60
+ Cratis.Blueprint.Default
61
+
62
+ root template blueprint Cratis.Blueprint.Default AppShell version "^4.5"
63
+ new screens use template blueprint Cratis.Blueprint.Default Detail
64
+ ```
65
+
66
+ - `root template`: at most one per profile. The shell is a `layout`, or a screen template that declares `scopes application` and fits no slot. It
67
+ needs a `content` slot, or no screen has a place in it.
68
+ - `option <name> <value>`: a configurable item the shell exposes (an own shell exposes the properties of its `exposure for <Shell>`).
69
+ The value is a bare word, a quoted string, a number, `true` or `false`. Set each name once.
70
+ - `appearance`: `color scheme` is `light`, `dark` or `system`; `accent` is a quoted `#RGB`, `#RRGGBB` or `#RRGGBBAA`. One block per profile.
71
+ - `new screens use template`: the template a new screen starts from in a designer. It is an authoring default, it changes no existing
72
+ screen, and it has to be able to start a screen in a feature (not a layout or an application-scope root; a `scopes` list that leaves
73
+ out `feature` is refused).
74
+ - A version range only applies to a blueprint template; `*`, an exact version or a `^`, `~`, `>=`, `>`, `<=` or `<` range.
75
+
76
+ ### Errors and fixes
77
+
78
+ | Code | Severity | Cause | Fix |
79
+ | --- | --- | --- | --- |
80
+ | `PLAY0788` | Error | A `root template` or `new screens use template` line is malformed, or it pins a version on an own template | Write `[blueprint <B>] <Name> [version "<range>"]`; drop the version on an own template |
81
+ | `PLAY0789` | Error | A malformed `appearance` line, a repeated line, or two `appearance` blocks | `color scheme <word>` / `accent "<colour>"`, each once, one block |
82
+ | `PLAY0790` | Error | The template is not declared in the document (or the blueprint does not ship it) | Declare `layout <Name>` or `screen template <Name>`, or take it from a blueprint |
83
+ | `PLAY0791` | Warning | The profile still selects its shell with the legacy `layout <Name>` line | Write `root template <Name>`; remove the `layout` line when a `root template` is present (the quick fix does either) |
84
+ | `PLAY0792` | Error | The blueprint is not listed in the profile's `packages` (or not installed) | Add it under `packages` |
85
+ | `PLAY0793` | Warning | The pinned `version` range is not satisfied by the installed blueprint | Move the pin or update the blueprint |
86
+ | `PLAY0794` | Error | The root template cannot be the shell: a dialog or ordinary screen template, a slot-fitting template, `scopes` without `application` | Choose a layout or an application-scope template |
87
+ | `PLAY0795` | Error | The root template has no `content` slot | Add the line `content` to it |
88
+ | `PLAY0796` | Warning | An `option` the shell does not expose | Use a name the shell exposes, or add the property to its `exposure` |
89
+ | `PLAY0797` | Error | An invalid color scheme or accent | `light`, `dark` or `system`; a quoted hex colour |
90
+ | `PLAY0798` | Error | More than one `root template` in one profile | Keep one |
91
+ | `PLAY0799` | Error | The `new screens use template` default cannot start a screen in a feature | Name a feature-scope screen template |
92
+
93
+ What a blueprint ships is only known where the blueprint is installed, so its checks (`PLAY0790` for a template it lacks, `PLAY0793`,
94
+ the options and outlets of its templates) come from the host that has the catalog (Stage, the `cratis` CLI, the MCP server); the compiler
95
+ decides everything the document alone decides.
96
+
97
+ ### Negative example: the legacy `layout` line
98
+
99
+ `layout <Name>` inside a profile still reads, but it is the old way to name the shell. Do not write it in a new model:
100
+
101
+ ```screenplay excerpt
102
+ layout AppShell
103
+ category application
104
+ topbar
105
+ content
106
+
107
+ ui profile Desktop
108
+ layout AppShell
109
+ ```
110
+
111
+ The canonical form is `root template AppShell`:
112
+
113
+ ```screenplay
114
+ layout AppShell
115
+ category application
116
+ topbar
117
+ content
118
+
119
+ ui profile Desktop
120
+ root template AppShell
121
+ ```
4
122
 
5
123
  ## `ui profile` and `theme`
6
124
 
@@ -10,7 +128,7 @@ Excerpt: `AppShell` is the layout above.
10
128
  ui profile Desktop
11
129
  target platform web
12
130
  target size regular
13
- layout AppShell
131
+ root template AppShell
14
132
  theme Nordic
15
133
  packages
16
134
  Cratis.Components
@@ -32,3 +150,7 @@ theme Nordic
32
150
  - `compatible with` lists the packages a theme actually supports, each at most
33
151
  once. A profile selecting a theme not declared compatible with one of its own
34
152
  packages gets a compile-time **warning**.
153
+
154
+ ## Reading and editing the shell
155
+
156
+ `ui-profiles` (MCP, Screenplay 4.201.0 or later) returns every profile's root template, options, appearance and new screens default with the shell diagnostics, and the own templates that could be the root template or the new screens default. Edit with `propose-ast` on `RootTemplateSyntax`, `ShellOptionSyntax` (`syntaxKind` is the value's kind), `ProfileAppearanceSyntax` and `NewScreenTemplateSyntax`; an invalid reference is refused with its code.
@@ -146,6 +146,31 @@
146
146
  "kind": "skill-contains",
147
147
  "value": "references/application-shell.md"
148
148
  },
149
+ {
150
+ "kind": "skill-contains",
151
+ "value": "`ui profile` is the only place that selects the shell",
152
+ "file": "references/ui-profile-and-theme.md"
153
+ },
154
+ {
155
+ "kind": "skill-contains",
156
+ "value": "| `PLAY0791` | Warning |",
157
+ "file": "references/ui-profile-and-theme.md"
158
+ },
159
+ {
160
+ "kind": "skill-contains",
161
+ "value": "| `PLAY0799` | Error |",
162
+ "file": "references/ui-profile-and-theme.md"
163
+ },
164
+ {
165
+ "kind": "skill-contains",
166
+ "value": "`layout <Name>` inside a profile still reads",
167
+ "file": "references/ui-profile-and-theme.md"
168
+ },
169
+ {
170
+ "kind": "skill-contains",
171
+ "value": "`root template` (an own layout or application-scope screen template",
172
+ "file": "SKILL.md"
173
+ },
149
174
  {
150
175
  "kind": "skill-contains",
151
176
  "value": "A module's own items may only target that module",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/pi",
3
- "version": "7.65.0",
3
+ "version": "7.66.0",
4
4
  "description": "Configuration-aware Cratis AI integration for Pi",
5
5
  "type": "module",
6
6
  "files": [