@cratis/pi 7.65.0 → 7.67.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.
Files changed (51) hide show
  1. package/package/corpus/product-sync.json +3 -3
  2. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/realization-and-gap-fill.md +1 -1
  3. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/atomic-batches-and-source-mappings.md +1 -1
  4. package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +4 -3
  5. package/package/corpus/skills/cratis-screenplay-command-surface/references/date-comparisons.md +13 -2
  6. package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +2 -2
  7. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +2 -2
  8. package/package/corpus/skills/cratis-screenplay-model-authoring/references/screen-authoring-workflow.md +13 -0
  9. package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +1 -1
  10. package/package/corpus/skills/cratis-screenplay-model-review/references/public-keys-and-routes.md +4 -2
  11. package/package/corpus/skills/cratis-screenplay-projections/SKILL.md +5 -0
  12. package/package/corpus/skills/cratis-screenplay-projections/references/pdl-grammar.md +42 -2
  13. package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +9 -7
  14. package/package/corpus/skills/cratis-screenplay-read-surface/references/equality-filters.md +1 -1
  15. package/package/corpus/skills/cratis-screenplay-read-surface/references/named-keys.md +168 -58
  16. package/package/corpus/skills/cratis-screenplay-read-surface/verification.json +2 -2
  17. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +1 -1
  18. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +1 -1
  19. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-examples.md +2 -2
  20. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +3 -3
  21. package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +2 -2
  22. package/package/corpus/skills/cratis-screenplay-slice-design/references/public-boundaries-and-keys.md +5 -3
  23. package/package/corpus/skills/cratis-screenplay-slice-design/references/read-model-design.md +3 -2
  24. package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +3 -2
  25. package/package/corpus/skills/cratis-screenplay-specifications/references/query-rejections.md +4 -0
  26. package/package/corpus/skills/cratis-screenplay-specifications/references/vocabulary.md +17 -0
  27. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +3 -1
  28. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/read-model-keys.md +46 -0
  29. package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +6 -5
  30. package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet.md +2 -2
  31. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostic-arguments.md +7 -0
  32. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +30 -6
  33. package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +31 -9
  34. package/package/corpus/skills/cratis-screenplay-toolchain/references/language-admission.md +15 -5
  35. package/package/corpus/skills/cratis-screenplay-toolchain/references/preferred-syntax.md +2 -1
  36. package/package/corpus/skills/cratis-screenplay-toolchain/references/production-routes-and-filters.md +1 -1
  37. package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +3 -3
  38. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +3241 -1287
  39. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
  40. package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +2 -2
  41. package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +1 -1
  42. package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +4 -3
  43. package/package/corpus/skills/cratis-screenplay-ui-composition/references/application-shell.md +1 -1
  44. package/package/corpus/skills/cratis-screenplay-ui-composition/references/screen-composition-contract.md +1 -1
  45. package/package/corpus/skills/cratis-screenplay-ui-composition/references/ui-profile-and-theme.md +124 -2
  46. package/package/corpus/skills/cratis-screenplay-ui-composition/verification.json +25 -0
  47. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +5 -4
  48. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +12 -7
  49. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/sandbox-and-specrunner.md +17 -0
  50. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +1 -1
  51. package/package.json +1 -1
@@ -13,7 +13,7 @@ Compiler syntax: `cheat-sheet.md`. Negative capability claims depend on the tool
13
13
  9. Authorization (module AND feature AND construct) runs before validation; unauthorized is `then denied`, never `then error`.
14
14
  10. Without a declared actor an invocation is caller-less. Declare reaction `runs as system role "<Role>"` (ESM v10), keep its gate, and reference-test the trusted path. Stage renders role and authenticated reaction identity; claim-reading or opaque system gates refuse STAGE-ESM-034. Arc gap-fill uses `[ExecuteCommandsAsSystem]` for returned commands, not a fictional `given caller`.
15
15
  11. A reaction `produces` without `for` lands on the trigger's event source; clock and application triggers need an explicit `for`.
