@cratis/pi 7.51.4 → 7.52.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 (97) hide show
  1. package/package/corpus/harnesses/copilot/instructions/glossary.instructions.md +2 -1
  2. package/package/corpus/harnesses/copilot/instructions/profiles.instructions.md +15 -0
  3. package/package/corpus/product-sync.json +26 -20
  4. package/package/corpus/rules/glossary.md +2 -1
  5. package/package/corpus/rules/profiles.md +15 -0
  6. package/package/corpus/skills/cratis-application-slice-specifications/references/query-and-decision-scenarios.md +14 -3
  7. package/package/corpus/skills/cratis-arc-command/SKILL.md +4 -0
  8. package/package/corpus/skills/cratis-arc-command/references/decisions-and-routing.md +22 -3
  9. package/package/corpus/skills/cratis-arc-command/references/fresh-identifiers.md +52 -0
  10. package/package/corpus/skills/cratis-arc-command/references/generated-values.md +7 -7
  11. package/package/corpus/skills/cratis-arc-command/references/handler-shapes.md +9 -0
  12. package/package/corpus/skills/cratis-arc-command/references/proxy-generation.md +5 -0
  13. package/package/corpus/skills/cratis-arc-command/references/read-model-injection.md +11 -0
  14. package/package/corpus/skills/cratis-arc-command-execution/SKILL.md +12 -1
  15. package/package/corpus/skills/cratis-arc-command-execution/references/command-refusals.md +65 -0
  16. package/package/corpus/skills/cratis-arc-command-validation/SKILL.md +5 -0
  17. package/package/corpus/skills/cratis-arc-hosting/SKILL.md +1 -0
  18. package/package/corpus/skills/cratis-arc-observable-query-http/SKILL.md +6 -0
  19. package/package/corpus/skills/cratis-chronicle-client-dotnet/references/additional-surfaces.md +18 -0
  20. package/package/corpus/skills/cratis-chronicle-client-dotnet/references/discovery.md +33 -1
  21. package/package/corpus/skills/cratis-chronicle-client-dotnet/references/lifecycle.md +7 -1
  22. package/package/corpus/skills/cratis-chronicle-compliance/SKILL.md +5 -0
  23. package/package/corpus/skills/cratis-chronicle-decision-reads/SKILL.md +17 -0
  24. package/package/corpus/skills/cratis-chronicle-decision-reads/references/choosing-how-a-rule-holds.md +3 -3
  25. package/package/corpus/skills/cratis-chronicle-event-constraints/SKILL.md +4 -0
  26. package/package/corpus/skills/cratis-chronicle-event-constraints/references/storage-uniqueness.md +28 -0
  27. package/package/corpus/skills/cratis-chronicle-event-modeling/SKILL.md +5 -3
  28. package/package/corpus/skills/cratis-chronicle-event-specifications/SKILL.md +7 -0
  29. package/package/corpus/skills/cratis-chronicle-event-type-migration/SKILL.md +18 -0
  30. package/package/corpus/skills/cratis-chronicle-event-type-migration/references/explicit-migrations.md +46 -0
  31. package/package/corpus/skills/cratis-chronicle-hosting/SKILL.md +8 -0
  32. package/package/corpus/skills/cratis-chronicle-hosting/references/operations.md +42 -0
  33. package/package/corpus/skills/cratis-chronicle-multi-tenancy/SKILL.md +1 -0
  34. package/package/corpus/skills/cratis-chronicle-projection/references/model-bound-attributes.md +6 -0
  35. package/package/corpus/skills/cratis-chronicle-projection/references/variants.md +7 -0
  36. package/package/corpus/skills/cratis-chronicle-reactor/SKILL.md +13 -7
  37. package/package/corpus/skills/cratis-chronicle-reactor/references/cross-service-events.md +9 -2
  38. package/package/corpus/skills/cratis-chronicle-reactor/references/return-event-metadata.md +7 -0
  39. package/package/corpus/skills/cratis-chronicle-reactor/references/slice-delivery-checklist.md +3 -3
  40. package/package/corpus/skills/cratis-chronicle-reactor/references/specifications.md +11 -5
  41. package/package/corpus/skills/cratis-chronicle-read-model/SKILL.md +8 -4
  42. package/package/corpus/skills/cratis-chronicle-read-model/references/collection-observation.md +49 -0
  43. package/package/corpus/skills/cratis-chronicle-read-model/references/queries.md +13 -2
  44. package/package/corpus/skills/cratis-chronicle-read-model-specifications/SKILL.md +8 -0
  45. package/package/corpus/skills/cratis-chronicle-web-workbench/SKILL.md +15 -0
  46. package/package/corpus/skills/cratis-multi-service-architecture/SKILL.md +204 -0
  47. package/package/corpus/skills/cratis-multi-service-architecture/references/publish-and-consume.md +229 -0
  48. package/package/corpus/skills/cratis-multi-service-local-orchestration/SKILL.md +172 -0
  49. package/package/corpus/skills/cratis-multi-service-local-orchestration/references/docker-compose.md +144 -0
  50. package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +4 -0
  51. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/automation-patterns.md +1 -1
  52. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/effects-and-idempotency.md +24 -5
  53. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/public-events-and-direction.md +1 -1
  54. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +11 -6
  55. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/invocation-identity.md +3 -1
  56. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/refusals-and-redelivery.md +97 -26
  57. package/package/corpus/skills/cratis-screenplay-command-surface/references/compliance.md +2 -1
  58. package/package/corpus/skills/cratis-screenplay-command-surface/references/generated-values-and-responses.md +45 -10
  59. package/package/corpus/skills/cratis-screenplay-command-surface/verification.json +3 -1
  60. package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +1 -0
  61. package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +10 -6
  62. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generate-notes.md +12 -1
  63. package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +5 -1
  64. package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +7 -3
  65. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +28 -12
  66. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +29 -6
  67. package/package/corpus/skills/cratis-screenplay-model-authoring/references/screen-authoring-workflow.md +15 -3
  68. package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +4 -1
  69. package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +1 -1
  70. package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +4 -0
  71. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +5 -1
  72. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/delivery-protocol.md +1 -1
  73. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +1 -1
  74. package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +9 -1
  75. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-catalogue.md +12 -10
  76. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +11 -6
  77. package/package/corpus/skills/cratis-screenplay-slice-design/references/field-lineage.md +1 -1
  78. package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +18 -10
  79. package/package/corpus/skills/cratis-screenplay-specifications/references/examples-and-routes.md +14 -13
  80. package/package/corpus/skills/cratis-screenplay-specifications/references/query-rejections.md +44 -0
  81. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +2 -1
  82. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/multi-service-models.md +188 -0
  83. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/verification.json +1 -1
  84. package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +6 -1
  85. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +12 -4
  86. package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +10 -6
  87. package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +28 -9
  88. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +4658 -230
  89. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
  90. package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +1 -1
  91. package/package/corpus/skills/cratis-specifications-csharp/SKILL.md +5 -0
  92. package/package/corpus/skills/cratis-specifications-csharp/references/application-scenarios.md +1 -1
  93. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +1 -1
  94. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +63 -15
  95. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/sandbox-and-specrunner.md +2 -2
  96. package/package/profile-catalog.json +3 -1
  97. package/package.json +1 -1
