@cratis/pi 7.6.4 → 7.7.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 (212) hide show
  1. package/package/corpus/agents/backend-developer.md +14 -0
  2. package/package/corpus/agents/code-reviewer.md +16 -0
  3. package/package/corpus/agents/coordinator.md +17 -0
  4. package/package/corpus/agents/frontend-developer.md +17 -0
  5. package/package/corpus/agents/orchestrator.md +18 -0
  6. package/package/corpus/agents/planner.md +24 -0
  7. package/package/corpus/agents/screenplay-modeler.md +57 -0
  8. package/package/corpus/agents/screenplay-renderer.md +42 -0
  9. package/package/corpus/agents/screenplay-reviewer.md +45 -0
  10. package/package/corpus/agents/slice-implementer.md +32 -5
  11. package/package/corpus/agents/spec-writer.md +16 -3
  12. package/package/corpus/prompts/add-reactor.prompt.md +5 -3
  13. package/package/corpus/prompts/new-vertical-slice.prompt.md +16 -5
  14. package/package/corpus/prompts/write-specs.prompt.md +12 -6
  15. package/package/corpus/rules/application-profile.md +7 -3
  16. package/package/corpus/rules/general.md +8 -3
  17. package/package/corpus/rules/glossary.md +1 -1
  18. package/package/corpus/rules/profiles.md +42 -4
  19. package/package/corpus/rules/reactors.md +30 -22
  20. package/package/corpus/rules/vertical-slices.md +3 -1
  21. package/package/corpus/skills/cratis-application-react-specifications/SKILL.md +13 -0
  22. package/package/corpus/skills/cratis-application-slice-conformance/LICENSE +2 -0
  23. package/package/corpus/skills/cratis-application-slice-conformance/SKILL.md +173 -0
  24. package/package/corpus/skills/cratis-application-slice-conformance/references/checklists.md +66 -0
  25. package/package/corpus/skills/cratis-application-slice-conformance/references/contract-and-precedence.md +49 -0
  26. package/package/corpus/skills/cratis-application-slice-conformance/references/provenance.md +23 -0
  27. package/package/corpus/skills/cratis-application-slice-conformance/references/worked-example.md +91 -0
  28. package/package/corpus/skills/cratis-application-slice-conformance/verification.json +14 -0
  29. package/package/corpus/skills/cratis-application-slice-specifications/SKILL.md +57 -1
  30. package/package/corpus/skills/cratis-application-slice-specifications/references/provenance.md +16 -0
  31. package/package/corpus/skills/cratis-arc-command/SKILL.md +10 -0
  32. package/package/corpus/skills/cratis-arc-command-execution/SKILL.md +10 -0
  33. package/package/corpus/skills/cratis-arc-command-validation/SKILL.md +10 -0
  34. package/package/corpus/skills/cratis-arc-observable-query-http/SKILL.md +10 -0
  35. package/package/corpus/skills/cratis-arc-query-paging/SKILL.md +10 -0
  36. package/package/corpus/skills/cratis-arc-react-page/SKILL.md +68 -8
  37. package/package/corpus/skills/cratis-arc-react-page/references/from-screenplay.md +199 -0
  38. package/package/corpus/skills/cratis-arc-react-page/references/provenance.md +13 -0
  39. package/package/corpus/skills/cratis-chronicle-event-constraints/SKILL.md +10 -0
  40. package/package/corpus/skills/cratis-chronicle-event-modeling/SKILL.md +38 -10
  41. package/package/corpus/skills/cratis-chronicle-event-type-migration/SKILL.md +13 -0
  42. package/package/corpus/skills/cratis-chronicle-projection/SKILL.md +13 -0
  43. package/package/corpus/skills/cratis-chronicle-reactor/SKILL.md +58 -6
  44. package/package/corpus/skills/cratis-chronicle-reactor/references/provenance.md +9 -0
  45. package/package/corpus/skills/cratis-chronicle-read-model/SKILL.md +13 -0
  46. package/package/corpus/skills/cratis-chronicle-read-model-specifications/SKILL.md +47 -0
  47. package/package/corpus/skills/cratis-chronicle-read-model-specifications/references/provenance.md +11 -0
  48. package/package/corpus/skills/cratis-chronicle-reducer/SKILL.md +13 -0
  49. package/package/corpus/skills/cratis-components-stepper-command-dialog/SKILL.md +13 -0
  50. package/package/corpus/skills/cratis-event-model-diagram/SKILL.md +35 -16
  51. package/package/corpus/skills/cratis-screenplay-automations-and-translations/LICENSE +28 -0
  52. package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +166 -0
  53. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/audit-format.md +31 -0
  54. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/automation-patterns.md +139 -0
  55. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/cases-to-specify.md +69 -0
  56. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/effects-and-idempotency.md +88 -0
  57. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/integration-contracts.md +64 -0
  58. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/provenance.md +37 -0
  59. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/realization-and-gap-fill.md +34 -0
  60. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/todo-list-example.md +208 -0
  61. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translate-example.md +126 -0
  62. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translation-patterns.md +93 -0
  63. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/worked-integration.md +98 -0
  64. package/package/corpus/skills/cratis-screenplay-automations-and-translations/verification.json +15 -0
  65. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +267 -50
  66. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/complete-examples.md +185 -0
  67. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/verification.json +60 -12
  68. package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +42 -12
  69. package/package/corpus/skills/cratis-screenplay-discovery/LICENSE +30 -0
  70. package/package/corpus/skills/cratis-screenplay-discovery/SKILL.md +229 -0
  71. package/package/corpus/skills/cratis-screenplay-discovery/references/divergent-sweep.md +37 -0
  72. package/package/corpus/skills/cratis-screenplay-discovery/references/event-naming.md +64 -0
  73. package/package/corpus/skills/cratis-screenplay-discovery/references/facilitation.md +62 -0
  74. package/package/corpus/skills/cratis-screenplay-discovery/references/human-workshop.md +222 -0
  75. package/package/corpus/skills/cratis-screenplay-discovery/references/interview-questions.md +66 -0
  76. package/package/corpus/skills/cratis-screenplay-discovery/references/personas-and-causes.md +152 -0
  77. package/package/corpus/skills/cratis-screenplay-discovery/references/plotting-and-handoff.md +111 -0
  78. package/package/corpus/skills/cratis-screenplay-discovery/references/provenance.md +37 -0
  79. package/package/corpus/skills/cratis-screenplay-discovery/references/storming-loop.md +119 -0
  80. package/package/corpus/skills/cratis-screenplay-discovery/references/worked-session.md +87 -0
  81. package/package/corpus/skills/cratis-screenplay-discovery/verification.json +15 -0
  82. package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +140 -77
  83. package/package/corpus/skills/cratis-screenplay-event-modeling/references/invoicing-example.md +51 -0
  84. package/package/corpus/skills/cratis-screenplay-event-modeling/references/nine-steps.md +114 -28
  85. package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +50 -0
  86. package/package/corpus/skills/cratis-screenplay-event-modeling/verification.json +28 -3
  87. package/package/corpus/skills/cratis-screenplay-legacy-extraction/LICENSE +31 -0
  88. package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +239 -0
  89. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/chronicle-observations.md +25 -0
  90. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/evidence-table-template.md +79 -0
  91. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/expert-verification.md +48 -0
  92. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generate-notes.md +75 -0
  93. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/intent-example.md +164 -0
  94. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/interview-findings.md +88 -0
  95. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/loss-report-template.md +47 -0
  96. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/prologue-safety.md +147 -0
  97. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/provenance.md +10 -0
  98. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/rule-modeling.md +36 -0
  99. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/side-car-migration.md +126 -0
  100. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/signal-to-intent.md +57 -0
  101. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/ui-observation.md +52 -0
  102. package/package/corpus/skills/cratis-screenplay-legacy-extraction/verification.json +17 -0
  103. package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +95 -54
  104. package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +50 -20
  105. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +211 -0
  106. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +45 -5
  107. package/package/corpus/skills/cratis-screenplay-model-authoring/references/provenance.md +13 -0
  108. package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +64 -7
  109. package/package/corpus/skills/cratis-screenplay-model-review/LICENSE +34 -0
  110. package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +209 -0
  111. package/package/corpus/skills/cratis-screenplay-model-review/references/anti-patterns.md +89 -0
  112. package/package/corpus/skills/cratis-screenplay-model-review/references/business-questions.md +128 -0
  113. package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +176 -0
  114. package/package/corpus/skills/cratis-screenplay-model-review/references/provenance.md +36 -0
  115. package/package/corpus/skills/cratis-screenplay-model-review/references/report-template.md +149 -0
  116. package/package/corpus/skills/cratis-screenplay-model-review/references/review-questions.md +59 -0
  117. package/package/corpus/skills/cratis-screenplay-model-review/references/worked-example.md +255 -0
  118. package/package/corpus/skills/cratis-screenplay-model-review/verification.json +13 -0
  119. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/LICENSE +32 -0
  120. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/SKILL.md +239 -0
  121. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/code-reading-and-tokens.md +55 -0
  122. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/handoff-template.md +124 -0
  123. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/identity-and-edits.md +84 -0
  124. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/opt-in.md +48 -0
  125. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/phase-report-inventories.md +25 -0
  126. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/phases.md +162 -0
  127. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/principles.md +53 -0
  128. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/provenance.md +63 -0
  129. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/reasoning-notes.md +31 -0
  130. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/safety.md +31 -0
  131. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/stop-or-assume.md +46 -0
  132. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/verdicts-and-modes.md +204 -0
  133. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/vocabulary-map.md +55 -0
  134. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/worked-example.md +86 -0
  135. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/verification.json +16 -0
  136. package/package/corpus/skills/cratis-screenplay-projections/SKILL.md +14 -3
  137. package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +15 -1
  138. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/LICENSE +2 -0
  139. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +179 -0
  140. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/delivery-protocol.md +99 -0
  141. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/drift-and-ledger.md +67 -0
  142. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +72 -0
  143. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/provenance.md +27 -0
  144. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +56 -0
  145. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/worked-example.md +124 -0
  146. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/verification.json +14 -0
  147. package/package/corpus/skills/cratis-screenplay-scenario-coverage/LICENSE +31 -0
  148. package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +200 -0
  149. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/berth-reservations.md +579 -0
  150. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/chronicle-verification.md +24 -0
  151. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/coverage-matrix.md +102 -0
  152. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/provenance.md +41 -0
  153. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-catalogue.md +196 -0
  154. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-workshop.md +102 -0
  155. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +71 -0
  156. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/view-and-story-specs.md +91 -0
  157. package/package/corpus/skills/cratis-screenplay-scenario-coverage/verification.json +13 -0
  158. package/package/corpus/skills/cratis-screenplay-slice-design/LICENSE +30 -0
  159. package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +236 -0
  160. package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md +107 -0
  161. package/package/corpus/skills/cratis-screenplay-slice-design/references/field-lineage.md +130 -0
  162. package/package/corpus/skills/cratis-screenplay-slice-design/references/provenance.md +20 -0
  163. package/package/corpus/skills/cratis-screenplay-slice-design/references/read-model-design.md +201 -0
  164. package/package/corpus/skills/cratis-screenplay-slice-design/references/review-questions.md +23 -0
  165. package/package/corpus/skills/cratis-screenplay-slice-design/references/rule-layers.md +41 -0
  166. package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +122 -0
  167. package/package/corpus/skills/cratis-screenplay-slice-design/references/worked-example.md +305 -0
  168. package/package/corpus/skills/cratis-screenplay-slice-design/verification.json +43 -0
  169. package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +217 -36
  170. package/package/corpus/skills/cratis-screenplay-specifications/verification.json +28 -4
  171. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/LICENSE +33 -0
  172. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +191 -0
  173. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/boundaries.md +154 -0
  174. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/chronicle-boundaries.md +54 -0
  175. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +191 -0
  176. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution-example.md +70 -0
  177. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution.md +65 -0
  178. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/provenance.md +13 -0
  179. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-patterns.md +128 -0
  180. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +378 -0
  181. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/verification.json +14 -0
  182. package/package/corpus/skills/cratis-screenplay-toolchain/LICENSE +2 -0
  183. package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +177 -0
  184. package/package/corpus/skills/cratis-screenplay-toolchain/references/automation-translate-example.md +121 -0
  185. package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet-example.md +319 -0
  186. package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet.md +96 -0
  187. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +107 -0
  188. package/package/corpus/skills/cratis-screenplay-toolchain/references/doc-contradictions.md +48 -0
  189. package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-example.md +113 -0
  190. package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +148 -0
  191. package/package/corpus/skills/cratis-screenplay-toolchain/references/pdl-example.md +267 -0
  192. package/package/corpus/skills/cratis-screenplay-toolchain/references/provenance.md +51 -0
  193. package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +88 -0
  194. package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +51 -0
  195. package/package/corpus/skills/cratis-screenplay-toolchain/references/verdicts.md +134 -0
  196. package/package/corpus/skills/cratis-screenplay-toolchain/references/versions.md +134 -0
  197. package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +15 -0
  198. package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +53 -5
  199. package/package/corpus/skills/cratis-screenplay-ui-composition/references/flow-review.md +56 -0
  200. package/package/corpus/skills/cratis-screenplay-ui-composition/references/provenance.md +13 -0
  201. package/package/corpus/skills/cratis-screenplay-ui-composition/references/worked-flow.md +65 -0
  202. package/package/corpus/skills/cratis-screenplay-ui-composition/verification.json +4 -1
  203. package/package/corpus/skills/cratis-specification-by-example/SKILL.md +44 -1
  204. package/package/corpus/skills/cratis-specifications-csharp/SKILL.md +10 -0
  205. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +186 -219
  206. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +177 -0
  207. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/render-example.md +150 -0
  208. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/rendered-application.md +87 -0
  209. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/sandbox-and-specrunner.md +98 -0
  210. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +19 -0
  211. package/package/profile-catalog.json +11 -0
  212. package/package.json +1 -1