16
- 12. Explicit trailing `key` marks replace inference (never `identifier`); multipart read-model keys remain PLAY0268. Without marks, single-instance queries in the owning slice must agree on `by xId XId`, where `xId` is a read-model property. Only with no such identifier and an admitted list query does `*Id` inference run (collection-key exclusions: read-surface `references/named-keys.md`); queryless views need explicit `key`. The identifier equals the projection's effective key (table in slice-design `references/read-model-design.md`; full rule, including Stage's narrower admission and `STAGE-ESM-017`, in `cratis-stage-rendering-and-sandbox` `references/admission.md`). Never mark a read-model property `identifier`. (Without explicit `key`, PLAY0268 when identity inference is ambiguous or absent; PLAY0351 when a `given`/`then` readmodel block omits that property.)
16
+ 12. Explicit trailing `key` marks replace inference (never `identifier`); several parts bind as v27 with an untyped projection `key` block per root `from` and `remove with`. Without marks, single-instance queries in the owning slice must agree on `by xId XId`, where `xId` is a read-model property. Only with no such identifier and an admitted list query does `*Id` inference run (collection-key exclusions: read-surface `references/named-keys.md`); queryless views need explicit `key`. The identifier equals the projection's effective key (table in slice-design `references/read-model-design.md`; full rule, including Stage's narrower admission and `STAGE-ESM-017`, in `cratis-stage-rendering-and-sandbox` `references/admission.md`). Never mark a read-model property `identifier`. (Without explicit `key`, PLAY0268 when identity inference is ambiguous or absent; PLAY0351 when a `given`/`then` readmodel block omits that property.)
17
17
  13. Projection `key` routes only on `from` (projection-level: PLAY0381). `all` is per event source. Joins never create instances and match the joined event's source id.
18
18
  14. AutoMap is on by default: same-named event properties fill read-model properties silently (scoped: case-insensitive, same type only; flat-bound: exact name, no type check, so a type mismatch invalidates the model). Use `no automap` for control.
19
19
  15. `given readmodel` bypasses the projection; prove a projection with `given` events + `when append`/command + `then readmodel`/`then query`.
@@ -40,7 +40,7 @@ Compiler syntax: `cheat-sheet.md`. Negative capability claims depend on the tool
40
40
 
41
41
  34. A `from <Event> key <property>` routes only if every such event carries that property: an event that frees or updates a row keyed by another stream's id must carry that id in its payload, or the row never changes. The compiler may not report a missing key property; check by hand.
42
42
  35. `description`/`documentation` are authoring metadata: board, MCP and Prologue show them; `cratis render` emits them only as XML doc comments (invalid XML characters are CLI-RENDER-005), never as behavior. A rule only in prose is unenforced in rendered code; make it a rule layer, a spec or a recorded target requirement.
43
- 36. One unadmitted construct (operations, `numbers exact`, composite view keys) blocks whole-model binding. Routing is admitted (v8), unlike composite view keys. Overrides replace the whole route, filters never match unrouted facts. Do not remove routing or authorization to render a model.
43
+ 36. One unadmitted construct (operations, `numbers exact`) blocks whole-model binding. Routing is admitted (v8), as are flat composite view keys (v27). Overrides replace the whole route, filters never match unrouted facts. Do not remove routing or authorization to render a model.
44
44
  37. Personas remain outside ESM bytes, but specifications accept `given caller as <Persona>`: one authenticated deterministic policy witness, not every matching caller. Inspect the chosen `or` branch; use explicit callers when synthesis is refused.
45
45
  38. A stored-state rule uses `reads <View>` and `require` with an indented message. Opt into `command reads protected` for eligible v25 views; absence rejects and matching decide/commit changes conflict. Legacy reads remain unprotected. The Cratis C# renderer refuses protected reads (STAGE-ESM-044), not the v25 pair; semantic Host/executor support is separate: hand-written Arc `[ProtectedDecision]` + `DecisionRead<T>` or Chronicle consistency enforcement needs separate target verification; use a constraint for uniqueness. Forbidden: caller-supplied copies of state in `require`, boolean attestation inputs (`confirmsX == true`), rules hidden in `handler`/implementation-hint prose. An unguarded materialized read is unsafe for a protected decision.
