@cratis/pi 7.62.0 → 7.64.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/package/corpus/product-sync.json +9 -9
  2. package/package/corpus/skills/cratis-application-slice-conformance/SKILL.md +1 -1
  3. package/package/corpus/skills/cratis-arc-command/references/generated-values.md +27 -12
  4. package/package/corpus/skills/cratis-arc-command/references/shop-generation.md +17 -6
  5. package/package/corpus/skills/cratis-fundamentals-concept/SKILL.md +10 -2
  6. package/package/corpus/skills/cratis-fundamentals-concept/references/shop-generation.md +49 -6
  7. package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +43 -41
  8. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/cases-to-specify.md +11 -2
  9. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/integration-interview.md +24 -0
  10. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/public-events-and-direction.md +76 -10
  11. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/realization-and-gap-fill.md +5 -0
  12. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/todo-list-example.md +1 -1
  13. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translate-example.md +39 -23
  14. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translation-patterns.md +35 -12
  15. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +51 -81
  16. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/atomic-batches-and-source-mappings.md +83 -0
  17. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/capture-map-and-example.md +14 -4
  18. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/reaction-forms.md +59 -0
  19. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/record-capture-specifications.md +60 -0
  20. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/specifying-triggers-and-clock.md +5 -1
  21. package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +37 -30
  22. package/package/corpus/skills/cratis-screenplay-command-surface/references/date-comparisons.md +100 -0
  23. package/package/corpus/skills/cratis-screenplay-command-surface/references/described-handlers.md +82 -0
  24. package/package/corpus/skills/cratis-screenplay-command-surface/references/generated-values-and-responses.md +82 -28
  25. package/package/corpus/skills/cratis-screenplay-command-surface/references/protected-reads.md +113 -0
  26. package/package/corpus/skills/cratis-screenplay-command-surface/references/shop-generation.md +45 -12
  27. package/package/corpus/skills/cratis-screenplay-command-surface/references/text-and-match-rules.md +119 -0
  28. package/package/corpus/skills/cratis-screenplay-command-surface/references/validate-rules.md +26 -6
  29. package/package/corpus/skills/cratis-screenplay-command-surface/verification.json +13 -3
  30. package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +12 -12
  31. package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +5 -3
  32. package/package/corpus/skills/cratis-screenplay-event-modeling/verification.json +5 -1
  33. package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +2 -2
  34. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/evidence-table-template.md +1 -1
  35. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generated-recovery.md +51 -14
  36. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/intent-example.md +5 -0
  37. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/loss-report-template.md +2 -1
  38. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/rule-modeling.md +6 -3
  39. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/signal-to-intent.md +1 -1
  40. package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +22 -28
  41. package/package/corpus/skills/cratis-screenplay-model-authoring/references/choosing-generation.md +20 -7
  42. package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +13 -6
  43. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +9 -1
  44. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +58 -10
  45. package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +4 -2
  46. package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +2 -5
  47. package/package/corpus/skills/cratis-screenplay-model-review/references/anti-patterns.md +2 -2
  48. package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +2 -2
  49. package/package/corpus/skills/cratis-screenplay-model-review/references/quick-self-check.md +2 -1
  50. package/package/corpus/skills/cratis-screenplay-model-review/references/review-questions.md +3 -2
  51. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/principles.md +1 -1
  52. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/vocabulary-map.md +1 -1
  53. package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +2 -3
  54. package/package/corpus/skills/cratis-screenplay-read-surface/references/named-keys.md +3 -1
  55. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +8 -3
  56. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +8 -0
  57. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +6 -4
  58. package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +48 -30
  59. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/berth-reservations.md +10 -4
  60. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-design.md +15 -4
  61. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-example.md +25 -20
  62. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/public-event-coverage.md +14 -3
  63. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-examples.md +9 -3
  64. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +9 -4
  65. package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +3 -1
  66. package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md +4 -4
  67. package/package/corpus/skills/cratis-screenplay-slice-design/references/rule-layers.md +4 -2
  68. package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +4 -3
  69. package/package/corpus/skills/cratis-screenplay-slice-design/references/worked-example.md +8 -8
  70. package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +69 -47
  71. package/package/corpus/skills/cratis-screenplay-specifications/references/actions-beyond-commands.md +11 -1
  72. package/package/corpus/skills/cratis-screenplay-specifications/references/generated-fixtures.md +48 -17
  73. package/package/corpus/skills/cratis-screenplay-specifications/references/outcome-comparison.md +6 -0
  74. package/package/corpus/skills/cratis-screenplay-specifications/references/vocabulary.md +14 -1
  75. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +25 -21
  76. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/boundaries.md +2 -2
  77. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +9 -3
  78. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/multi-service-models.md +4 -3
  79. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +7 -0
  80. package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +32 -22
  81. package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet-example.md +3 -1
  82. package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet.md +47 -2
  83. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostic-arguments.md +60 -0
  84. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +66 -6
  85. package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +67 -23
  86. package/package/corpus/skills/cratis-screenplay-toolchain/references/generation-checks.md +93 -0
  87. package/package/corpus/skills/cratis-screenplay-toolchain/references/generation-strategies-example.md +117 -35
  88. package/package/corpus/skills/cratis-screenplay-toolchain/references/language-admission.md +61 -0
  89. package/package/corpus/skills/cratis-screenplay-toolchain/references/preferred-syntax.md +3 -1
  90. package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +27 -10
  91. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +3489 -335
  92. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
  93. package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +5 -3
  94. package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +6 -1
  95. package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +8 -53
  96. package/package/corpus/skills/cratis-screenplay-ui-composition/references/file-references.md +2 -2
  97. package/package/corpus/skills/cratis-screenplay-ui-composition/references/interaction-example.md +54 -0
  98. package/package/corpus/skills/cratis-screenplay-ui-composition/verification.json +6 -3
  99. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +30 -29
  100. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +39 -9
  101. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/choosing-generation.md +28 -8
  102. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/publication-and-recovery.md +31 -0
  103. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/sandbox-and-specrunner.md +8 -0
  104. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +4 -1
  105. package/package.json +1 -1