@@ -16,8 +16,8 @@ Typed example/override forms: `cratis-screenplay-specifications`
16
16
  | `given readmodel` | yes | yes (complete instance with key) | only as the query-only lookup below |
17
17
  | `when append <Event>` | yes | yes | supported single-hop reaction effects/invocation only; fan-out, deeper cascades and other refused assertions retain STAGE-ESM-011 |
18
18
  | `then readmodel` / `then query` (keyed `ById`, `arguments`, `result`) | yes | yes | yes |
19
- | `then query` on an unfiltered list or a list narrowed by one `by` key (observable too) | yes | yes: no `arguments` for an unkeyed list, one `result` per row stating the read-model identifier, no `result` = empty list | observable lists render, a non-observable list is `STAGE-ESM-010` |
20
- | Collection query with caller-supplied equality `filter`, including observable | yes | yes, ESM v14: same-named scalar property/type, AND with `by`; optional omission allowed, supplied null refused; PLAY0468 checks arguments; row order does not matter | yes on supported observable collections / Stage; DateTime/filter parameter order and snapshot lists refuse -010; independent Stage executor still refuses filtered assertions (-010) |
19
+ | `then query` on an unfiltered list or a list narrowed by one `by` key (observable too) | yes | yes: no `arguments` for an unkeyed list, one `result` per row stating the read-model identifier, no `result` = empty list | snapshot and observable lists render |
20
+ | Collection query with caller-supplied equality `filter`, including observable | yes | yes, ESM v14: same-named scalar property/type, AND with `by`; optional omission allowed, supplied null refused; PLAY0468 checks arguments; row order does not matter | yes on supported snapshot/observable collections; DateTime/filter parameter order refuse -010; independent Stage executor still refuses filtered assertions (-010) |
21
21
  | Context `from`, single-result filters, `scoped to`, `performer` or composite `by` | yes | PLAY0268: query context, collection-only filtering, opaque scope/implementation or multipart lookup are unadmitted | no |
22
22
  | `then no readmodel <RM> for "<key>"` | yes | yes | no |
23
23
  | `when query` -> `then result` / `then no result` | yes | yes | same as `then query`: only the query-only cases below |
@@ -29,7 +29,9 @@ Typed example/override forms: `cratis-screenplay-specifications`
29
29
  | Event `stream` / `no stream`, typed `for` and stream ids | yes | ESM v8 | The CLI reaches Stage route checks (toolchain `references/renderable-subset.md`); routed read-model/query replay now renders; reserved names/unformattable fixtures remain STAGE-ESM-030 |
30
30
  | Typed examples and overrides | yes | expanded and type-checked before binding; required fields remain required | depends on expanded contract, not fixture reuse |
31
31
  | `given operation ... fails`, `then operation`, `then compensated` | yes | unadmitted PLAY0268 | gap-fill |
32
- | Refusal branches, `when redelivered`, `then no events` | yes | unadmitted PLAY0268 | gap-fill |
32
+ | `then no events`, `when redelivered` | yes | ESM v17; no new facts, input not re-appended | Stage no-event/redelivery subset; fan-out/cascades/constraints/read expectations/refusal redelivery retain -011 |
33
+ | Refusal branches, `$refusal` | yes | ESM v19; first matching branch wins | Stage supported subset; -039 for unfaithful refusal details/trigger groups, -011 for specification limits |
34
+ | Query `then error` | yes | ESM v18; one query/one error, no result/denial | requires target v18 admission; a v19-capable renderer does not necessarily admit v18 |
33
35
  | Composite (JSON) values in specs | yes | yes | no |
34
36
  | Rules over dates or `today`, nested paths | spec them in design | rule does not bind: `recorded` | `recorded` |
35
37
  | Bodied rules, code policies | spec them | spec reported **unsupported**, never passed | no |
@@ -37,6 +39,9 @@ Typed example/override forms: `cratis-screenplay-specifications`
37
39
 
38
40
  Requires Screenplay 4.105.0 or later (`screenplay --version`) for list-query specifications, and 4.143.0 or later for collection equality filters (ESM v14).
39
41
 
42
+ Requires Screenplay 4.157.0 for v17, 4.160.0 for v19 and 4.161.0 for query validation/error assertions (`screenplay --version`); older compilers refuse those forms.
43
+ Requires Stage 4.90.0 for snapshot/live lists, 4.101.0 for no-event specifications, 4.102.0 for refusal branches and 4.103.0 for rendered redelivery; older renderers refuse those shapes.
44
+
40
45
  ## Design mode
41
46
  Write the full intended behaviour, including scenarios the executable subset cannot run
42
47
  (filtered, scoped and performer-backed views; clock, trigger and capture scenarios when only a
@@ -51,12 +56,12 @@ older cratis bundle is available). Mark each such spec in the coverage matrix as
51
56
  - Run V3 (binding-ready, per `cratis-screenplay-toolchain`); binding-only codes (PLAY0273/0350/0352/0388/0389) appear only there.
52
57
  - V4 runs through `screenplay test` or MCP `run-specifications`; record expected,
53
58
  discovered/selected and passed/failed/unsupported counts. Unbound/unsupported