46
46
  Requires Arc 22.39.0 or later for `[ProtectedDecision]`.
@@ -12,7 +12,7 @@
12
12
  { "kind": "skill-contains", "value": "PLAY0666", "file": "references/diagnostics.md" },
13
13
  { "kind": "skill-contains", "value": "bind/reference-execute as v11", "file": "references/executable-subset.md" },
14
14
  { "kind": "skill-contains", "value": "A consumer admitting v10 must include all three", "file": "references/production-routes-and-filters.md" },
15
- { "kind": "skill-contains", "value": "Composite view keys remain authoring-only (PLAY0268)" },
15
+ { "kind": "skill-contains", "value": "Flat composite read-model keys select v27" },
16
16
  { "kind": "skill-contains", "value": "the **whole source, stream and stream id**", "file": "references/production-routes-and-filters.md" },
17
17
  { "kind": "play-compiles" },
18
18
  { "kind": "skill-contains", "value": "Requires Screenplay 4.144.0", "file": "references/verdicts.md" },
@@ -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",
@@ -74,8 +74,9 @@ printed), `1` is a missing input. Add `-o json` for the counts and the publicati
74
74
  Facts that surprise:
75
75
 
76
76
  - **Binding uses the CLI's bundled compiler**, not the standalone one. Version admission
77
- does not imply construct support: exact ESM v1–v21 and v23–v25 pairs are admitted,
78
- while v22/v26 and mixed pairs refuse `STAGE-ESM-016`. Pattern/random generation and checksum validation
77
+ does not imply construct support: exact ESM v1–v21 and v23–v26 pairs are admitted,
78
+ while v22/v27 and mixed pairs refuse `STAGE-ESM-016`. Date/DateTime command comparisons (v26)
79
+ execute in the semantic Host and executor but refuse `STAGE-ESM-046` in the renderer. Pattern/random generation and checksum validation
79
80
  render with an admitting renderer; `generate rule` still refuses `STAGE-ESM-028`.
80
81
  Read [references/admission.md](references/admission.md) for the introducing-release
81
82
  prerequisites, all-Proven unpinned specifications and construct/pin checks (-011/-038).
