@cratis/pi 7.38.3 → 7.40.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/agents/screenplay-modeler.md +1 -1
  2. package/package/corpus/agents/screenplay-reviewer.md +1 -1
  3. package/package/corpus/product-sync.json +11 -11
  4. package/package/corpus/skills/cratis-chronicle-reactor/SKILL.md +2 -2
  5. package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +4 -2
  6. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/audit-format.md +1 -1
  7. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/automation-patterns.md +1 -1
  8. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/public-events-and-direction.md +3 -6
  9. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/realization-and-gap-fill.md +12 -7
  10. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/todo-list-example.md +5 -6
  11. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translate-example.md +2 -5
  12. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +12 -15
  13. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/complete-examples.md +6 -15
  14. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/specifying-triggers-and-clock.md +1 -1
  15. package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +14 -15
  16. package/package/corpus/skills/cratis-screenplay-command-surface/references/compliance.md +14 -4
  17. package/package/corpus/skills/cratis-screenplay-command-surface/references/enum-numbers.md +11 -13
  18. package/package/corpus/skills/cratis-screenplay-command-surface/references/generated-values-and-responses.md +10 -6
  19. package/package/corpus/skills/cratis-screenplay-command-surface/references/inline-events.md +23 -1
  20. package/package/corpus/skills/cratis-screenplay-command-surface/verification.json +2 -2
  21. package/package/corpus/skills/cratis-screenplay-discovery/references/provenance.md +1 -1
  22. package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +13 -13
  23. package/package/corpus/skills/cratis-screenplay-event-modeling/references/invoicing-example.md +3 -7
  24. package/package/corpus/skills/cratis-screenplay-event-modeling/references/nine-steps.md +9 -12
  25. package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +4 -4
  26. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generate-notes.md +1 -1
  27. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/intent-example.md +3 -8
  28. package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +9 -4
  29. package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +9 -7
  30. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +26 -6
  31. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +40 -0
  32. package/package/corpus/skills/cratis-screenplay-model-authoring/references/property-links.md +3 -1
  33. package/package/corpus/skills/cratis-screenplay-model-review/references/anti-patterns.md +1 -1
  34. package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +1 -1
  35. package/package/corpus/skills/cratis-screenplay-model-review/references/report-template.md +1 -1
  36. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/SKILL.md +2 -2
  37. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/phases.md +1 -1
  38. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/verdicts-and-modes.md +3 -2
  39. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/vocabulary-map.md +5 -3
  40. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/worked-example.md +2 -6
  41. package/package/corpus/skills/cratis-screenplay-projections/SKILL.md +2 -0
  42. package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +26 -18
  43. package/package/corpus/skills/cratis-screenplay-read-surface/references/equality-filters.md +208 -0
  44. package/package/corpus/skills/cratis-screenplay-read-surface/references/screen-patterns.md +2 -5
  45. package/package/corpus/skills/cratis-screenplay-read-surface/verification.json +4 -0
  46. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +20 -16
  47. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/delivery-protocol.md +1 -1
  48. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +4 -3
  49. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +8 -8
  50. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/worked-example.md +2 -5
  51. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/verification.json +2 -2
  52. package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +4 -1
  53. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/berth-reservations.md +8 -19
  54. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-design.md +8 -20
  55. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-example.md +9 -23
  56. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-examples.md +9 -3
  57. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +6 -5
  58. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/view-and-story-specs.md +2 -1
  59. package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +7 -4
  60. package/package/corpus/skills/cratis-screenplay-slice-design/references/field-lineage.md +1 -1
  61. package/package/corpus/skills/cratis-screenplay-slice-design/references/model-reasoning.md +2 -5
  62. package/package/corpus/skills/cratis-screenplay-slice-design/references/read-model-design.md +5 -10
  63. package/package/corpus/skills/cratis-screenplay-slice-design/references/worked-example.md +8 -19
  64. package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +17 -25
  65. package/package/corpus/skills/cratis-screenplay-specifications/references/actions-beyond-commands.md +2 -1
  66. package/package/corpus/skills/cratis-screenplay-specifications/references/generated-fixtures.md +3 -3
  67. package/package/corpus/skills/cratis-screenplay-specifications/references/persona-callers-and-cases.md +2 -5
  68. package/package/corpus/skills/cratis-screenplay-specifications/references/reactions-and-cascades.md +5 -4
  69. package/package/corpus/skills/cratis-screenplay-specifications/references/source-notes.md +10 -0
  70. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +3 -3
  71. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/boundaries.md +2 -1
  72. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution.md +2 -2
  73. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +10 -24
  74. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/verification.json +1 -1
  75. package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +23 -17
  76. package/package/corpus/skills/cratis-screenplay-toolchain/references/automation-translate-example.md +4 -10
  77. package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet-example.md +11 -23
  78. package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet.md +1 -1
  79. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +3 -3
  80. package/package/corpus/skills/cratis-screenplay-toolchain/references/doc-contradictions.md +4 -3
  81. package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-example.md +3 -7
  82. package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +40 -24
  83. package/package/corpus/skills/cratis-screenplay-toolchain/references/pdl-example.md +27 -69
  84. package/package/corpus/skills/cratis-screenplay-toolchain/references/preferred-syntax.md +73 -0
  85. package/package/corpus/skills/cratis-screenplay-toolchain/references/production-routes-and-filters.md +1 -1
  86. package/package/corpus/skills/cratis-screenplay-toolchain/references/provenance.md +1 -1
  87. package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +34 -31
  88. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract-exceptions.json +21 -0
  89. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +7 -1
  90. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
  91. package/package/corpus/skills/cratis-screenplay-toolchain/references/sources-and-streams.md +4 -3
  92. package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +4 -4
  93. package/package/corpus/skills/cratis-screenplay-toolchain/references/verdicts.md +17 -5
  94. package/package/corpus/skills/cratis-screenplay-toolchain/references/versions.md +50 -34
  95. package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +7 -2
  96. package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +13 -18
  97. package/package/corpus/skills/cratis-screenplay-ui-composition/references/screen-composition-contract.md +4 -3
  98. package/package/corpus/skills/cratis-screenplay-ui-composition/references/worked-flow.md +3 -2
  99. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +32 -32
  100. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +58 -26
  101. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/rendered-application.md +17 -20
  102. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/sandbox-and-specrunner.md +18 -14
  103. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/scene-runtime.md +4 -3
  104. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +2 -2
  105. package/package.json +1 -1
@@ -107,13 +107,12 @@ is the fallback, and neither names the other's verdict. Versions and commands:
107
107
  - [ ] Every event is past tense, single-purpose, and carries no event-source id.
108
108
  - [ ] Personal data is classified on the `concept`, with a reason.
109
109
  - [ ] Specifications name the rejections, not only the happy path.