@@ -0,0 +1,267 @@
1
+ # Projection (PDL) example
2
+
3
+ Projection forms that compile warning-free, bind on both tools and run in the reference runner without Unsupported results (`PlacingAnOrder`, `CancellingAnOrder`, `Depositing` and `RejectingAnEmptyCode` pass). The specifications exercise every, from, `set`, increment, remove with, all + count, add/subtract by, `clear` and the concept rules; `PlacingAnOrder` also runs the `children lines` block (through `LineAdded`) without asserting it; join, nested and variant groups bind but no specification drives them. Forms in this example: every, join, children, nested, clear with, remove with, increment/decrement, all + count, add/subtract by, set to, clear, no automap, literal mapping, variant group (no `=> RM`), concept rules not empty/max/length ==. `lineCount` is initialized in `OrderPlaced` and `shipping` is optional, because the reference runner requires every non-optional read-model property to be set after each fact. Rejected by the binder: more than one every/all block on one level (PLAY0268); `$eventContext.occurred.Week` (PLAY0273, derived value). Not in this example because they block the whole execution plan in the reference runner (Screenplay v4.64.0): a `remove via join` on a projection's own (root) level (`UnsupportedProjectionBlock`; it binds, but on Chronicle v19.32.0 it creates no removal subscription, so `CustomerDeleted` would not remove an `OrderView`), and any event-context value other than the event source identity in a projection, such as `$eventContext.occurred` (`UnsupportedEventContext`). Quick reference: [cheat-sheet.md](cheat-sheet.md). The `every` block here maps a literal to show the form. Carry a timestamp on the event with `$context.occurred` in the producing command when a view must show it.
4
+
5
+ ```screenplay
6
+ // PDL forms that bind executable on both tools.
7
+ concept OrderId : Uuid
8
+ concept CustomerId : Uuid
9
+ concept IssueId : Uuid
10
+ concept AccountId : Uuid
11
+ concept Code : String
12
+ validate
13
+ not empty message "Required"
14
+ max 10 message "Too long"
15
+ length == 4
16
+ type OrderLine
17
+ lineNumber Int
18
+ sku String
19
+ type Shipping
20
+ carrier String optional
21
+ module Shop
22
+ feature Orders
23
+ slice StateChange PlaceOrder
24
+ command PlaceOrder
25
+ orderId OrderId identifier
26
+ customerId CustomerId
27
+ total Decimal
28
+ produces OrderPlaced
29
+ for orderId
30
+ customerId = customerId
31
+ total = total
32
+ produces LineAdded
33
+ for orderId
34
+ lineNumber = 1
35
+ sku = "A-1"
36
+ event OrderPlaced
37
+ customerId CustomerId
38
+ total Decimal
39
+ event LineAdded
40
+ lineNumber Int
41
+ sku String
42
+ specification PlacingAnOrder
43
+ when PlaceOrder
44
+ orderId = "7a1c2e30-4b5d-4e6f-8a9b-0c1d2e3f4a5b"
45
+ customerId = "1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7a8b"
46
+ total = 25
47
+ then OrderPlaced
48
+ for "7a1c2e30-4b5d-4e6f-8a9b-0c1d2e3f4a5b"
49
+ customerId = "1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7a8b"
50
+ total = 25
51
+ then LineAdded
52
+ for "7a1c2e30-4b5d-4e6f-8a9b-0c1d2e3f4a5b"
53
+ lineNumber = 1
54
+ sku = "A-1"
55
+ then query OrderViewById
56
+ arguments
57
+ orderId = "7a1c2e30-4b5d-4e6f-8a9b-0c1d2e3f4a5b"
58
+ result
59
+ total = 25
60
+ status = "placed"
61
+ lastSeen = "seen"
62
+ lineCount = 1
63
+ slice StateChange RemoveLine
64
+ command RemoveLine
65
+ orderId OrderId identifier
66
+ lineNumber Int
67
+ produces LineRemoved
68
+ for orderId
69
+ lineNumber = lineNumber
70
+ event LineRemoved
71
+ lineNumber Int
72
+ slice StateChange ShipOrder
73
+ command ShipOrder
74
+ orderId OrderId identifier
75
+ carrier String
76
+ produces Shipped
77
+ for orderId
78
+ carrier = carrier
79
+ produces ShippingCleared
80
+ for orderId
81
+ event Shipped
82
+ carrier String
83
+ event ShippingCleared
84
+ slice StateChange CancelOrder
85
+ command CancelOrder
86
+ orderId OrderId identifier
87
+ produces OrderCancelled
88
+ for orderId
89
+ event OrderCancelled
90
+ specification CancellingAnOrder
91
+ given OrderPlaced
92
+ for "7a1c2e30-4b5d-4e6f-8a9b-0c1d2e3f4a5b"
93
+ customerId = "1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7a8b"
94
+ total = 25
95
+ when CancelOrder
96
+ orderId = "7a1c2e30-4b5d-4e6f-8a9b-0c1d2e3f4a5b"
97
+ then OrderCancelled
98
+ for "7a1c2e30-4b5d-4e6f-8a9b-0c1d2e3f4a5b"
99
+ then no readmodel OrderView for "7a1c2e30-4b5d-4e6f-8a9b-0c1d2e3f4a5b"
100
+ slice StateChange RenameCustomer
101
+ command RenameCustomer
102
+ customerId CustomerId identifier
103
+ name String
104
+ produces CustomerRenamed
105
+ for customerId
106
+ name = name
107
+ produces CustomerDeleted
108
+ for customerId
109
+ event CustomerRenamed
110
+ name String
111
+ event CustomerDeleted
112
+ slice StateView OrderOverview
113
+ readmodel OrderView
114
+ orderId OrderId
115
+ customerId CustomerId
116
+ customerName String optional
117
+ total Decimal
118
+ lastSeen String
119
+ lineCount Int
120
+ status String
121
+ lines OrderLine[]
122
+ shipping Shipping optional
123
+ query OrderViewById => OrderView optional
124
+ by orderId OrderId
125
+ projection OrderOverview => OrderView
126
+ no automap
127
+ every
128
+ lastSeen = "seen"
129
+ from OrderPlaced
130
+ orderId = $eventSourceId
131
+ customerId = customerId
132
+ total = total
133
+ status = "placed"
134
+ set lineCount to 0
135
+ from LineAdded
136
+ increment lineCount
137
+ from LineRemoved
138
+ decrement lineCount
139
+ join Customer on customerId
140
+ with CustomerRenamed
141
+ customerName = name
142
+ children lines identified by lineNumber
143
+ from LineAdded key lineNumber
144
+ sku = sku
145
+ remove with LineRemoved key lineNumber
146
+ nested shipping
147
+ from Shipped
148
+ carrier = carrier
149
+ clear with ShippingCleared
150
+ remove with OrderCancelled
151
+ feature Items
152
+
153
+ module Work
154
+ feature Items
155
+ slice StateChange OpenIssue
156
+ command OpenIssue
157
+ issueId IssueId identifier
158
+ title String
159
+ produces IssueCreated
160
+ for issueId
161
+ title = title
162
+ produces IssueTitleCorrected
163
+ for issueId
164
+ title = title
165
+ event IssueCreated
166
+ title String
167
+ event IssueTitleCorrected
168
+ title String
169
+ slice StateChange OpenPullRequest
170
+ command OpenPullRequest
171
+ issueId IssueId identifier
172
+ status String
173
+ produces PullRequestCreated
174
+ for issueId
175
+ produces BuildCompleted
176
+ for issueId
177
+ status = status
178
+ event PullRequestCreated
179
+ event BuildCompleted
180
+ status String
181
+ slice StateView WorkItems
182
+ readmodel BacklogItem
183
+ issueId IssueId
184
+ title String
185
+ readmodel PullRequestItem
186
+ issueId IssueId
187
+ title String
188
+ buildStatus String
189
+ query BacklogItemById => BacklogItem optional
190
+ by issueId IssueId
191
+ query PullRequestItemById => PullRequestItem optional
192
+ by issueId IssueId
193
+ projection WorkItem
194
+ from IssueTitleCorrected
195
+ title = title
196
+ variant BacklogItem
197
+ enters on IssueCreated
198
+ variant PullRequestItem
199
+ enters on PullRequestCreated
200
+ from BuildCompleted
201
+ buildStatus = status
202
+
203
+ module Bank
204
+ feature Accounts
205
+ slice StateChange Deposit
206
+ command Deposit
207
+ accountId AccountId identifier
208
+ amount Decimal
209
+ code Code
210
+ produces Deposited
211
+ for accountId
212
+ amount = amount
213
+ produces Withdrawn
214
+ for accountId
215
+ amount = amount
216
+ produces Frozen
217
+ for accountId
218
+ event Deposited
219
+ amount Decimal
220
+ event Withdrawn
221
+ amount Decimal
222
+ event Frozen
223
+ specification Depositing
224
+ when Deposit
225
+ accountId = "5d1f0c2e-8a47-4c1b-9b3e-6f2a7c9d1e10"
226
+ amount = 10
227
+ code = "ABCD"
228
+ then Deposited
229
+ for "5d1f0c2e-8a47-4c1b-9b3e-6f2a7c9d1e10"
230
+ amount = 10
231
+ then Withdrawn
232
+ for "5d1f0c2e-8a47-4c1b-9b3e-6f2a7c9d1e10"
233
+ amount = 10
234
+ then Frozen
235
+ for "5d1f0c2e-8a47-4c1b-9b3e-6f2a7c9d1e10"
236
+ then query AccountById
237
+ arguments
238
+ accountId = "5d1f0c2e-8a47-4c1b-9b3e-6f2a7c9d1e10"
239
+ result
240
+ balance = 0
241
+ deposits = 3
242
+ specification RejectingAnEmptyCode // one concept rejection spec, through this command
243
+ when Deposit
244
+ accountId = "5d1f0c2e-8a47-4c1b-9b3e-6f2a7c9d1e10"
245
+ amount = 10
246
+ code = ""
247
+ then error "Required"
248
+ slice StateView Balance
249
+ readmodel Account
250
+ accountId AccountId
251
+ balance Decimal
252
+ deposits Int
253
+ note String optional
254
+ query AccountById => Account optional
255
+ by accountId AccountId
256
+ projection Balances => Account
257
+ all
258
+ count deposits
259
+ from Deposited
260
+ accountId = $eventSourceId
261
+ add balance by amount
262
+ set note to "active"
263
+ from Withdrawn
264
+ subtract balance by amount
265
+ from Frozen
266
+ clear note
267
+ ```
@@ -0,0 +1,51 @@
1
+ # Provenance
2
+
3
+ ## Origin
4
+
5
+ This skill is an original Cratis work, condensed from verified research on the Screenplay
6
+ language, the standalone tool, the cratis CLI and Stage, then re-verified against product
7
+ source at the tags in `versions.md` and probed on the installed tools (Screenplay 4.64.0 and
8
+ cratis 3.27.1). Every version, diagnostic and exit-code row cites its evidence there or in
9
+ the file that holds it.
10
+
11
+ ## External material
12
+
13
+ | Source | Use | Licence handling |
14
+ | --- | --- | --- |
15
+ | TrogonStack/agentskills `7b249d3ee42d8b7e11fa564141ebd5fbc37aadf1` (MIT, Copyright (c) 2025 Straw Hat, LLC) | none: no passage of this skill is adapted from it | no third-party notice needed in `LICENSE` |
16
+ | idea from Nebulit-GmbH/agentic-engineer@07b0f30:`.claude/skills/connect/SKILL.md`, written independently | resolve the tool connection once per session and reuse it until something changes (Ground rule 8, `references/verdicts.md` V2 start-up) | no text reused; repository has no licence |
17
+ | idea from Nebulit-GmbH/agentic-engineer@07b0f30:`.claude/skills/load-slice/SKILL.md`, written independently | scoped, identity-first reads instead of loading the whole model | no text reused |
18
+ | idea from Nebulit-GmbH/agentic-engineer@07b0f30:`.claude/skills/learn-eventmodelers-api/SKILL.md`, written independently | load tool reference on demand; "let the tool resolve what it can" (Ground rule 8) | no text reused |
19
+
20
+ ## Sources read for facts
21
+
22
+ - Screenplay `v4.64.0` (`7e16162`): `Documentation/screenplay/` (grammar, commands, queries,
23
+ specifications, reactions, diagnostics, mcp), `decisions/0017`, `0020`, `0022` to `0024`,
24
+ `Source/DotNET/Screenplay/Semantics/` (binder, versions, execution),
25
+ `Source/DotNET/Screenplay.Mcp/` (connection, catalog, schemas, workspaces, visualization),
26
+ `Source/DotNET/Tool/Program.cs`. Also `v4.60.1` and `v4.63.1` for the bundled-compiler and
27
+ cascade differences.
28
+ - Stage `v4.24.0` (`fa48546`): `Source/Rendering.Cratis/` (surface ledger, planner, pure
29
+ transition admission, scaffold), `Documentation/guides/customize-rendered-application.md`.
30
+ - cratis `v3.27.1` (`a327e89`): `Source/Cli/Commands/Render/`, `ScreenplayMcpRoot.cs`,
31
+ `Documentation/reference/screenplay.md`.
32
+ - Arc `v22.50.5` and Chronicle `v19.32.0` for the code-level facts cited in `versions.md`.
33
+ - Open issues cited as limits: cli#242, #243, #244, #245; Screenplay#377, #379, #383, #384,
34
+ #388; Stage#79, #165, #178, #197; Chronicle#3744, #4123, #4131.
35
+
36
+ ## Changes from the earlier toolkit
37
+
38
+ - Folded the version facts into one `versions.md` (the only version table in the corpus).
39
+ - Replaced the readiness script with the MCP view and field that carry the same result; no
40
+ script ships.
41
+ - Moved the MCP loop to `cratis-screenplay-model-authoring`; this skill keeps only the facts
42
+ needed to run a verdict and the edit strategy summary.
43
+ - Re-checked every documentation contradiction at v4.64.0; resolved the clock boundary and the
44
+ ESM v7 and v11 allocations; added numbers-exact, concurrency, approval-policy, visualization,
45
+ bodied-reducer, file-mode and cascade rows.
46
+ - Corrected the code-attachment rule (a handler never binds, with or without `hint`), the
47
+ automation rendering rule (Stage renders no Automation or Translate slices) and the
48
+ Stage output description (a React/Vite scaffold is emitted too).
49
+ - Verdict names follow the frozen V1 to V5 (V2 is executable diagnostics, V3 binding-ready);
50
+ the earlier "authoring accepted" meaning of V2 was dropped because it proves only that the
51
+ source compiled.
@@ -0,0 +1,88 @@
1
+ # Renderable subset (V5): what `cratis render` admits
2
+
3
+ Sources, all read at tags: Stage v4.24.0 `Source/Rendering.Cratis/Semantics/SemanticSurfaceLedger.cs`
4
+ (an exhaustive map of every ESM member to Rendered, Rejected(code) or Ignored),
5
+ `CratisArtifactRenderPlanner.cs`, `PureTransitionAdmission.cs`; cli v3.27.1
6
+ `Commands/Render/RenderSettings.cs` and `Documentation/reference/screenplay.md`. Re-run the
7
+ render itself before claiming renderability: this table is a reading of the source, not a
8
+ render result.
9
+
10
+ Renderable is a strict subset of executable (`executable-subset.md`). Order of events in
11
+ `cratis render`: the CLI binds the model with its **bundled Screenplay 4.60.1** (so PLAY0268
12
+ and friends appear first, and anything above ESM v5 fails there), then Stage admits or
13
+ rejects members. A model that binds only on the standalone tool is not renderable.
14
+
15
+ ## What Stage 4.24 admits
16
+
17
+ Whole-model admission requires ESM schema v1 to v3; anything else is STAGE-ESM-016 (v4
18
+ generations also fail the CLI pre-check CLI-RENDER-003). The admitted vertical is concepts,
19
+ composite types, one command to its events, a one-instance projection, an optional keyed
20
+ snapshot query, declarative authorization (including query authorization) and modeled
21
+ specifications. **Automation and Translate slices are not rendered** (Stage#79, open): the
22
+ whole automation is hand-written (gap-fill).
23
+
24
+ | Area | Renders | Rejected (code) |
25
+ | --- | --- | --- |
26
+ | ESM version | schema v1 to v3 | v4 generations, v5 `then no readmodel`, v6 constructs: STAGE-ESM-016 for the whole model |
27
+ | Slice kinds | `StateChange`, `StateView` | `Automation`, `Translate`: STAGE-ESM-001 |
28
+ | Types | concepts over Uuid, String, Int, Decimal, Bool, Date, DateTime; composite types; collections; optional | unknown types: 002 and 003 |
29
+ | Validation | not empty, min, max, equal, not equal, comparisons, length, `all >`/`all >=`, matches, `$strings` keys (missing default keys: 018) | code rules and code validation: 005 |
30
+ | State change | exactly one command per `StateChange` (004); unconditional `produces` with property mappings; typed `for`; tags; requirements; portable authorization; `$context.occurred` | `produces when` (006); value or literal expressions (006); other `$context` and event-context values (013); `reads` (PLAY0271) |
31
+ | State view | one projection per read model (007); `from`, `join`, `children`, `nested`, `every`, removals; set, add, subtract, increment, decrement, clear | composite keys, `all` (FromAll), event-context values, join keys, literal mappings in `every`/`all`, derived event-property names (017); Many or ZeroOrOne affected-instance cardinality (009); root join removal and nested shapes are blocked by Chronicle#4125 and #4166 |
32
+ | Queries | only the ZeroOrOne snapshot lookup by the read-model identifier, plus authorization | lists, `One`, observable, live, filters, paging: 010 or PLAY0268 |
33
+ | Reducers | bodies that pass the pure-transition allowlist (Roslyn; 023 is information) | impure bodies: 019 to 022 |
34
+ | Constraints | unique property value, unique event occurrence; admitted even though Chronicle#4123 means index updates run after commit | intra-command multi-event change to one constraint; multi-claim in one command: 014 |
35
+ | Authorization | authenticated, role, claim and logical policies; caller fixtures; ownership claims against text-backed targets | opaque policy code, role-claim URIs, a claim matched against a Uuid-backed subject or path: 015 |
36
+ | Specifications | command-action scenarios: given events, `when <Command>`, `then` events (ordered or any order), `then readmodel`, `then query`, `then error` (naming a rendered constraint or message), `then denied`, `given caller`. Two narrow when-less routes: an unprotected single `then query` seeded by exactly one `given readmodel` whose key and values match (no given events, no caller), and a query-only denial (`given caller`, one `then query` with no results, `then denied`, a protected query, no role claims) | `then no readmodel`, `when append`, composite values, error codes not naming a rendered constraint: 011. Any other when-less specification (for example given events with `then query`) fails 011 |
37
+ | Compliance | none | any `@pii` or `@sensitive` already fails binding (PLAY0268). Stage's `[PII]` attribute comes only from the legacy syntax renderer, which renders `@sensitive` as `[PII]` too (Stage#197) |
38
+
39
+ ## Authoring consequences in renderable mode
40
+
41
+ - `produces when` is STAGE-ESM-006: split conditional outcomes into separate commands, or
42
+ record the slice as non-renderable (gap-fill) without distorting a design-mode model.
43
+ - No `when append` specifications and no when-less event-replay proofs: prove a projection
44
+ with a command-action scenario (given events, `when <Command>`, `then query` or `then
45
+ readmodel`). The seeded when-less `then query` only checks a lookup over a given read-model
46
+ state; it proves no projection (Stage `SemanticSpecificationAdmission.Callers.cs`).
47
+ - Use `$context.occurred` only; no `$context.identity.*` mappings.
48
+ - A list is a design-only query and blocks binding, and so rendering, of the whole application on its own. A keyed `XById` sibling does not change that: while any list query remains, nothing in the model binds, runs or renders. Keep a list the domain needs and report the capability gap.
49
+ - A `handler` (with or without `implementation` or `hint`) never binds; the slice is
50
+ gap-fill, never "customized into" rendering.
51
+ - Descriptions and documentation are never rendered (Stage#178): a rule that exists only in
52
+ prose is unenforced in rendered code.
53
+
54
+ ## Ownership, publication and recovery
55
+
56
+ - Ownership is the destination's **`.cratis-render.json`** manifest (semantic revision,
57
+ identities, path and SHA-256 per artifact) and the **`.cratis-render/`** control directory
58
+ (`journal.json`, staging, backups). There are no in-file markers. Do not stage
59
+ `.cratis-render/` in git.
60
+ - Recovery runs before planning. A result with `recovered: true` means stop and reconcile.
61
+ - `--force` replaces a *modified active managed* file only. It never overwrites unmanaged
62
+ files and never deletes modified stale files.
63
+ - `--name` is **required** for plain source and sets the application identity (it also
64
+ defaults the project name and root namespace). Attachments are read from the model root,
65
+ so render from a dedicated model folder.
66
+ - `Customizations/` is reserved and unmanaged (STAGE-CRATIS-005 if a model would render into
67
+ it). Seams: `Customizations/Program.cs` (partial `ConfigureServices` and
68
+ `ConfigureApplication`), `Customizations/*.cs`, `Customizations/Dependencies.props`,
69
+ `Customizations/styles.css`. The planner never reads it, and it never binds a modeled
70
+ reaction or capture. A customization never makes a rejected model renderable.
71
+ - `cratis render` does **not** build, test or run the application.
72
+ - The scaffold pins .NET 10, Arc 22.25.0, Chronicle 19.8.1 and emits a `.frontend/` React/Vite
73
+ app (Components 4.14.0, Scene 4.2.0). `Directory.Packages.props` is Stage-managed: do not
74
+ edit it. `[ProtectedDecision]` (Arc v22.39.0) is not available in a rendered application.
75
+
76
+ ## Reading V5
77
+
78
+ V5 is four separate results (admission, publication, build, tests), plus runtime when it
79
+ was exercised; formats and the Debug-only spec classes are in `verdicts.md`. Three cases
80
+ stay distinct: admission failure (nothing rendered); an existing generated base plus
81
+ separately authorized hand-written gap-fill; and a fully hand-written delivery. Never claim a
82
+ whole-application V5 from a subset. Drift: compare successive `.cratis-render.json`
83
+ `semanticRevision` values from renders with the same `--name` and inputs (see `versions.md`,
84
+ "Revisions and descriptions"); not the MCP `modelRevision`, not `open-workspace.revision`.
85
+
86
+ Workflow, gap-fill boundaries and recovery: `cratis-screenplay-render-and-gap-fill` and
87
+ `cratis-stage-rendering-and-sandbox`. The `cratis/stage` sandbox and the
88
+ `cratis/stage-specrunner` job are still shipped.
@@ -0,0 +1,51 @@
1
+ # Traps (one line each, with the fix)
2
+
3
+ Re-checked against Screenplay v4.64.0 and cli v3.27.1 where marked [probed] or [source]. Tool and version facts: `versions.md`. Compiler-verified syntax: `cheat-sheet.md`.
4
+
5
+ 1. Clean V1 is not executable: binding errors appear only through MCP (V2) or `render`. Neither `screenplay <folder>` nor `cratis screenplay validate` binds. [probed]
6
+ 2. The Screenplay samples validate clean but are not all executable; copying their idioms (list queries, `@pii`, `today`, `reads`, `$causedBy`, templates, performers) breaks V3. [probed]
7
+ 3. Know the target mode (design/executable/renderable) before writing; state it.
8
+ 4. Plain `produces` without `for` means allocation in the ESM but "the identifier" in rendered code. Always write `for <identifier>`. [PLAY0478 probed]
9
+ 5. PLAY0029 is a warning: a misspelled keyword (or `type` inside a slice) drops the construct silently. Use `--warnings-as-errors`. [probed]
10
+ 6. Validate the folder: `cratis screenplay validate file.play` ignores imports and reports false unknown-name warnings (cli#244, open); the standalone tool follows them. [probed on 3.27.1 and 4.64.0]
11
+ 7. Unresolved names are warnings by design. Mappings to undeclared projection targets and undeclared events in `remove with`/capture `append` pass V1 and fail binding (V3, PLAY0273); a declared read-model property that nothing maps is reported by no tool. Run V3 and check field lineage by hand.
12
+ 8. Severity does not soften a rule: `severity warning` still rejects the command.
13
+ 9. Authorization (module AND feature AND construct) runs before validation; unauthorized is `then denied`, never `then error`.
14
+ 10. A reaction's `invokes` runs with no caller (no syntax for an identity yet: Screenplay#383, open): a gated invoked command rejects and ends the scenario. Design the trusted path (`cratis-screenplay-automations-and-translations`): keep the gate and record the capability gap; at code level `[ExecuteCommandsAsSystem]` (Arc 20.56.0 and later, so also in a Stage-rendered app on Arc 22.25.0); never invent `runs as`. Never strip authorization.
15
+ 11. A reaction `produces` without `for` lands on the trigger's event source; clock and application triggers need an explicit `for`.
16
+ 12. Read-model identity comes from its keyed queries, which must all use the same `by` property: `query XById => RM optional` + `by xId XId` with `xId` a read-model property, and the identifier equals the projection's effective key (table in slice-design `references/read-model-design.md`; full rule, including Stage's narrower admission and `STAGE-ESM-017`, in `cratis-stage-rendering-and-sandbox` `references/admission.md`). Never mark a read-model property `identifier`. (PLAY0268 when the keyed queries do not share one `by` property; PLAY0351 when a `given`/`then` readmodel block omits that property.)
17
+ 13. Projection `key` routes only on `from` (projection-level: PLAY0381). `all` is per event source. Joins never create instances and match the joined event's source id. [probed]
18
+ 14. AutoMap is on by default: same-named event properties fill read-model properties silently (scoped: case-insensitive, same type only; flat-bound: exact name, no type check, so a type mismatch invalidates the model). Use `no automap` for control.
19
+ 15. `given readmodel` bypasses the projection; prove a projection with `given` events + `when append`/command + `then readmodel`/`then query`.
20
+ 16. PLAY0285/0286/0287 are static spec checks: do not edit expectations blindly; PLAY0285 has a cascade false positive on the cratis-bundled compiler 4.60.1 only (cli#242, open). [probed]
21
+ 17. `null` in specs only for optional read-model properties (PLAY0350); omit the property or record a gap; whether an optional detail is really a separate fact is a review question, not the fix for this code.
22
+ 18. `then` events are exhaustive and ordered (use `then events in any order` for order only). From ESM v6 they include reaction cascades; after `when append` they list only what followed the append.
23
+ 19. `reads` without `by` means a singleton view today (decision 0017 will change it); `reads` never binds (PLAY0271), and neither does a command `concurrency` block (PLAY0271, error). [probed, source]
24
+ 20. Declare each event once, in its producing slice; renaming a persisted event needs `id "OldName"`; renaming a constraint discards its index.
25
+ 21. Quoted `import "x/*.play"` = my files; unquoted `import Ctx.Event` = another context's contract (does not bind: PLAY0268). [probed]
26
+ 22. Construct keywords are closed (`aggregate`, `saga`, `workflow` do not exist): PLAY0029 or PLAY0001/0022/0024.
27
+ 23. `@` escapes are mandatory for `tag`, `authorize`, `produces`, `reads`, `file`, `validate`, `sequence`, `occurred`, `causedBy`, `namespace`, `correlation`, `causation`, and projection `key`/`parent`/`with` as names.
28
+ 24. Comments do not survive canonicalizing edits (PLAY0288 reprint; `droppedCommentCount`); keep durable rationale in `description` text, not `//`.
29
+ 25. MCP writes: propose, review, approval, apply by the identity owner (the session that owns the MCP connection); other subagents return edit requests; proposals are connection-local, at most 16 (`cratis-screenplay-model-authoring`).
30
+ 26. Future syntax (`generated`, `returns`, operations, systems, eventsource/stream) parses but never binds; never invent ADR-planned syntax (`derive`, `provide`, `advisory`, `origin`, subject marks, `order by`, paging, `occurred at`, `from` filters, `for each`).
31
+ 27. Translate vs Automation is semantic: external facts become local facts in `Translate`; in-app event-to-event goes in `Automation`.
32
+ 28. Personas drive the board: a persona must list every policy on the path, including module-level `IsAuthenticated`.
33
+ 29. Sample specifications are never executed; their expected values (e.g. `.0000000Z` clock fraction, given==when clock boundary) are illustrative only.
34
+ 30. Claims compare with `matches` (`claim "dept" matches "Finance"`); `==` is PLAY0120. Conditions with `contains`/`starts with` compile but do not bind. [probed]
35
+ 31. One `every`/`all` block per projection level for V3; `$eventContext.occurred.Week` does not bind. [probed]
36
+ 32. Concept rules: `min`/`max`/`length ==`, not `length 3 to 10` (PLAY0141). [probed]
37
+ 33. Which compiler matters: the cratis-bundled one (3.27.1, Screenplay 4.60.1) rejects ESM v6 (Automation/Translate) and reports a false PLAY0285 on cascades; use the standalone tool for V1 to V3 and name the tool in every verdict. [probed on both tools]
38
+
39
+ 34. A `from <Event> key <property>` routes only if every such event carries that property: an event that frees or updates a row keyed by another stream's id must carry that id in its payload, or the row never changes. Whether the compiler reports a missing key property is unverified [to probe]; check by hand.
40
+ 35. `description`/`documentation` are authoring metadata: board, MCP and Prologue show them; `cratis render` never does (Stage#178). A rule only in prose is unenforced in rendered code; make it a rule layer, a spec or a recorded target requirement.
41
+ 36. Any `system`/`operation` (v9) or `generated`/`returns` (v8) leaves the whole application without an executable model (PLAY0268), not just the slice: keep them out of executable/renderable scope.
42
+ 37. Personas are not in the ESM (Screenplay#254); specs cannot reference them. Write `given caller` as the roles/claims that stand for the persona.
43
+ 38. A rule that depends on stored state is `reads <View>` + `require <expr> message "..."` (stated intent; PLAY0268/0271 at binding are expected in design mode). The slice `description` must mark it NOT enforced in the model today (Screenplay#129/#209) and name the target: Arc `[ProtectedDecision]` + `DecisionRead<T>` (Arc v22.39.0 and later; not available in a Stage-rendered app on Arc 22.25.0), Chronicle DCB (`concurrency` scope), or a constraint where one fits. Forbidden: caller-supplied copies of state in `require`, boolean attestation inputs (`confirmsX == true`), rules hidden in `handler`/implementation-hint prose. An unguarded materialized read is unsafe for a protected decision.
44
+
45
+ The SKILL.md top 12: 1, 4, 5, 6, 7, 10, 12, 13, 17, 18, 20, 21 (+ mode/version notes there). Traps 39 to 44 are tool traps added at the 4.64.0 pin.
46
+ 39. A handler never binds: PLAY0268 "Command '<n>' handler requires a constrained implementation attachment", with a file, a fence, `implementation` or `hint` alike. `hint` is handler-only authoring intent (no execution, lock or confirmation). A handler slice is gap-fill, not a customization of a rendered slice. [source, probed]
47
+ 40. `numbers exact` parses on 4.64.0 but never binds (PLAY0268; ESM v7 is not admitted) and is PLAY0001 on older compilers; it is absent from `grammar.md`. Never use it in a model or example meant to execute. [probed]
48
+ 41. MCP roots bug (4.63.1 and earlier, including cratis 3.27.1's bundled 4.60.1): a dynamic-root server answers the roots request with an `id: null` error right after `notifications/initialized`; hosts treat it as fatal. `open-workspace.path` does not help. Start with a fixed root (`screenplay mcp <folder>`, `cratis screenplay mcp` in a project with `.cratis/ai.json`) or use 4.63.2 or later. [source, probed]
49
+ 42. A symlinked model path is refused by the MCP server (macOS `/tmp` is a symlink); pass the physical path. Proposals are connection-local (at most 16); `apply` persists identities to `.screenplay/identities.json` and is not crash-atomic across files; never retry `apply` after `ApplyOutcomeUnknown`. [source]
50
+ 43. `modelRevision` is canonical semantic (line positions and descriptions do not change it; a file move only if it changes logical placement or application identity) and, without `identities.json`, changes with the root folder name; it is not comparable with a render's `semanticRevision`. Source identity for verdicts is the commit plus the digest from the source-identity helper (`cratis-screenplay-modeling-lifecycle` `references/verdicts-and-modes.md` "Source identity"). [probed]
51
+ 44. `cratis render` neither builds nor tests; `--name` is required for plain source; `.cratis-render/` is control state and is never staged; Stage-rendered apps are on Arc 22.25.0 (no `[ProtectedDecision]`). `cratis` file mode versus folder mode (trap 6) and a stale `cratis` on `PATH` (`which -a cratis`) both silently change what a verdict means. [source]
@@ -0,0 +1,134 @@
1
+ # Verdict commands, V1 to V5
2
+
3
+ The five verdicts are independent results, not a ladder: each proves only its own layer,
4
+ and each is either a result or "not run" with the reason. The verdict names are frozen
5
+ (`cratis-screenplay-modeling-lifecycle` owns when each is required; this file owns how to
6
+ obtain it). Tool and version facts: `versions.md`. No script ships with this skill: V2 and
7
+ V3 are read from the MCP server or from a render, V1 and V5 from the CLIs.
8
+
9
+ | Verdict | Meaning |
10
+ | --- | --- |
11
+ | V1 | authorable: compiles, warnings as errors |
12
+ | V2 | executable diagnostics: the binder's diagnostics were read |
13
+ | V3 | binding-ready: the executable model binds with no blocking executable diagnostics |
14
+ | V4 | reference specifications run |
15
+ | V5 | rendered and target-verified: admission, publication, build and tests, each separately |
16
+
17
+ ## V1: authorable
18
+
19
+ | Tool | Command | Pass | Fail |
20
+ | --- | --- | --- | --- |
21
+ | Standalone (preferred) | `screenplay <model-folder> --warnaserror --no-color` | exit 0 and `N file(s) compiled - 0 error(s), 0 warning(s)` | exit 1 |
22
+ | cratis (fallback) | `cratis screenplay validate <model-folder> --warnings-as-errors -o json-compact` | exit 0 | exit 5; exit 1 means missing path or no files |
23
+
24
+ - Always validate the **folder**. cratis file mode ignores imports (cli#244); the standalone
25
+ tool follows them, but a folder run is the same on both tools.
26
+ - An empty folder exits 0 on the standalone tool: read the file count.
27
+ - Warnings are failures here. PLAY0029 (a construct dropped silently) and the unresolved-name
28
+ warnings are the defects this verdict exists to catch.
29
+ - Syntax and consistency checks (PLAY0282 to PLAY0294) run; binding does not.
30
+ - Report: `V1 pass (screenplay 4.64.0, 3 files)`, `V1 fail: PLAY0029 a.play:12 ...`.
31
+
32
+ ## V2: executable diagnostics
33
+
34
+ Needs an MCP connection (V2 and V3 belong to the session that owns MCP; a subagent without
35
+ MCP reports `V2 not run: no MCP in this agent` unless the brief supplies fresh output).
36
+
37
+ 1. Start the server with a fixed root: `screenplay mcp <model-folder>` or `cratis screenplay
38
+ mcp` in a project with `.cratis/ai.json` (see `versions.md`, roots bug). Send
39
+ `initialize`, then `notifications/initialized`.
40
+ 2. `open-workspace`. The result carries `readiness` (`authoringAccepted`, `executableReady`)
41
+ and `executableDiagnosticsCount`.
42
+ 3. Read the diagnostics: `read-workspace` with `view: "executable-diagnostics"` and the
43
+ current `expectedRevision` (page with `offset`; paging beyond the first page needs the
44
+ source revision).
45
+ 4. Report the codes with counts, blocking (error severity) apart from informational. A list
46
+ with blocking entries is a valid V2 result (`V2 read: 6 blocking, PLAY0268 x3 list query,
47
+ @pii ...`); it is the evidence for a "V3 blocked" report. The view also lists
48
+ information-severity diagnostics (PLAY0269 deferred UI, PLAY0270 authoring metadata such as
49
+ descriptions, personas and screens) on models that bind; they do not block.
50
+
51
+ `authoringAccepted: true` only says the source compiled (or the root is empty). It says
52
+ nothing about print or parse fidelity or identity continuity.
53
+
54
+ ## V3: binding-ready
55
+
56
+ V3 holds when `executableReady` is true and V2 returned **no blocking** (error-severity)
57
+ executable diagnostics; informational PLAY0269/PLAY0270 entries are reported separately and
58
+ do not block. The ESM then binds (and `read-workspace view=executable-model` reports `available: true` with a
59
+ `modelRevision`; avoid reading the whole model bytes just for the revision unless a
60
+ comparison needs it). Binding is what makes a model renderable at all. V3 means "binds",
61
+ never "specifications pass".
62
+
63
+ - Report the ESM version the model needs: `V3 ready (screenplay 4.64.0, ESM v6)`,
64
+ `V3 blocked: PLAY0268 x3 (list query, @pii) - design scope kept`.
65
+ - A blocked V3 is not repaired by deleting protection or domain rules. Never remove `@pii`,
66
+ `@sensitive`, authorization, list queries, automations or rules to reach V3; record the
67
+ slice and the code in the gap list.
68
+ - A model is "executable" only on the compiler that bound it. A V3 from the standalone tool
69
+ does not carry to `cratis render` (bundled 4.60.1, ESM v1 to v5; Stage v1 to v3).
70
+
71
+ ## V4: reference specifications run
72
+
73
+ No MCP tool and no compile command runs specifications (Screenplay#377 is open). V4 comes
74
+ only from an actually executed Screenplay **reference** route. Record the route, the expected
75
+ versus discovered specification count, and passed, failed, unsupported and cancelled counts.
76
+ The reference runner returns unsupported for a specification that reads a reducer-built read
77
+ model and for any construct whose evaluation needs an opaque body.
78
+
79
+ **Rendered Debug tests are never V4.** A rendered application is a different engine: Stage
80
+ 4.24 admits pure reducer bodies and generates reducer replay and assertions in its Debug
81
+ tests, so the two engines can differ (a pure reducer body is a concrete case). Report those
82
+ outcomes only under V5.tests, labelled target-test evidence. The `cratis/stage-specrunner` job
83
+ (Docker, opt-in; behaviour on ESM v4 to v6 unverified) runs Stage's own semantic executor
84
+ (`SemanticSpecificationExecutor`, Stage `v4.24.0` `Source/SpecRunner/Program.cs`), not the
85
+ reference route: report its outcomes on a separate line, "Stage semantic engine (target-engine
86
+ evidence)", never as V4 and not as V5.tests.
87
+ Without a reference route: `V4 not run: no route`.
88
+
89
+ ## V5: rendered and target-verified
90
+
91
+ `cratis render` is the entry point; it neither builds nor tests. Report four separate
92
+ results, plus runtime when it was exercised:
93
+
94
+ 1. **Admission**: the render plan was accepted, or the STAGE-ESM / PLAY / CLI-RENDER codes
95
+ that rejected it (nothing is rendered on rejection).
96
+ 2. **Publication**: what was written, unchanged or refused (`.cratis-render.json`,
97
+ `.cratis-render/journal.json`; `recovered: true` means stop and reconcile).
98
+ 3. **Build**: Debug build of the destination (`dotnet build`).
99
+ 4. **Tests**: Debug tests of the destination (`dotnet test`). Generated specifications are
100
+ compiled in Debug only; map results by generated spec class (`when_<snake>` in namespace
101
+ `<Slice ns>.when_<snake>`, `when_<snake>_is_queried`, `when_<snake>_is_projected`) back to
102
+ the `.play` specification, not by test counts.
103
+
104
+ Never claim a whole-application V5 from a rendered subset. Render workflow, ownership
105
+ and gap-fill: `cratis-screenplay-render-and-gap-fill` and `cratis-stage-rendering-and-sandbox`.
106
+ What Stage admits: `renderable-subset.md`.
107
+
108
+ ## Report format
109
+
110
+ One line per verdict, tool and version first, evidence second:
111
+
112
+ ```text
113
+ V1 pass (screenplay 4.64.0, 3 files)
114
+ V2 read (screenplay 4.64.0 via MCP): 0 blocking, 3 informational (PLAY0270)
115
+ V3 ready (screenplay 4.64.0, ESM v3)
116
+ V4 not run: no route
117
+ V5 admission pass (cratis 3.27.1, Stage 4.24.0); publication written 14 files; build not run; tests not run
118
+ ```
119
+
120
+ Rules: a clean verdict never implies a later one; a verdict names the **source identity** it
121
+ ran on (commit plus the digest from the source-identity helper (`cratis-screenplay-modeling-lifecycle` `references/verdicts-and-modes.md` "Source identity")); a tool or
122
+ source change makes earlier verdicts stale.
123
+
124
+ ## Example gate (for skill and documentation authors)
125
+
126
+ Every complete `screenplay` fence in this corpus compiles with the standalone tool at the
127
+ pin and `--warnaserror`. Every fence without the marker `// Needs the standalone screenplay
128
+ compiler (ESM v6)` also passes `cratis screenplay validate --warnings-as-errors` (3.27.1) on
129
+ a folder holding that one file. Examples meant to execute are also opened through MCP and
130
+ must be `executableReady`. No example uses `numbers exact`.
131
+
132
+ Edit strategy for `.play` changes (typed identity-preserving operations preferred, bounded text
133
+ edits for address-preserving changes) is in
134
+ `SKILL.md`; the MCP edit procedure is in `cratis-screenplay-model-authoring`.