@cratis/pi 7.62.0 → 7.64.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 (105) hide show
  1. package/package/corpus/product-sync.json +9 -9
  2. package/package/corpus/skills/cratis-application-slice-conformance/SKILL.md +1 -1
  3. package/package/corpus/skills/cratis-arc-command/references/generated-values.md +27 -12
  4. package/package/corpus/skills/cratis-arc-command/references/shop-generation.md +17 -6
  5. package/package/corpus/skills/cratis-fundamentals-concept/SKILL.md +10 -2
  6. package/package/corpus/skills/cratis-fundamentals-concept/references/shop-generation.md +49 -6
  7. package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +43 -41
  8. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/cases-to-specify.md +11 -2
  9. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/integration-interview.md +24 -0
  10. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/public-events-and-direction.md +76 -10
  11. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/realization-and-gap-fill.md +5 -0
  12. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/todo-list-example.md +1 -1
  13. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translate-example.md +39 -23
  14. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translation-patterns.md +35 -12
  15. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +51 -81
  16. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/atomic-batches-and-source-mappings.md +83 -0
  17. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/capture-map-and-example.md +14 -4
  18. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/reaction-forms.md +59 -0
  19. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/record-capture-specifications.md +60 -0
  20. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/specifying-triggers-and-clock.md +5 -1
  21. package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +37 -30
  22. package/package/corpus/skills/cratis-screenplay-command-surface/references/date-comparisons.md +100 -0
  23. package/package/corpus/skills/cratis-screenplay-command-surface/references/described-handlers.md +82 -0
  24. package/package/corpus/skills/cratis-screenplay-command-surface/references/generated-values-and-responses.md +82 -28
  25. package/package/corpus/skills/cratis-screenplay-command-surface/references/protected-reads.md +113 -0
  26. package/package/corpus/skills/cratis-screenplay-command-surface/references/shop-generation.md +45 -12
  27. package/package/corpus/skills/cratis-screenplay-command-surface/references/text-and-match-rules.md +119 -0
  28. package/package/corpus/skills/cratis-screenplay-command-surface/references/validate-rules.md +26 -6
  29. package/package/corpus/skills/cratis-screenplay-command-surface/verification.json +13 -3
  30. package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +12 -12
  31. package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +5 -3
  32. package/package/corpus/skills/cratis-screenplay-event-modeling/verification.json +5 -1
  33. package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +2 -2
  34. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/evidence-table-template.md +1 -1
  35. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generated-recovery.md +51 -14
  36. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/intent-example.md +5 -0
  37. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/loss-report-template.md +2 -1
  38. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/rule-modeling.md +6 -3
  39. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/signal-to-intent.md +1 -1
  40. package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +22 -28
  41. package/package/corpus/skills/cratis-screenplay-model-authoring/references/choosing-generation.md +20 -7
  42. package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +13 -6
  43. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +9 -1
  44. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +58 -10
  45. package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +4 -2
  46. package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +2 -5
  47. package/package/corpus/skills/cratis-screenplay-model-review/references/anti-patterns.md +2 -2
  48. package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +2 -2
  49. package/package/corpus/skills/cratis-screenplay-model-review/references/quick-self-check.md +2 -1
  50. package/package/corpus/skills/cratis-screenplay-model-review/references/review-questions.md +3 -2
  51. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/principles.md +1 -1
  52. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/vocabulary-map.md +1 -1
  53. package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +2 -3
  54. package/package/corpus/skills/cratis-screenplay-read-surface/references/named-keys.md +3 -1
  55. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +8 -3
  56. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +8 -0
  57. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +6 -4
  58. package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +48 -30
  59. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/berth-reservations.md +10 -4
  60. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-design.md +15 -4
  61. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-example.md +25 -20
  62. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/public-event-coverage.md +14 -3
  63. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-examples.md +9 -3
  64. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +9 -4
  65. package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +3 -1
  66. package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md +4 -4
  67. package/package/corpus/skills/cratis-screenplay-slice-design/references/rule-layers.md +4 -2
  68. package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +4 -3
  69. package/package/corpus/skills/cratis-screenplay-slice-design/references/worked-example.md +8 -8
  70. package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +69 -47
  71. package/package/corpus/skills/cratis-screenplay-specifications/references/actions-beyond-commands.md +11 -1
  72. package/package/corpus/skills/cratis-screenplay-specifications/references/generated-fixtures.md +48 -17
  73. package/package/corpus/skills/cratis-screenplay-specifications/references/outcome-comparison.md +6 -0
  74. package/package/corpus/skills/cratis-screenplay-specifications/references/vocabulary.md +14 -1
  75. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +25 -21
  76. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/boundaries.md +2 -2
  77. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +9 -3
  78. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/multi-service-models.md +4 -3
  79. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +7 -0
  80. package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +32 -22
  81. package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet-example.md +3 -1
  82. package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet.md +47 -2
  83. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostic-arguments.md +60 -0
  84. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +66 -6
  85. package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +67 -23
  86. package/package/corpus/skills/cratis-screenplay-toolchain/references/generation-checks.md +93 -0
  87. package/package/corpus/skills/cratis-screenplay-toolchain/references/generation-strategies-example.md +117 -35
  88. package/package/corpus/skills/cratis-screenplay-toolchain/references/language-admission.md +61 -0
  89. package/package/corpus/skills/cratis-screenplay-toolchain/references/preferred-syntax.md +3 -1
  90. package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +27 -10
  91. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +3489 -335
  92. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
  93. package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +5 -3
  94. package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +6 -1
  95. package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +8 -53
  96. package/package/corpus/skills/cratis-screenplay-ui-composition/references/file-references.md +2 -2
  97. package/package/corpus/skills/cratis-screenplay-ui-composition/references/interaction-example.md +54 -0
  98. package/package/corpus/skills/cratis-screenplay-ui-composition/verification.json +6 -3
  99. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +30 -29
  100. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +39 -9
  101. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/choosing-generation.md +28 -8
  102. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/publication-and-recovery.md +31 -0
  103. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/sandbox-and-specrunner.md +8 -0
  104. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +4 -1
  105. package/package.json +1 -1