110
- - [ ] If the model must reach a runtime, check it binds with the tool that will
111
- consume it. Current pins: `cratis-screenplay-toolchain` `references/versions.md`. Stage 4.73.1
112
- (in CLI 3.53.1) admits ESM v1 to v10 by version and renders `StateChange` and `StateView`
113
- slices; reactions, captures, Automation and Translate, and the v7+ constructs in Stage's
114
- admission table refuse with their own `STAGE-ESM-*` code, so those scopes are gap-fill with
115
- the model as the contract. A reaction that produces events and invokes commands is refused
116
- (`STAGE-ESM-037`) although Arc 22.72.0 and later can run it (the Arc the Stage scaffold pins needs a proven override): hand-write it as one reactor, never split the modeled reaction.
110
+ - [ ] Bind with the runtime's compiler; pins: toolchain `references/versions.md`.
111
+ CLI 3.56.0 / Stage 4.83.0 admit through v13, including supported event Automation,
112
+ UUID generation/responses, enum numbers and compliance. Translate/captures,
113
+ refused reactions and v14 filters remain gaps (Stage `references/admission.md`).
114
+ Mixed effects remain `STAGE-ESM-037`: retries can duplicate events. Keep the reaction
115
+ whole and prove retry-safe gap-fill; never split or drop effects.
117
116
 
118
117
  ## Parsed is not runnable
119
118
 
@@ -130,12 +129,12 @@ What binds depends on **which tool** you ask, so name the tool and its version:
130
129
 
131
130
  - `Automation` and `Translate` slices, reactions, captures and triggers bind (ESM v6) on the
132
131
  standalone tool and the CLI bundle. (Historical: the cratis 3.27.1 bundle, Screenplay 4.60.1,
133
- reported *Slice '<name>' of type '<type>' is not admitted by ESM v1.*) Stage 4.73.1 renders none of them.
132
+ reported *Slice '<name>' of type '<type>' is not admitted by ESM v1.*) Stage 4.83.0 renders supported event-triggered Automation, not Translate/captures or non-event triggers.
134
133
  - `reads` and `concurrency` on a command do not bind (`PLAY0271`), so no decision is
135
134
  protected against stale state. A reaction trigger's `reads` that only `invokes` is
136
135
  report-only intent (`PLAY0270`); one that `produces` directly fails binding (`PLAY0268`).
137
136
  - `persona` declarations are report-only and never block; bare `pii` and `secret`
138
- concepts bind as ESM v13 on standalone 4.142.0 (since 4.141.0), but still block the pinned CLI.
137
+ concepts bind as ESM v13 on standalone 4.142.0 (since 4.141.0), and the pinned CLI; Stage renders admitted v13 protection.
139
138
  Enum/identity compliance and protected events with explicit subject marks remain
140
139
  refused (PLAY0268); see command-surface `references/compliance.md`. Keep protection.
141
140
  - Generated values/responses bind and reference-execute as v7; sources, streams
@@ -143,10 +142,11 @@ What binds depends on **which tool** you ask, so name the tool and its version:
143
142
  qualifying Double literals lower exactly as v11 and non-positional enum numbers
144
143
  as v12. Use `screenplay test` or MCP `run-specifications` for V4.
145
144
  Operations/systems, the `numbers exact` **source mode** (PLAY0268) and
146
- refusal/redelivery remain unadmitted. Stage still refuses generated values and
147
- responses (`STAGE-ESM-028`/`029`). For the pinned CLI/Stage pair
148
- (`cratis-screenplay-toolchain/references/versions.md`), v10 reaches construct
149
- admission, not full support.
145
+ refusal/redelivery remain unadmitted. CLI 3.56.0 / Stage 4.83.0 render UUID-concept generated values,
146
+ scalar/named responses, enum numbers, compliance and supported event reactions.
147
+ The pair reaches construct checks through v13, not blanket rendering; v14 filters
148
+ bind but remain refused. Current boundaries and source evidence:
149
+ `cratis-screenplay-toolchain/references/renderable-subset.md`.
150
150
  Source/binding admission and target realization are separate gates.
151
151
 
152
152
  The ESM versions, the full disposition table and the Step 7 clock example's binding
@@ -26,13 +26,9 @@ module Invoicing
26
26
  authorize CanManageInvoice
27
27
  validate
28
28
  invoiceNumber not empty message "Invoice number is required"
29
- produces InvoiceRegistered
30
- for invoiceId
31
- invoiceNumber = invoiceNumber
32
- registeredAt = $context.occurred
33
- event InvoiceRegistered
34
- invoiceNumber InvoiceNumber
35
- registeredAt DateTime
29
+ produces event InvoiceRegistered
30
+ invoiceNumber InvoiceNumber = invoiceNumber
31
+ registeredAt DateTime = $context.occurred
36
32
  event InvoiceSent
37
33
 
38
34
  slice StateView InvoiceList
@@ -111,7 +111,8 @@ property (at most one; leave it out only when the runtime should allocate a new
111
111
  identity), `authorize`, and `produces`. Excerpt: the complete document is
112
112
  [invoicing-example.md](invoicing-example.md). Give the event a description of the
113
113
  fact, and fenced Markdown `documentation` when its meaning needs elaboration.
114
- Alternatively, declare it in the command with `produces event` and typed mappings.
114
+ Prefer `produces event` with typed mappings for an event owned by one command;
115
+ shared events stay standalone with explicit command destinations.
115
116
 
116
117
  ```screenplay excerpt parent=references/invoicing-example.md#1
117
118
  // Parent: references/invoicing-example.md (complete document), slice RegisterInvoice
@@ -122,10 +123,9 @@ slice StateChange RegisterInvoice
122
123
  authorize CanManageInvoice
123
124
  validate
124
125
  invoiceNumber not empty message "Invoice number is required"
125
- produces InvoiceRegistered
126
- for invoiceId
127
- invoiceNumber = invoiceNumber
128
- registeredAt = $context.occurred
126
+ produces event InvoiceRegistered
127
+ invoiceNumber InvoiceNumber = invoiceNumber
128
+ registeredAt DateTime = $context.occurred
129
129
  ```
130
130
 
131
131
  The "under what circumstances would this NOT happen" answers become `validate`
@@ -199,10 +199,10 @@ system state?"* If no, it is co-production — one `StateChange` slice with seve
199
199
 
200
200
  **Output:** the `reaction`, in an `Automation` slice. It binds on the standalone
201
201
  `screenplay` and the `cratis` bundle (ESM v6; the 3.27.1 bundle rejected the slice at binding) and
202
- Stage 4.73.1 renders none, so the automation is gap-fill there (versions:
202
+ Stage 4.83.0 renders supported event-triggered Automation; refused scope stays gap-fill (versions:
203
203
  `cratis-screenplay-toolchain`). A reaction that `produces` and `invokes` stays one reaction: Stage
204
204
  refuses it (`STAGE-ESM-037`) but Arc 22.72.0 and later run it as one reactor (events first, then
205
- commands; no cross-effect transaction; the Arc the Stage scaffold pins needs a proven override), so gap-fill it whole, never split it. When the automation decides from a view, declare it under
205
+ commands; no cross-effect transaction; the scaffold includes the handler, but retries can duplicate events), so gap-fill it whole, never split it. When the automation decides from a view, declare it under
206
206
  the trigger with `reads` (see `cratis-screenplay-captures-and-reactions`).
