@cratis/pi 7.64.0 → 7.65.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 (36) hide show
  1. package/package/corpus/product-sync.json +1 -1
  2. package/package/corpus/skills/cratis-fundamentals-concept/references/shop-generation.md +16 -3
  3. package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +2 -1
  4. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +3 -1
  5. package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +2 -1
  6. package/package/corpus/skills/cratis-screenplay-command-surface/references/generated-values-and-responses.md +30 -0
  7. package/package/corpus/skills/cratis-screenplay-command-surface/references/protected-reads.md +15 -5
  8. package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +2 -2
  9. package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +1 -1
  10. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generated-recovery.md +14 -2
  11. package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +1 -1
  12. package/package/corpus/skills/cratis-screenplay-model-review/references/anti-patterns.md +1 -1
  13. package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +1 -1
  14. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/principles.md +1 -1
  15. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/vocabulary-map.md +1 -1
  16. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +3 -2
  17. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +3 -1
  18. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +6 -1
  19. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/berth-reservations.md +1 -1
  20. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-design.md +1 -1
  21. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +1 -1
  22. package/package/corpus/skills/cratis-screenplay-slice-design/references/rule-layers.md +1 -1
  23. package/package/corpus/skills/cratis-screenplay-slice-design/references/worked-example.md +1 -1
  24. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +1 -1
  25. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +3 -2
  26. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +1 -1
  27. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +5 -2
  28. package/package/corpus/skills/cratis-screenplay-toolchain/references/language-admission.md +5 -3
  29. package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +4 -2
  30. package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +1 -1
  31. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +12 -4
  32. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +5 -3
  33. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/rendered-application.md +41 -1
  34. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/sandbox-and-specrunner.md +32 -1
  35. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/scene-runtime.md +10 -0
  36. package/package.json +1 -1
@@ -46,7 +46,7 @@
46
46
  ],
47
47
  "rules": []
48
48
  },
49
- "notes": "Source-checked Stage v4.103.0: exact ESM v1-v17 and v19, not v18 or v20 (v18 admitted from 4.106.0 and v20 from 4.109.0, taught with Requires lines; 4.104-4.108 not otherwise reviewed). Snapshot/live collection queries, identity-mapping all projections, stored event names, event-id publication checks, release-baseline warnings, command clock/receipt-time generation, conditional and multi-command slices, generated text constraints, no-event and bounded redelivery specs, refusal branches. Query concept validation still uses primitive workaround; Stage#370 released in 4.106.0. CLI v3.62.0 bundles Stage 4.99.0, not 4.103.0. Generated-values-only delta checked at v4.127.0: v21/all-Proven unpinned specs from 4.115.0, warning/info generated rules 4.117.0, checksum validation 4.118.0, pattern/random factories/Host/executor 4.119.0; generate rule still STAGE-ESM-028. Language admission reconciled at the same v4.127.0 tag: exact v1-v21 and v23-v25 pairs; v22/v26 and mixed pairs -016, protected reads -044, atomic mode -043, described bodies STAGE-IMPL-002 even Stub mode; v24 first admitted 4.124.0 (absent 4.123.0). Other deltas not reviewed; synced unchanged. No new render/browser/Docker probe."
49
+ "notes": "Source-checked Stage v4.103.0: exact ESM v1-v17 and v19, not v18 or v20 (v18 admitted from 4.106.0 and v20 from 4.109.0, taught with Requires lines; 4.104-4.108 not otherwise reviewed). Snapshot/live collection queries, identity-mapping all projections, stored event names, event-id publication checks, release-baseline warnings, command clock/receipt-time generation, conditional and multi-command slices, generated text constraints, no-event and bounded redelivery specs, refusal branches. Query concept validation still uses primitive workaround; Stage#370 released in 4.106.0. CLI v3.62.0 bundles Stage 4.99.0, not 4.103.0. Generated-values-only delta checked at v4.127.0: v21/all-Proven unpinned specs from 4.115.0, warning/info generated rules 4.117.0, checksum validation 4.118.0, pattern/random factories/Host/executor 4.119.0; generate rule still STAGE-ESM-028. Language admission reconciled at the same v4.127.0 tag: exact v1-v21 and v23-v25 pairs; v22/v26 and mixed pairs -016, protected reads -044, atomic mode -043, described bodies STAGE-IMPL-002 even Stub mode; v24 first admitted 4.124.0 (absent 4.123.0). Reviewed v4.128.0-v4.130.0 deltas for Cratis/AI#739: v4.128.0 new-application self-reducing Cratis C# profile (CreateNewApplicationProfile, ReducerConventionInput.Read, WithReducerConvention; existing callers classic); shared SemanticValidationRules.Check confirmed (already present in v4.127.1, so no new 4.128.0 minimum claimed); v4.129.0 semantic Host/executor protected reads, presence before requirements/generation, read-backed requirements/mappings, non-Error requirements STAGE-ESM-045 including reaction invocations, Host fault on any outside append (stricter than reference scoped conflict). Renderer/legacy Host/structural runner retain STAGE-ESM-044. v4.130.0 root-template shell, options/appearance and fail-closed startup/planning findings reviewed in stage-rendering.md, RootShell.cs and stageShell.ts. Exact pairs remain v1-v21 and v23-v25; v26 refused STAGE-ESM-016 and Stage#473 still open. Earlier unreviewed deltas remain as noted above, so synced stays at the last fully reviewed release. No new render/browser/Docker probe."
50
50
  },