54
- is not passed. Authoring-only refusal/redelivery/operation specs remain recorded
55
- contracts; test them at the owning target after authorized gap-fill.
59
+ is not passed. Operation specs remain authoring-only recorded contracts; refusal/redelivery
60
+ reference execution is independent of the owning target's admission.
56
61
 
57
62
  ## Renderable mode
58
63
  - Specs use given events, a command `when`, and then events / readmodel / query / error /
59
- denied. No `when append` or `then no readmodel`. `given readmodel` appears only in the
64
+ denied. Only supported single-hop `when append` or located redelivery; no `then no readmodel`. `given readmodel` appears only in the
60
65
  query-only lookup below.
61
66
  - Query-only specs (no command `when`) are admitted by Stage in exactly two cases, and
62
67
  `when query` and `then query` are the same case: Screenplay normalises `when query` to the
@@ -30,7 +30,7 @@ allocates, or a view's own calculation. A value with no such start is a gap, not
30
30
  | the user types or picks it | screen `action`, form or dialog input | default for business decisions |
31
31
  | shown before the user acts | form `populate via query` from a read model | the read model must exist and be traced |
32
32
  | the instance being acted on | the `identifier` property, carried from the screen row or route | |
33
- | allocated by the runtime | `Type generated` on a required scalar generatable Uuid/String concept (implicit UUID is v7; explicit serialized strategy selects v15, Screenplay 4.147.0+ with strict fixtures and whole-source freshness). CLI 3.57.0 / Stage 4.89.1 render supported strategies; types/combinations retain -028/-038; no concept rules. See command-surface `references/generated-values-and-responses.md` | never a request input or form field; no policy, rule or requirement may read it (`PLAY0273`); return it with `returns`; where a tool cannot bind it, executable scope needs explicit allocation |
33
+ | allocated by the runtime | `Type generated` on a required scalar generatable Uuid/String concept (implicit UUID is v7; explicit serialized strategy selects v15, Screenplay 4.147.0+ with strict fixtures and whole-source freshness). The CLI/Stage render supported strategies within their bundled ESM ceiling; types/combinations retain -028/-038. Generated-concept rules select v20 (Requires Screenplay 4.164.0, `screenplay --version`); older compilers refuse them, and targets need explicit v20 admission. See command-surface `references/generated-values-and-responses.md` | never a request input or form field; no policy, rule or requirement may read it (`PLAY0273`); return it with `returns`; where a tool cannot bind it, executable scope needs explicit allocation |
34
34
  | an outside party | capture field `$.x` or a reaction trigger value | `cratis-screenplay-automations-and-translations` |
35
35
  | time of the decision | not an input: `$context.occurred` in `produces`; a rule reads it as `context.Occurred` in a named rule (`command-inventory.md` *Values a rule reads*) | a date the person chooses is an input; "now" is context |
36
36
  | the caller | not an input: `$context.identity.*` in `produces`; who may act in `authorize`; "acting on own X" is a claim policy matched to the identifier or a command property | never trust a caller-supplied "who am I" |
@@ -97,10 +97,10 @@ Read [references/vocabulary.md](references/vocabulary.md) when writing or readin
97
97
  Rules the binder enforces:
98
98
 
99
99
  - **At most one action** — a command, `when append`, `when clock`, `when trigger`,
100
- `when capture` or `when query` (`PLAY0097`, `PLAY0358`). Without an action,
101
- assert only `then readmodel`, `then no readmodel` or `then query` (`PLAY0352`).
100
+ `when capture`, `when redelivered` or `when query` (`PLAY0097`, `PLAY0358`). Without an action,
101
+ assert only read state or one queried call with `then error` (ESM v18; otherwise PLAY0352).
102
102
  - **`then result` and `then no result` need `when query`**, and `when query`
103
- needs one of them or `then denied` (`PLAY0465`). Each argument is a `by` or
103
+ needs one of them, `then denied` or a sole validation `then error` (`PLAY0465`). Each argument is a `by` or
104
104
  `filter` parameter of the query (`PLAY0468`).
105
105
  - **A clock instant is ISO 8601 with an offset or `Z`**, such as
106
106
  `"2026-10-05T08:00:00Z"` (`PLAY0461`); `given clock` appears at most once.
@@ -166,16 +166,23 @@ unadmitted (PLAY0268); see read-surface `references/named-keys.md`.
166
166
  Use typed `example` declarations for repeated event/command/read-model values;
167
167
  step overrides keep the action/outcome visible and carry authored/example/override
168
168
  provenance. Event examples can carry routes, replaced as a whole by a step.
169
- Redelivery locators may state `stream` or `no stream` to select one definitely
170
- matching given occurrence with no undecided candidates (PLAY0543); redelivery
171
- remains authoring-only. Event `stream`/`no stream` assertions bind as ESM v8; typed `for` and
172
- stream ids are not guessed. Read [examples and routes](references/examples-and-routes.md).
169
+ Read [examples and routes](references/examples-and-routes.md) when locating a
170
+ redelivered given (v17, PLAY0543) or asserting event routes (v8); it owns typed
171
+ `for`, `stream`/`no stream`, complete ids and undecided-candidate rules.
173
172
 
174
- `given operation`, `then operation`, `then compensated`, reaction refusal branches, `when redelivered` and `then no events` are authoring-only (`PLAY0268`): compile them and report the refusal, never an executed result. Read [references/examples-and-routes.md](references/examples-and-routes.md) for the full wording.
173
+ Operations remain authoring-only (PLAY0268). Read `references/examples-and-routes.md`
174
+ when asserting `then no events` or located recovery without re-append (v17), and
175
+ [refusal handling](../cratis-screenplay-captures-and-reactions/references/refusals-and-redelivery.md)
176
+ when recording/acknowledging invocation refusals (v19).
177
+ Requires Screenplay 4.157.0 (`screenplay --version`) for v17, 4.160.0 for v19;
178
+ older compilers report PLAY0268.
175
179
 
176
180
  ## Rejections and denials say different things
177
181
 
178
- `then error "<message>"` pins the reason, bare `then error` leaves it unnamed, and `then denied` is an authorization denial decided first. Views cannot reject events. Read [references/outcome-comparison.md](references/outcome-comparison.md) when choosing among them.
182
+ `then error "<message>"` pins the reason, bare `then error` leaves it unnamed, and `then denied` is an authorization denial decided first. Views cannot reject events.
183
+ Read `references/query-rejections.md` when specifying malformed keys/filters
184
+ (Validation `then error`, v18) versus valid absence (`then no result`).
185
+ Requires Screenplay 4.161.0 (`screenplay --version`); older runners may answer absence. Read [references/outcome-comparison.md](references/outcome-comparison.md) when choosing among them.
179
186
 