@@ -132,9 +133,9 @@ One blocker publishes nothing. Codes, limits and fixes: [references/admission.md
132
133
  The Cratis C# renderer refuses protected reads with `STAGE-ESM-044`, described handlers `STAGE-IMPL-002`
133
134
  (even Stub mode), and atomic mode in admitted pairs `STAGE-ESM-043`.
134
135
  - **Binding refusals (`PLAY0268`/`PLAY0271`):** legacy reads, `concurrency`, attached
135
- handlers, context/single-result filters, opaque scope/performer, composite `by`,
136
+ handlers, context/single-result filters, opaque scope/performer, a list-query `by` block,
136
137
  enum/identity compliance and subject lineage. Eligible protected reads bind v25;
137
- pending handlers with unconditional productions bind v23, but neither renders.
138
+ pending handlers with unconditional productions bind v23, but neither renders. A read model with several key parts (v27) refuses `STAGE-ESM-016`.
138
139
  Never drop protection.
139
140
 
140
141
  A refusal is not a licence to weaken the model: drop no specification, event generation or
@@ -11,8 +11,8 @@
11
11
  - Specification rules (`STAGE-ESM-011`)
12
12
  - Refusals seen while drafting a model
13
13
 
14
- Stage admits exact ESM v1–v21 and v23–v25 language/semantic pairs, then checks
15
- constructs. V22, v26 and mixed or unknown pairs report `STAGE-ESM-016`. The CLI's bundled renderer
14
+ Stage admits exact ESM v1–v21 and v23–v26 language/semantic pairs, then checks
15
+ constructs. V22, v27 and mixed or unknown pairs report `STAGE-ESM-016`. The CLI's bundled renderer
16
16
  may stop at v16 and refuse newer models with `CLI-RENDER-004`.
17
17
 
18
18
  Requires Stage 4.96.0 for v16, 4.101.0 for v17, 4.102.0 for v19, 4.106.0 for v18, and 4.103.0 for rendered redelivery; older renderers refuse the respective shapes.
@@ -34,9 +34,13 @@ Requires Stage 4.129.0 for semantic Host/executor protected reads; older engines
34
34
  Described handlers refuse STAGE-IMPL-002, even Stub mode; atomic mode in an
35
35
  admitted pair refuses STAGE-ESM-043. Version admission never implements a body,
36
36
  batch or rendered protected decision. Chronological Date/DateTime command comparisons
37
- select v26 in Screenplay but still refuse STAGE-ESM-016 here; standalone reference
38
- success is not rendering or Host/executor admission. Keep the date rule and use
39
- authorized gap-fill rather than downgrading to ordinal text or millisecond precision.
37
+ select v26. The semantic Host and specification executor run them; the renderer,
38
+ legacy engines and default sandbox engine refuse them with STAGE-ESM-046, naming the
39
+ property, and emit no artifacts. Standalone reference success is not rendering. Keep
40
+ the date rule and use authorized gap-fill rather than downgrading to ordinal text or
41
+ millisecond precision.
42
+
43
+ Requires Stage 4.135.0 for v26 admission; older Stage refuses v26 with STAGE-ESM-016.
40
44
 
41
45
  Binding with the CLI's bundled compiler is a separate
42
46
  prerequisite. The exhaustive construct table is `references/renderable-subset.md` in
@@ -135,13 +139,13 @@ Requires Stage 4.90.0 for snapshot/live lists, 4.96.0 for non-text secrets and 4
135
139
  | `STAGE-ESM-005` | Code validation or rule predicate bodies; or a command beyond the first capability (optional event property, event revision other than the first, validation or requirement that cannot be rendered, neither `produces` nor a response) | Use declarative validation; non-initial event generations are not rendered |
136
140
  | `STAGE-ESM-006` | `produces` that cannot render without changing its destination or mappings (expression/enum conditions, literal or computed mappings, `for` not a command identifier, mappings not one-to-one with event properties, duplicate tags) | Map properties one to one; supported conditional productions render as guarded events, not separate commands |
137
141
  | `STAGE-ESM-007`, `-008`, `-009` | Projection count per read model (exactly one projection or reducer each); unresolvable properties or no single read-model transition (**flat** projections only); affected instance not one, not keyed by an event property, or not the event-source identity (flat projections only) | One projection per read model; see "Projections" below |
138
- | `STAGE-ESM-010` | A query is neither an optional snapshot lookup by the read-model identifier nor a supported snapshot/observable collection query; each query is checked on its own. Both collection modes render. Concept-typed keys and filters retain Arc validation, including composite members and collection elements; nullable concept keys or optional concept filters with `not empty` cannot preserve null semantics | Keyed `XById => X optional` queries or snapshot/observable lists. Equality filters render on both collections; DateTime filters, required filters after optional ones and unsupported null-validation shapes refuse 010. Filter-name collisions refuse 012. Context/single-result filters, opaque scope/performer and composite `by` remain PLAY0268 |
142
+ | `STAGE-ESM-010` | A query is neither an optional snapshot lookup by the read-model identifier nor a supported snapshot/observable collection query; each query is checked on its own. Both collection modes render. Concept-typed keys and filters retain Arc validation, including composite members and collection elements; nullable concept keys or optional concept filters with `not empty` cannot preserve null semantics | Keyed `XById => X optional` queries or snapshot/observable lists. Equality filters render on both collections; DateTime filters, required filters after optional ones and unsupported null-validation shapes refuse 010. Filter-name collisions refuse 012. Context/single-result filters, opaque scope/performer and a list-query `by` block remain PLAY0268; a read model with several key parts (v27) refuses `STAGE-ESM-016` |
139
143
  | `STAGE-ESM-011` | A specification cannot render (see the rules below) | Reshape it only if the assertion keeps its meaning; otherwise keep the specification, record the gap, and gap-fill with the specification as the oracle. Never weaken or delete it to get a render |
140
144
  | `STAGE-ESM-012` | Generated C# names collide (properties, types, namespaces, constraints) | Rename |
141
145
  | `STAGE-ESM-013` | An event-context value other than `$context.occurred` mapped in `produces` | Map a command property when that preserves the meaning; otherwise gap-fill |
142
146
  | `STAGE-ESM-014` | A constraint Chronicle cannot reproduce (kind, scope, message; multi-claim in one command; optional or composite targets) | A different constraint is a requirement change for the model owner; otherwise gap-fill |
143
147
  | `STAGE-ESM-015` | Authorization Stage cannot render exactly: a role-claim URI, an opaque policy nested inside a condition, an unresolved or non-portable policy, no single identifier, an opaque-policy subject that is not text, Uuid, Date or DateTime (a restriction on opaque-policy subjects, separate from declarative claim targets), an unsupported claim artifact. Role-only, authenticated, opaque pure policies, claim conditions with Uuid, Date, DateTime or text targets (numeric and Boolean claim matches render as always false) and `not`/and/or render; roles are read through the identity's `RoleClaimType` | Reshape the policy to a portable condition; otherwise gap-fill |
144
- | `STAGE-ESM-016` | Model language/semantic pair is not admitted by the installed Stage; exact v1–v21 and v23–v25 pairs are admitted, v22/v26 and mixed pairs refused; older Stage also refuses the versions listed in the minimums above. A CLI bundle stopping at v16 reports `CLI-RENDER-004` above v16 first. v14 filters and v15 generation join v11 numbers, v12 enum numbers and v13 compliance as supported constructs, not blanket construct support | Not fixable by editing: the model needs a newer renderer. Keep the model, record the gap, gap-fill |
148
+ | `STAGE-ESM-016` | Model language/semantic pair is not admitted by the installed Stage; exact v1–v21 and v23–v26 pairs are admitted, v22/v27 and mixed pairs refused; older Stage also refuses the versions listed in the minimums above. A CLI bundle stopping at v16 reports `CLI-RENDER-004` above v16 first. v14 filters and v15 generation join v11 numbers, v12 enum numbers and v13 compliance as supported constructs, not blanket construct support | Not fixable by editing: the model needs a newer renderer. Keep the model, record the gap, gap-fill |
145
149
  | `STAGE-ESM-017` | Read model or projection cannot render (property names that collide with Chronicle paths or expression syntax, mappings that overwrite the key or child identity, composite keys, unsupported `all` mappings, the refused scope shapes below) | Reshape the projection without changing what it records, or record the gap |
146
150
  | `STAGE-ESM-018` | `$strings.` key missing in the default locale or containing formatting characters | Fix the strings |
147
151
  | `STAGE-ESM-019` | Reducer structure or body not admitted (outside a `StateView`, impure, does not compile) | An equivalent pure body, or gap-fill |
@@ -164,6 +168,7 @@ Requires Stage 4.90.0 for snapshot/live lists, 4.96.0 for non-text secrets and 4
164
168
  | `STAGE-ESM-042` | Unknown validation rule kinds; checksum on the legacy syntax path (semantic checksum renders) | Keep the rule; use an admitting semantic renderer or gap-fill |
165
169
  | `STAGE-ESM-043` | `reaction batches atomic` in an admitted version pair | Keep the batch boundary; gap-fill without splitting it |
166
170
  | `STAGE-ESM-044` | Protected-read preamble, command reads or read-backed conditions/mappings in the Cratis C# renderer; legacy Host/structural runner also refuse the preamble | Keep protection; semantic Host/executor support is separate from generated-app enforcement |
171
+ | `STAGE-ESM-046` | Date/DateTime comparison in `require`, `produces when` or a validation rule (including through concepts) in the renderer, legacy engines or default sandbox engine; names the property | Keep the date rule; the semantic Host/executor run it; deliver rendering through gap-fill that compares exact calendar dates and UTC ticks |
167
172
  | `STAGE-ESM-045` | Non-Error requirement on a protected command, including reaction-invoked commands; semantic admission refuses before reads, requirements or facts | Keep the severity contract; record the execution gap, never silently promote or drop the requirement |
168
173
  | `STAGE-IMPL-002` | Described command handler, naming command and RequirementId; also refused in Stub mode | Supply authorized implementation outside rendering; no generated stub is emitted |
169
174
  | `STAGE-ESM-037` | Events and commands from one handler, even across separate triggers on the same event in one reaction. The scaffold's Arc supports mixed results, but appends events before commands; a refused command causes redelivery and duplicate events | **Do not split the modeled reaction or drop an effect.** Gap-fill only with a proven retry-safe implementation; `[OnceOnly]` excludes replay, not retry |
@@ -4,6 +4,7 @@
4
4
 
5
5
  - The sandbox: a partial, disposable runtime
6
6
  - Protected command reads
7
+ - Date comparisons (v26)
7
8
  - Refusals shared by both engines
8
9
  - The specification runner
9
10
  - Choosing between them
@@ -128,6 +129,22 @@ even an unrelated one, before committing an accepted command. This interim guard
128
129
  is stricter than the reference's dependency-scoped decide/commit conflicts; do not
129
130
  claim full reference conflict parity or generated-application protection.
130
131
 
132
+ ## Date comparisons (v26)
133
+
134
+ Requires Stage 4.135.0 for v26 admission; older Stage refuses v26 with `STAGE-ESM-016`.
135
+ The semantic Host and specification executor compare `Date` as calendar days and
136
+ `DateTime` as UTC ticks in `require`, `produces when` and validation rules, including
137
+ through concepts. A participating `DateTime` input without an offset or `Z` rejects
138
+ with Validation after authorization and before any rule. `then` stays ordinal. The
139
+ renderer, legacy engines and default sandbox engine refuse these comparisons with
140
+ `STAGE-ESM-046`, naming the property; no date validators or artifacts are emitted.
141
+
142
+ One ordering differs from the reference: the reference checks authorization, then
143
+ offsets, then opaque C# validation, so an offset-less DateTime beside opaque
144
+ validation is a Validation rejection there. The specification executor refuses opaque
145
+ validation at run admission and the Host refuses it before authorization, so both Stage
146
+ paths report `Unsupported`, which never counts as a pass.
147
+
131
148
  ## Refusals shared by both engines
132
149
 
133
150
  Both engines refuse public events (`STAGE-ESM-032`), foreign or source-event captures
@@ -24,7 +24,7 @@
24
24
  { "kind": "skill-contains", "value": "`cratis run` has no `--engine` option", "file": "references/sandbox-and-specrunner.md" },
25
25
  { "kind": "skill-contains", "value": "the environment setting below", "file": "references/sandbox-and-specrunner.md" },
26
26
  { "kind": "skill-contains", "value": "fresh in-memory Chronicle log per specification", "file": "references/sandbox-and-specrunner.md" },
27
- { "kind": "skill-contains", "value": "exact ESM v1–v21 and v23–v25 pairs" },
27
+ { "kind": "skill-contains", "value": "exact ESM v1–v21 and v23–v26 pairs" },
28
28
  { "kind": "skill-contains", "value": "STAGE-ESM-044" },
29
29
  { "kind": "skill-contains", "value": "STAGE-IMPL-002" },
30
30
  { "kind": "skill-contains", "value": "all-Proven rules permit unpinned rendered", "file": "references/admission.md" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/pi",
3
- "version": "7.65.0",
3
+ "version": "7.67.0",
4
4
  "description": "Configuration-aware Cratis AI integration for Pi",
5
5
  "type": "module",
6
6
  "files": [