51
51
  {
52
52
  "id": "arc",
@@ -74,9 +74,10 @@ has 74 random bits and the TypeID `order_` prefix. Default NanoID is 21 symbols
74
74
  with 126 bits; bytes use unpadded base64url (43 symbols for 32 bytes).
75
75
 
76
76
  `IGeneratableInContext<TSelf>` requires `static abstract TSelf New(GenerationContext)`.
77
- `GenerationContext` holds one captured `DateTimeOffset Now` and a portable String
78
- `Tenant`; `DefaultTenant` is the zero-GUID string, never a display name or empty
79
- string. The shop passes time and tenant together, for example:
77
+ Fundamentals' `Cratis.Concepts.GenerationContext` is a readonly record struct with
78
+ one captured `DateTimeOffset Now` and a String `Tenant`; `DefaultTenant` is the
79
+ zero-GUID string, never a display name or empty string. The shop passes time and
80
+ tenant together, for example:
80
81
 
81
82
  ```csharp excerpt
82
83
  var context = new GenerationContext(
@@ -91,6 +92,18 @@ A domain factory can read Tenant, but arbitrary tenant IDs cannot be inserted
91
92
  into a TypeID prefix (only lowercase letters/underscores, letter endpoints).
92
93
  Do not present a tenant-prefixed custom string as standard TypeID.
93
94
 
95
+ For Screenplay `generate rule`, this Fundamentals type is the **Cratis C# target's**
96
+ binding of the language-neutral Now/Tenant descriptor, not the universal runtime
97
+ type. `Cratis.Screenplay.Contexts.GenerationContext` remains a BCL-only record with
98
+ portable `TenantId Tenant`, not a Fundamentals alias. The selected provider, not
99
+ `csharp` or a file reference, chooses the binding. Portable C# uses `context.Now`,
100
+ BCL operations and tenant text (for example `$"{context.Tenant}"`, compared ordinally).
101
+ Passing the whole context to `GenerateValue.*`, naming/constructing GenerationContext,
102
+ using `DefaultTenant` or reading `Tenant.Value` is target-bound. Never add a bridge
103
+ or claim Stage renders a rule merely because its Cratis binding is defined; read
104
+ [generation context binding](../../cratis-screenplay-command-surface/references/generated-values-and-responses.md#generation-context-binding)
105
+ for the compiler prerequisite and renderer refusal.
106
+
94
107
  Use the context form only for time/tenant-dependent generation. If both interfaces
95
108
  are implemented, callers choose context; the interfaces themselves do not dispatch.
96
109
  Time-ordered built-in context overloads reject default Now (`MissingGenerationTime`)
@@ -171,7 +171,8 @@ or actor that nobody confirmed. Read `references/worked-integration.md` when you
171
171
  separate binder check.
172
172
  - A trigger with `reads` that `produces` directly fails binding: decide in a command.
173
173
  Command reads can protect with `command reads protected` and admitted shapes (v25);
174
- trigger reads cannot. Stage refuses protected reads (STAGE-ESM-044); target protection remains a separate check.
174
+ trigger reads cannot. The Cratis C# renderer refuses protected reads (STAGE-ESM-044);
175
+ semantic execution is separate from generated-app protection.
175
176
  - An authorized command exercised in a spec without `given caller` is PLAY0389 at binding.
176
177
  - A list query (`=> Item[]`) binds (a snapshot list is not rendered, `STAGE-ESM-010`);
177
178
  a clock sweep that iterates items needs a code body the reference does not run
@@ -104,7 +104,9 @@ binding, because its decision dependency cannot be protected. A reaction that on
104
104
  command's own reads. Eligible command reads protect under application-root
105
105
  `command reads protected` (ESM v25); legacy reads retain PLAY0271. Read command-surface
106
106
  [protected reads](../cratis-screenplay-command-surface/references/protected-reads.md)
107
- for admission and absence/conflict behavior. Stage admits v25 but refuses protected reads with STAGE-ESM-044.
107
+ for admission and absence/conflict behavior. Stage admits v25; the Cratis C# renderer refuses protected reads with STAGE-ESM-044.
108
+ Semantic Host/executor support is separate; non-Error protected requirements refuse -045,
109
+ including reaction-invoked commands.
108
110
  `where` over read paths out of scope, and `where` needs
109
111
  every operand to resolve from the trigger's declared scalar occurrence shape (listed in
110
112
  the input selection or not; nested paths and read aliases fail binding): keep the logic that uses the state in
@@ -151,7 +151,8 @@ view name when that view is read once.
151
151
  Opt eligible state reads into application-root `command reads protected` (v25).
152
152
  Absence rejects; matching intervening facts conflict. Read [protected reads](references/protected-reads.md)
153
153
  for strict admission, paths and PLAY0780–0786. Legacy reads stay unprotected;
154
- reads/concurrency cannot combine (PLAY0783). Stage refuses protected reads (STAGE-ESM-044), not v25 itself.
154
+ reads/concurrency cannot combine (PLAY0783). The Cratis C# renderer refuses protected reads (STAGE-ESM-044), not v25 itself;
155
+ semantic Host/executor support is separate.
155
156
  Uniqueness still uses a constraint; reference success is not target realization.
156
157
 
157
158
  Do not use `reads` to fetch data the caller could supply. A composite-key view's `by` block is
@@ -5,6 +5,7 @@
5
5
  - Choosing a strategy
6
6
  - When not to
7
7
  - The concept declares how; the property declares that
8
+ - Generation context binding
8
9
  - Inspect and edit generation through MCP
9
10
  - Generated-concept rules (ESM v20)
10
11
  - Version and freshness
@@ -94,6 +95,35 @@ checks only suffix shape on fixtures. `generate sequence` stays reserved (PLAY06
94
95
  and compliance markers on generated concepts, including secrets, remain refused.
95
96
  Never remove classification to make a model bind.
96
97
 
98
+ ## Generation context binding
99
+
100
+ Requires Screenplay 4.181.1 or later (`screenplay --version`) for per-target context
101
+ binding and tenant value formatting; older context documentation does not establish
102
+ that binding. The version-1 ValueGeneration descriptor is language-neutral: `Now`
103
+ (an instant), portable `TenantId` `Tenant`, and a String result. The selected provider,
104
+ not a `csharp` fence or file attachment, chooses the native context type.
105
+
106
+ The Cratis C# target (Arc and Stage's Cratis target contract) binds it to Fundamentals'
107
+ `Cratis.Concepts.GenerationContext` (`DateTimeOffset Now`, `string Tenant`). BCL-only
108
+ hosts can use `Cratis.Screenplay.Contexts.GenerationContext` (`Now`, `TenantId Tenant`);
109
+ that package stays BCL-only. The types are name-compatible, not type-identical.
110
+
111
+ For portable C# bodies, use `context.Now`, BCL operations and the tenant as text:
112
+ `$"{context.Tenant}:{context.Now:yyyyMMdd}"`. `TenantId` formats as its value;
113
+ compare that formatted string ordinally when a tenant comparison is needed.
114
+ Passing `context` to `GenerateValue.*`, naming `GenerationContext` or
115
+ `GenerationContext.DefaultTenant`, constructing a context, or reading
116
+ `context.Tenant.Value` is target-bound.
117
+
118
+ For example, `generate rule TenantReceiptNew` can own the inline `csharp` body
119
+ `return $"{context.Tenant}:{GenerateValue.Ulid(context)}";` on the Cratis C# binding.
120
+ Do not insert a bridge to Screenplay's record or promise another provider accepts it.
121
+ Arc can recover such self-contained compound bodies under the adapter gate in
122
+ [generated recovery](../../cratis-screenplay-legacy-extraction/references/generated-recovery.md).
123
+ Recovery does not run the body; reference execution consumes a String pin, opaque
124
+ entropy cannot supply an identifier, and Stage rendering still refuses `generate rule`
125
+ with STAGE-ESM-028. A target binding contract is not released renderer support.
126
+
97
127
  ## Inspect and edit generation through MCP
98
128
 
99
129
  A concept `generation` summary and entropy repairs are available.
@@ -105,9 +105,19 @@ explicit `apply`. The repair inserts into the domain document or sole document,
105
105
  refuses ambiguous roots and requires individual review, never fix-all. It changes
106
106
  absence/conflict behavior, not merely formatting.
107
107
 
108
- Stage admits ESM v25 but refuses protected reads with STAGE-ESM-044 in rendering,
109
- Host serving and specification execution; a reference pass is not Stage or Arc
110
- realization. Preserve the model's protection and deliver authorized hand-written
111
- consistency enforcement through the render-and-gap-fill workflow. Never remove
112
- the preamble to get a render. `screenplay <root> --warnaserror` must exit zero;
108
+ Stage admits ESM v25, but the Cratis C# renderer refuses protected reads with
109
+ STAGE-ESM-044: no artifacts are emitted. Preserve protection and deliver authorized
110
+ hand-written enforcement through render-and-gap-fill; never remove the preamble.
111
+
112
+ Requires Stage 4.129.0 for semantic Host/specification-executor protected reads;
113
+ older engines refuse STAGE-ESM-044. They require presence before requirements or
114
+ generation and use stored read properties in requirements and produced mappings,
115
+ including reaction-invoked commands. Any non-Error requirement on a protected
116
+ command refuses STAGE-ESM-045 before execution, even when a rejection is expected.
117
+ Legacy Host and structural runner still refuse the preamble with STAGE-ESM-044.
118
+ The semantic Host faults on any outside append, even an unrelated one, before
119
+ committing an accepted command: stricter than dependency-scoped reference conflicts,
120
+ not proof of full conflict parity. Read Stage's [sandbox boundaries](../../cratis-stage-rendering-and-sandbox/references/sandbox-and-specrunner.md#protected-command-reads).
121
+ A semantic-engine pass is separate from reference behavior and from generated Arc
122
+ protection. `screenplay <root> --warnaserror` must exit zero;
113
123
  `screenplay test <root>` separately establishes reference behavior, not target support.
@@ -174,8 +174,8 @@ compile or will not be safe. Both are deliberate.
174
174
  rejects and matching decide/commit changes conflict. Read
175
175
  [protected reads](../cratis-screenplay-command-surface/references/protected-reads.md)
176
176
  for the strict shape and paths. Legacy reads remain PLAY0271; `concurrency` is
177
- not protection and cannot combine with protected reads. Stage refuses protected reads
178
- (STAGE-ESM-044), not v25 itself: name target enforcement separately rather than claiming a render.
177
+ not protection and cannot combine with protected reads. The Cratis C# renderer refuses protected reads
178
+ (STAGE-ESM-044), not v25 itself: semantic Host/executor support is not generated-app protection.
179
179
  Write state-dependent rules as `reads` plus `require` with an indented message;
180
180
  mark refused shapes as unenforced and name the intended target mechanism. Model uniqueness as a `unique` constraint. Never copy state into a
181
181
  command input, add an attestation flag, or hide the rule in `handler` prose. Do not
@@ -34,7 +34,7 @@ Tool versions and consumer boundaries: toolchain `SKILL.md`.
34
34
  | Compliance concepts | Bare `pii`/`personal` and `secret`, qualifiers and scope bind as v13; enum/identity compliance and events combining personal or explicitly subject-scoped secret values with an explicit `subject` mark refuse PLAY0268 at binding only. A CLI bundle that admits v13 binds markers; Stage renders v13 protection, not protected identities/enums or subject lineage. Never remove protection |
35
35
  | Identity details / processing purposes / event subject | Report-only metadata; executable detail reads refuse PLAY0268, not source declaration errors |
36
36
  | Composite stream ids | v8 routing; complete named parts/canonical comparisons, PLAY0515 refuses protected keys/sources; not a legacy text split |
37
- | Command reads/concurrency | Eligible reads opt into v25 with `command reads protected`; legacy reads/concurrency retain PLAY0271; Stage refuses protected reads (STAGE-ESM-044), not the v25 pair |
37
+ | Command reads/concurrency | Eligible reads opt into v25 with `command reads protected`; legacy reads/concurrency retain PLAY0271; the Cratis C# renderer refuses protected reads (STAGE-ESM-044), not the v25 pair; semantic Host/executor support is separate |
38
38
  | Invokes-only trigger reads | Report-only, not protected state; direct production with reads refuses |
39
39
  | Generated values/responses | v7 binding/reference execution; v15 strategies/strict fixtures/freshness. Stage renders supported UUID/String strategies, responses and fixtures; unsupported types/combinations remain -028/-038 |
40
40
  | Sources/streams and command/specification routes | v8 binding/reference execution; the CLI (toolchain `references/renderable-subset.md`) reaches Stage checks through its bundled ceiling (v16 without v17 support) |
@@ -123,8 +123,20 @@ Guid, RandomNumberGenerator and GenerateValue are allowlisted; multi-statement
123
123
  bodies can qualify. Compound time-based calls must pass the captured context.
124
124
  Private helpers, fields, DI, aliases/static imports, ambient time, raw Default
125
125
  comparisons and external dependencies remain SP0073; no file fallback is invented.
126
- This is the Cratis C# binding to Fundamentals' GenerationContext, not a universal
127
- runtime type. Opaque entropy is unknown, so a rule cannot supply an identifier.
126
+ For example, a proven forwarding factory returning
127
+ `new($"{context.Tenant}:{context.Now:yyyyMMdd}:{GenerateValue.Ulid(context)}")`
128
+ recovers `generate rule <Concept>New` with inline body
129
+ `return $"{context.Tenant}:{context.Now:yyyyMMdd}:{GenerateValue.Ulid(context)}";`.
130
+ The compound call remains a rule, not an inferred built-in ULID strategy.
131
+
132
+ This uses the Cratis C# binding to Fundamentals' `Cratis.Concepts.GenerationContext`,
133
+ not Screenplay's BCL-only record. Passing `context` to `GenerateValue.*` makes the
134
+ body target-bound; a `csharp` tag alone does not select that binding. `Now` and the
135
+ tenant formatted as text are the portable subset; other providers must admit the
136
+ body against their own native type. Read the command-surface [binding guide](../../cratis-screenplay-command-surface/references/generated-values-and-responses.md#generation-context-binding)
137
+ when deciding whether to retain target-bound code. Recovery preserves the body but
138
+ neither executes it nor proves another target can compile it. Opaque entropy is
139
+ unknown, so a rule cannot supply an identifier.
128
140
  The concept owns `generate`; each command property only marks generation.
129
141
  Use the shared [strategy reference](../../cratis-screenplay-command-surface/references/generated-values-and-responses.md)
130
142
  for exact encodings, ranges, entropy and admission, rather than duplicating them.
@@ -271,7 +271,7 @@ See read-surface `references/named-keys.md` for the collection-key exclusion alg
271
271
  | Atomic reaction batches (ESM v22) | Root `reaction batches atomic`; direct productions per occurrence and selected refusal branches are separate batches, commands independent; Stage refuses v22 and atomic mode |
272
272
  | Described handlers (ESM v23) | Pending implementation beside unconditional produces; payload-only contract, reached body Unsupported ImplementationBody; Stage STAGE-IMPL-002 even Stub mode |
273
273
  | Ordinal text rules (ESM v24) | contains/not contains/starts with/ends with on scalar non-enum text properties; quoted literals, not conditions; Stage semantic engines execute/render |
274
- | Protected command reads (ESM v25) | Root `command reads protected`; eligible read paths in requirements and production mappings, absence Validation, concurrent matching facts Conflict; Stage admits v25 but refuses protected reads STAGE-ESM-044 |
274
+ | Protected command reads (ESM v25) | Root `command reads protected`; eligible read paths in requirements and production mappings, absence Validation, concurrent matching facts Conflict; Stage admits v25; Cratis C# rendering refuses STAGE-ESM-044, semantic Host/executor execute admitted reads with non-Error protected requirements refused STAGE-ESM-045 |
275
275
  | Chronological command dates (ESM v26) | Same-primitive Date/DateTime `==`, `!=`, `>`, `>=`, `<`, `<=` in require/produces-when (property or literal RHS) and command/property rules (literal RHS only). DateTime uses UTC ticks, participating offset-less inputs reject Validation before rules; then matching stays ordinal. Requires Screenplay 4.199.0 (`screenplay --version`); older binders refuse PLAY0268. Stage refuses v26 STAGE-ESM-016. Read command-surface `references/date-comparisons.md`. |
276
276
  | Current routing and actor admission | Sources/streams and command/specification routes bind and reference-execute as v8; reaction `runs as system role` supplies the invocation actor as v10. Whole-workspace binding determines executable availability; CLI/Stage realization remains separate |
277
277
  | Blocks binding (`PLAY0268`) | enum/identity compliance and events combining personal or explicitly subject-scoped secret values with explicit subject marks; a compiler that stops before v13 refuses all `pii`/`secret` concepts ("compliance attributes require portable data-subject semantics"), while v13 binds them and Stage renders protection; attached command `handler` (PLAY0035 beside productions; pending described intent instead binds v23), bare `rule <Name>`, read paths without protected opt-in or in unsupported positions such as `produces when`, date comparisons with mixed primitives, optional condition operands, `$context`, protected read paths or `today`, date rules on concepts or reaction `where`, `$context.tenant`/claims/roles/causation in `produces`, `$env` conditions, `file` constraints, unquoted `import` of an external contract, a read model with neither explicit `key` nor unambiguous query-based identity as described above (composite keys remain unadmitted), queries with context `from` sources (typed query context is unadmitted), single-result filters (collections only), `scoped to` (opaque scope), `performer` (opaque implementation) or composite `by` blocks; optional keyed and collection queries, including caller-supplied equality filters and observable delivery, bind, `$causedBy` and templates in projections |
@@ -64,7 +64,7 @@ the problem, the checks it violates, the fix, all pinned to one declaration.
64
64
  | Undeclared removal/append event | `remove with` or capture `append` names an undeclared event | V1 warns (PLAY0166, a failure under warnings as errors); binding fails PLAY0273 | C (executable) / D | declare or fix the name; run V3 |
65
65
  | Gated command invoked by a reaction without a declared actor | reaction `invokes` a command under a caller policy and has no `runs as system role "<Role>"` that satisfies the gate | the invocation carries no caller: rejected at run time | D (major) | declare `runs as system role "<Role>"` with the least-privilege role the gate admits (ESM v10, Screenplay 4.125.0; Stage 4.89.1 renders role/authenticated trusted actors, but claim-reading/opaque gates still refuse STAGE-ESM-034 and need gap-fill) or record another trusted-path decision - never just delete the gate. A matching `runs as system role` is the admitted trusted path, not a defect |
66
66
  | `reads` + `produces` reaction | reaction both reads a view and produces | fails binding | C (executable) | invoke a command, or produce without reads |
67
- | Unadmitted read claimed protected | rule "checked" by legacy command or trigger reads | no protected contract or target realization | D (major) | opt eligible command reads into `command reads protected` (v25); inspect shape, absence and conflict cases. Stage refuses protected reads (STAGE-ESM-044); distinguish reference protection from target evidence; checklist E3 |
67
+ | Unadmitted read claimed protected | rule "checked" by legacy command or trigger reads | no protected contract or target realization | D (major) | opt eligible command reads into `command reads protected` (v25); inspect shape, absence and conflict cases. The Cratis C# renderer refuses protected reads (STAGE-ESM-044); distinguish reference/semantic-engine evidence from generated-app protection; checklist E3 |
68
68
  | Caller-supplied state rule | `require currentStatus == "open"` where the caller sends `currentStatus` | the caller decides its own permission | D (major) | read authoritative stored state through admitted protected reads and `require`; mark legacy/refused shapes and target realization as gaps; checklist E3 |
69
69
  | `severity warning` as soft rule | rule meant to warn but still rejects | blocks valid requests | C semantics | remove or make it a real rule |
70
70
  | Relay events | `*Synced`, `*Forwarded` events that only move data | noise, not facts | D | translate once into a business fact |
@@ -123,7 +123,7 @@ the format in `worked-example.md`.
123
123
  |---|---|---|---|
124
124
  | E1 | Value formats on `concept`s; input rules on the command; uniqueness as `constraint`; access as `authorize` | declarations | D |
125
125
  | E2 | Every refusal has a message a person understands; constraint messages copied verbatim in specs | `message`, specs | D |
126
- | E3 | A state-dependent rule uses `reads` + `require` over authoritative state: eligible reads opt into `command reads protected` (v25), with required absence and decide/commit conflict cases. Legacy/refused reads are marked unenforced with a named target. Stage refuses protected reads (STAGE-ESM-044); reference protection is not target realization. Not: caller-supplied copies of state, attestation booleans (`confirmsX == true`), rules in `handler` / `implementation hint` prose, or `reads` treated as protection | slice `description`, `require`, `handler` | D (faking or hiding = major) |
126
+ | E3 | A state-dependent rule uses `reads` + `require` over authoritative state: eligible reads opt into `command reads protected` (v25), with required absence and decide/commit conflict cases. Legacy/refused reads are marked unenforced with a named target. The Cratis C# renderer refuses protected reads (STAGE-ESM-044); reference/semantic-engine evidence is not generated-app protection. Not: caller-supplied copies of state, attestation booleans (`confirmsX == true`), rules in `handler` / `implementation hint` prose, or `reads` treated as protection | slice `description`, `require`, `handler` | D (faking or hiding = major) |
127
127
  | E4 | `severity warning` is not used as "soft" validation (it still rejects) | validate lines | C semantics |
128
128
  | E5 | Preconditions are explicit; nothing relies on "obviously you can't" | descriptions, specs | Q |
129
129
  | E6 | Each invariant has an atomic enforcement point (name the storage provider where constraint admission matters); the race loser's outcome is specified | constraints, specs | D |
@@ -11,7 +11,7 @@ instruction for the work, not background reading. Skills that restate one cite i
11
11
  6. **Keep semantic identity independent of names, paths, layout and generated symbols.** Commit the identity catalog with the model.
12
12
  7. **Keep unsupported intent visible.** Return a precise gap and its owning issue; never weaken the model so rendering passes.
13
13
  8. **Write specifications with intent, including rejection and denial.** Never report an unexecuted or unsupported scenario as passed.
14
- 9. **Treat state reads as a correctness boundary.** Eligible command reads opt into `command reads protected` (v25); legacy/trigger reads remain unprotected. Stage refuses protected reads (STAGE-ESM-044), not the v25 pair: reference absence/conflict guarantees and verified target realization are different claims.
14
+ 9. **Treat state reads as a correctness boundary.** Eligible command reads opt into `command reads protected` (v25); legacy/trigger reads remain unprotected. The Cratis C# renderer refuses protected reads (STAGE-ESM-044), not the v25 pair: reference absence/conflict guarantees, semantic-engine execution and generated-app protection are different claims.
15
15
  10. **Separate event-source identity from event payload and choose destinations explicitly.**
16
16
  11. **Persisted event shape changes are evolution, never cleanup.** Keep historical generations.
17
17
  12. **Model external work as business intent.** Provider interfaces and transport mechanics stay out of the language.
@@ -21,7 +21,7 @@ speaks in them; never model board mechanics (lanes, node ids, positions).
21
21
  | Storyline (ordered beats) | a **family** of specifications sharing example data, each one transition (no storyline syntax) | several spec classes | specifications |
22
22
  | Field validation | concept `validate` (every use) / command `validate`, `require` | `ConceptValidator<T>` / `CommandValidator<T>` | command validation |
23
23
  | Role permission ("Cannot") | `policy` + `authorize` + `then denied` spec; ownership via `claim ... matches subject` | `[Authorize(Policy)]`, generated policies | authorization |
24
- | Precondition on stream state | `command reads protected` + eligible `reads`/`require` (v25 reference protection); legacy/refused reads remain stated intent. Stage refuses protected reads (STAGE-ESM-044); target Arc `[ProtectedDecision]` + `DecisionRead<T>` or Chronicle DCB needs separate verification | decision over a guarded read | command validation |
24
+ | Precondition on stream state | `command reads protected` + eligible `reads`/`require` (v25 reference protection); legacy/refused reads remain stated intent. The Cratis C# renderer refuses protected reads (STAGE-ESM-044); semantic-engine execution is separate from generated-app protection. Target Arc `[ProtectedDecision]` + `DecisionRead<T>` or Chronicle DCB needs separate verification | decision over a guarded read | command validation |
25
25
  | Generated id (`derived:uuid4()`) | `generated` (authorable, not executable) | id supplied before `Handle()` | commands |
26
26
  | External system / outbound call | `Translate` slice (inbound); `system`/`operation` (authorable, not executable) or Automation (outbound) | `ICommandOperation` / reactor | operations, reactors |
27
27
  | HTML mockup | `screen` Level 1 + board (`visualize-model`) | default Scene composition | ui composition |
@@ -35,8 +35,9 @@ Tool versions are covered in `cratis-screenplay-toolchain` `SKILL.md`; read it b
35
35
  ## Language modes that block target delivery
36
36
 
37
37
  Read [language admission](../cratis-screenplay-toolchain/references/language-admission.md)
38
- for v22–v25: Stage refuses atomic batches, described bodies (even Stub mode) and
39
- protected reads. Preserve contracts; reference success is not target realization.
38
+ for v22–v25: Stage rendering refuses atomic batches, described bodies (even Stub mode)
39
+ and protected reads. Semantic Host/executor support is not generated-app protection.
40
+ Preserve contracts; reference success is not target realization.
40
41
 
41
42
  ## Interview phase
42
43
  **Skip if** the request names the model root, the application name, the destination and the
@@ -111,7 +111,9 @@ invoked commands independent. Stage refuses v22 (STAGE-ESM-016) and atomic mode
111
111
  in admitted v23–v25 (STAGE-ESM-043); the declaration is not external-effect deduplication.
112
112
  For described handlers, hand off only payload computation under the v23 result
113
113
  contract; Stage STAGE-IMPL-002 means no stubs, even Stub mode. Protected v25 reads
114
- refuse STAGE-ESM-044 despite version admission and need target admission/enrollment tests; ordinary injection never supplies protection.
114
+ refuse Cratis C# rendering with STAGE-ESM-044 despite version admission and need
115
+ generated-app admission/enrollment tests; ordinary injection never supplies protection.
116
+ Semantic Host/executor support is a separate result, not generated-app enforcement.
115
117
 
116
118
  ## Re-delivery
117
119
  The work list is the full in-scope contract delta since the fallback record's last verified source
@@ -31,10 +31,15 @@ ESM). Only the probe answers renderability. `PLAY0270` entries are information,
31
31
  | Class | Meaning | Typical examples (each verified in `admission.md`) | Action |
32
32
  | --- | --- | --- | --- |
33
33
  | **Model fix (in mode)** | the model is in, or the user chose, renderable mode and breaks its own subset in a way that has a renderable equivalent with the same meaning | a `produces` whose `for` is not the command identifier; two projections for one read model (`-007`); a policy Stage cannot express portably (`-015`; role-only and opaque pure policies render) | edit request to the modeler session with address, change and rationale |
34
- | **Capability gap** | the intended meaning needs a construct Stage does not render yet | DateTime equality filters and required parameters after optional filters (`-010`); context/single-result filters, opaque `scoped to`/`performer` and composite `by` remain PLAY0268; Translate, clocks, captures, non-event triggers and opaque reaction bodies (`-024`); claim-reading/opaque `runs as` gates (`-034`), legacy `from` (`-035`), mixed effects in one handler (`-037`, retries can duplicate events; keep it whole), unsupported reaction mappings (`-039`); unsupported generated types/result combinations (`-028`/`-038`); `then no readmodel` (`-027`); evolved events (`STAGE-ESM-026`); unsupported expression/enum production conditions (`-006`; supported conditional productions render); legacy reads (`PLAY0271`), protected reads (STAGE-ESM-044 despite v25 admission); code validation (`-005`); protected identities/enums (`-040`) or unadmitted explicit subject lineage (`PLAY0268`); attached command handlers (PLAY0268), described handlers (v23, STAGE-IMPL-002 even Stub mode), atomic mode (STAGE-ESM-016 for v22, STAGE-ESM-043 in admitted v23–v25) | keep the model; fallback record entry; options a to c in `SKILL.md`; link the Stage issue |
34
+ | **Capability gap** | the intended meaning needs a construct Stage does not render yet | DateTime equality filters and required parameters after optional filters (`-010`); context/single-result filters, opaque `scoped to`/`performer` and composite `by` remain PLAY0268; Translate, clocks, captures, non-event triggers and opaque reaction bodies (`-024`); claim-reading/opaque `runs as` gates (`-034`), legacy `from` (`-035`), mixed effects in one handler (`-037`, retries can duplicate events; keep it whole), unsupported reaction mappings (`-039`); unsupported generated types/result combinations (`-028`/`-038`); `then no readmodel` (`-027`); evolved events (`STAGE-ESM-026`); unsupported expression/enum production conditions (`-006`; supported conditional productions render); legacy reads (`PLAY0271`), protected-read rendering (STAGE-ESM-044 despite v25 admission; semantic Host/executor support is separate); code validation (`-005`); protected identities/enums (`-040`) or unadmitted explicit subject lineage (`PLAY0268`); attached command handlers (PLAY0268), described handlers (v23, STAGE-IMPL-002 even Stub mode), atomic mode (STAGE-ESM-016 for v22, STAGE-ESM-043 in admitted v23–v25) | keep the model; fallback record entry; options a to c in `SKILL.md`; link the Stage issue |
35
35
  | **Tool skew** | the bundled compiler disagrees with documented semantics | the false `PLAY0285` on reaction cascades from an older bundle; codes the standalone compiler does not raise | record in the session state and the fallback record; never "fix" a correct model |
36
36
  | **Environment** | not the model | restore failures, missing SDK, a destination that is not writable | fix the environment or report blocked |
37
37
 
38
+ Requires Stage 4.129.0 for semantic Host/executor protected reads; older engines
39
+ refuse STAGE-ESM-044. Non-Error protected requirements refuse STAGE-ESM-045, including
40
+ reaction invocations. A semantic-engine pass does not resolve the rendering gap;
41
+ read [sandbox boundaries](../../cratis-stage-rendering-and-sandbox/references/sandbox-and-specrunner.md#protected-command-reads).
42
+
38
43
  ## Triage rules
39
44
  - A capability gap never becomes a model fix by deleting meaning. Turning a list screen into a
40
45
  keyed lookup, dropping `pii`, removing authorization or a rule, or splitting a conditional
@@ -4,7 +4,7 @@ This is a legacy control without `command reads protected`; the unprotected-read
4
4
  markers below describe that control, not all command reads. Eligible views can opt
5
5
  into v25; the date-rule blocker still remains. Read
6
6
  [protected reads](../../cratis-screenplay-command-surface/references/protected-reads.md)
7
- for admission and Stage's protected-read refusal (STAGE-ESM-044).
7
+ for admission and the Cratis C# renderer's protected-read refusal (STAGE-ESM-044).
8
8
 
9
9
  Complete, compiled design-mode model (marina guest berths) showing a coverage matrix turned into specifications: happy path, one rejection per rule, authorization denial, duplicate and retry, competing claim, state violation, alternative branches, compensation and a view lifecycle family. The matrix for it is in `coverage-matrix.md`; the catalogue (`scenario-catalogue.md`) names its specifications.
10
10
 
@@ -4,7 +4,7 @@
4
4
  Read [protected reads](../../cratis-screenplay-command-surface/references/protected-reads.md)
5
5
  for the opt-in alternative. Do not insert the preamble blindly: every read must meet
6
6
  finite event-source-keyed admission with removals. A v25 reference pass still does not
7
- render protected reads: Stage admits v25 but refuses them with STAGE-ESM-044. The comments and unenforced markers below describe
7
+ render protected reads: Stage admits v25 but the Cratis C# renderer refuses them with STAGE-ESM-044. The comments and unenforced markers below describe
8
8
  this legacy control, not a general limit on command reads.
9
9
 
10
10
  **Design mode.** This document states the stored-state rules of the
@@ -40,7 +40,7 @@ Typed example/override forms: `cratis-screenplay-specifications`
40
40
  | Pending described command handlers (v23) | specify intent | binds; denial/validation execute, body-reaching specs Unsupported ImplementationBody; all-Unsupported is not green | STAGE-IMPL-002 even Stub mode |
41
41
  | Attached command handlers, `file` constraints, query `performer`s | spec them in design | blocked: PLAY0268 at binding, no spec runs (V3 blocked) | no |
42
42
  | Atomic reaction mode (v22) | declare for new models | failed batch adds no facts or view changes; earlier batches/commands remain; `then error` alone is insufficient | v22 STAGE-ESM-016; mode in admitted v23–v25 STAGE-ESM-043 |
43
- | Protected command reads (v25) | declare opt-in for eligible reads | absence Validation; matching intervening facts Conflict; race vectors are not a new spec construct | protected reads STAGE-ESM-044; v25 pair admitted |
43
+ | Protected command reads (v25) | declare opt-in for eligible reads | absence Validation; matching intervening facts Conflict; race vectors are not a new spec construct | Cratis C# rendering STAGE-ESM-044; semantic Host/executor execute admitted reads, non-Error protected requirements STAGE-ESM-045; v25 pair admitted |
44
44
 
45
45
  Requires Screenplay 4.105.0 or later (`screenplay --version`) for list-query specifications, and 4.143.0 or later for collection equality filters (ESM v14).
46
46
 
@@ -20,7 +20,7 @@ protected decisions. Gap-fill must use an admitted projection/key shape and acti
20
20
  unit-of-work enrollment; do not edit managed dependencies. Keep the `.play` rule
21
21
  target enforcement separate from reference semantics until target tests verify it.
22
22
  Read [protected command reads](../../cratis-screenplay-command-surface/references/protected-reads.md)
23
- for admission and Stage's protected-read refusal (STAGE-ESM-044); never remove protection to obtain rendering. Forbidden: caller-supplied copies of state in `require`, boolean attestation
23
+ for admission and the Cratis C# renderer's protected-read refusal (STAGE-ESM-044); never remove protection to obtain rendering. Forbidden: caller-supplied copies of state in `require`, boolean attestation
24
24
  inputs (`confirmsX == true`), rules in `handler` / implementation-hint prose.
25
25
 
26
26
  ## Authorization is executable
@@ -5,7 +5,7 @@ One complete legacy design-mode control for `cratis-screenplay-slice-design`, wi
5
5
  specification runs here. List queries and clock fixtures bind on an admitting compiler;
6
6
  they are not the remaining blocker. Personas and screens are informational.
7
7
  Eligible command reads can opt into v25; inspect every projection/key/removal before
8
- migration and retain Stage's separate refusal (STAGE-ESM-044; the v25 pair itself is admitted). Read
8
+ migration and retain the Cratis C# renderer's separate refusal (STAGE-ESM-044; the v25 pair itself is admitted). Read
9
9
  [protected reads](../../cratis-screenplay-command-surface/references/protected-reads.md).
10
10
  The unenforced descriptions below refer to this legacy control, not all command reads.
11
11
  The specifications still seed every read-model source (`LockerInstalled`, `LockerRequested`,
@@ -114,7 +114,7 @@ Unattended work takes the conservative option and marks it `ASSUMED` in model
114
114
  conflict. Legacy reads remain PLAY0271/PLAY0268; `concurrency` remains unbound and
115
115
  combining it with protected reads is PLAY0783. Read
116
116
  [protected reads](../cratis-screenplay-command-surface/references/protected-reads.md)
117
- for admission and Stage's STAGE-ESM-044 protected-read refusal (the v25 pair itself is admitted). `description` text never reaches rendered code: a rule that lives only in prose is
117
+ for admission and the Cratis C# renderer's STAGE-ESM-044 protected-read refusal (the v25 pair itself is admitted). `description` text never reaches rendered code: a rule that lives only in prose is
118
118
  unenforced there.
119
119
  - `pii` and `secret` bind as ESM v13;
120
120
  enum/identity compliance and protected events with explicit subject marks still
@@ -58,7 +58,7 @@ observed legacy check from verified atomic protection.
58
58
  | a value across all sources | `unique <prop> on <Event>` | value owned by one source; same source may re-claim |
59
59
  | a fact at most once per source; mutually exclusive facts | `unique event` (+ `released by`) | covers simple lifecycle transitions |
60
60
  | state-dependent rule (balance, capacity, "only if approved") | eligible `reads` + `require` under `command reads protected` (v25) | required absence rejects; matching intervening facts conflict. Payload-key fan-in, joins, reducers and other refused shapes remain target gaps |
61
- | a view (read model) | unguarded materialized reads are not protection | legacy command and trigger reads remain unprotected; Stage refuses protected reads (STAGE-ESM-044), so reference protection is not target realization |
61
+ | a view (read model) | unguarded materialized reads are not protection | legacy command and trigger reads remain unprotected; the Cratis C# renderer refuses protected reads (STAGE-ESM-044); semantic Host/executor evidence is not generated-app protection |
62
62
 
63
63
  ## 3. Record each state-dependent rule that the model cannot enforce
64
64
  Never accept the caller's copy of the state: `currentStatus Status` on the command with
@@ -69,7 +69,8 @@ the rule unenforced in rendered scope.
69
69
 
70
70
  First inspect [protected reads](../../cratis-screenplay-command-surface/references/protected-reads.md):
71
71
  opt eligible command reads into v25, retain absence/conflict specifications and verify
72
- target consistency separately. Stage admits v25 but refuses protected reads (STAGE-ESM-044). A payload-keyed
72
+ target consistency separately. Stage admits v25 but the Cratis C# renderer refuses protected reads (STAGE-ESM-044).
73
+ Semantic Host/executor support has separate severity and outside-append limits. A payload-keyed
73
74
  fan-in such as the course-capacity example remains refused; the preamble is not a
74
75
  blanket admission of arbitrary projections.
75
76
 
@@ -4,7 +4,7 @@ Legacy control: no `command reads protected` preamble is declared. The course-ca
4
4
  payload-key fan-in remains refused even with opt-in; eligible active-enrolment reads
5
5
  can protect under v25, but reads plus concurrency cannot combine (PLAY0783). Read
6
6
  [protected reads](../../cratis-screenplay-command-surface/references/protected-reads.md)
7
- for admission and Stage's protected-read refusal (STAGE-ESM-044). The legacy diagnostics below describe this
7
+ for admission and the Cratis C# renderer's protected-read refusal (STAGE-ESM-044). The legacy diagnostics below describe this
8
8
  control, not a blanket refusal of command reads.
9
9
 
10
10
  A complete design-mode model for course enrolment. It shows one business identity per stream,
@@ -326,13 +326,16 @@ refusal reasons. Read [language admission](language-admission.md) before changin
326
326
  | PLAY0786 (I) | Eligible legacy model; preview typed preamble repair, individually review absence/conflict semantics |
327
327
  | PLAY0787 (W) | Exact deprecated Studio text-rule pattern; repair to literal rule or equality, preserving message/severity |
328
328
  | STAGE-ESM-043 | Atomic mode not realized, even in admitted v23–v25; retain declaration and gap-fill |
329
- | STAGE-ESM-044 | Protected reads not realized despite v25 version admission; keep protection and gap-fill |
329
+ | STAGE-ESM-044 | Cratis C# renderer refuses protected reads despite v25 admission; semantic Host/executor support is separate; keep protection and gap-fill generated-app scope |
330
+ | STAGE-ESM-045 | Non-Error protected requirement; semantic Host/executor refuse before execution, including reaction-invoked commands; keep severity and report Unsupported |
330
331
  | STAGE-IMPL-002 | Described handler body not realized by Stage, even Stub mode; no stubs emitted |
331
332
 
332
333
  Invalid match syntax remains PLAY0367. Property/concept text rules bind v24;
333
334
  `contains`/`starts with` in conditions only still fail PLAY0268. Stage rejects
334
335
  v22/v26 and mixed pairs with STAGE-ESM-016; v23–v25 admission does not implement
335
- bodies, batches or protected reads (STAGE-ESM-044).
336
+ bodies, batches or rendered protected reads (STAGE-ESM-044). Requires Stage 4.129.0
337
+ for semantic Host/executor protected reads; older engines refuse -044. Read
338
+ [language admission](language-admission.md) for the stricter Host outside-append guard.
336
339
 
337
340
  ## Binding (V2 and V3) - see `executable-subset.md` for the full table
338
341
  | Code | Meaning | Fix |
@@ -12,7 +12,7 @@ exact language/semantic pairs; binding, reference execution and rendering are se
12
12
  | v22 | Application-root `reaction batches atomic` | Direct productions per trigger occurrence and each selected refusal branch are separate atomic batches; commands remain independent | v22 refused STAGE-ESM-016; mode in admitted v23–v25 refused STAGE-ESM-043 |
13
13
  | v23 | Pending `handler implementation` beside unconditional `produces` | Payload-only body; PLAY0695 information; reaching body gives Unsupported ImplementationBody | v23 admitted, body refused STAGE-IMPL-002 in renderer/Host/executor, even Stub mode |
14
14
  | v24 | `contains`, `not contains`, `starts with`, `ends with` property/concept rules | Ordinal UTF-16, absent optional passes; not text-condition operators | v24 admitted; semantic Host/executor and generated ordinal comparisons preserve rules |
15
- | v25 | Application-root `command reads protected` | Admitted reads in requirements/mappings, absence Validation, matching decide/commit changes Conflict | v25 admitted; protected reads refused STAGE-ESM-044 in renderer/Host/executor |
15
+ | v25 | Application-root `command reads protected` | Admitted reads in requirements/mappings, absence Validation, matching decide/commit changes Conflict | v25 admitted; Cratis C# renderer refuses STAGE-ESM-044; semantic Host/executor execute reads, non-Error protected requirements refuse STAGE-ESM-045 |
16
16
  | v26 | Chronological command Date/DateTime comparisons | Same-primitive `==`, `!=`, `>`, `>=`, `<`, `<=`; DateTime UTC ticks and pre-rule offset validation | v26 refused STAGE-ESM-016 |
17
17
 
18
18
  Requires Screenplay 4.181.0 or later (`screenplay --version`) for atomic batches; older compilers cannot admit the preamble.
@@ -27,7 +27,9 @@ Requires Screenplay 4.199.0 (ESM v26; `screenplay --version`) for date compariso
27
27
 
28
28
  Requires Stage 4.124.0 for v24 text-rule admission (`cratis --version` identifies the CLI bundle); older renderers refuse v24 with STAGE-ESM-016. V23 admission alone does not implement described bodies.
29
29
 
30
- Requires Stage 4.127.0 for v25 version admission; older renderers refuse v25 with STAGE-ESM-016. Protected reads still refuse STAGE-ESM-044, including on legacy paths; no artifacts are emitted.
30
+ Requires Stage 4.127.0 for v25 version admission; older renderers refuse v25 with STAGE-ESM-016. The Cratis C# renderer still refuses protected reads with STAGE-ESM-044; no artifacts are emitted.
31
+
32
+ Requires Stage 4.129.0 for semantic Host/executor protected reads; older engines refuse STAGE-ESM-044. Absence rejects before requirements/generation; read properties feed requirements and productions. Non-Error protected requirements refuse STAGE-ESM-045, including reaction invocations. Legacy Host/structural runner retain -044. The Host faults on any outside append, stricter than reference dependency-scoped conflicts; see [sandbox boundaries](../../cratis-stage-rendering-and-sandbox/references/sandbox-and-specrunner.md#protected-command-reads).
31
33
 
32
34
  Read [atomic batches and event-source invocation mappings](../../cratis-screenplay-captures-and-reactions/references/atomic-batches-and-source-mappings.md)
33
35
  for atomic boundaries and the source-identity mapping prerequisite. Start new models
@@ -56,6 +58,6 @@ for the complete interval example and input/target boundaries.
56
58
 
57
59
  Stage's semantic engines admit exact v1–v21 and v23–v25 pairs. V22/v26 and mixed
58
60
  pairs refuse STAGE-ESM-016. Admission of v23–v25 is not admission of described bodies,
59
- atomic mode or protected reads. A CLI may bundle an older compiler/Stage pair: run no-write render
61
+ atomic mode or rendered protected reads. A CLI may bundle an older compiler/Stage pair: run no-write render
60
62
  admission rather than transferring a standalone verdict. Pattern diagnostics arise
61
63
  in Screenplay before rendering; diagnostic arguments add no ESM version or new tool.
@@ -60,12 +60,14 @@ This table is a reading of the renderer's admission, not a render result: run th
60
60
  | Evolved events | initial revisions only (migrations are not rendered) | `STAGE-ESM-026` |
61
61
  | Descriptions, documentation | XML `<summary>`/`<remarks>` doc comments only | characters invalid in XML: `CLI-RENDER-005`; never behavior |
62
62
 
63
- Stage refuses protected command reads with STAGE-ESM-044, described handlers
63
+ The Cratis C# renderer refuses protected command reads with STAGE-ESM-044, described handlers
64
64
  with STAGE-IMPL-002 (even Stub mode), and atomic mode in admitted pairs with
65
65
  STAGE-ESM-043. Literal
66
66
  text rules execute/render ordinal UTF-16 comparisons. Read [language admission](language-admission.md).
67
67
  A CLI's older bundled compiler may fail first: legacy reads/concurrency PLAY0271,
68
- attached handlers PLAY0268. Protected reads bind standalone v25, not a Stage render.
68
+ attached handlers PLAY0268. Protected reads bind v25, not a Stage render. Requires Stage 4.129.0 for semantic
69
+ Host/executor protected reads; older engines refuse -044. Non-Error protected requirements
70
+ refuse STAGE-ESM-045, including reaction invocations; this is not a rendering result.
69
71
  Response-name authoring scopes are not rendered and Scene runtime does not supply them.
70
72
 
71
73
  Compliance mapping in the generated C#: personal data to `[PII]`, operational secrets to
@@ -42,7 +42,7 @@ Compiler syntax: `cheat-sheet.md`. Negative capability claims depend on the tool
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
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.
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
- 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. Stage refuses protected reads (STAGE-ESM-044), not the v25 pair: 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.
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]`.
47
47
 
48
48
  Identity and compliance traps (`identity.md`, `concepts.md`, `events.md`, `purposes.md`, `diagnostics.md` in the Screenplay documentation):
@@ -21,7 +21,8 @@ Requires cratis CLI ≥ 3.57 (`cratis --version`) to render ESM v14 and v15 mode
21
21
 
22
22
  Read [language admission](../cratis-screenplay-toolchain/references/language-admission.md)
23
23
  for v22–v25: text rules render, atomic batches/protected reads/described bodies do
24
- not. Stub mode emits no described-body stubs. Keep protection and report refusal.
24
+ not. The semantic Host and specification runner execute admitted protected reads;
25
+ that is not rendering. Stub mode emits no described-body stubs. Keep protection and report refusal.
25
26
 
26
27
  ## When to use
27
28
 
@@ -128,7 +129,7 @@ One blocker publishes nothing. Codes, limits and fixes: [references/admission.md
128
129
  (`-032`/`-033`), claim-reading/opaque `runs as` gates (`-034`), legacy filters (`-035`), production
129
130
  overrides (`-036`), code validation (`-005`), DateTime filters (`-010`),
130
131
  unsupported conditional productions, composite projection keys and unsupported `all` shapes.
131
- Protected reads refuse `STAGE-ESM-044`, described handlers `STAGE-IMPL-002`
132
+ The Cratis C# renderer refuses protected reads with `STAGE-ESM-044`, described handlers `STAGE-IMPL-002`
132
133
  (even Stub mode), and atomic mode in admitted pairs `STAGE-ESM-043`.
133
134
  - **Binding refusals (`PLAY0268`/`PLAY0271`):** legacy reads, `concurrency`, attached
134
135
  handlers, context/single-result filters, opaque scope/performer, composite `by`,
@@ -159,7 +160,8 @@ files, a policy registration and generated policies, `Common/<Concept>.cs`, one
159
160
  the `[EventType]` event, the validator and the `[ReadModel]` with its query, `scene.json`,
160
161
  and a React/Vite frontend scaffold (`.frontend/`, `package.json`, `tsconfig.json`,
161
162
  `.gitignore`). Per-file detail, the scaffold's dependency set and the `Customizations/`
162
- contract: [references/rendered-application.md](references/rendered-application.md). Scene
163
+ contract, including the opt-in self-reducing layout for confirmed new Cratis C# applications:
164
+ [references/rendered-application.md](references/rendered-application.md). Scene
163
165
  package ids, host capabilities and the boundary from hand-built Components pages:
164
166
  [references/scene-runtime.md](references/scene-runtime.md). A complete renderable model:
165
167
  [references/render-example.md](references/render-example.md).
@@ -190,7 +192,13 @@ disposable runtime**, not a generated application. The default engine appends mo
190
192
  simple literal `validate` rules on top-level properties, but enforces no other rule, no
191
193
  constraint and no command or query authorization; `Stage__Runtime__Engine=semantic` opts
192
194
  in to an engine that does, and refuses what it cannot execute (HTTP 501). The default engine
193
- also refuses routed models (`STAGE-ESM-030`). Callers are built from unsigned headers, so
195
+ also refuses routed models (`STAGE-ESM-030`) and protected reads (`STAGE-ESM-044`).
196
+ Requires Stage 4.129.0 for semantic Host/runner protected reads; older engines refuse
197
+ `STAGE-ESM-044`. Required absence rejects before requirements/generation, read properties
198
+ feed requirements and productions, and non-Error protected requirements refuse
199
+ `STAGE-ESM-045`, including reaction invocations. The Host faults on any outside append,
200
+ even unrelated facts; this is stricter than reference dependency-scoped conflicts.
201
+ Callers are built from unsigned headers, so
194
202
  authorization there is not a security boundary.
195
203
 
196
204
  `cratis/stage-specrunner` checks modeled specifications and writes a results file. The
@@ -29,10 +29,11 @@ Requires Stage 4.119.0 for pattern/random rendering, Host generation and indepen
29
29
  opaque/unsupported rules refuse -005 before pin evaluation. Independent execution
30
30
  always needs pins.
31
31
  Requires Stage 4.124.0 for v24 text-rule admission (`cratis --version` identifies the CLI bundle); older renderers refuse v24 with STAGE-ESM-016.
32
- Requires Stage 4.127.0 for v25 version admission; older renderers refuse v25 with STAGE-ESM-016. Protected reads still refuse STAGE-ESM-044.
32
+ Requires Stage 4.127.0 for v25 version admission; older renderers refuse v25 with STAGE-ESM-016. The Cratis C# renderer still refuses protected reads with STAGE-ESM-044.
33
+ Requires Stage 4.129.0 for semantic Host/executor protected reads; older engines refuse STAGE-ESM-044. Required absence rejects before requirements or generation; read-backed requirements and produced-event mappings execute. Non-Error protected requirements refuse STAGE-ESM-045, including reaction invocations. See [sandbox boundaries](sandbox-and-specrunner.md#protected-command-reads) for ordering and the Host's stricter outside-append fault boundary.
33
34
  Described handlers refuse STAGE-IMPL-002, even Stub mode; atomic mode in an
34
35
  admitted pair refuses STAGE-ESM-043. Version admission never implements a body,
35
- batch or protected decision. Chronological Date/DateTime command comparisons
36
+ batch or rendered protected decision. Chronological Date/DateTime command comparisons
36
37
  select v26 in Screenplay but still refuse STAGE-ESM-016 here; standalone reference
37
38
  success is not rendering or Host/executor admission. Keep the date rule and use
38
39
  authorized gap-fill rather than downgrading to ordinal text or millisecond precision.
@@ -162,7 +163,8 @@ Requires Stage 4.90.0 for snapshot/live lists, 4.96.0 for non-text secrets and 4
162
163
  | `STAGE-ESM-041` | Older renderers refuse non-text secrets; supported renderers keep their original types | Keep classification; upgrade the renderer, never declassify |
163
164
  | `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 |
164
165
  | `STAGE-ESM-043` | `reaction batches atomic` in an admitted version pair | Keep the batch boundary; gap-fill without splitting it |
165
- | `STAGE-ESM-044` | Protected-read preamble, command reads or read-backed conditions/mappings in renderer, Host or specification executor | Keep protection; gap-fill with independently verified target enforcement |
166
+ | `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 |
167
+ | `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 |
166
168
  | `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 |
167
169
  | `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 |
168
170
  | `STAGE-ESM-023` | Information: transition bodies analysed | none |
@@ -3,6 +3,7 @@
3
3
  ## Contents
4
4
 
5
5
  - Scaffold
6
+ - Reducer layout for new applications
6
7
  - What is managed
7
8
  - `Customizations/` (unmanaged)
8
9
  - Re-render checklist
@@ -35,13 +36,52 @@ Consequences: `[ProtectedDecision]` (`Cratis.Arc.Chronicle.ReadModels`) and
35
36
  in the scaffold's package set, as is `[ExecuteCommandsAsSystem]`. This is API
36
37
  availability, not Stage emission or runtime protection: gap-fill must opt into
37
38
  the protected command profile and enroll an admitted projection/key read in the
38
- active unit of work. Stage does not turn `.play` `reads`/`require` into protected decisions.
39
+ active unit of work. The Cratis C# renderer does not turn `.play` `reads`/`require` into protected decisions;
40
+ semantic Host/executor support is separate from generated-application protection.
39
41
  Hand-written scope that needs a newer dependency can raise its version through
40
42
  `Customizations/Dependencies.props` (explicit `Version`, imported last; central management
41
43
  is off), but any override must be proven with a restore and build. The compose file binds local ports `27017` and
42
44
  `35000`, keeps data in the named volumes `chronicle-data` and `chronicle-config`, and
43
45
  `docker compose down --volumes` is the only thing that deletes them.
44
46
 
47
+ ## Reducer layout for new applications
48
+
49
+ Requires Stage 4.128.0 for the Cratis C# self-reducing profile; older renderers emit
50
+ separate `IReducerFor<T>` classes. Existing `CreateProfile` callers remain classic;
51
+ a missing destination/configuration file does not identify a new application.
52
+ For a **confirmed new application**, artifact-planning hosts opt in explicitly:
53
+
54
+ ```csharp excerpt
55
+ var profile = CratisRendering.CreateNewApplicationProfile(
56
+ "Shop", new("Shop.Backend", "Acme.Shop"));
57
+ ```
58
+
59
+ This API is in `Cratis.Stage.Rendering.Cratis`. Pass the profile to scaffold and
60
+ artifact planning through `CratisPlanOptions.Profile`. The scaffold persists
61
+ `.cratis/stage/rendering.json` with exactly
62
+ `{"version":1,"application":"Shop","reducerConvention":"self"}`. On later renders,
63
+ the host reads that file and restores the input; Stage does not search the destination:
64
+
65
+ ```csharp excerpt
66
+ var input = ReducerConventionInput.Read("Shop", configurationJson);
67
+ var profile = CratisRendering.WithReducerConvention(
68
+ CratisRendering.CreateProfile("Shop", new("Shop.Backend", "Acme.Shop")), input);
69
+ ```
70
+
71
+ `configurationJson` is the host-supplied file content. Invalid version, application,
72
+ fields or convention are refused, not defaulted. Self mode emits public static
73
+ `Reduce` overloads and non-public typed-context helpers on the read-model record,
74
+ with unchanged queries and no companion `IReducerFor<T>`. StateView and Automation
75
+ slices use the layout; observer filters become model attributes. Existing purity,
76
+ identity, tenant, deletion and occurrence semantics remain. Model/property/query
77
+ name `Reduce`, replay-hook query names, or generated `Transition_<suffix>` collisions
78
+ refuse `STAGE-ESM-019`; Stage never silently changes layout.
79
+
80
+ No per-model override or existing-application migration is supported. Do not flip
81
+ an existing classic application to `self`: observer identity and old reducer removal
82
+ need migration-aware publication. This opt-in does not automatically change CLI,
83
+ Studio or semantic-engine execution.
84
+
45
85
  ## What is managed
46
86
 
47
87
  Every path in `.cratis-render.json` is managed: the scaffold files (project, solution,
@@ -3,6 +3,7 @@
3
3
  ## Contents
4
4
 
5
5
  - The sandbox: a partial, disposable runtime
6
+ - Protected command reads
6
7
  - Refusals shared by both engines
7
8
  - The specification runner
8
9
  - Choosing between them
@@ -101,6 +102,32 @@ A refusal or an acceptance from the default engine therefore proves nothing beyo
101
102
  lists above. Use the semantic engine, or Debug tests of a render, for
102
103
  evidence about the rest.
103
104
 
105
+ ## Protected command reads
106
+
107
+ Requires Stage 4.129.0 for semantic Host and specification-executor protected reads;
108
+ older engines refuse them with `STAGE-ESM-044`. The default EventModel Host and
109
+ structural runner still refuse the preamble with `STAGE-ESM-044`; the structural
110
+ runner exits `1` without a report. The Cratis C# renderer also retains `-044`:
111
+ executing a model here does not make it renderable.
112
+
113
+ After authorization and property/concept rules, each declared read must exist at
114
+ its key. Missing state rejects with `<View> '<key>' does not exist.` before any
115
+ requirement or generation, even a command-only requirement. `/validate` reports
116
+ absence too. Present read properties feed `require` and produced-event mappings.
117
+ The executor projects prior facts through Chronicle's in-memory read-model scenario,
118
+ preserving event-source-keyed removal and recreation. Join removals, parent keys,
119
+ children and nested scopes remain refused.
120
+
121
+ A protected command with any non-Error requirement refuses `STAGE-ESM-045` before
122
+ execution. This includes reaction-invoked commands, even a specification expecting
123
+ rejection: the outcome is `Unsupported`, before seeding facts, not a passing refusal.
124
+ Do not change modeled severity to get an executable result.
125
+
126
+ The semantic Host faults the session on **any outside append** to its event log,
127
+ even an unrelated one, before committing an accepted command. This interim guard
128
+ is stricter than the reference's dependency-scoped decide/commit conflicts; do not
129
+ claim full reference conflict parity or generated-application protection.
130
+
104
131
  ## Refusals shared by both engines
105
132
 
106
133
  Both engines refuse public events (`STAGE-ESM-032`), foreign or source-event captures
@@ -141,7 +168,7 @@ invalid semantic option.
141
168
  - **Semantic**: creates a fresh in-memory Chronicle log per specification and dispatches
142
169
  admitted commands through Arc's in-memory pipeline; supports explicit-source and routed
143
170
  given events, unconditional production, event assertions, caller and authorization,
144
- command rules, unique constraints, flat and event-source-keyed scoped projections, and
171
+ command rules, protected command reads (including reaction invocations), unique constraints, flat and event-source-keyed scoped projections, and
145
172
  optional snapshot queries, including protected ones: portable authorization is evaluated
146
173
  with the fixture caller, query arguments and key, and an expected denial matches only
147
174
  `then denied`. Report schema `stage-spec-run/1` with outcomes
@@ -150,6 +177,10 @@ invalid semantic option.
150
177
  allocation, external effects, composite values, queries other than optional snapshots, and
151
178
  a reached opaque authorization policy (reported as `Unsupported`). Unsupported is never a pass. Do not feed the file to a legacy reader.
152
179
 
180
+ The runner and generated-fixture checks use Screenplay's public
181
+ `SemanticValidationRules.Check`. This shared rule check does not execute opaque
182
+ generation or validation bodies.
183
+
153
184
  How the runner relates to the verdicts: a structural pass is not a behavioral result. The
154
185
  semantic engine is Stage's own executor running through Arc's in-memory pipeline. It is
155
186
  not the Screenplay reference route, so a semantic pass is never V4 (V4 is reference
@@ -62,6 +62,16 @@ The scaffold's Scene runtime provides:
62
62
  imports and network assets; an explicit importer map is not arbitrary module
63
63
  loading. Diagnostics block mismatched or unavailable bundles.
64
64
 
65
+ Requires Stage 4.130.0 for Stage shell selection from `ui profile` root template,
66
+ options and appearance; older hosts do not apply that complete shell contract.
67
+ The Host and render plan use Scene's shell resolution: root, legacy layout,
68
+ default blueprint layout, then bare shell. Unknown/unavailable/version-mismatched
69
+ roots and roots lacking a `content` outlet produce planning findings or an explicit
70
+ Host startup message, never silent fallback. Shell options such as `navigationMode`,
71
+ `menuTheme` and `showFooter` are applied or reported unsupported. Light/dark/system
72
+ color scheme and accent reach the shell; runtime Scene carries root, appearance
73
+ and defaults but no sample data. Browser evidence is still needed for UI parity.
74
+
65
75
  Keep authoring acceptance, executable admission and runtime behavior separate.
66
76
  Require Stage's plan/diagnostics for emission and a browser run for UI parity;
67
77
  source verification alone proves neither. For authoring details read
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/pi",
3
- "version": "7.64.0",
3
+ "version": "7.65.0",
4
4
  "description": "Configuration-aware Cratis AI integration for Pi",
5
5
  "type": "module",
6
6
  "files": [