@@ -20,7 +20,7 @@ Compiler syntax: `cheat-sheet.md`. Negative capability claims depend on the tool
20
20
  16. PLAY0285/0286/0287 are static spec checks: do not edit expectations blindly. An older bundled compiler can report PLAY0285 falsely on reaction cascades; confirm with the standalone tool before changing a `then`.
21
21
  17. `null` in specs only for optional read-model properties (PLAY0350); omit the property or record a gap; whether an optional detail is really a separate fact is a review question, not the fix for this code.
22
22
  18. `then` events are exhaustive and ordered (use `then events in any order` for order only). From ESM v6 they include reaction cascades; after `when append` they list only what followed the append.
23
- 19. `reads` without `by` means a singleton view; `reads` never binds (PLAY0271), and neither does a command `concurrency` block (PLAY0271, error).
23
+ 19. Under `command reads protected`, omitted `by` uses the command identifier; absent identifier is PLAY0782. Eligible reads bind v25; legacy reads and `concurrency` retain PLAY0271. Combining reads/concurrency under opt-in is PLAY0783.
24
24
  20. Declare each event once, in its producing slice; renaming a persisted event needs `id "OldName"`; renaming a constraint discards its index.
25
25
  21. Quoted `import "x/*.play"` = my files; unquoted `import Ctx.Event` = another context's contract (does not bind: PLAY0268).
26
26
  22. Construct keywords are closed (`aggregate`, `saga`, `workflow` do not exist): PLAY0029 or PLAY0001/0022/0024.
@@ -29,6 +29,8 @@ Compiler syntax: `cheat-sheet.md`. Negative capability claims depend on the tool
29
29
  25. MCP writes: propose, review, approval, apply by the identity owner (the session that owns the MCP connection); other subagents return edit requests; proposals are connection-local, at most 16 (`cratis-screenplay-model-authoring`).
30
30
  26. Operations/systems and `numbers exact` source mode remain unadmitted. Qualifying retained non-route Double literals select ESM v11. Sources/streams/routes bind as v8, public/direction forms v9, identity/overrides/filters v10. Stage construct checks run through the CLI's newest admitted version; supported equality filters and strategies render (`renderable-subset.md`).
31
31
  27. Translate crosses the public boundary: inbound foreign/data to private local facts; outbound private facts to one local public type. Public metadata needs explicit direction; a quoted origin is an unverified store name, not a path. Commands never publish public events. In-app private follow-up is Automation; see public-events-and-direction in the method skill.
32
+ - PLAY0694: a directionless Translate's unrouted reaction to its own capture's append (including children/nested) warns and fails `--warnaserror`. Keep the capture here, move the reaction/specs to Automation; no automatic split. Explicit inbound already refuses local consumption (PLAY0616). Older compilers do not report it; see the cheat sheet for the minimum version.
33
+ - PLAY0700/0701: event-capture keys must be required content properties of every `from` event, not `$eventSourceId`. Supply typed `given <Event>` / `when append <Event>`, not capture records. PLAY0701 repairs only a single-source-event capture; no PLAY0700 repair. Older runners do not deliver events to captures; see the cheat sheet for the minimum version. See automations-and-translations `references/public-events-and-direction.md`.
32
34
  28. Personas drive the board: a persona must list every policy on the path, including module-level `IsAuthenticated`.
33
35
  29. A sample's source check is not execution. Run selected admitted specifications through `screenplay test`/MCP; given==when clock still fires no scheduled occurrence.
34
36
  30. Claims compare with `matches` (`claim "dept" matches "Finance"`); `==` is PLAY0120. Conditions with `contains`/`starts with` compile but do not bind.
@@ -40,7 +42,7 @@ Compiler syntax: `cheat-sheet.md`. Negative capability claims depend on the tool
40
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.
41
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.
42
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.
43
- 38. A rule that depends on stored state is `reads <View>` + `require <expr> message "..."` (stated intent; PLAY0268/0271 at binding are expected in design mode). The slice `description` must mark it NOT enforced in the model today and name the target: Arc `[ProtectedDecision]` + `DecisionRead<T>` (available to gap-fill, not emitted protection), Chronicle DCB (`concurrency` scope), or a constraint where one fits. 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. 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.
44
46
  Requires Arc 22.39.0 or later for `[ProtectedDecision]`.
45
47
 
46
48
  Identity and compliance traps (`identity.md`, `concepts.md`, `events.md`, `purposes.md`, `diagnostics.md` in the Screenplay documentation):