@@ -0,0 +1,93 @@
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
+ # Generation checks for tool and renderer authors
5
+
6
+ Use the language-owned APIs instead of copying option tables, rule evaluators or
7
+ proof logic. These are .NET APIs of Screenplay, not Cratis C# target contracts.
8
+ They never generate a value or execute an attached body.
9
+
10
+ ## Choose the check
11
+
12
+ | Need | API | Result and boundary |
13
+ | --- | --- | --- |
14
+ | Populate strategy/option controls | `GenerationStrategyCatalog.All`, `Find(string name)` in `Cratis.Screenplay.Semantics` | Exact case-sensitive source spelling; unknown names return null. Descriptors expose ESM kind, source primitives, introducing version, admission/executability, fixed bits and options with placement, kinds, bounds, choices, defaults and conditions. `rule` serializes as `implementation`; reserved `sequence` is not admitted. Metadata alone is not validation. |
15
+ | Check one concept declaration | `SemanticConceptCheck.Check(concept, utcAssessmentYear: 2026)` in `Cratis.Screenplay.Semantics` | Accepts `ConceptSyntax` or `SemanticConcept`; returns `Concept`, `Findings`, `Proofs`, `Support`, `RequiredVersion`. No enclosing application is invented. |
16
+ | Check a concrete value | `SemanticValidationRules.Check(concept, value)` in `Cratis.Screenplay.Semantics` | Rule results in declaration order; also single-rule and application/type/value overloads. Not a declaration check or a general type validator. |
17
+ | Prove every generated-concept rule | `RuleConsistency.Check(concept, utcAssessmentYear: 2026)` in `Cratis.Screenplay.Semantics.Generation` | Results parallel `concept.Validations`: Proven, Refuted with witness, Unproven with reason. Status is not serialized in ESM. |
18
+
19
+ Requires Screenplay 4.174.0 (`screenplay --version`) for `RuleConsistency.Check`;
20
+ older consumers must not infer proof from missing serialized status.
21
+ Requires Screenplay 4.185.0 for `SemanticValidationRules.Check`; older consumers
22
+ lack the standalone value-check API.
23
+ Requires Screenplay 4.191.0 for `GenerationStrategyCatalog` and
24
+ `SemanticConceptCheck.Check`; older tools must use whole-model binding, not a
25
+ hand-maintained imitation of admission.
26
+
27
+ ## Check a declaration, not a sample
28
+
29
+ ```csharp
30
+ using Cratis.Screenplay.Diagnostics;
31
+ using Cratis.Screenplay.Semantics;
32
+ using Cratis.Screenplay.Syntax;
33
+
34
+ var concept = new ConceptSyntax("InviteCode", "String", [], [], SourceLocation.Start)
35
+ {
36
+ Generation = new("nanoid", SourceLocation.Start) { Size = 8, Alphabet = "ab" }
37
+ };
38
+ var check = SemanticConceptCheck.Check(concept, utcAssessmentYear: 2026);
39
+ Console.WriteLine(check.Support!.Count); // 256
40
+ Console.WriteLine(check.Support.MeetsIdentifierMinimum); // False
41
+ ```
42
+
43
+ The assessment year is nullable (null uses the current UTC year); pass it explicitly
44
+ for reproducible date support and witnesses. Valid years are 1–9899; invalid years
45
+ return PLAY0673 without an assessment. Both overloads accept optional
46
+ `assumeGenerated: false`: set true only for an implicit Uuid concept actually used
47
+ by a generated property, never to invent generation for String/Int.
48
+
49
+ Findings carry compiler code, severity, message and construct `Target`, not source
50
+ coordinates: a generation-wide finding, an option named by `Option`, or a rule
51
+ named by zero-based `RuleIndex`. Syntax indices count authored rules even when
52
+ some fail binding; proofs follow the inspected semantic validation array.
53
+ Unknown targets are not successful checks. A partial `Concept` is not admission.
54
+
55
+ Keep `Support.Count` as `BigInteger`; `Bits` is display data and
56
+ `MeetsIdentifierMinimum` can be null for unknown support. Unknown entropy is not
57
+ zero or proof of sufficient entropy. `RequiredVersion` describes this concept
58
+ only. PLAY0683/0684 depend on command-property use and uniqueness, so a concept
59
+ check cannot replace whole-application binding. It also proves no authorization,
60
+ implementation linkage, uniqueness or runtime readiness.
61
+
62
+ ## Check values and interpret proofs
63
+
64
+ `SemanticValidationRules.Check` overloads accept `(SemanticValidationRule,
65
+ SemanticValue)`, `(SemanticConcept, SemanticValue)` or `(SemanticApplication,
66
+ SemanticTypeReference, SemanticValue)`. The last walks supplied composite and
67
+ collection values. Pass contract-validated inputs; incompatible rule/value kinds
68
+ throw `InvalidSemanticContract` rather than becoming ordinary failed rules.
69
+
70
+ A `SemanticRuleCheck` carries `Status`, `Rule`, `Message`, optional `Concept` and
71
+ `Pattern`. Status is Satisfied, Failed or NotEvaluable: never treat NotEvaluable
72
+ as a pass. Absent values satisfy evaluable rules except NotEmpty; opaque rules
73
+ remain NotEvaluable. Text compares ordinally, length counts UTF-16 code units,
74
+ and numbers compare as exact decimals. Severity does not waive a failed rule.
75
+ The API allocates nothing and executes no opaque predicate.
76
+
77
+ All-Proven rules permit unpinned generation only on targets that support it.
78
+ Unproven/Refuted rules need deterministic pins; refuted source contracts must
79
+ first be repaired. Passing samples do not prove containment. Stage supports the
80
+ all-Proven case from 4.115.0; Screenplay's reference runner and Stage's independent
81
+ specification executor still require every reached generated value to be pinned.
82
+ A strategy-shape fixture check is separate from checksum arithmetic: author
83
+ `validate checksum` to enforce arithmetic on pins too.
84
+
85
+ ## References and verification
86
+
87
+ Read the product references for complete overload/result contracts:
88
+ [concept checks](https://github.com/Cratis/Screenplay/blob/main/Documentation/screenplay/concept-checks.md),
89
+ [value-rule checks](https://github.com/Cratis/Screenplay/blob/main/Documentation/screenplay/value-rule-checks.md),
90
+ and [strategy catalog and proofs](https://github.com/Cratis/Screenplay/blob/main/Documentation/screenplay/generated-values/strategies.md).
91
+ Build a tool against the required Screenplay library; the example's observable
92
+ result is count 256 and identifier minimum False. Then bind and verify the whole
93
+ model: a declaration check is not an executable-model verdict.
@@ -1,42 +1,124 @@
1
- # Generation strategies example (ESM v15)
1
+ <!-- Copyright (c) Cratis. All rights reserved. -->
2
+ <!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
2
3
 
3
- A deterministic UUIDv7 identifier and NanoID receipt, with an accepted response
4
- and a reused-source rejection. Fixtures, not random seeds, make this executable.
5
- Contract: the Screenplay documentation pages `generated-values.md` and `generated-values/strategies.md`.
4
+ # Shop generation strategies example (ESM v21)
5
+
6
+ ## Contents
7
+
8
+ - Choosing a strategy
9
+ - Pinned creation and freshness
10
+ - Attached generation rule
11
+ - When not to
12
+ - Verify
13
+
14
+ ## Choosing a strategy
15
+
16
+ Requires Screenplay 4.172.0 or later (`screenplay --version`) for pattern/random
17
+ and checksum validation; older compilers refuse PLAY0268.
18
+ Requires Stage 4.118.0 for checksum validation and 4.119.0 for pattern/random
19
+ rendering; older renderers refuse them with STAGE-ESM-042/-028. The attached rule
20
+ below still refuses STAGE-ESM-028. The reference runner uses whole-value fixtures,
21
+ never random seeds.
22
+
23
+ OrderId stays the high-entropy source identity. InvoiceNumber is a readable
24
+ reference, not a gapless/sequential invoice allocator or secret; its check digit
25
+ catches typos, not forgery. The Int pickup ticket is a value, not an identifier.
26
+ Unique constraints protect short payload codes, while serialized generation
27
+ activates freshness for the whole generated source. Dates/check digits add no
28
+ entropy. The clock fixes every UTC pattern segment, not the random digits.
29
+
30
+ ## Pinned creation and freshness
6
31
 
7
32
  ```screenplay
8
- concept InvoiceId : Uuid
9
- generate uuidv7
10
- concept Receipt : String
11
- generate nanoid
12
- module Billing
13
- feature Drafts
14
- slice StateChange Start
15
- command StartDraft
16
- invoiceId InvoiceId generated identifier
17
- receipt Receipt generated
18
- produces event DraftStarted
19
- receipt Receipt = receipt
20
- returns invoiceId
21
- specification StartsWithPinnedValues
22
- when StartDraft
23
- for "00112233-4455-7677-8899-aabbccddeeff"
24
- generated receipt = "abcdefghijklmnopqrstu"
25
- then DraftStarted
26
- for "00112233-4455-7677-8899-aabbccddeeff"
27
- receipt = "abcdefghijklmnopqrstu"
28
- then returns "00112233-4455-7677-8899-aabbccddeeff"
33
+ concept OrderId : String
34
+ generate typeid "order"
35
+ concept InvoiceNumber : String
36
+ generate pattern "INV-{yyyy}{MM}-#{7}" checksum luhn
37
+ validate checksum luhn
38
+ concept TicketNumber : Int
39
+ generate random 100000..999999
40
+ module Shop
41
+ feature Orders
42
+ slice StateChange Place
43
+ constraint UniqueInvoiceNumber
44
+ unique invoiceNumber on OrderPlaced
45
+ constraint UniquePickupTicket
46
+ unique pickupTicket on OrderPlaced
47
+ command PlaceOrder
48
+ orderId OrderId generated identifier
49
+ invoiceNumber InvoiceNumber generated
50
+ pickupTicket TicketNumber generated
51
+ produces event OrderPlaced
52
+ invoiceNumber InvoiceNumber = invoiceNumber
53
+ pickupTicket TicketNumber = pickupTicket
54
+ returns orderId
55
+ specification PlacesWithPinnedValues
56
+ given clock "2026-10-02T09:00:00Z"
57
+ when PlaceOrder
58
+ for "order_0000000000e008000000000000"
59
+ generated invoiceNumber = "INV-202610-00000004"
60
+ generated pickupTicket = 123456
61
+ then OrderPlaced
62
+ for "order_0000000000e008000000000000"
63
+ invoiceNumber = "INV-202610-00000004"
64
+ pickupTicket = 123456
65
+ then returns "order_0000000000e008000000000000"
29
66
  specification RejectsAUsedGeneratedSource
30
- given DraftStarted
31
- for "00112233-4455-7677-8899-aabbccddeeff"
32
- receipt = "abcdefghijklmnopqrstu"
33
- when StartDraft
34
- for "00112233-4455-7677-8899-aabbccddeeff"
35
- generated receipt = "abcdefghijklmnopqrstu"
67
+ given clock "2026-10-02T09:00:00Z"
68
+ given OrderPlaced
69
+ for "order_0000000000e008000000000000"
70
+ invoiceNumber = "INV-202610-00000004"
71
+ pickupTicket = 123456
72
+ when PlaceOrder
73
+ for "order_0000000000e008000000000000"
74
+ generated invoiceNumber = "INV-202610-00000004"
75
+ generated pickupTicket = 123456
36
76
  then error "A generated event source already has facts; retry the command with a fresh generated value."
37
77
  ```
38
78
 
39
- The rejection appends no new facts and returns no response. v15 guards the whole
40
- source even if the old fact uses another stream or event type. Removing every
41
- serialized generation strategy restores the earlier Unguarded contract, not an
42
- alternative way to make a stale-source specification pass.
79
+ The rejection appends no new facts and returns no response. Freshness guards the
80
+ whole source even if its old facts use another stream or event type. Without a
81
+ serialized strategy the model is Unguarded, even if generated-concept rules
82
+ select v20; removing strategies is not a way to repair stale-source behavior.
83
+ Pin failure against shape or authored rules is a server Contract rejection,
84
+ never a client validation failure or a reason to redraw. Without `validate
85
+ checksum`, a fixture checks suffix shape only, not arithmetic. Without `given
86
+ clock`, date segments check digit widths only, never today's date.
87
+
88
+ ## Attached generation rule
89
+
90
+ An implementation-specific tenant-bearing reference can instead attach one
91
+ generation rule; its entropy is unknown, not zero. The body gets only Now and
92
+ Tenant. The reference evaluator consumes a String fixture without running code:
93
+
94
+ ````screenplay
95
+ concept TenantOrderReference : String
96
+ generate rule TenantOrder
97
+ ```csharp
98
+ return $"{context.Tenant}:order_{context.Now:yyyyMMdd}-{Guid.NewGuid():N}";
99
+ ```
100
+ module Shop
101
+ feature Orders
102
+ slice StateChange ReserveReference
103
+ command ReserveReference
104
+ reference TenantOrderReference generated
105
+ returns reference
106
+ specification UsesThePinnedReference
107
+ when ReserveReference
108
+ generated reference = "shop-eu:order_example"
109
+ then returns "shop-eu:order_example"
110
+ ````
111
+
112
+ ## When not to
113
+
114
+ Keep client-minted values as inputs. Generation is neither idempotency nor
115
+ authorization. Use an allocator for gapless numbering, and preserve secret
116
+ classification rather than trying to bind generated credentials. A short code's
117
+ uniqueness constraint protects its payload claim, not source freshness or retry
118
+ safety after an unknown append outcome.
119
+
120
+ ## Verify
121
+
122
+ Compile with `screenplay <file> --warnaserror`; then `screenplay test <file>` must report
123
+ all selected specifications passed, none failed or unsupported. Passing reference
124
+ specifications do not prove target support or that attached generation code runs.
@@ -0,0 +1,61 @@
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
+ # Language admission: batches, described bodies, text, reads and dates
5
+
6
+ Select the highest version required by constructs in the model. A newer version
7
+ alone never opts into either application mode. Consumers must explicitly admit
8
+ exact language/semantic pairs; binding, reference execution and rendering are separate.
9
+
10
+ | ESM | Selecting construct | Binding/reference behavior | Stage boundary |
11
+ | --- | --- | --- | --- |
12
+ | v22 | Application-root `reaction batches atomic` | Direct productions per trigger occurrence and each selected refusal branch are separate atomic batches; commands remain independent | v22 refused STAGE-ESM-016; mode in admitted v23–v25 refused STAGE-ESM-043 |
13
+ | v23 | Pending `handler implementation` beside unconditional `produces` | Payload-only body; PLAY0695 information; reaching body gives Unsupported ImplementationBody | v23 admitted, body refused STAGE-IMPL-002 in renderer/Host/executor, even Stub mode |
14
+ | v24 | `contains`, `not contains`, `starts with`, `ends with` property/concept rules | Ordinal UTF-16, absent optional passes; not text-condition operators | v24 admitted; semantic Host/executor and generated ordinal comparisons preserve rules |
15
+ | v25 | Application-root `command reads protected` | Admitted reads in requirements/mappings, absence Validation, matching decide/commit changes Conflict | v25 admitted; protected reads refused STAGE-ESM-044 in renderer/Host/executor |
16
+ | v26 | Chronological command Date/DateTime comparisons | Same-primitive `==`, `!=`, `>`, `>=`, `<`, `<=`; DateTime UTC ticks and pre-rule offset validation | v26 refused STAGE-ESM-016 |
17
+
18
+ Requires Screenplay 4.181.0 or later (`screenplay --version`) for atomic batches; older compilers cannot admit the preamble.
19
+
20
+ Requires Screenplay 4.182.0 or later (`screenplay --version`) for described handlers; older binders report PLAY0268.
21
+
22
+ Requires Screenplay 4.184.0 or later (`screenplay --version`) for literal text rules; older binders do not admit those rules.
23
+
24
+ Requires Screenplay 4.193.0 or later (`screenplay --version`) for protected reads; older binders retain PLAY0271/PLAY0268.
25
+
26
+ Requires Screenplay 4.199.0 (ESM v26; `screenplay --version`) for date comparisons; older binders report PLAY0268.
27
+
28
+ Requires Stage 4.124.0 for v24 text-rule admission (`cratis --version` identifies the CLI bundle); older renderers refuse v24 with STAGE-ESM-016. V23 admission alone does not implement described bodies.
29
+
30
+ Requires Stage 4.127.0 for v25 version admission; older renderers refuse v25 with STAGE-ESM-016. Protected reads still refuse STAGE-ESM-044, including on legacy paths; no artifacts are emitted.
31
+
32
+ Read [atomic batches and event-source invocation mappings](../../cratis-screenplay-captures-and-reactions/references/atomic-batches-and-source-mappings.md)
33
+ for atomic boundaries and the source-identity mapping prerequisite. Start new models
34
+ with atomic mode; explicitly review opt-in for legacy models. Keep protection when
35
+ Stage refuses: do not remove the declaration or promise a target release date.
36
+
37
+ Read [described handlers](../../cratis-screenplay-command-surface/references/described-handlers.md)
38
+ for the payload result contract and [protected reads](../../cratis-screenplay-command-surface/references/protected-reads.md)
39
+ for finite event-source-keyed view admission, single-level paths and repair guards.
40
+ Text comparisons and matching are in [text and match rules](../../cratis-screenplay-command-surface/references/text-and-match-rules.md).
41
+ `matches` uses the portable linear dialect without selecting a new ESM version;
42
+ PLAY0699 refuses nonportable constructs, PLAY0367 invalid syntax, PLAY0787 warns
43
+ on exact Studio text-rule patterns and offers a literal-rule repair.
44
+
45
+ For v26, `require`/`produces when` compare a required scalar command property to
46
+ a required same-primitive property or literal. Command/property validation rules
47
+ compare only to literals. Date is a calendar date; DateTime is a UTC instant at
48
+ seven-fractional-digit tick precision. Participating DateTime inputs without an
49
+ offset or `Z` reject with Validation before any rule, even if a comparison is skipped.
50
+ `then` matching, keys, constraints and freshness remain ordinal. PLAY0268 retains
51
+ mixed Date/DateTime, optional condition operands, `$context` (including occurred),
52
+ `today`, protected read paths, concept date rules and reaction `where`. In admitted
53
+ positions, invalid date literals or offset-less DateTime literals use PLAY0273.
54
+ Read [date comparisons](../../cratis-screenplay-command-surface/references/date-comparisons.md)
55
+ for the complete interval example and input/target boundaries.
56
+
57
+ Stage's semantic engines admit exact v1–v21 and v23–v25 pairs. V22/v26 and mixed
58
+ pairs refuse STAGE-ESM-016. Admission of v23–v25 is not admission of described bodies,
59
+ atomic mode or protected reads. A CLI may bundle an older compiler/Stage pair: run no-write render
60
+ admission rather than transferring a standalone verdict. Pattern diagnostics arise
61
+ in Screenplay before rendering; diagnostic arguments add no ESM version or new tool.
@@ -5,7 +5,7 @@
5
5
 
6
6
  Use these forms when writing or reviewing `.play`. Acceptance of an older
7
7
  spelling is not a recommendation to teach it. Information diagnostics do not
8
- fail `--warnaserror`; the corpus verification gate rejects the nine style codes
8
+ fail `--warnaserror`; the corpus verification gate rejects the eleven style codes
9
9
  below even when a fence declares `expect`, unless an exact, reasoned migration
10
10
  exception exists in the verifier's preferred-syntax allowlist. That allowlist also
11
11
  covers deliberate legacy explanations in prose; stale entries fail.
@@ -23,6 +23,8 @@ covers deliberate legacy explanations in prose; stale entries fail.
23
23
  | Imports | Import only declarations not already declared by the application | Importing the application's own names | PLAY0290 (warning) |
24
24
  | Interaction guard | Block-form `when` alternatives | Opaque interaction `where` on click, double click or select | PLAY0564 (warning or information) |
25
25
  | Projection transition cardinality | Source binding emits `One` | Constructed/deserialized ESM v1–v3 `ZeroOrOne` / `Many` | PLAY0445 (warning; ESM-only, not a source spelling) |
26
+ | Command decision reads | `command reads protected` after reviewing every read's admission, absence and conflict semantics | Eligible legacy command reads without the application-root preamble | PLAY0786 (information; individual typed repair review, never fix-all) |
27
+ | Literal text rules | `starts with`, `ends with`, `contains`, `not contains` or equality, preserving message and severity | Exact deprecated Studio `matches` shapes | PLAY0787 (warning; not arbitrary regex rewriting) |
26
28
 
27
29
  `query Q => observable?` is not a legacy optional type suffix and has no keyword
28
30
  replacement. Reaction/Translate `where` is current syntax, not an interaction
@@ -21,24 +21,36 @@ and concept compliance (v13) render.
21
21
 
22
22
  ## Current admission
23
23
 
24
- Stage admits exact ESM v1–v17 and v19 pairs, not v18 or v20; v19 does not imply v18
25
- admission. The CLI's bundled Stage can be older: read installed versions and the
26
- pins in `product-sync.json`, not the standalone compiler's version. Each construct
27
- it does not render refuses with its own code before any artifact is planned.
24
+ Stage admits exact ESM v1–v21 and v23–v25 pairs; v22/v26 and mixed pairs
25
+ refuse STAGE-ESM-016. Chronological command Date/DateTime comparisons select v26:
26
+ standalone binding/reference execution does not make them renderable. Keep the
27
+ rule and use authorized gap-fill. Version admission is separate from construct support.
28
+ Requires Stage 4.106.0 for v18 admission; older Stage refuses it with `STAGE-ESM-016`.
29
+ For generated-concept v20/v21 admission and construct prerequisites, read
30
+ [Stage admission](../../cratis-stage-rendering-and-sandbox/references/admission.md).
31
+ The CLI's bundled Stage can be older: read installed versions and the pins in
32
+ `product-sync.json`, not the standalone compiler's version. Each construct it
33
+ does not render refuses with its own code before any artifact is planned.
28
34
 
29
35
  Requires Stage 4.96.0 for stored event names (v16), 4.101.0 for no-event assertions (v17), 4.102.0 for refusal branches (v19), and 4.103.0 for rendered redelivery; older renderers refuse the respective shapes.
30
36
  Requires Cratis CLI 3.60.0 (`cratis --version`) for v16 rendering; a bundle that stops at v16 refuses newer models with CLI-RENDER-004.
31
37
 
38
+ With an admitting renderer, all-Proven generated-concept rules allow unpinned
39
+ rendered specs; warning/info rules and semantic checksum validation are enforced,
40
+ and pattern/random strategies render. `generate rule` remains STAGE-ESM-028.
41
+ The independent executor still needs deterministic pins. Dated patterns use
42
+ receipt-time UTC; random ranges use `long` with inclusive endpoints.
43
+
32
44
  This table is a reading of the renderer's admission, not a render result: run the bundled renderer before asserting renderability.
33
45
 
34
46
  | Area | Renders | Refused (code) |
35
47
  | --- | --- | --- |
36
48
  | Slice kinds | `StateChange`, `StateView`, supported event-triggered `Automation` with Chronicle reactors | Translate, captures, non-event triggers, opaque bodies, clock/trigger/capture specs (`-024`); claim-reading/opaque `runs as` gates (`-034`), mixed effects from one handler (`-037`, redelivery can duplicate events), unsupported conditions/destinations/mappings (`-039`). Keep refused reactions whole |
37
- | Queries | optional keyed snapshot lookups; snapshot or observable collections, keyed or unkeyed, with v14 equality filters | context/single-result filters, opaque `scoped to`/`performer` and composite `by`: PLAY0268. DateTime filters and required parameters after optional filters refuse `-010`; filter-name collisions refuse `-012`; validated scalar keys render as primitives and convert inside the query (an out-of-rule key finds no instance), nested validated keys still refuse `-010` |
49
+ | Queries | optional keyed snapshot lookups; snapshot or observable collections, keyed or unkeyed, with v14 equality filters | context/single-result filters, opaque `scoped to`/`performer` and composite `by`: PLAY0268. DateTime filters and required parameters after optional filters refuse `-010`; filter-name collisions refuse `-012`; concept arguments retain Arc validation, including nested members/elements; nullable keys or optional concept filters with `not empty` refuse `-010` rather than changing null behavior |
38
50
  | Authorization | role-only, authenticated, opaque pure policies, claim conditions with Uuid, Date, DateTime or text targets (numeric and Boolean claim matches render as always false), `not`/and/or; roles read through the identity's `RoleClaimType` | role-claim URIs, nested opaque policies, unresolved or non-portable policies, no single identifier, opaque-policy subjects that are not text, Uuid, Date or DateTime (`STAGE-ESM-015`, a restriction separate from declarative claim targets) |
39
51
  | Event sources, streams, routes (ESM v8) | rendered, including routed read-model/query companion replay | reserved stored names, unformattable routed fixtures (`STAGE-ESM-030`) |
40
52
  | Numbers, case tables | whole numbers as `long` from ESM v8; case tables | out-of-`int` literals below v8 (`STAGE-ESM-031`) |
41
- | Generated values and responses (v7/v15) | required scalar UUID/String strategies, Guarded v15 freshness, scalar/named responses, generation fixtures and `then returns` | unsupported generated types (`-028`); routed/generated-rule/legacy-allocation/name-collision or unsupported response combinations, unpinned unordered/projected expectations (`-038`); no blanket `-029` refusal |
53
+ | Generated values and responses (v7/v15/v20/v21) | required scalar UUID/String strategies and Int random, pattern/checksum, concept validators at all severities, all-Proven unpinned relational specs, Guarded v15 freshness, scalar/named responses and fixtures | `generate rule`, unknown strategies and unsupported generated types (`-028`); unsupported response combinations, generated-property validation, name collisions, unpinned Unproven/Refuted rules or unordered/projected/collision-sensitive expectations (`-038`); invalid pins (`-011`); opaque concept rules (`-005`); unknown rule kinds and legacy checksum (`-042`) |
42
54
  | Enum numbers / compliance | explicit enum numbers (v12); concept `[PII]` or scoped `[Encrypted]` + `[NotAudited]` (v13), property-level `[NotAudited]` for protected command inputs | protected identities/enums (`-040`); explicit subject lineage remains unadmitted |
43
55
  | Specifications | command scenarios and supported single-hop reaction appends; Stage's `admission.md` | appends outside the single-hop subset and commands cascading into reactions (`-011`); `then no readmodel` (`-027`); an unauthenticated caller carrying roles or claims (`-011`); command `given clock` renders only whole milliseconds at or after 1970 |
44
56
  | v9 and v10 | reaction/reducer `from` filters; role/authenticated `runs as` | public events and event-target projections (`-032`); foreign origins and event-source captures (`-033`); directed Translate (`-024`); claim-reading/opaque `runs as` gates (`-034`); legacy `from` (`-035`); per-production route overrides (`-036`) |
@@ -48,8 +60,12 @@ This table is a reading of the renderer's admission, not a render result: run th
48
60
  | Evolved events | initial revisions only (migrations are not rendered) | `STAGE-ESM-026` |
49
61
  | Descriptions, documentation | XML `<summary>`/`<remarks>` doc comments only | characters invalid in XML: `CLI-RENDER-005`; never behavior |
50
62
 
51
- The CLI's bundled compiler still refuses `reads` and `concurrency` (PLAY0271) and command
52
- `handler`s (PLAY0268) at binding, before Stage admission. Supported filters and strategies render.
63
+ Stage refuses protected command reads with STAGE-ESM-044, described handlers
64
+ with STAGE-IMPL-002 (even Stub mode), and atomic mode in admitted pairs with
65
+ STAGE-ESM-043. Literal
66
+ text rules execute/render ordinal UTF-16 comparisons. Read [language admission](language-admission.md).
67
+ A CLI's older bundled compiler may fail first: legacy reads/concurrency PLAY0271,
68
+ attached handlers PLAY0268. Protected reads bind standalone v25, not a Stage render.
53
69
  Response-name authoring scopes are not rendered and Scene runtime does not supply them.
54
70
 
55
71
  Compliance mapping in the generated C#: personal data to `[PII]`, operational secrets to
@@ -76,8 +92,9 @@ ids into routing to fit a renderer (PLAY0515).
76
92
  older renderers refuse snapshot lists with STAGE-ESM-010.
77
93
  context/single-result filters, opaque `scoped to` and `performer` block binding. Keep a list the domain needs and report
78
94
  the capability gap; marking it `observable` or keying it is a modeling decision for the user.
79
- - A `handler` (with or without `implementation` or `hint`) never binds; the slice is
80
- gap-fill, never "customized into" rendering.
95
+ - Attached handlers remain PLAY0268. Pending handlers beside unconditional
96
+ productions bind v23 but Stage refuses their bodies (STAGE-IMPL-002), even Stub mode;
97
+ deliver as authorized gap-fill, never as implemented generated stubs.
81
98
  - Descriptions and documentation render only as XML doc comments, never as
82
99
  behavior: a rule that exists only in prose is unenforced in rendered code.
83
100