180
187
  ## Business rule or concept rule?
181
188
 
@@ -222,7 +229,8 @@ For view specifications:
222
229
  - [ ] `given readmodel` is a complete instance with its identifier.
223
230
  - [ ] `then readmodel` states the identifier and the properties that matter; add
224
231
  `exactly` only when extra properties must fail the assertion.
225
- - [ ] No error cases — views cannot reject.
232
+ - [ ] Queries cover out-of-rule concept arguments with `then error`; a valid
233
+ absent key uses `then no result`. Projections still cannot reject events.
226
234
 
227
235
  ## Verify
228
236
 
@@ -166,10 +166,11 @@ needs exactly one definitely matching candidate and **no undecided candidates**
166
166
  values, `stream` or `no stream`; do not guess an unknown value. A locator's `for`
167
167
  is optional but typed against the routed source when present.
168
168
 
169
- This complete syntax-only model validates; `screenplay test` reports
170
- PLAY0268 for redelivery, not a passing scenario:
169
+ This complete model validates and `screenplay test <root>` exits 0 with one passed redelivery scenario.
171
170
 
172
- ```screenplay test=unbound
171
+ Requires Screenplay 4.157.0 or later (`screenplay --version`) for redelivery and no-event assertions (ESM v17); older compilers report PLAY0268.
172
+
173
+ ```screenplay
173
174
  eventsource Account
174
175
  identifier String
175
176
  stream Transactions
@@ -200,8 +201,8 @@ module Accounts
200
201
  The second given replaces the example's **entire** route, independently of `for`,
201
202
  not just its id. PLAY0548 is command-action-only, never a locator route error;
202
203
  malformed routes use PLAY0547 and resolution/key-shape errors PLAY0549. MCP labels
203
- locator fixtures `whenRedeliveredEvent` with route-origin rows. Route admission
204
- alone does not admit redelivery or `then no events`.
204
+ locator fixtures `whenRedeliveredEvent` with route-origin rows. Delivery fires only
205
+ the named reaction, then settles the cascade without appending the input again.
205
206
 
206
207
  ## Operation and recovery intent
207
208
 
@@ -210,15 +211,15 @@ Operation failure/request/compensation forms are authoring-only (PLAY0268):
210
211
  subset, and leaf `then compensated <Name>`. See command-surface
211
212
  `references/operations.md` for the complete checked authoring fixture.
212
213
 
213
- Refusal selectors, redelivery to one observer and `then no events` likewise
214
- remain unadmitted; they are not executed append scenarios. Forms, matching,
215
- acknowledgement and their whole-model refusal boundary are in
216
- captures-and-reactions `references/refusals-and-redelivery.md`.
214
+ Refusal selectors bind/reference-execute as ESM v19; redelivery to one observer
215
+ and `then no events` as v17. Forms, matching, acknowledgement and the distinction
216
+ between domain refusals and infrastructure failures are in captures-and-reactions
217
+ `references/refusals-and-redelivery.md`.
217
218
 
218
219
  Authority: Screenplay `Documentation/screenplay/specifications.md`.
219
220
 
220
221
  `given operation ... fails`, `then operation` and `then compensated` describe
221
- future external-work behavior. Reaction refusal branches, `when redelivered`
222
- and `then no events` (PLAY0268) are also authoring-only: compile them, but report their
223
- PLAY0268 binding refusal instead of an executed result. Preserve the contract; a read-model or
224
- query assertion states a zero-fact outcome.
222
+ future external-work behavior. Use `then no events` to assert explicitly that the
223
+ action and cascade produced no new facts; after append it excludes the input fact.
224
+ It may accompany view/query/response assertions, not events, event-order assertions,
225
+ errors or denial (PLAY0545). An omitted event list is not this explicit assertion.
@@ -0,0 +1,44 @@
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
+ # Query rejection versus absence
5
+
6
+ Requires Screenplay 4.161.0 or later (`screenplay --version`) for query argument validation and query `then error` (ESM v18); older runners may return no result for an invalid key.
7
+
8
+ Authorization runs first. The `by` key and each supplied filter value then pass
9
+ through their concept's `validate` rules in every ESM version. An omitted optional
10
+ filter is not validated. A violation is a Validation rejection carrying the rule's
11
+ message; a valid key with no matching instance is absence.
12
+
13
+ Use exactly one query request and one `then error`, bare or with a message. No
14
+ command/append/reaction action, result, `then no result` or `then denied` may
15
+ accompany it (PLAY0465). An actionless `then query` with `arguments` and no `result`
16
+ can also carry the sole error assertion. Only the error-asserting form selects v18;
17
+ ordinary argument validation does not change the model's ESM version.
18
+
19
+ Run `screenplay test <root>` on this complete model: exit 0, two passed scenarios.
20
+
21
+ ```screenplay
22
+ concept InvoiceNumber : String
23
+ validate
24
+ min 2 message "Invoice number is too short"
25
+ module Billing
26
+ feature Lookup
27
+ slice StateView FindInvoice
28
+ readmodel Invoice
29
+ number InvoiceNumber key
30
+ query GetInvoice => Invoice optional
31
+ by number InvoiceNumber
32
+ specification RejectingAShortNumber
33
+ when query GetInvoice
34
+ number = "A"
35
+ then error "Invoice number is too short"
36
+ specification MissingAValidNumber
37
+ when query GetInvoice
38
+ number = "AB"
39
+ then no result
40
+ ```
41
+
42
+ This proves query-boundary rejection, not event rejection by a projection.
43
+ Renderer admission is independent: a target that does not admit v18 cannot render
44
+ this specification. Keep the model's concept rules and report the target gap.
@@ -48,7 +48,7 @@ Ask only what is missing: (1) instance - what real-world thing the stream is abo
48
48
  namespace, process-stream routing and concurrency scope apart
49
49
  (`references/chronicle-boundaries.md`). Declared `eventsource`/`stream`/`streamId` and