207
207
 
208
208
  The example below is a complete document: a Monday-morning clock occurrence invokes a command
@@ -251,11 +251,8 @@ module Invoicing
251
251
  description "Records that the weekly collections digest was issued"
252
252
  command IssueCollectionsDigest
253
253
  period DigestPeriod identifier
254
- produces CollectionsDigestIssued
255
- for period
256
- issuedAt = $context.occurred
257
- event CollectionsDigestIssued
258
- issuedAt DateTime
254
+ produces event CollectionsDigestIssued
255
+ issuedAt DateTime = $context.occurred
259
256
  specification IssuingTheDigest
260
257
  given clock "2026-10-05T07:30:00Z"
261
258
  when IssueCollectionsDigest
@@ -29,14 +29,14 @@ Pins and consumer boundaries: toolchain `references/versions.md`.
29
29
  | Construct | Standalone disposition (v4.125.0/v4.139.0 evidence; compliance updated at v4.141.0) |
30
30
  | --- | --- |
31
31
  | `persona`, domain/authentication metadata | Report-only; unknown named policies remain source defects |
32
- | Compliance concepts | Bare `pii`/`personal` and `secret`, qualifiers and scope bind as v13 (4.142.0 checked); enum/identity compliance and events combining personal or explicitly subject-scoped secret values with an explicit `subject` mark refuse PLAY0268 at binding only. CLI 3.53.1's 4.137.0 bundle still refuses markers; Stage 4.76.0 admits only through v12 (Stage#345). Never remove protection |
32
+ | Compliance concepts | Bare `pii`/`personal` and `secret`, qualifiers and scope bind as v13 (4.142.0 checked); enum/identity compliance and events combining personal or explicitly subject-scoped secret values with an explicit `subject` mark refuse PLAY0268 at binding only. CLI 3.56.0's 4.145.1 bundle binds markers; Stage 4.83.0 renders v13 protection, not protected identities/enums or subject lineage. Never remove protection |
33
33
  | Identity details / processing purposes / event subject | Report-only metadata (4.127.0); executable detail reads refuse PLAY0268, not source declaration errors |
34
34
  | Composite stream ids | v8 routing; complete named parts/canonical comparisons, PLAY0515 refuses protected keys/sources; not a legacy text split |
35
35
  | Command reads/concurrency | Legacy unprotected decisions, PLAY0271 |
36
36
  | Invokes-only trigger reads | Report-only, not protected state; direct production with reads refuses |
37
- | Generated values/responses | v7 binding/reference execution; Stage 4.73.1 member refusals STAGE-ESM-028/029 |
38
- | Sources/streams and command/specification routes | v8 binding/reference execution; the pinned CLI (toolchain `references/versions.md`) reaches Stage checks through v10 |
39
- | Declared reaction invocation actor | v10 binding/reference execution; older CLI parser PLAY0137; Stage planner refuses v10 |
37
+ | Generated values/responses | v7 binding/reference execution; Stage 4.83.0 renders required scalar UUID concepts, scalar/named responses and fixtures; unsupported types/combinations remain -028/-038 |
38
+ | Sources/streams and command/specification routes | v8 binding/reference execution; the pinned CLI (toolchain `references/versions.md`) reaches Stage checks through v13 |
39
+ | Declared reaction invocation actor | v10 binding/reference execution; older CLI parser PLAY0137; Stage planner refuses reaction identity (STAGE-ESM-034), not v10 as a version |
40
40
  | Operations/systems, `numbers exact` source mode, refusal/redelivery | Source accepted; whole binding refuses PLAY0268 |
41
41
  | UI | Authoring/deferred metadata; runtime support is a separate consumer contract |
42
42
 
@@ -75,7 +75,7 @@ cratis screenplay generate <solution|project|folder> \
75
75
  ## Coverage (what a provider reads)
76
76
  | Provider | Reads | Does not read |
77
77
  |---|---|---|
78
- | Arc | commands, events, concepts, read models, projections, reducers, reactors, constraints, declarative FluentValidation rules, authorization policies, `produces` from constants and input paths, Chronicle integration specs as given/when/then, `.tsx` beside a slice as `screen` + `data via query` | handler bodies, rules written in code, computed messages (`SP0016`), screen bodies, captures, personas, seeds, `@sensitive`. A rule held to `When`/`Unless` is written down as if unconditional and `SP0016` names the condition: read the diagnostic, do not trust the declaration |
78
+ | Arc | commands, events, concepts, read models, projections, reducers, reactors, constraints, declarative FluentValidation rules, authorization policies, `produces` from constants and input paths, Chronicle integration specs as given/when/then, `.tsx` beside a slice as `screen` + `data via query` | handler bodies, rules written in code, computed messages (`SP0016`), screen bodies, captures, personas, seeds, `secret`. A rule held to `When`/`Unless` is written down as if unconditional and `SP0016` names the condition: read the diagnostic, do not trust the declaration |
79
79
  | Marten / Critter Stack (preview; an independent optional adapter built on the neutral Screenplay.Generation SDK, not affiliated with JasperFx: review every `GEN`/`MARTEN`/`WOLVERINE` diagnostic by hand) | aggregates, snapshots, HTTP and message handlers, document operations, queries, outgoing and delayed messages, saga facts | saga lifecycle, policies, middleware bodies, runtime tenancy, upcasting; unbounded extension code is reported by presence only |
80
80
  | any non-.NET stack | nothing | use Prologue and targeted reads |
81
81
 
@@ -44,11 +44,8 @@ module Cloakroom
44
44
  command TakeInCoat
45
45
  coatId CoatId identifier
46
46
  ticketNumber TicketNumber
47
- produces CoatTakenIn
48
- for coatId
49
- ticketNumber = ticketNumber
50
- event CoatTakenIn
51
- ticketNumber TicketNumber
47
+ produces event CoatTakenIn
48
+ ticketNumber TicketNumber = ticketNumber
52
49
  constraint UniqueTicketNumber
53
50
  unique ticketNumber on CoatTakenIn
54
51
  released by CoatHandedBack
@@ -100,9 +97,7 @@ module Cloakroom
100
97
  validate
101
98
  require CoatStatus.onHook == true
102
99
  message "That coat is not on a hook"
103
- produces CoatHandedBack
104
- for coatId
105
- event CoatHandedBack
100
+ produces event CoatHandedBack
106
101
  specification HandingBackACoat
107
102
  given caller
108
103
  authenticated
@@ -6,6 +6,8 @@ license: MIT
6
6
 
7
7
  # Author a Screenplay model through its AST
8
8
 