@@ -60,7 +62,7 @@ Identity and compliance traps (`identity.md`, `concepts.md`, `events.md`, `purpo
60
62
  unknown, not safe. Arc needs `[ExecuteCommandsAsSystem]` to supply a principal.
61
63
 
62
64
  Traps 39 to 44 are tool traps.
63
- 39. A handler never binds: PLAY0268 "Command '<n>' handler requires a constrained implementation attachment", with a file, a fence, `implementation` or `hint` alike. `implementation` and `hint` are accepted on a command handler, an operation execute/compensate phase and a command property named rule, and are rejected on concept rules, built-in property rules and whole-command `require`/`validate` bodies; on a handler they are authoring intent only (no execution, lock or confirmation). A handler slice is gap-fill, not a customization of a rendered slice.
65
+ 39. Attached handlers remain PLAY0268; pending `handler implementation` beside unconditional productions binds as a described v23 command (PLAY0695). Body-reaching specs are Unsupported ImplementationBody; Stage refuses STAGE-IMPL-002, including Stub mode. `implementation` and `hint` are accepted on a command handler, an operation execute/compensate phase and a command property named rule, and are rejected on concept rules, built-in property rules and whole-command `require`/`validate` bodies; hints do not execute, lock or confirm a body. A handler slice is gap-fill, not a customization of a rendered slice.
64
66
  40. `numbers exact` (the source mode) parses but never binds (PLAY0268; "not admitted by any supported executable model (ESM) version yet") and is PLAY0001 on older compilers; it is absent from `grammar.md`. Exact lowering of qualifying Double-mode literals is separate (v11). Never use it in a model or example meant to execute.
65
67
  41. MCP roots bug: a dynamic-root server on an old tool answers the roots request with an `id: null` error right after `notifications/initialized`; hosts treat it as fatal, and `open-workspace.path` does not help. Start with a fixed root (`screenplay mcp <folder>`, `cratis screenplay mcp` in a project with `.cratis/ai.json`).
66
68
  Requires Screenplay 4.63.2 or later (`screenplay --version`) for a dynamic-root server; the compiler bundled in older cratis releases lacks it.
@@ -41,7 +41,12 @@
41
41
  { "kind": "skill-contains", "value": "cratis screenplay validate" },
42
42
  { "kind": "skill-contains", "value": "validating one file with `cratis screenplay validate file.play`", "file": "references/traps.md" },
43
43
  { "kind": "skill-contains", "value": "`notifications/initialized`" },
44
- { "kind": "skill-contains", "value": "A handler never binds" },
44
+ { "kind": "skill-contains", "value": "Pending described handlers bind but do not execute their bodies" },
45
+ { "kind": "skill-contains", "value": "STAGE-ESM-043", "file": "references/language-admission.md" },
46
+ { "kind": "skill-contains", "value": "v25", "file": "references/language-admission.md" },
47
+ { "kind": "skill-contains", "value": "PLAY0787", "file": "references/diagnostics.md" },
48
+ { "kind": "skill-contains", "value": "stepIndex", "file": "references/diagnostic-arguments.md" },
49
+ { "kind": "skill-contains", "value": "never parse message text", "file": "references/diagnostic-arguments.md" },
45
50
  { "kind": "skill-contains", "value": "references/sources-and-streams.md" },
46
51
  { "kind": "skill-contains", "value": "CLI-RENDER-004" },
47
52
  { "kind": "skill-contains", "value": "Concept strategies (v15)" },
@@ -230,66 +230,23 @@ and the review checklist. `contribute to Navigation` stays the flat contribution
230
230
 
231
231
  ## Interactions — what a click does
232
232
 
233
- A screen can say what it shows; an interaction says what happens when someone
234
- acts. Three words carry it:
235
-
236
- | Word | What it is |
237
- | --- | --- |
238
- | **Interaction trigger** | the `on <thing>` clause: `click`, `double click`, `select`, `submit`, `change`, `load`/`unload`, `enter`/`leave`, `event <Event>`, `interval <n> <unit>`, or a declared application trigger |
239
- | **Action** | a closed set: `execute`, `navigate to`/`navigate back`, `open dialog`/`close dialog`, `refresh`, `set … to`, `notify`, `confirm`, `raise` |
240
- | **Behavior** | a bundle of trigger-to-action bindings; inline (`on …`) or named (`behavior` + `uses`) |
233
+ An interaction wires an `on <thing>` trigger to actions, inline or through named
234
+ `behavior` + `uses`. This is closed UI wiring, not scripting; validation stays on
235
+ the command. Trigger/action syntax is in [interaction example](references/interaction-example.md)
236
+ and [guarded interactions](references/guarded-interactions.md).
241
237
 
242
238
  Guarded alternatives and `where` deprecation:
243
239
  [guarded interactions](references/guarded-interactions.md).
244
240
 
245
- Complete named/inline behavior example:
246
-
247
- ```screenplay
248
- concept InvoiceId : Uuid
249
-
250
- behavior ConfirmThenExecute
251
- parameter command
252
- parameter message
253
- on click
254
- confirm message
255
- on success
256
- execute command
257
-
258
- module Invoicing
259
- feature InvoiceManagement
260
- slice StateChange CancelInvoice
261
- command CancelInvoice
262
- invoiceId InvoiceId identifier
263
- produces event InvoiceCancelled
264
- screen CancelInvoiceScreen
265
- data InvoiceStatusView via query InvoiceStatusById by invoiceId
266
- uses ConfirmThenExecute
267
- command CancelInvoice
268
- message "Cancel this invoice?"
269
- on enter
270
- refresh InvoiceStatusById
271
- on failure
272
- notify error "The invoice could not be loaded"
273
- slice StateView InvoiceStatus
274
- readmodel InvoiceStatusView
275
- invoiceId InvoiceId
276
- cancelled Bool
277
- projection InvoiceStatuses => InvoiceStatusView
278
- from InvoiceCancelled
279
- invoiceId = $eventSourceId
280
- cancelled = true
281
- query InvoiceStatusById => InvoiceStatusView optional
282
- by invoiceId InvoiceId
283
- ```
284
-
285
- The inline event targets `invoiceId`; the projection gets it from event context.
241
+ Read [interaction example](references/interaction-example.md) when wiring a
242
+ named confirmation behavior and an inline refresh to the same screen.
286
243
  Scalar/named `returns` bind and reference-execute (ESM v7).
287
244
  Renderer generation/response limits: command-surface `references/generated-values-and-responses.md`.
288
245
  Screenplay resolves response names in form submit and execute success (Requires Screenplay 4.148.0 or later);
289
246
  own failure use is PLAY0685. No ESM change; Scene runtime binding remains downstream.
290
247
  An existing success continuation does not imply a response contract.
291
- Read [response continuations](references/response-continuations.md) for precedence,
292
- nested/failure scopes, PLAY0485, examples and tagged evidence.
248
+ Read [response continuations](references/response-continuations.md) for scope,
249
+ precedence, PLAY0485 and examples.
293
250
 
294
251
  - Write the one-off case inline; name it with `behavior` when several places need
295
252
  the same wiring. A `uses` site must supply exactly the declared parameters
@@ -307,8 +264,6 @@ nested/failure scopes, PLAY0485, examples and tagged evidence.
307
264
  - **A declared `trigger` is not a UI event.** Use `on click`, not `trigger`, for a
308
265
  button. `on <Trigger>` observes an application trigger and `raise <Trigger>`
309
266
  fires one; that is where the two meet.
310
- - Interactions are a closed vocabulary, not a scripting language. Validation stays
311
- on the command; the UI surfaces it.
312
267
 
313
268
  ## `ui profile` and `theme`
314
269
 
@@ -6,8 +6,8 @@ This reference holds the three meanings of `file` and the rules for paths and lo
6
6
 
7
7
  Three meanings, one word:
8
8
 
9
- - **Backend implementation attachment.** On a command `handler` (which never
10
- binds, `PLAY0268`), a validation
9
+ - **Backend implementation attachment.** On an attached command `handler` (still
10
+ PLAY0268; pending described handlers instead bind v23 without a file), a validation
11
11
  rule predicate, a query `performer`, a reducer rule, a reaction trigger, a
12
12
  `constraint` and a `policy`, `file` stands in for the inline body: the
13
13
  implementation lives there. These are the files a host inventories.
@@ -0,0 +1,54 @@
1
+ <!-- Copyright (c) Cratis. All rights reserved. -->
2
+ <!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
3
+
4
+ # Named and inline interaction example
5
+
6
+ Interaction triggers are `click`, `double click`, `select`, `submit`, `change`,
7
+ `load`/`unload`, `enter`/`leave`, `event <Event>`, `interval <n> <unit>` or a declared
8
+ application trigger. Actions are `execute`, `navigate to`/`navigate back`,
9
+ `open dialog`/`close dialog`, `refresh`, `set … to`, `notify`, `confirm` and `raise`.
10
+ A behavior bundles trigger-to-action bindings, inline (`on …`) or named
11
+ (`behavior` + `uses`); these closed vocabularies are not scripting.
12
+
13
+ The named behavior confirms before executing; the screen also refreshes on enter.
14
+ The inline event targets `invoiceId`, which the projection reads from event context.
15
+ Validate the complete model with `screenplay <root> --warnaserror`; that validates
16
+ source, not Scene runtime wiring.
17
+
18
+ ```screenplay
19
+ concept InvoiceId : Uuid
20
+
21
+ behavior ConfirmThenExecute
22
+ parameter command
23
+ parameter message
24
+ on click
25
+ confirm message
26
+ on success
27
+ execute command
28
+
29
+ module Invoicing
30
+ feature InvoiceManagement
31
+ slice StateChange CancelInvoice
32
+ command CancelInvoice
33
+ invoiceId InvoiceId identifier
34
+ produces event InvoiceCancelled
35
+ screen CancelInvoiceScreen
36
+ data InvoiceStatusView via query InvoiceStatusById by invoiceId
37
+ uses ConfirmThenExecute
38
+ command CancelInvoice
39
+ message "Cancel this invoice?"
40
+ on enter
41
+ refresh InvoiceStatusById
42
+ on failure
43
+ notify error "The invoice could not be loaded"
44
+ slice StateView InvoiceStatus
45
+ readmodel InvoiceStatusView
46
+ invoiceId InvoiceId
47
+ cancelled Bool
48
+ projection InvoiceStatuses => InvoiceStatusView
49
+ from InvoiceCancelled
50
+ invoiceId = $eventSourceId
51
+ cancelled = true
52
+ query InvoiceStatusById => InvoiceStatusView optional
53
+ by invoiceId InvoiceId
54
+ ```
@@ -33,15 +33,18 @@
33
33
  },
34
34
  {
35
35
  "kind": "skill-contains",
36
- "value": "produces event InvoiceCancelled"
36
+ "value": "produces event InvoiceCancelled",
37
+ "file": "references/interaction-example.md"
37
38
  },
38
39
  {
39
40
  "kind": "skill-contains",
40
- "value": "invoiceId = $eventSourceId"
41
+ "value": "invoiceId = $eventSourceId",
42
+ "file": "references/interaction-example.md"
41
43
  },
42
44
  {
43
45
  "kind": "skill-contains",
44
- "value": "InvoiceStatusView optional"
46
+ "value": "InvoiceStatusView optional",
47
+ "file": "references/interaction-example.md"
45
48
  },
46
49
  {
47
50
  "kind": "skill-contains",
@@ -17,6 +17,12 @@ whether it is admitted; reading the admission rules is not a render result.
17
17
 
18
18
  Requires cratis CLI ≥ 3.57 (`cratis --version`) to render ESM v14 and v15 models; an older CLI refuses newer ESM versions with `CLI-RENDER-004` (or `STAGE-ESM-016` from Stage directly).
19
19
 
20
+ ## Batches, described handlers, text rules and protected reads
21
+
22
+ Read [language admission](../cratis-screenplay-toolchain/references/language-admission.md)
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.
25
+
20
26
  ## When to use
21
27
 
22
28
  - Deciding whether a model can be rendered, or reading a blocked render.
@@ -66,7 +72,14 @@ printed), `1` is a missing input. Add `-o json` for the counts and the publicati
66
72
 
67
73
  Facts that surprise:
68
74
 
69
- - **Binding uses the CLI's bundled Screenplay compiler**, which differs from a standalone one. A model that binds is not necessarily renderable: Stage admits exact ESM v1–v17 and v19 pairs (not v18/v20), then checks constructs; CLI admission can stop at v16. A newer model reports `CLI-RENDER-004` (direct Stage: `STAGE-ESM-016`). Supported generation strategies, freshness scopes, responses, equality filters, enum numbers and concept compliance render.
75
+ - **Binding uses the CLI's bundled compiler**, not the standalone one. Version admission
76
+ does not imply construct support: exact ESM v1–v21 and v23–v25 pairs are admitted,
77
+ while v22/v26 and mixed pairs refuse `STAGE-ESM-016`. Pattern/random generation and checksum validation
78
+ render with an admitting renderer; `generate rule` still refuses `STAGE-ESM-028`.
79
+ Read [references/admission.md](references/admission.md) for the introducing-release
80
+ prerequisites, all-Proven unpinned specifications and construct/pin checks (-011/-038).
81
+ An older CLI bundle can refuse `CLI-RENDER-004` (direct Stage: `STAGE-ESM-016`);
82
+ keep refused models for gap-fill.
70
83
  - **Render never builds, tests or runs** the output. A published render is admission and
71
84
  publication only; build and tests are separate results (see "Verify"). Admission can be
72
85
  green while a rendered Debug test fails (for example a query assertion on the key).
@@ -81,7 +94,7 @@ Facts that surprise:
81
94
 
82
95
  `--scope` renders an admitted part while other slices wait for hand-written code or
83
96
  renderer support. The whole model must still compile and bind, so a `PLAY0268`, protected
84
- identity/enum, handler or newer-than-v15 problem anywhere blocks even a scoped render.
97
+ identity/enum, attached handler or unsupported ESM version anywhere blocks even a scoped render.
85
98
  `PLAN-*` problems in unselected slices become warnings and `STAGE-ESM-*` refusals in
86
99
  unselected slices do not block. A scoped plan has no application scaffold or default Scene
87
100
  (with no manifest in the destination the plain scaffold is added). A dependency in another
@@ -91,27 +104,11 @@ first). Unselected managed files are preserved. A scoped result is evidence for
91
104
 
92
105
  ## Publication and recovery
93
106
 
94
- Ownership is the destination's **`.cratis-render.json`** manifest (semantic revision,
95
- identity, path and SHA-256 per artifact); there are no in-file markers. Interrupted
96
- commits are journaled in the **`.cratis-render/`** control directory (journal, staging,
97
- backups). Never stage `.cratis-render/` in git; commit the manifest with the output.
98
-
99
- - An unmanaged file at a planned path is refused, even with `--force`.
100
- - A user-modified managed file is refused unless it is still active **and** `--force` is
101
- given; `--force` replaces it. It never overwrites unmanaged files and never deletes a
102
- modified stale file. A stale managed file is removed only if its bytes still match.
103
- - Recovery runs before planning, even when planning then fails. **`recovered: true` in the
104
- result means stop and reconcile**: the receipt does not describe what recovery changed.
105
- - An unchanged re-render writes nothing (`unchanged` equals the artifact count).
106
- - Use exclusive access to the destination; a receipt is a filesystem result, not a Git commit, and the command creates no branch, commit or PR.
107
- - Drift: `cratis render ... --check` is the first probe; exit `6` means pending changes.
108
- Otherwise compare successive manifests' `semanticRevision` for renders with the same
109
- `--name` and inputs. Do not compare the MCP `modelRevision` with the manifest: their
110
- application identities can differ.
111
-
112
- A modified managed file reports `Managed artifact 'Program.cs' was modified by the user; pass --force to replace it.`
113
- Find out why it was edited, move the intent into the model or `Customizations/`, then
114
- re-render; use `--force` only to discard the edit on purpose.
107
+ Read [publication and recovery](references/publication-and-recovery.md) before
108
+ publishing or using `--force`. Commit `.cratis-render.json`, never the
109
+ `.cratis-render/` control directory. Force never overwrites unmanaged files or
110
+ modified stale artifacts. Recovery runs before planning:
111
+ `recovered: true` means stop and reconcile. Use `--check` for drift, not MCP-to-manifest revision comparisons.
115
112
 
116
113
  ## Admission
117
114
 
@@ -126,14 +123,18 @@ One blocker publishes nothing. Codes, limits and fixes: [references/admission.md
126
123
  single-hop reaction append specifications, Debug specifications and authored UI through Scene.
127
124
  - **Refused:** Translate/captures, non-event triggers, opaque bodies and clock specs (`STAGE-ESM-024`);
128
125
  mixed effects (`STAGE-ESM-037`, redelivery duplicates events); unsupported reaction mappings (`-039`),
129
- protected identities/enums (`-040`), non-text secrets (`-041`); generated types/results (`-028`/`-038`);
126
+ protected identities/enums (`-040`); unsupported generated types/results (`-028`/`-038`);
130
127
  appends beyond single-hop/cascade specs (`-011`), absence (`-027`), evolution (`STAGE-ESM-026`), public/foreign events
131
128
  (`-032`/`-033`), claim-reading/opaque `runs as` gates (`-034`), legacy filters (`-035`), production
132
- overrides (`-036`), code validation (`-005`), snapshot lists/DateTime filters (`-010`), conditional
133
- productions, composite projection keys and `all`. Through v15 is construct admission.
134
- - **Binding refusals (`PLAY0268`/`PLAY0271`):** `reads`, `concurrency`, handlers,
135
- context/single-result filters, opaque scope/performer, composite `by`, enum/identity
136
- compliance and subject lineage. Never drop protection.
129
+ overrides (`-036`), code validation (`-005`), DateTime filters (`-010`),
130
+ unsupported conditional productions, composite projection keys and unsupported `all` shapes.
131
+ Protected reads refuse `STAGE-ESM-044`, described handlers `STAGE-IMPL-002`
132
+ (even Stub mode), and atomic mode in admitted pairs `STAGE-ESM-043`.
133
+ - **Binding refusals (`PLAY0268`/`PLAY0271`):** legacy reads, `concurrency`, attached
134
+ handlers, context/single-result filters, opaque scope/performer, composite `by`,
135
+ enum/identity compliance and subject lineage. Eligible protected reads bind v25;
136
+ pending handlers with unconditional productions bind v23, but neither renders.
137
+ Never drop protection.
137
138
 
138
139
  A refusal is not a licence to weaken the model: drop no specification, event generation or
139
140
  protection to get a render; keep the model, record the capability gap and gap-fill.
@@ -11,12 +11,31 @@
11
11
  - Specification rules (`STAGE-ESM-011`)
12
12
  - Refusals seen while drafting a model
13
13
 
14
- Stage admits exact ESM v1–v17 and v19 language/semantic pairs to construct planning,
15
- not v18 or v20; unknown pairs report `STAGE-ESM-016`. The CLI's bundled renderer
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
16
16
  may stop at v16 and refuse newer models with `CLI-RENDER-004`.
17
17
 
18
- Requires Stage 4.96.0 for v16, 4.101.0 for v17, 4.102.0 for v19, and 4.103.0 for rendered redelivery; older renderers refuse the respective shapes.
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.
19
19
  Requires Cratis CLI 3.60.0 (`cratis --version`) for v16 rendering.
20
+ Requires Stage 4.109.0 for v20 generated-concept rules; older renderers refuse v20.
21
+ It renders New() plus ConceptValidator and refuses invalid pins with STAGE-ESM-011.
22
+ Requires Stage 4.115.0 for v21 admission and all-Proven unpinned rendered specs;
23
+ older renderers refuse v21 or require rule-bearing pins even when Proven.
24
+ Requires Stage 4.117.0 for warning/info-severity generated-concept rules; older
25
+ renderers refuse them with STAGE-ESM-038. All severities are enforced at runtime.
26
+ Requires Stage 4.118.0 for semantic checksum validation; older renderers refuse it with STAGE-ESM-042.
27
+ Requires Stage 4.119.0 for pattern/random rendering, Host generation and independent executor fixture checks; older renderers refuse those strategies with STAGE-ESM-028.
28
+ `generate rule` still refuses -028. Any Unproven/Refuted rule needs a pin (-038);
29
+ opaque/unsupported rules refuse -005 before pin evaluation. Independent execution
30
+ always needs pins.
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.
33
+ Described handlers refuse STAGE-IMPL-002, even Stub mode; atomic mode in an
34
+ admitted pair refuses STAGE-ESM-043. Version admission never implements a body,
35
+ batch or protected decision. Chronological Date/DateTime command comparisons
36
+ select v26 in Screenplay but still refuse STAGE-ESM-016 here; standalone reference
37
+ success is not rendering or Host/executor admission. Keep the date rule and use
38
+ authorized gap-fill rather than downgrading to ordinal text or millisecond precision.
20
39
 
21
40
  Binding with the CLI's bundled compiler is a separate
22
41
  prerequisite. The exhaustive construct table is `references/renderable-subset.md` in
@@ -115,13 +134,13 @@ Requires Stage 4.90.0 for snapshot/live lists, 4.96.0 for non-text secrets and 4
115
134
  | `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 |
116
135
  | `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 |
117
136
  | `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 |
118
- | `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. A scalar validated key renders as its primitive and is converted inside the query, so an out-of-rule key finds no instance instead of failing validation; a validated concept inside a composite or collection argument is refused | Keyed `XById => X optional` queries or snapshot/observable lists. Equality filters render on both collections; DateTime filters, required filters after optional ones and nested validated arguments refuse 010. Filter-name collisions refuse 012. Context/single-result filters, opaque scope/performer and composite `by` remain PLAY0268 |
137
+ | `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 |
119
138
  | `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 |
120
139
  | `STAGE-ESM-012` | Generated C# names collide (properties, types, namespaces, constraints) | Rename |
121
140
  | `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 |
122
141
  | `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 |
123
142
  | `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 |
124
- | `STAGE-ESM-016` | Model language/semantic pair is not an audited ESM v1–v17 or v19 pair; v18 and v20 remain refused. 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 |
143
+ | `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 |
125
144
  | `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 |
126
145
  | `STAGE-ESM-018` | `$strings.` key missing in the default locale or containing formatting characters | Fix the strings |
127
146
  | `STAGE-ESM-019` | Reducer structure or body not admitted (outside a `StateView`, impure, does not compile) | An equivalent pure body, or gap-fill |
@@ -131,8 +150,8 @@ Requires Stage 4.90.0 for snapshot/live lists, 4.96.0 for non-text secrets and 4
131
150
  | `STAGE-ESM-026` | A selected event, or an event a selected slice depends on (producing command, observing projection or reducer, specification, constraint target), is above its initial revision: `Event 'X' has evolved to revision N; Stage does not render event migrations yet.` The whole selection is refused, nothing is emitted | Not fixable by editing without dropping the evolution. Gap-fill the evolved events and hand-write the migrations (`cratis-chronicle-event-type-migration`). A scoped slice of initial events that depends on no evolved event still renders |
132
151
  | `STAGE-ESM-024` | Interval, schedule, application, startup and shutdown triggers, opaque reaction bodies, captures, Translate (including directed Translate), and clock/trigger/capture specifications. Event-triggered Automation slices render as Chronicle reactors, subject to `-013` and `-034` to `-040` below | Keep refused scope as gap-fill; do not confuse semantic Host settlement with live reactor delivery |
133
152
  | `STAGE-ESM-027` | A specification asserting a read model is absent (`then no readmodel`) is not rendered (the semantic specification engine executes keyed absence) | Keep the specification; verify absence another way and record the gap |
134
- | `STAGE-ESM-028`, `-029` | Generated values or responses Stage cannot render. Supported scalar UUID/String-concept strategies, v15 freshness, generation fixtures, scalar/named responses and `then returns` render; unsupported generated types report `-028` | Probe the supported form; preserve refused combinations as gap-fill |
135
- | `STAGE-ESM-038` | Generated/response results combined with routes, generated-property/concept rules, legacy allocation, non-scalar/non-command response sources or generated-name collisions | Keep the model; gap-fill that command |
153
+ | `STAGE-ESM-028`, `-029` | Generated values or responses Stage cannot render. Supported scalar UUID/String-concept strategies and Int random, v15 freshness, generation fixtures, scalar/named responses and `then returns` render; `generate rule`, unknown strategies and unsupported generated types report `-028` | Probe the supported form; preserve refused combinations as gap-fill |
154
+ | `STAGE-ESM-038` | Generated/response results combined with routes, generated-property rules, legacy allocation, non-scalar/non-command response sources or generated-name collisions | Keep the model; gap-fill that command |
136
155
  | `STAGE-ESM-039`, `-040` | Reaction conditions, destinations or mappings outside the faithful target subset; protected identity uses (including reaction destinations) and protected enum concepts | See the event-reaction boundary above; never declassify protected values |
137
156
  | `STAGE-ESM-030` | Named event-source or stream definition with a reserved stored name; unformattable routed fixtures or command replay routes. The default sandbox engine also reports it for every routed model | Rename the reserved name; render the model with `cratis render`, not `cratis run` |
138
157
  | `STAGE-ESM-031` | Whole-number literal outside the C# `int` range below ESM v8 (v8 and later render `long`) | Raise the model to v8 constructs or gap-fill |
@@ -141,6 +160,10 @@ Requires Stage 4.90.0 for snapshot/live lists, 4.96.0 for non-text secrets and 4
141
160
  | `STAGE-ESM-035` | Observer filters on legacy syntax paths; semantic reaction/reducer filters render | Use semantic admission |
142
161
  | `STAGE-ESM-036` | Per-production route overrides | Gap-fill |
143
162
  | `STAGE-ESM-041` | Older renderers refuse non-text secrets; supported renderers keep their original types | Keep classification; upgrade the renderer, never declassify |
163
+ | `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
+ | `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-IMPL-002` | Described command handler, naming command and RequirementId; also refused in Stub mode | Supply authorized implementation outside rendering; no generated stub is emitted |
144
167
  | `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 |
145
168
  | `STAGE-ESM-023` | Information: transition bodies analysed | none |
146
169
  | `STAGE-CRATIS-001` to `-005` | Profile or `scene.json` not the package-owned shape; unrecognized or missing scaffold input; artifact path collision (`-004`, for example case names that normalize to one path); a modeled module or feature that would render into the reserved `Customizations/` (`-005`) | Rename the module, feature or case |
@@ -222,8 +245,10 @@ context, no directives, no writes to statics, `throw` limited to
222
245
  pure expressions, and no generated type shadowing a referenced one. Anything else is
223
246
  `STAGE-ESM-019`, `-021` or `-022`. A reducer needs a `StateView` slice, its read model in the
224
247
  same slice, a required Guid or text identifier and a matching keyed query. Code validation
225
- (`STAGE-ESM-005`) is refused outright (opaque pure policies render), and a command
226
- `handler` never binds (`PLAY0268`).
248
+ (`STAGE-ESM-005`) is refused outright (opaque pure policies render). Attached
249
+ command handlers remain `PLAY0268`; a pending handler beside unconditional
250
+ productions binds as a described v23 command, but Stage refuses it with
251
+ `STAGE-IMPL-002`, even in Stub mode.
227
252
 
228
253
  ## Specification rules (`STAGE-ESM-011`)
229
254
 
@@ -247,6 +272,11 @@ same slice, a required Guid or text identifier and a matching keyed query. Code
247
272
  query whose fixtures use streams other than the queried key.
248
273
  - A when-less specification is admitted only as `then denied` on an authorized keyed
249
274
  query, or `given readmodel` plus `then query` on an unprotected query.
275
+ - Generated pins must satisfy shape and concept rules; failing pins refuse -011,
276
+ not an input-validation or exception assertion. Unpinned generation with any
277
+ Unproven/Refuted rule refuses -038; all-Proven rules permit unpinned rendered
278
+ specs within the admitted expectation shapes. Independent execution still
279
+ requires pins; see the introducing-release prerequisites above.
250
280
  - Descriptions and event documentation render only as XML doc comments; comments are never rendered, and neither is behavior.
251
281
 
252
282
  ## Refusals seen while drafting a model
@@ -9,20 +9,40 @@ Render only the supported part of the [shared shop model](../../cratis-screenpla
9
9
  CustomerId (`cus_` + ULID), TypeID OrderId and NanoID InviteCode. ApiKey remains
10
10
  secret with no generated property; do not turn .NET Bytes(32) credential generation
11
11
  into a promise of Stage secret generation. The Arc context-aware OrderId is not
12
- Stage's wall-clock TypeID factory or tenant isolation.
12
+ tenant isolation: Stage's TypeID factory uses the command receipt time, not the
13
+ tenant. InvoiceNumber pattern/checksum and random Int TicketNumber render as
14
+ Fundamentals Pattern/Integer factories; dated patterns use receipt-time context.
15
+ Read [admission.md](admission.md) for checksum validation and pattern/random
16
+ rendering prerequisites and their STAGE-ESM-042/-028 refusals on older renderers.
13
17
 
14
18
  Select the strategy on the model's concept, not in managed C#: implicit UUID for
15
19
  ordinary identity, UUIDv7/ULID for time-ordered values, TypeID for typed text,
16
20
  NanoID for opaque text or bytes for an exact entropy budget. Read the shared
17
21
  [strategy, fixture and renderer reference](../../cratis-screenplay-command-surface/references/generated-values-and-responses.md)
18
- for exact shapes and refusals. Time-ordered factories use wall clock, not
19
- receipt-time `GenerationContext`; neither strict millisecond order nor `given clock`
20
- ID synthesis is promised.
22
+ for exact shapes and refusals. Time-ordered factories use receipt-time
23
+ `GenerationContext`.
24
+ Neither strict millisecond order nor `given clock` ID synthesis is promised.
25
+ Requires Stage 4.94.0 for receipt-time factories; older factories use wall clock.
26
+ Requires Stage 4.109.0 for v20 rule-bearing generated concepts; older renderers
27
+ refuse v20. It emits both New() and ConceptValidator; generated values failing
28
+ rules are server defects after authorization/input validation, never redraws.
29
+ Requires Stage 4.115.0 for all-Proven unpinned rendered specs; older renderers
30
+ require pins even when Proven. Any Unproven/Refuted rule still needs a pin (-038).
31
+ Invalid pins refuse STAGE-ESM-011; opaque/unsupported rules refuse -005 before
32
+ pin evaluation. Every severity is enforced at runtime.
33
+ Requires Stage 4.117.0 for warning/info-severity concept rules; older renderers refuse them with STAGE-ESM-038.
21
34
 
22
- ## Pitfalls
35
+ ## When not to
23
36
 
24
37
  Do not generate client-owned inputs, idempotency keys, gapless invoice numbers or
25
38
  secrets. Generation is not authorization, projection readiness or external-effect
26
- success. Pattern/random/rule execution, sequences and clock specs remain unsupported.
27
- At ESM v15, Stage emits explicit whole-source concurrency scopes; below v15 it
28
- keeps unguarded handlers. This is not a general freshness API.
39
+ success. Patterns are not gapless/sequential allocators or secrets; check digits
40
+ catch typos, not forgery. Short codes need uniqueness separate from whole-source
41
+ freshness. `generate rule` remains unsupported by Stage (STAGE-ESM-028), and
42
+ sequence is refused by Screenplay. Admitted command clock specs render. Stage
43
+ emits explicit whole-source scopes when the model serializes a strategy; models
44
+ with only implicit UUID stay Unguarded even at v20. This is not a general freshness
45
+ API. Unpinned rendered captures assert shape/range, rules and the fixed UTC date
46
+ for dated patterns; the independent executor still requires deterministic pins.
47
+
48
+ Requires Stage 4.95.0 for command clock specs; older renderers refuse them.
@@ -0,0 +1,31 @@
1
+ <!-- Copyright (c) Cratis. All rights reserved. -->
2
+ <!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
3
+
4
+ # Managed publication and recovery
5
+
6
+ Ownership is the destination's `.cratis-render.json` manifest: semantic revision,
7
+ identity, path and SHA-256 per artifact, not in-file markers. Interrupted commits
8
+ are journaled in `.cratis-render/` (journal, staging, backups). Never stage that
9
+ control directory; commit the manifest with generated output.
10
+
11
+ - An unmanaged file at a planned path is refused, even with `--force`.
12
+ - A modified managed file is refused unless still active and `--force` is given.
13
+ Force replaces it, never overwrites unmanaged files and never deletes modified
14
+ stale files. Stale files are removed only when their bytes still match.
15
+ - Recovery precedes planning. `recovered: true` means stop and reconcile: the
16
+ publication receipt does not describe what recovery changed.
17
+ - An unchanged re-render writes nothing; `unchanged` equals the artifact count.
18
+ - Use exclusive destination access. A receipt is a filesystem result, not a Git
19
+ commit; rendering creates no branch, commit or PR.
20
+ - Probe drift with `cratis render ... --check` (exit 6 means pending changes).
21
+ Otherwise compare manifest `semanticRevision` for the same `--name` and inputs.
22
+ Do not compare MCP `modelRevision`: application identities can differ.
23
+
24
+ A modified managed file reports:
25
+
26
+ ```text
27
+ Managed artifact 'Program.cs' was modified by the user; pass --force to replace it.
28
+ ```
29
+
30
+ Find why it changed, move intent into the model or `Customizations/`, then
31
+ re-render. Use `--force` only to discard that edit deliberately.
@@ -61,6 +61,14 @@ launch failure, nonzero exit or invalid report is 502. The timeout defaults to 1
61
61
  (1–600, including queue); specifications stay available after a later world-rebuild or
62
62
  registration failure if the model was admitted.
63
63
 
64
+ ### Semantic text rules versus the default syntax engine
65
+
66
+ The semantic Host/specification executor admits v24 literal `contains`, `not contains`,
67
+ `starts with` and `ends with` rules as ordinal UTF-16 comparisons; absence passes.
68
+ Empty operands pass contains/starts/ends and fail not-contains for present text.
69
+ The legacy EventModel default engine drops these rules: its list below is not evidence
70
+ of semantic support. Generated applications render these comparisons without regex.
71
+
64
72
  ### What the default engine enforces
65
73
 
66
74
  When a command that declares at least one `produces` executes, the default engine
@@ -24,7 +24,10 @@
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": "Through v15" },
27
+ { "kind": "skill-contains", "value": "exact ESM v1–v21 and v23–v25 pairs" },
28
+ { "kind": "skill-contains", "value": "STAGE-ESM-044" },
29
+ { "kind": "skill-contains", "value": "STAGE-IMPL-002" },
30
+ { "kind": "skill-contains", "value": "all-Proven rules permit unpinned rendered", "file": "references/admission.md" },
28
31
  { "kind": "skill-contains", "value": "CLI-RENDER-004" },
29
32
  { "kind": "skill-contains", "value": "STAGE-ESM-024" },
30
33
  { "kind": "skill-contains", "value": "STAGE-ESM-026" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/pi",
3
- "version": "7.62.0",
3
+ "version": "7.64.0",
4
4
  "description": "Configuration-aware Cratis AI integration for Pi",
5
5
  "type": "module",
6
6
  "files": [