50
50
  command/specification routes bind and reference-execute as ESM v8.
51
- The CLI (toolchain `references/renderable-subset.md`) reaches Stage construct checks through v15; keep the routing
51
+ The CLI (toolchain `references/renderable-subset.md`) reaches Stage construct checks through its bundled ceiling; keep the routing
52
52
  contract when target admission requires gap-fill. Forms/boundaries:
53
53
  toolchain `references/sources-and-streams.md`. A `generated identifier` (ESM v7; Stage renders supported UUID/String strategies and v15 freshness; unsupported types/results still refuse -028/-038) is
54
54
  generated fresh on every acceptance: it is not a retry identity, and generated values give no
@@ -99,6 +99,7 @@ Ask only what is missing: (1) instance - what real-world thing the stream is abo
99
99
  interface and processor inventory, one real interaction walked across each boundary, coupling
100
100
  check. Keep team, module, stream and deployment boundaries distinct; inbound facts via
101
101
  Translate; unresolved decisions stay visible.
102
+ Read [references/multi-service-models.md](references/multi-service-models.md) when the system spans several services, each with its own event store and model folder.
102
103
  7. **Record and gate.** Durable rationale in feature and slice `documentation`; open consistency
103
104
  decisions and capability gaps in `STATE.md`. Then the gate below.
104
105
 
@@ -0,0 +1,188 @@
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
+ # Modeling a system of several services
5
+
6
+ ## Contents
7
+
8
+ - One model folder per service
9
+ - A module is not a store boundary
10
+ - The contract between two service models
11
+ - Diagnostics at the service boundary
12
+ - Tooling: one workspace and one verdict set per service
13
+ - Rendering: one application per run
14
+ - What nothing checks
15
+
16
+ ## One model folder per service
17
+
18
+ Screenplay has no `service`, `event store` or `deployment` construct. A folder of
19
+ `.play` files is exactly one application, and one application becomes one Chronicle
20
+ event store when rendered. A system of several services, each owning its own store,
21
+ is therefore several model folders:
22
+
23
+ ```text
24
+ Shop/
25
+ ├── Ordering/Screenplay/ # domain Shop.Ordering; .screenplay/identities.json
26
+ └── Billing/Screenplay/ # domain Shop.Billing; .screenplay/identities.json
27
+ ```
28
+
29
+ - Each folder has its own `domain`, its own `.screenplay/identities.json` and its
30
+ own concepts. A concept both services use (`OrderId`) is declared in both.
31
+ - Never put the services under one folder that is compiled or rendered as a whole;
32
+ the files merge into one application, and a second `domain` in that folder
33
+ refuses with `PLAY0172`.
34
+ - `eventsource` declares an event-source type inside one store and `system` an
35
+ external system an operation uses; neither expresses a service or a store.
36
+
37
+ ## A module is not a store boundary
38
+
39
+ Modules inside one application share its single event store. Use modules for
40
+ bounded contexts that ship together in one service; reference another module's
41
+ events by name, and state the dependency with `depends on <Module>` or
42
+ `depends on <Module>.<Feature>` when the team opts in. Once a container declares
43
+ dependencies, an undeclared counted reference into a producer module is `PLAY0552`
44
+ (warning) and a declared dependency nothing uses is `PLAY0553` (information).
45
+ `depends on` cannot name another application. Split a module into its own model
46
+ folder only when it gets its own store and deployment.
47
+
48
+ ## The contract between two service models
49
+
50
+ The producer declares a `public event` in an outbound `Translate` slice and builds
51
+ it from private events with an event-target projection. The consumer redeclares
52
+ the same shape as `event <Name> from "<producer store>"` in an inbound `Translate`
53
+ slice and captures it into a private event of its own. The quoted origin is the
54
+ producer's Chronicle event-store name, the `--name` its model is rendered with.
55
+
56
+ Producer, `Ordering/Screenplay/ordering.play`:
57
+
58
+ ```screenplay
59
+ domain Shop.Ordering
60
+ concept OrderId : Uuid
61
+ module Ordering
62
+ feature Placing
63
+ slice StateChange PlaceOrder
64
+ command PlaceOrder
65
+ orderId OrderId identifier
66
+ total Decimal
67
+ produces OrderPlaced
68
+ for orderId
69
+ total = total
70
+ event OrderPlaced
71
+ total Decimal
72
+ slice Translate PublishOrderAccepted
73
+ direction outbound
74
+ public event OrderAccepted
75
+ orderId OrderId
76
+ total Decimal
77
+ projection OrderAcceptedPublisher => OrderAccepted
78
+ from OrderPlaced
79
+ orderId = $eventSourceId
80
+ total = total
81
+ specification PublishingAPlacedOrder
82
+ when append OrderPlaced
83
+ for "3fa85f64-5717-4562-b3fc-2c963f66afa6"
84
+ total = 10
85
+ then OrderAccepted
86
+ orderId = "3fa85f64-5717-4562-b3fc-2c963f66afa6"
87
+ total = 10
88
+ ```
89
+
90
+ Consumer, `Billing/Screenplay/billing.play`:
91
+
92
+ ```screenplay
93
+ domain Shop.Billing
94
+ concept OrderId : Uuid
95
+ module Billing
96
+ feature Invoicing
97
+ slice Translate AcceptOrders
98
+ direction inbound
99
+ event OrderAccepted from "Ordering"
100
+ orderId OrderId
101
+ total Decimal
102
+ event InvoiceRequested
103
+ total Decimal
104
+ capture OrderIntake
105
+ source events
106
+ from OrderAccepted
107
+ key orderId
108
+ append InvoiceRequested
109
+ total = $.total
110
+ ```
111
+
112
+ - Name the public contract differently from the private fact it summarizes
113
+ (`OrderAccepted` from `OrderPlaced`). One application cannot hold a producer's
114
+ public event and a foreign event of the same name (`PLAY0472` with `PLAY0268`),
115
+ another reason each service has its own folder.
116
+ - A capture keys on the incoming content, so the contract carries the identity
117
+ the consumer keys on.
118
+ - The producer's publication specification runs in the reference evaluator; the
119
+ consumer's capture over events binds but evaluates as typed Unsupported. Specify
120
+ the consumer's private behavior downstream of the capture.
121
+ - Syntax, publication semantics and the full rules: read
122
+ `cratis-screenplay-automations-and-translations`
123
+ `references/public-events-and-direction.md`.
124
+
125
+ Requires Screenplay 4.117.0 or later (`screenplay --version`) for public events,
126
+ origins and direction (ESM v9).
127
+
128
+ ## Diagnostics at the service boundary
129
+
130
+ | Code | Fix |
131
+ | --- | --- |
132
+ | `PLAY0607` | A command produced a public event; publish from an outbound Translate instead |
133
+ | `PLAY0608`, `PLAY0609`, `PLAY0617` | An outbound slice publishes exactly one local public event type, and only there |
134
+ | `PLAY0610`, `PLAY0616` | A foreign event is consumed only in an inbound Translate, and an inbound slice consumes only foreign events |
135
+ | `PLAY0611`, `PLAY0612`, `PLAY0613` | Outbound consumes private local events; inbound produces private local events; a foreign event is never produced locally |
136
+ | `PLAY0614` | A Translate that declares or uses public metadata states its direction |
137
+ | `PLAY0615`, `PLAY0618`, `PLAY0619`, `PLAY0620` | Captures of outside data stay inbound, event-target builders stay outbound, and `source events` lists distinct `from <Event>` lines |
138
+ | `PLAY0268` | A public or foreign `import` has no local shape; declare `event X from "Store"` with its fields |
139
+
140
+ One capture reads one origin: split a capture whose `from` events come from several
141
+ origins into one capture per origin (`PLAY0687`). Chronicle realizes one capture as one inbox observer and refuses a mixed capture at runtime.
142
+
143
+ Requires Screenplay 4.155.0 or later for `PLAY0687`; older compilers accept a mixed capture silently, so check origins by review there.
144
+
145
+ ## Tooling: one workspace and one verdict set per service
146
+
147
+ - Compile, test and record verdicts V1–V5 per model folder
148
+ (`cratis-screenplay-toolchain` owns the commands). A system-level verdict does
149
+ not exist; the contract agreement below is a review step.
150
+ - The `screenplay` MCP server works on one workspace at a time; switching clears
151
+ outstanding proposals. When `cratis screenplay mcp` locates the project's model
152
+ itself (`--project-root`, or `.cratis/ai.json` without
153
+ `mcpServers.screenplay.root`), it serves the common folder of the project's
154
+ `.play` files, which for several service folders is their parent and merges the
155
+ services. Start each connection with the service's model folder as its explicit
156
+ path (`cratis screenplay mcp Ordering/Screenplay`).
157
+ - `cratis screenplay generate` describes one application per solution or solution
158
+ filter. Generate each service from its own `.slnf` into its own model folder. A
159
+ reactor observing anything other than the event log, such as another store's
160
+ inbox, keeps its code reference instead of becoming an inbound Translate; model the
161
+ Translate by hand.
162
+
163
+ ## Rendering: one application per run
164
+
165
+ - Render each service separately:
166
+ `cratis render Ordering/Screenplay --name Ordering --destination Ordering/out`,
167
+ then the same for `Billing`. `--name` is the application identity and becomes the
168
+ Chronicle event-store name and the MongoDB database name, so it must equal every
169
+ consumer's `from "…"` origin.
170
+ - Stage refuses public events and event-target builders (`STAGE-ESM-032`), foreign
171
+ events and events-source captures (`STAGE-ESM-033`) and directed Translate slices
172
+ (`STAGE-ESM-024`). Render the admitted modules with `--scope` and gap-fill the
173
+ publication and the consumer translation by hand against the model, using
174
+ `cratis-multi-service-architecture` for the runtime shape
175
+ (`cratis-screenplay-render-and-gap-fill` owns the workflow).
176
+ - Each rendered scaffold carries its own single-kernel compose file with fixed host
177
+ ports. Run one kernel for all services instead
178
+ (`cratis-multi-service-local-orchestration`).
179
+
180
+ ## What nothing checks
181
+
182
+ - The consumer's copy of a contract against the producer's: field names, types and
183
+ the event name agree only by review. Keep the consumers named in the public
184
+ event's `documentation`, and diff both declarations whenever either changes.
185
+ - The origin string against a real store or model: a typo binds silently.
186
+ - Contract versions across services: generations, `id` pins and stored names apply
187
+ within one application. Treat a public event as a published API and make a breaking
188
+ change a new event (`references/evolution.md`).
@@ -24,6 +24,6 @@
24
24
  { "kind": "skill-contains", "value": "decision tree and red flags" },