9
+ Read [preferred syntax](../cratis-screenplay-toolchain/references/preferred-syntax.md) when writing or reviewing `.play`.
10
+
9
11
  Prefer the Screenplay MCP tools to text/regex edits: the compiler owns declaration,
10
12
  reference, hierarchy and source evidence for the declarative document set.
11
13
 
@@ -95,7 +97,7 @@ can keep that entry point; use the project's supported installation channel.
95
97
  bindings are not an empty, successful dependency graph.
96
98
  4. Use `find-fixtures` for value occurrences (including example/override origins
97
99
  and event routes) and `find-assertion-gaps` for authored assertion gaps. Neither
98
- executes specifications. `diagnostics` accepts `scope` and opt-in `checks`;
100
+ executes specifications; use `run-specifications` for that. `diagnostics` accepts `scope` and opt-in `checks`;
99
101
  skipped completeness checks are not passes. Details: `references/mcp-tools.md`.
100
102
  5. Echo `sourceRevision` on subsequent pages. Restart the query after drift;
101
103
  never combine pages from different snapshots.
@@ -149,12 +151,15 @@ and applies; others send an edit request ([MCP loop](references/mcp-loop.md)).
149
151
  identity-state change through `workspace-state`. Review `orphanedNotes` on
150
152
  source proposals; reanchor or resolve affected questions before applying