25
25
  { "kind": "skill-contains", "value": "bind and reference-execute as ESM v8" },
26
26
  { "kind": "skill-contains", "value": "generated values give no\n idempotency, retry or deduplication guarantee" },
27
- { "kind": "skill-contains", "value": "Stage construct checks through v15" }
27
+ { "kind": "skill-contains", "value": "Stage construct checks through its bundled ceiling" }
28
28
  ]
29
29
  }
@@ -127,6 +127,10 @@ changes with the root folder name.
127
127
  - **Concept strategies (v15):** concept strategies and Guarded freshness; strict fixture shapes,
128
128
  no silent retry. Read [references/generation-strategies-example.md](references/generation-strategies-example.md)
129
129
  and command-surface `references/generated-values-and-responses.md` for supported strategies/refusals.
130
+ - **v17–v20:** recovery/no-event assertions (v17), query Validation errors (v18),
131
+ invocation refusal branches (v19), generated-concept rules (v20). Read
132
+ `references/executable-subset.md` when choosing a version; specifications and
133
+ command-surface references own examples. Newer binding is not render admission.
130
134
  - **Caller/compliance metadata:** `$identity` aliases caller built-ins;
131
135
  additional identity details are metadata and executable reads still refuse.
132
136
  Bare `pii`/`secret` replace legacy spellings; `pii personal` repeats one marker
@@ -203,7 +207,8 @@ reason; blocked verdicts list codes and keep the protection they blocked on.
203
207
 
204
208
  Read [model notes gate](references/verdicts.md#model-notes-gate) when checking
205
209
  unresolved questions: the standalone tool has `--open-questions fail`; `cratis screenplay validate`
206
- does not. It is separate from compilation and `--warnaserror`.
210
+ does through `--open-questions report|fail`. It is separate from compilation and `--warnaserror`.
211
+ Requires Cratis CLI 3.60.0 or later (`cratis --version`) for that option; older CLIs lack it.
207
212
 
208
213
  ## Route near misses
209
214
 
@@ -218,7 +218,7 @@ migration. Preview every repair; legal notes never move automatically.
218
218
 
219
219
  Descriptions/documentation are report-only PLAY0270, not executable conditions.
220
220
  Case tables and persona callers expand before binding without a new ESM version.
221
- Routes do not make redelivery executable: it still reports PLAY0268.
221
+ Routes do not by themselves select v17: redelivery executes as v17 (Requires Screenplay 4.157.0), and older compilers report PLAY0268 for it.
222
222
 
223
223
  ## Guarded interaction diagnostics
224
224
 
@@ -299,7 +299,7 @@ or V4 execution. Run the CLI or MCP for those verdicts.
299
299
  | PLAY0273 | incoherent: ambiguous `for`, property not on event revision, operand type mismatch, derived `$eventContext` path | fix the reference |
300
300
  | PLAY0350 | `null` in command/event value | Chronicle semantics (nullable event properties are CHR0012; an optional fact is a separate event), not only a binder limitation: specs cannot state an absent command/event value. Omit the value or record a capability gap; whether the optional detail is really a separate fact is a review question, not this code's fix |
301
301
  | PLAY0351 | given/then readmodel lacks the key property | add the keyed query's `by` property |
302
- | PLAY0352 | when-less spec asserting events/errors | add a `when` or assert readmodel/query |
302
+ | PLAY0352 | when-less spec asserting an action outcome, except a sole query Validation error (v18) | add an action or assert readmodel/query |
303
303
  | PLAY0389 | gated command/query exercised without `given caller` | add `given caller` (empty block = anonymous) |
304
304
 
305
305
  ## Frequent errors
@@ -325,6 +325,7 @@ or V4 execution. Run the CLI or MCP for those verdicts.
325
325
  | PLAY0410/0411/0412 | same view read twice / duplicate alias / alias collision |
326
326
  | PLAY0453 | `then no readmodel` needs `RM for "<key>"` |
327
327
  | PLAY0461 | clock instant not ISO 8601 with `Z`/offset |
328
+ | PLAY0465 | query action needs result/no-result/denial or one Validation error; a query error cannot mix with results/no-result/denial or more than one query |
328
329
  | PLAY0468 | `when query` argument is not a `by`/`filter` param |
329
330
  | PLAY0474 | `produces event` (inline) outside a command, e.g. in a reaction |
330
331
  | PLAY0478 (I) | plain `produces` without `for`: add `for <identifier>` |
@@ -333,6 +334,9 @@ or V4 execution. Run the CLI or MCP for those verdicts.
333
334
  | PLAY0480/0484 | modifier order `Type optional generated identifier` |
334
335
  | PLAY0682 | `generate sequence` is reserved; keep the intended sequence as a capability gap |
335
336
  | PLAY0683/0684 | PLAY0683: generated non-identifier below 64 random bits warns (a single-property unique constraint suppresses it); PLAY0684: generated identifier below 64 random bits is an error |
337
+ | PLAY0687 | capture `source events` spans multiple origins; split into one capture per origin (event store) |
338
+ | PLAY0688 | generated strategy refutes a concept rule; read its violating example, align the rule/strategy or review the derived-`matches` repair |
339
+ | PLAY0689 (W) | generated-concept rule proof is undecided; reason names regex fragment/budget/opaque limits. Never treat a warning as proof |
336
340
  | PLAY0685 | own response name used under execute failure; outer successful responses remain available. UI composition `references/response-continuations.md` |
337
341
  | PLAY0289 | (binding) no documents: empty root |
338
342
 
@@ -351,14 +355,18 @@ Publication STAGE-ESM-032, foreign facts/event captures 033, claim-reading/opaqu
351
355
  | STAGE-ESM-025 | a typed-context member references a historical event revision or property identity; only the current revision renders |
352
356
  | STAGE-ESM-026 | a selected event, or an event a selected scope depends on, is above its initial revision; Stage cannot render event-type migrations; gap-fill and hand-write the migrations |
353
357
  | STAGE-ESM-001 | unsupported slice kind; `StateChange`, `StateView` and event-triggered `Automation` render, Translate is STAGE-ESM-024 |
354
- | STAGE-ESM-004 / 006 / 013 | a `StateChange` without exactly one command; `produces` that cannot render (conditional, literal or computed mappings, duplicate tags); event-context value other than `$context.occurred` (reactions: `$context.causedBy.*`, `$context.eventSourceId`) |
358
+ | STAGE-ESM-004 / 006 / 013 | a `StateChange` without commands; `produces` that cannot render (expression/enum conditions, literal or computed mappings, duplicate tags); event-context value other than `$context.occurred` (reactions: `$context.causedBy.*`, `$context.eventSourceId`) |
355
359
  | STAGE-ESM-005 / 015 | code rule or code validation bodies; authorization Stage cannot render exactly (role-claim URIs, nested or unresolved opaque policies, opaque-policy subjects that are not text, Uuid, Date or DateTime). Role-only, authenticated, opaque pure policies and Uuid/Date/DateTime/text claim targets render |
356
- | STAGE-ESM-007 / 009 / 010 / 017 | projection shape (one projection or reducer per read model, affected-instance key, query delivery such as a snapshot list, keys, `all`, event-context values) |
360
+ | STAGE-ESM-007 / 009 / 010 / 017 | projection shape (one projection or reducer per read model, affected-instance key, unsupported query shapes, keys, unsupported `all` mappings, event-context values) |
357
361
  | STAGE-ESM-011 | specification shape not rendered (`when append` outside the single-hop reaction subset, command specifications that cascade into reactions, composite values, an unauthenticated caller carrying roles or claims, v15 fixtures that do not match their strategy). Command scenarios and single-hop reaction appends render |
358
362
  | STAGE-ESM-014 | constraint shape (multi-claim in one command, optional or composite targets) |
359
363
  | STAGE-ESM-019/022 | reducer or opaque pure policy body outside the pure allowlist |
360
364
  | STAGE-ESM-024 | interval, schedule, application, startup and shutdown triggers, opaque reaction bodies, captures, Translate, clock/trigger/capture specifications |
361
365
  | STAGE-ESM-020 | a body the model requires is missing or changed (content hash check); blocks publication |
366
+ | STAGE-ESM-039 | unsupported refusal branch conditions/routes/mappings, same-event multi-trigger refusal groups, localized `$refusal.message` or ambiguous multi-constraint `$refusal.constraint` |
367
+ | STAGE-EVENT-002 / CLI-RENDER-016 | existing destination event type ids changed or unreadable; pin stored identity, never bypass with `--force` |
368
+ | STAGE-BASELINE-001–004 | whole-application warnings: changed/missing admitted event revision, unreadable baseline, unavailable or stale assessment; keep `baseline check` as the independent CI gate |
369
+ | CLI-RENDER-017 / 018 | persisted PATH root cannot open / `--name` differs from saved application name; resolve root state, never discard identities |
362
370
  | STAGE-CRATIS-005 | a modeled artifact would render into `Customizations/` |
363
371
  Fix by changing the model only where the domain allows it; otherwise the slice is gap-fill
364
372
  with the model as its contract (`cratis-screenplay-render-and-gap-fill`).
@@ -18,11 +18,13 @@
18
18
  What the binder admits, and what it refuses with which code, depends on the compiler: the
19
19
  standalone tool binds the newest ESM versions, while the compiler bundled in the CLI (and the
20
20
  renderer that uses it) admits through an older version. Operations, the `numbers exact`
21
- **source mode** (PLAY0268) and reaction refusals/redelivery remain unadmitted. Routes bind as
21
+ **source mode** (PLAY0268) remain unadmitted. Routes bind as
22
22
  ESM v8, public/direction constructs as v9, identity/overrides/filters as v10, qualifying
23
23
  non-route Double literals (exact lowering of Double-mode literals) as v11, non-positional enum
24
24
  numbers as v12, concept compliance as v13, caller-supplied collection equality filters as v14,
25
- concept generation strategies and freshness as v15 and stored event names as v16. Always name
25
+ concept generation strategies and freshness as v15, stored event names as v16,
26
+ no-event assertions/redelivery as v17, query-error specifications as v18,
27
+ invocation refusal branches as v19 and generated-concept rules as v20. Always name
26
28
  the tool with a V2 or V3 result. When tool and documentation disagree, the tool decides
27
29
  current capability; the documentation and the domain decide intended correctness. Record
28
30
  the gap, never strip the model to pass. Use the actual binder before promoting an older
@@ -127,7 +129,7 @@ filters AND with `by`; optional omission does not narrow, supplied null is refus
127
129
  `then query … arguments` and `when query` accept both `by` and filters; PLAY0468
128
130
  reports unknown/repeated/missing required arguments. Collection results match by
129
131
  read model/key regardless of row order. Stage admits and renders these filters, subject to
130
- construct checks (snapshot lists, DateTime filters and parameter order still refuse). Complete compiled specs:
132
+ construct checks (DateTime filters and parameter order still refuse). Complete compiled specs:
131
133
  read-surface [equality filters](../../cratis-screenplay-read-surface/references/equality-filters.md).
132
134
 
133
135
  Requires Screenplay 4.143.0 or later (`screenplay --version`) for equality filters; earlier compilers refuse them.
@@ -169,14 +171,16 @@ Complete examples: `generated-responses-example.md`, `generation-strategies-exam
169
171
  - A generated property is command-only, required, scalar and a generatable concept backed by Uuid or String;
170
172
  bare primitives, optional and collection types are invalid. Uuid has implicit `uuid`; String needs a strategy.
171
173
  Explicit serialized generation selects v15, with strict fixture encoding and whole-source freshness for all
172
- generated destinations. `pattern`, `random`, `rule`, `sequence`, generated rules/secrets remain unadmitted.
174
+ generated destinations. `pattern`, `random`, `rule`, `sequence` and generated secrets remain unadmitted;
175
+ generated-concept rules bind as v20 with proof diagnostics PLAY0688/0689.
173
176
  See command-surface `references/generated-values-and-responses.md` and `generation-strategies-example.md`. Modifier order is `Type optional generated identifier`.
174
177
  - Generated values are not request inputs, form fields, invocation arguments or ordinary `when` values. Generation
175
178
  runs after authorization and validation and before productions, so a denial or a validation failure never
176
179
  reaches it.
177
180
  - A policy (including inherited or composed ones and the implicit `subject` of a generated identifier), a property
178
181
  rule or a requirement that references a generated value reports `PLAY0273`; reference input properties only. A
179
- generated property whose concept declares any validation rule (declarative, named or code) reports `PLAY0268`.
182
+ generated property whose concept declares rules selects v20; refuted rules report
183
+ PLAY0688 and unproven rules warn PLAY0689. Opaque execution needs a target.
180
184
  A reaction mapping into a generated property is invalid.
181
185
  - Responses: `returns <property>` is scalar; bare `returns` opens an ordered record of `<name> [<Type>] = <property>` fields
182
186
  over direct properties of the same command (collections, read aliases, arithmetic and whole read models are not
@@ -288,7 +292,7 @@ bodies still leave their owner non-executable.
288
292
  | `$eventContext.occurred.Week` | PLAY0273 | derived value |
289
293
  | Projection `parent p` where `p` is not on the child event | PLAY0273 | "Event property not found" |
290
294
  | `generated` or `returns` on an older compiler | PLAY0268 | admitted from ESM v7, see above |
291
- | Operations or systems, `numbers exact` source mode, reaction refusals/redelivery | PLAY0268 | not admitted by any supported ESM version; one such construct leaves the **whole** application without an executable model. Event sources/streams/routes instead bind as ESM v8 on the current compiler (`sources-and-streams.md`) |
295
+ | Operations or systems, `numbers exact` source mode | PLAY0268 | not admitted by any supported ESM version; one such construct leaves the **whole** application without an executable model. Event sources/streams/routes instead bind as ESM v8 on the current compiler (`sources-and-streams.md`) |
292
296
  | Spec of a gated command or query without `given caller` | PLAY0389 | module and feature gates count |
293
297
  | `given` or `then readmodel` missing key parts | PLAY0351 | explicit `key` marks replace inference; composite fixtures need every part but remain unadmitted |
294
298
  | When-less spec asserting events or errors | PLAY0352 | |