151
153
  ([notes and orphan impact](references/model-notes.md#source-proposals-can-orphan-notes)).
152
- 7. `apply` only the reviewed server-produced proposal within the user's requested
154
+ 7. Run `run-specifications` with `proposalId` before applying on **Screenplay
155
+ 4.145.0 and later**. Record V4 separately: PLAY0285 (impossible `then`) unbinds the whole
156
+ model. Paging and read-only candidate semantics: [MCP tool guide](references/mcp-tools.md#run-reference-specifications).
157
+ 8. `apply` only the reviewed server-produced proposal within the user's requested
153
158
  change. The proposal ID and before revisions are required; stale state rejects.
154
159
  When the user asked for the change to be applied ("apply it when you're done",
155
160
  "apply each change"), apply once the proposal checks out instead of asking again;
156
161
  otherwise show the proposal and ask once.
157
- 8. When the host draws views, `visualize-model` shows the board. It follows the files
162
+ 9. When the host draws views, `visualize-model` shows the board. It follows the files
158
163
  on disk while open, so after an apply do not re-request it; just say what changed.
159
164
 
160
165
  Node handles are revision-bound occurrences, not durable IDs. A logical module
@@ -284,7 +289,7 @@ paths or diagnosing `PLAY0430`-`PLAY0434`; `read-workspace`/`read-proposal`
284
289
  boundaries v9, identity/overrides/filters v10, qualifying non-route Double
285
290
  literals v11, enum numbers v12, compliance v13 (since 4.141.0;
286
291
  limits: command-surface `references/compliance.md`).
287
- CLI 3.53.1/Stage 4.73.1 bundle 4.137.0 and do not admit v12. Never drop or stub source contracts to bind.
292
+ CLI 3.56.0 bundles Screenplay 4.145.1 / Stage 4.83.0 and renders v12 enum numbers. Never drop or stub source contracts to bind.
288
293
  - Distinguish authoring acceptance from `executableReady`; unsupported backend
289
294
  capabilities are not a reason to drop source constructs or invent stubs.
290
295
  - If execution is intended, validate with the owning downstream runtime as well.
@@ -249,7 +249,8 @@ v4.31.0 table, re-read against v4.66.0 and v4.68.0 documentation and probed thro
249
249
  the standalone 4.66.0 tool for the rows marked "probed"; Cratis CLI 3.28.2 and 3.28.3 bundle
250
250
  Screenplay 4.66.0 (before 3.28.2, Screenplay 4.60.1, differ where stated).
251
251
 
252
- Read-model identity and query admission below are corrected to 4.135.0:
252
+ Read-model identity below is corrected to 4.135.0; equality query filters are
253
+ updated to standalone 4.145.0 (admitted in 4.143.0, ESM v14):
253
254
  explicit trailing `key` wins; otherwise single-instance queries in the owning slice
254
255
  must agree on `by`. Only with no single-instance identifier and an admitted list
255
256
  query does conventional `*Id` inference run. Queryless views need explicit `key`.
@@ -259,14 +260,15 @@ See read-surface `references/named-keys.md` for the collection-key exclusion alg
259
260
  | --- | --- |
260
261
  | Binds and runs in the reference runner | `StateChange`/`StateView` slices; `produces` including `when` conditions over command properties and literal tags; the portable validation rules, `matches email`, quoted `matches` patterns and `require` over command properties; declarative policies and `authorize` on modules, features, commands and keyed queries; `unique` constraints; projections as Chronicle lowers them, including variants, except the projection constructs in the next row; specifications, including `given caller`, `then denied` and `when append` |
261
262
  | Binds, but the reference execution plan refuses it | A projection-level `remove via join`; `all` beside removals, `children` or `nested`; a `join`, `children` or `remove via join` inside `nested`; any event-context value other than the event source identity in a projection mapping or key, such as `$eventContext.occurred`, `$eventContext.sequenceNumber` or `$eventContext.causedBy.subject` (`$eventSourceId` and `$eventContext.eventSourceId` run) |
262
- | Binds as ESM v6 on Screenplay 4.66.0, standalone and Cratis CLI 3.28.2 (probed); `PLAY0268` on Cratis CLI before 3.28.2 | `Automation` and `Translate` slices, reactions that produce or invoke, captures, top-level `trigger`, clock, trigger and capture specifications. The current standalone `screenplay test`/MCP reference route evaluates admitted v6 actions; the historical Stage 4.24.2 probe rendered none of them (the whole automation is gap-fill) |
263
+ | Binds as ESM v6 on Screenplay 4.66.0, standalone and Cratis CLI 3.28.2 (probed); `PLAY0268` on Cratis CLI before 3.28.2 | `Automation` and `Translate` slices, reactions that produce or invoke, captures, top-level `trigger`, clock, trigger and capture specifications. The current standalone `screenplay test`/MCP reference route evaluates admitted v6 actions; the historical Stage 4.24.2 probe rendered none; Stage 4.83.0 renders supported event-triggered Automation, with remaining refusals in the Stage skill's `references/admission.md` |
263
264
  | Reaction with trigger `reads` | Direct-producing (or code-bodied) reaction with `reads`: `PLAY0268` ("ESM v6 cannot protect that decision dependency", decision 0006), non-executable. Invokes-only reaction with `reads`: information only; the invoked command must declare and protect its own decision reads. Keep the `reads`; never remove them to obtain binding |
264
265
  | Binds as opaque code (v3); reference runner reports unsupported | Bodied reducers, bodied named rules, fenced `validate` blocks, code or file policies. A pure reducer body is the only attachment Stage 4.24.0 admits |
265
266
  | Information only, never blocks (probed) | `persona` (report-only: `PLAY0270`, the policies it lists must exist), `authentication`, `domain`, `seed`, descriptions and `file` provenance. A persona does not block binding and does not change behavior, so state persona scope in a description or a policy the model uses |
266
- | Binds as ESM v7 on standalone Screenplay 4.68.0 (source and release notes; `PLAY0268` on the 4.66.0 in Cratis CLI 3.28.x, probed) | `generated` properties and `returns` responses, generated fixtures and `then returns`: bound and executed by the reference runner; a policy, rule or requirement that references a generated value is `PLAY0273`, and a generated property on a concept with validation rules is `PLAY0268`. Stage 4.73.1 refuses them (`STAGE-ESM-028`/`-029`, Stage#175): gap-fill |
267
+ | Binds as ESM v7 on standalone Screenplay 4.68.0 (source and release notes; `PLAY0268` on the 4.66.0 in Cratis CLI 3.28.x, probed) | `generated` properties and `returns` responses, generated fixtures and `then returns`: bound and executed by the reference runner; a policy, rule or requirement that references a generated value is `PLAY0273`, and a generated property on a concept with validation rules is `PLAY0268`. Stage 4.83.0 renders required scalar UUID concepts, scalar/named responses and fixtures; unsupported types/result combinations remain `-028`/`-038` |
267
268
  | Authorable, not executable (PLAY0268) | Systems/operations, the `numbers exact` source mode (PLAY0268; exact lowering of qualifying Double literals is the admitted v11) and refusal/redelivery remain unadmitted |
269
+ | Collection equality filters (ESM v14, since 4.143.0) | Caller-supplied `filter name Type [optional]`, no `from`, matching a same-named scalar primitive/concept/enum read-model property with the same nominal type. AND with `by`; optional omission does not narrow, supplied null is refused. PLAY0468 covers unknown/repeated/missing required spec arguments; result rows compare by read-model/key regardless of order. Read read-surface `references/equality-filters.md` for the compiled example and renderer ceilings |
268
270
  | 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 on 4.125.0. Whole-workspace binding determines executable availability; CLI/Stage realization remains separate |
269
- | Blocks binding (`PLAY0268`) | enum/identity compliance and events combining personal or explicitly subject-scoped secret values with explicit subject marks (4.141.0); the older CLI bundle refuses all `pii`/`secret` concepts (historical probe: "compliance attributes require portable data-subject semantics"); command `handler` (never binds; a command cannot declare both `produces` and `handler`, `PLAY0035`), bare `rule <Name>`, `require` or conditions over read-model paths, dates and `today` in comparisons, `$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 filters, scope, performer, context-derived `by` or composite `by` blocks (optional keyed and collection queries, including observable delivery, bind at 4.135.0), `$causedBy` and templates in projections |
271
+ | Blocks binding (`PLAY0268`) | enum/identity compliance and events combining personal or explicitly subject-scoped secret values with explicit subject marks (4.141.0); historical CLI 3.53.1 refuses all `pii`/`secret` concepts; CLI 3.56.0 binds v13 and Stage 4.83.0 renders protection (historical probe: "compliance attributes require portable data-subject semantics"); command `handler` (never binds; a command cannot declare both `produces` and `handler`, `PLAY0035`), bare `rule <Name>`, `require` or conditions over read-model paths, dates and `today` in comparisons, `$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 (#599); optional keyed and collection queries, including caller-supplied equality filters and observable delivery, bind, `$causedBy` and templates in projections |
270
272
  | Blocks binding (`PLAY0271`, legacy meaning) | Command `reads` and `concurrency` |
271
273
  | Deferred (`PLAY0269`, information) | Screens, layouts, templates, forms, contributions, UI profiles, themes, behaviors and `on`/`uses` |
272
274
  | Metadata only (`PLAY0270`, information) | `domain`, `seed`, `persona`, trigger and other descriptions, and `file` provenance on declarations |
@@ -275,9 +277,9 @@ The table is a snapshot, not a contract (rows without "probed" are carried from
275
277
  v4.31.0 and v4.66.0 documentation): ask the binder (MCP `executable-diagnostics`
276
278
  view) rather than extrapolating from it. Neither `screenplay` nor
277
279
  `cratis screenplay validate` binds, so a clean validation says nothing about this table. Retain valid source that the
278
- backend cannot represent rather than downgrading it to a stub. The MCP does not
279
- run specifications, compile embedded code, generate an application, or follow
280
- realization files. Stage owns rendering and runtime admission.
280
+ backend cannot represent rather than downgrading it to a stub. MCP `run-specifications` executes the admitted reference subset, not embedded
281
+ code or realization files. Stage owns application generation, rendering and
282
+ runtime admission.
281
283
 
282
284
  ## Not in the language yet
283
285
 
@@ -17,7 +17,7 @@
17
17
  - Provenance
18
18
 
19
19
  The working loop for the session that owns the model connection: connect, orient,
20
- choose an edit route, propose, review, apply, verify. Tool-by-tool arguments and
20
+ choose an edit route, propose, review, run specifications, apply, verify. Tool-by-tool arguments and
21
21
  refusals are in the [MCP tool guide](mcp-tools.md); verdict names (V1 to V5) are
22
22
  defined by `cratis-screenplay-modeling-lifecycle`. Facts here were read at
23
23
  Screenplay v4.66.0 (`Source/DotNET/Screenplay.Mcp/`, `Documentation/screenplay/mcp/`)
@@ -139,14 +139,30 @@ the server sends `roots/list` and serves `tools/list` after the reply).
139
139
  diagnostics, report V3 as not binding-ready, and never drop or stub the
140
140
  construct. The server's own guidance is to apply such a proposal only when
141
141
  the user accepts a model that does not run yet.
142
- 7. Get approval unless the user already approved this effect and target (ask again
142
+ 7. On **Screenplay 4.145.0 and later**, run `run-specifications` with the
143
+ retained `proposalId` before `apply`. This read-only V4 route runs the candidate,
144
+ including retained identities and planned renames, without applying, refreshing
145
+ from disk or discarding it. `read-proposal view: "semantic-diff"` is static
146
+ comparison, not execution. Record counts and outcomes; an unbound candidate
147
+ returns executable diagnostics and executes nothing. An impossible `then`
148
+ (PLAY0285) unbinds the whole model, not just that specification.
149
+ For continuation pages, reuse `proposalId` and `expectedSourceRevision` from
150
+ the first response (required for `offset > 0`). Applied, discarded or reopened
151
+ proposals give `UnknownProposal`. A changed disk base can still run the retained
152
+ candidate; it does not make a stale `apply` safe. Without `proposalId`, the
153
+ tool runs the current workspace, not the candidate.
154
+ 8. Get approval unless the user already approved this effect and target (ask again
143
155
  only when target or consequence expands). A request or brief that names a rename,
144
156
  move or removal is that approval, also unattended: do not ask again per apply. Then `apply` with the **before**
145
157
  revisions. Every old handle and proposal is gone afterwards: re-read at the new
146
158
  revision.
147
- 8. Verify: compile the whole folder (V1), read `executable-diagnostics` (V2,
148
- V3), naming the tool and version. Hand off to the verdict vocabulary; do not
149
- restate a state you did not run.
159
+ 9. Verify: compile the whole folder (V1), read `executable-diagnostics` (V2,
160
+ V3), and run `screenplay test <root> --format json` or workspace
161
+ `run-specifications` (V4), naming the tool, version and source revision. A
162
+ candidate V4 applies only to that candidate; never relabel it as disk evidence.
163
+ CLI exits: 0 passed, 1 failed, 2 invalid arguments/input/selection or IO,
164
+ 3 unsupported/unbound. `test` rejects `--no-color`. Hand off to the verdict
165
+ vocabulary; do not restate a state you did not run.
150
166
 
151
167
  ## One edit strategy
152
168
 
@@ -259,7 +275,7 @@ or create a fallback folder to bypass the conflict.
259
275
  | `StaleRevision`, `DiskDrift`, `IdentityStateDrift` | Reopen and re-propose |
260
276
  | `ProposalRejected` | Read `conflicts`; change the request |
261
277
  | `FormattingConsentRequired` | Pass `formatting` |
262
- | `UnknownProposal` | The connection was reopened or the proposal applied: re-propose |
278
+ | `UnknownProposal` | The connection was reopened or the proposal applied/discarded: re-propose |
263
279
  | `LimitExceeded` | Discard unused proposals (16 cap) |
264
280
  | `PendingOperation`, `RecoveryRequired` | `workspace-state`, then ask before `recover-workspace` |
265
281
  | `RootChangeRefused` | Keep the fixed root, or start a new connection |
@@ -284,6 +300,10 @@ rejects the plan.
284
300
 
285
301
  ## Provenance
286
302
 
303
+ Proposal execution: Screenplay v4.145.0
304
+ `Source/DotNET/Screenplay.Mcp/McpWorkspaces.Specifications.cs:12-79` and
305
+ `Source/DotNET/Tool/ModelTest.cs:14-108`; `Documentation/screenplay/mcp/authoring-tools.md:500-535`.
306
+
287
307
  The structure of this loop (ownership, edit-request shape, failure handling) is
288
308
  adapted from the project's earlier event-modeling toolkit draft and re-verified
289
309
  against the Screenplay sources named above. See [provenance](provenance.md).
@@ -6,6 +6,7 @@
6
6
  ## Contents
7
7
 
8
8
  - Tool groups
9
+ - Run reference specifications
9
10
  - Whole-source authoring
10
11
  - Diagnostic repairs and refactorings
11
12
  - Syntax-only constructs through the MCP
@@ -53,6 +54,7 @@ the [MCP loop](mcp-loop.md).
53
54
  | Visual (MCP-Apps hosts only) | `visualize-model` | Draw the board for the model or a `proposalId`; its `sketch` argument previews a what-if of whole documents. Reads only |
54
55
  | Planning | `propose-source`, `propose-ast`, `propose-rename`, `propose-move`, `propose-repair`, `propose-property`, `propose-number-enum-members`, `propose-extract-inline-event`, `propose`, `recommend-layout`, `expand-layout` | Produce validated, reviewable candidates without writing them |
55
56
  | Review | `read-proposal`, `discard-proposal` | Inspect exact changes, dropped comments and proposed attachments, or abandon a connection-local proposal |
57
+ | Reference execution | `run-specifications` | Run the workspace or, from 4.145.0, a retained proposal candidate read-only; not attached code or target tests |
56
58
  | Effects | `apply`, `recover-workspace` | Apply an accepted plan or explicitly recover an interrupted write |
57
59
 
58
60
  `propose-move` moves a slice to another feature, or a feature to another module or feature, keeping identities: copy the `target` and `newParent` `{kind, parts}` addresses from the identity inventory and pass `expectedRevision` and `expectedCatalogRevision`. It repairs qualified references and `depends on`, and refuses identity loss, capture, collisions, descendant destinations, inherited authorization or screen-interaction changes and glob imports; review `moveReport` (`identityMigrations`, `referenceRepairs`, `fragmentsMoved`). It does not rename events, change pins or move files, and declaration moves between slices are deferred. Use it for legacy re-slicing instead of retyping declarations.
@@ -71,6 +73,44 @@ Exact arguments, AutoMap and fixture rules: [property evidence and planning](pro
71
73
  source-only authoring proposal may be accepted while `executableReady` is false.
72
74
  That is not permission to claim the application runs.
73
75
 
76
+ ## Run reference specifications
77
+
78
+ `run-specifications` runs the deterministic in-memory reference evaluator, not
79
+ Arc/Chronicle, external services or opaque code. It writes no files. Parameters:
80
+ `specification` (exact dotted address or semantic id), `scope` (module/feature/slice
81
+ prefix), `offset` (default 0), `limit` (1–200, default 50), and
82
+ `expectedSourceRevision` (required for `offset > 0`). Both selectors mean
83
+ intersection; no match refuses `UnknownSpecificationSelection`, never an empty pass.
84
+ A table address selects all its cases. Drift refuses `StaleSourceRevision`.
85
+
86
+ **Screenplay 4.145.0 and later** also accepts `proposalId`: propose → review
87
+ `read-proposal` (including `view: "semantic-diff"`) → run the retained candidate →
88
+ `apply`. Static expectation comparison is not execution. The candidate retains
89
+ identities and planned renames; running does not apply, refresh from disk or discard
90
+ it. A changed base does not prevent candidate execution but still blocks stale
91
+ apply. Applied/discarded proposals and workspace reopen give `UnknownProposal`.
92
+ Continue with the same `proposalId` and returned `sourceRevision` as
93
+ `expectedSourceRevision`. Without `proposalId`, the tool runs the open workspace
94
+ or reads the root with its persisted identities.
95
+
96
+ The response includes `sourceRevision`, `outcome`, discovered/selected/executed/
97
+ passed/failed/unsupported counts, `executableDiagnostics`, `planIssues`, and `page`
98
+ (plus `proposalId` for candidate runs). Counts cover the entire selection, not one
99
+ page; unsupported cases are not executed. Outcomes are `passed`, `failed`,
100
+ `unsupported`, or overall `unbound`; only `passed` has `isError: false`. An unbound
101
+ model has `page: null`; an impossible `then` (PLAY0285) prevents every spec running.
102
+ Opaque capabilities report unsupported with a capability and reason, not a pass.
103
+ Zero discovered specifications is not coverage evidence.
104
+
105
+ Outside MCP, use `screenplay test <root> [--filter <exact-address>] [--format text|json]`:
106
+ exit 0 passed, 1 failed, 2 invalid arguments/input/selection or IO, 3 unsupported
107
+ or unbound. `--no-color` is rejected (exit 2); there is no proposal or paging option.
108
+ A folder is one application; a file selects only itself and its imports.
109
+
110
+ Sources: Screenplay v4.145.0 `Source/DotNET/Screenplay.Mcp/McpWorkspaces.Specifications.cs:12-79`,
111
+ `McpSpecificationExecution.cs:20-49,106-111`, `Source/DotNET/Tool/ModelTest.cs:14-108`,
112
+ `Documentation/screenplay/mcp/authoring-tools.md:500-535` and `tool.md:120-142`.
113
+
74
114
  ## Whole-source authoring
75
115
 
76
116
  `propose-source` takes `expectedRevision`, `expectedCatalogRevision`, explicit
@@ -191,7 +191,9 @@ For a required addition with existing fixtures/assertions, supply `fixtureValue`
191
191
  as **literal source text**, for example `"\"normal\""` for a String value. The
192
192
  planner adds it to existing specification steps, examples and query results;
193
193
  `optional: true` adds no fixture values. A literal is not proof of behavior:
194
- inspect the assertions and run `run-specifications` on the retained proposal.
194
+ inspect the assertions and, on Screenplay **4.145.0 and later**, run
195
+ `run-specifications` with `proposalId` on the retained candidate before `apply`.
196
+ See [reference execution](mcp-tools.md#run-reference-specifications).
195
197
 
196
198
  | Refusal | Response |
197
199
  | --- | --- |
@@ -62,7 +62,7 @@ the problem, the checks it violates, the fix, all pinned to one declaration.
62
62
  | Missing `for` | an event production (`produces <Event>` or `produces event`) without `for`. Not operation productions: they are authorable design intent, belong to commands, and take no event `for`, tags or routing | runtimes disagree on the destination | C (executable) / D | `for <identifier>` |
63
63
  | Unbuilt read-model field | field no projection maps and AutoMap cannot fill | always empty; not reported by the compiler | D | map it or remove it |
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
- | 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.73.1 refuses `runsAs` with STAGE-ESM-034 and every reaction model, so 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 |
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.83.0 renders supported event reactions but still refuses `runsAs` with STAGE-ESM-034, so this trusted-actor scope is 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
67
  | `reads` treated as protection | rule "checked" because the command or reaction `reads` a view | `reads` enforces nothing | D (major) | keep or introduce `reads <View>` + `require ... message` as stated intent, mark it NOT enforced in the slice `description`, name the target (`[ProtectedDecision]` + `DecisionRead<T>`, Chronicle DCB, or a constraint where it fits); 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 the stored state with `reads`; keep or introduce `reads <View>` + `require ... message` as stated intent, mark it NOT enforced in the slice `description`, name the target (`[ProtectedDecision]` + `DecisionRead<T>`, Chronicle DCB, or a constraint where it fits); checklist E3 |
@@ -180,7 +180,7 @@ Nebulit (`provenance.md`).
180
180
  | Id | Check | Evidence | Tier |
181
181
  |---|---|---|---|
182
182
  | H1 | Query shape follows the business view (list where people scan; lookup where they open one) | queries, screens | D |
183
- | H2 | Executable scope: a keyed `=> RM optional` query with `by` named like a read-model property, or an unfiltered / one-`by` list (`=> RM[]`, observable too; `filter`, `scoped to`, `performer` do not bind), and the projection routes by the same identity (a `from` key or an event property, or `$eventSourceId`; `$eventSourceId` is not mandated). Renderable scope only: Stage-specific identity limits (Stage 4.73.1 renders a keyed optional snapshot lookup and observable collection queries; any other query is `STAGE-ESM-010`) | queries, projections | C (executable); C (render admission, renderable only) |
183
+ | H2 | Executable scope: a keyed `=> RM optional` query with `by` named like a read-model property, or a collection (`=> RM[]`, observable too) with caller-supplied `by` and/or equality filters (ESM v14 since 4.143.0). `from`, single-result filters, opaque `scoped to`/`performer` and composite `by` remain PLAY0268. The projection routes by the same identity (a `from` key or an event property, or `$eventSourceId`; `$eventSourceId` is not mandated). Filtered models: CLI 3.56.0 / Stage 4.83.0 admit through v13, not v14. Renderable scope only: Stage-specific identity limits (Stage 4.83.0 renders a keyed optional snapshot lookup and observable collection queries; any other query is `STAGE-ESM-010`) | queries, projections | C (executable); C (render admission, renderable only) |
184
184
  | H3 | One builder per read model; projection `key` only on `from` | projections | C |
185
185
  | H4 | Screens show one actor's point of view; a form submits one command | screens, forms | D |
186
186
 
@@ -35,7 +35,7 @@ Independence: independent (fresh context, different model family from every auth
35
35
  V1 authorable: <pass (tool, version, N files) | fail: PLAYnnnn at file:line>
36
36
  V2 executable diagnostics: <clean | n diagnostics: codes | not run: reason>
37
37
  V3 binding-ready: <ready | blocked: codes | not run: reason>
38
- V4 reference specs run: <route, expected vs discovered, passed/failed/unsupported/cancelled | not run: no route>
38
+ V4 reference specs run: <route, expected vs discovered, passed/failed/unsupported; overall unbound | not run: no route>
39
39
  V5 rendered, target-verified: admission <...>; publication <...>; build <...>; tests <...> (each "not run: reason" when absent)
40
40
  Gaps: <capability gaps and tool-version gaps, e.g. a false PLAY0285 on cascades from a cratis before 3.28.2 bundle>
41
41
 
@@ -43,7 +43,7 @@ an unproven pass.
43
43
  | An accepted model covers the scope | **Model** | Change the `.play`, verify V1-V3, review, then render or gap-fill |
44
44
  | Opted in, but this scope has no model yet | **Model** | New behavior starts in discovery, then slice design |
45
45
  | A computed rule inside a modeled slice | **Model + code attachment** | `csharp`/`file` block; it binds only as the construct allows (`cratis-screenplay-model-authoring`) |
46
- | Scope Stage cannot render yet, including every modeled automation and translation (Stage 4.73.1 renders neither; the whole behavior is gap-fill, not just its outside call; a reaction that produces and invokes stays one reaction, `STAGE-ESM-037`, hand-written as one reactor on Arc 22.72.0 or later) | **Gap-fill code** | Hand-written; the `.play` slice and specs are the contract. `cratis-screenplay-render-and-gap-fill` separates an authorized existing generated base from fully hand-written delivery |
46
+ | Scope Stage cannot render yet (Stage 4.83.0 renders supported event-triggered Automation; Translate/captures and refused reactions remain gap-fill. Mixed effects stay one reaction, `STAGE-ESM-037`; a hand-written realization must prove retry safety) | **Gap-fill code** | Hand-written; the `.play` slice and specs are the contract. `cratis-screenplay-render-and-gap-fill` separates an authorized existing generated base from fully hand-written delivery |
47
47
  | Outside call, transport or credentials | **Adapter code** | `Customizations/` or the host, applying `cratis-engineering-effect-boundaries` |
48
48
  | Infrastructure, clients, framework-profile repositories, brownfield not opted in | **Code** | Arc, Chronicle, spec and React skills; trivial changes keep the proportional-delegation policy |
49
49
 
@@ -221,7 +221,7 @@ the packet opens with `Outcome:`; STATE.md is current.
221
221
  ## Verified product sources
222
222
  Model notes: Screenplay `v4.144.0:Documentation/screenplay/model-notes.md:12-77`,
223
223
  `decisions/0045-model-notes-sidecar.md:40-79`; exact tool sources in model-authoring
224
- `references/model-notes.md`. Full pin table: `cratis-screenplay-toolchain/references/versions.md`. Read `cratis-screenplay-toolchain/references/versions.md` when selecting or reverifying tool versions. Current pins (Stage 4.73.1, cratis CLI 3.53.1 and the rest) are in that file. Older source reads used here: Screenplay
224
+ `references/model-notes.md`. Full pin table: `cratis-screenplay-toolchain/references/versions.md`. Read `cratis-screenplay-toolchain/references/versions.md` when selecting or reverifying tool versions. Current pins (Stage 4.83.0, cratis CLI 3.56.0 and the rest) are in that file. Older source reads used here: Screenplay
225
225
  `v4.66.0` (`c89198b`): `Source/DotNET/Tool/Program.cs` (`--warnaserror`, folder mode),
226
226
  `Source/DotNET/Screenplay/Semantics/SemanticModelBinder.cs:209-216` (personas are report-only),
227
227
  `Documentation/screenplay/{constraints,specifications}.md`, `mcp/reference.md` (`modelRevision`);
@@ -127,7 +127,7 @@ phase, a decision important enough that a later reader could misread the model (
127
127
  - **Input**: the accepted identity.
128
128
  - **Carry-forward**: the admission result; render output and named gaps in `Customizations/`;
129
129
  non-renderable scope handed to a code agent with the model as contract, plus a fallback record
130
- naming the blocking codes. Automations and translations are not rendered at the pinned Stage version (4.73.1), so the whole behavior is gap-fill (a reaction that produces and invokes keeps its one modeled form; `STAGE-ESM-037` is Stage's refusal, not a reason to split it). Three cases stay distinct: admission failure (nothing rendered); an
130
+ naming the blocking codes. Stage 4.83.0 renders supported event-triggered Automation; Translate/captures and refused reactions remain gap-fill (mixed effects keep one modeled reaction; `STAGE-ESM-037` is a redelivery-safety refusal, not a reason to split it). Three cases stay distinct: admission failure (nothing rendered); an
131
131
  existing generated base plus separately authorized gap-fill; fully hand-written delivery.
132
132
  - **Gate**: V5 sub-results, or a fallback entry per non-renderable scope. A customization never
133
133
  makes a rejected model renderable; no whole-application V5 from a subset.
@@ -21,13 +21,14 @@ defines what each result means and how to report it. Do not copy version facts h
21
21
  | V1 authorable | folder-mode validate with warnings as errors. The standalone compiler includes imports in folder and file mode; `cratis` CLI 3.28.2 file validation ignored imports (cli#244, probed); since 3.28.4 (PR #258) it compiles the file with its imports, but folder mode stays the recommended cross-tool check | semantics, binding, specs |
22
22
  | V2 executable diagnostics | the executable model reports no diagnostics for the scope | that any spec runs or passes |
23
23
  | V3 binding-ready | the model binds to the executable semantic model | that any spec runs or passes |
24
- | V4 reference specs run | the reference execution route only: engine, and per `.play` specification passed / failed / unsupported / cancelled | rendering, generated code, build or target tests |
24
+ | V4 reference specs run | the reference execution route only: engine, and per `.play` specification passed / failed / unsupported (overall model may be unbound) | rendering, generated code, build or target tests |
25
25
  | V5 delivery and target-verified | admission, publication, Debug build, Debug tests of generated specifications, each reported separately | customization conformance, faithful UI |
26
26
 
27
27
  Results are independent: V3 can be ready while V1 has warnings; V5 build can pass with V4 not
28
28
  run. Never infer one from another. Spec outcomes for V4 come only from a reference execution
29
29
  route. Written or bound specifications are never "specs pass", and rendered Debug tests are
30
- V5 evidence, not V4.
30
+ V5 evidence, not V4. A read-only `run-specifications` proposal run (Screenplay
31
+ 4.145.0+) is V4 evidence for that retained candidate only, not the disk model.
31
32
 
32
33
  V4 rules:
33
34
  - Report per `.play` specification (expected = specifications in the accepted scope; discovered =
@@ -42,9 +42,11 @@ Screenplay meaning, and when you meet the older usage, translate it and say so.
42
42
  - Screenplay **`reaction`**: the construct that models it (`when` trigger, optional `where`,
43
43
  `invokes` a command or `produces` events).
44
44
  - Chronicle **reactor**: C# observer, usually for side effects; it does not by itself define
45
- business decisions. A Screenplay reaction is authorable and bindable, but Stage 4.73.1 renders no Automation or
46
- Translate slice: the reactor and command are gap-fill code. A reaction that both produces events and invokes commands is
47
- refused by Stage (`STAGE-ESM-037`); Arc 22.72.0 and later run one reactor returning events and commands (the Arc the Stage scaffold pins needs a proven override), so keep the reaction whole.
45
+ business decisions. Stage 4.83.0 renders supported event-triggered Automation as Chronicle reactors.
46
+ Translate/captures and refused reactions remain gap-fill. Mixed events and commands
47
+ in one handler remain `STAGE-ESM-037`: Arc supports the return shape, but redelivery
48
+ after a failed command duplicates events. Keep the reaction whole and prove retry safety.
49
+ Source boundary: Stage skill `references/admission.md`.
48
50
 
49
51
  ## Scenario vs specification
50
52
  "Scenario" is the Event Modeling example and the scenario *types* `cratis-screenplay-scenario-coverage` uses for
@@ -34,12 +34,8 @@ module Berths
34
34
  command AllocateBerth
35
35
  berthId BerthId identifier
36
36
  boat BoatName
37
- produces BerthAllocated
38
- for berthId
39
- boat = boat
40
-
41
- event BerthAllocated
42
- boat BoatName
37
+ produces event BerthAllocated
38
+ boat BoatName = boat
43
39
 
44
40
  constraint OneBerthPerBoat
45
41
  unique boat on BerthAllocated
@@ -6,6 +6,8 @@ license: MIT
6
6
 
7
7
  # Projections — the Screenplay PDL
8
8
 
9
+ Read [preferred syntax](../cratis-screenplay-toolchain/references/preferred-syntax.md) when writing or reviewing `.play`.
10
+
9
11
  A `projection` folds events into a read model. Its body is the **Projection
10
12
  Declaration Language**, an embedded sub-grammar with its own parser — not free
11
13
  text. This is half of every event model, and the half most easily got wrong.