@cratis/pi 7.33.0 → 7.34.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 (160) hide show
  1. package/package/corpus/agents/screenplay-modeler.md +1 -1
  2. package/package/corpus/agents/screenplay-renderer.md +1 -1
  3. package/package/corpus/agents/screenplay-reviewer.md +1 -1
  4. package/package/corpus/agents/slice-implementer.md +1 -1
  5. package/package/corpus/rules/profiles.md +1 -0
  6. package/package/corpus/skills/cratis-application-slice-conformance/LICENSE +2 -2
  7. package/package/corpus/skills/cratis-application-slice-conformance/SKILL.md +5 -0
  8. package/package/corpus/skills/cratis-application-slice-conformance/references/checklists.md +12 -0
  9. package/package/corpus/skills/cratis-application-slice-conformance/references/provenance.md +3 -4
  10. package/package/corpus/skills/cratis-application-slice-specifications/LICENSE +2 -2
  11. package/package/corpus/skills/cratis-application-slice-specifications/references/provenance.md +2 -3
  12. package/package/corpus/skills/cratis-arc-react-page/LICENSE +2 -2
  13. package/package/corpus/skills/cratis-arc-react-page/references/provenance.md +2 -3
  14. package/package/corpus/skills/cratis-chronicle-event-modeling/SKILL.md +12 -6
  15. package/package/corpus/skills/cratis-chronicle-reactor/LICENSE +2 -2
  16. package/package/corpus/skills/cratis-chronicle-reactor/SKILL.md +5 -2
  17. package/package/corpus/skills/cratis-chronicle-reactor/references/provenance.md +3 -3
  18. package/package/corpus/skills/cratis-chronicle-reactor/references/slice-delivery-checklist.md +93 -0
  19. package/package/corpus/skills/cratis-chronicle-read-model-specifications/LICENSE +2 -2
  20. package/package/corpus/skills/cratis-chronicle-read-model-specifications/SKILL.md +1 -1
  21. package/package/corpus/skills/cratis-chronicle-read-model-specifications/references/provenance.md +3 -3
  22. package/package/corpus/skills/cratis-chronicle-read-model-specifications/references/view-lifecycle-checks.md +79 -0
  23. package/package/corpus/skills/cratis-event-model-diagram/LICENSE +7 -0
  24. package/package/corpus/skills/cratis-event-model-diagram/SKILL.md +26 -2
  25. package/package/corpus/skills/cratis-event-model-diagram/references/provenance.md +19 -0
  26. package/package/corpus/skills/cratis-screenplay-automations-and-translations/LICENSE +2 -2
  27. package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +14 -9
  28. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/automation-patterns.md +5 -5
  29. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/effects-and-idempotency.md +1 -1
  30. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/provenance.md +2 -3
  31. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/public-events-and-direction.md +1 -2
  32. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/realization-and-gap-fill.md +9 -5
  33. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/todo-list-example.md +6 -6
  34. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translate-example.md +1 -1
  35. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +14 -13
  36. package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +12 -13
  37. package/package/corpus/skills/cratis-screenplay-command-surface/references/compliance.md +3 -1
  38. package/package/corpus/skills/cratis-screenplay-command-surface/references/generated-values-and-responses.md +2 -2
  39. package/package/corpus/skills/cratis-screenplay-command-surface/references/validate-rules.md +4 -2
  40. package/package/corpus/skills/cratis-screenplay-delivery-planning/LICENSE +9 -0
  41. package/package/corpus/skills/cratis-screenplay-delivery-planning/SKILL.md +118 -0
  42. package/package/corpus/skills/cratis-screenplay-delivery-planning/references/parallel-delivery.md +45 -0
  43. package/package/corpus/skills/cratis-screenplay-delivery-planning/references/provenance.md +29 -0
  44. package/package/corpus/skills/cratis-screenplay-delivery-planning/references/slice-counting.md +43 -0
  45. package/package/corpus/skills/cratis-screenplay-delivery-planning/references/velocity-and-capacity.md +48 -0
  46. package/package/corpus/skills/cratis-screenplay-delivery-planning/verification.json +16 -0
  47. package/package/corpus/skills/cratis-screenplay-discovery/LICENSE +2 -2
  48. package/package/corpus/skills/cratis-screenplay-discovery/SKILL.md +6 -5
  49. package/package/corpus/skills/cratis-screenplay-discovery/references/divergent-sweep.md +1 -0
  50. package/package/corpus/skills/cratis-screenplay-discovery/references/domain-analysis-template.md +92 -0
  51. package/package/corpus/skills/cratis-screenplay-discovery/references/personas-and-causes.md +2 -2
  52. package/package/corpus/skills/cratis-screenplay-discovery/references/provenance.md +4 -3
  53. package/package/corpus/skills/cratis-screenplay-discovery/verification.json +1 -1
  54. package/package/corpus/skills/cratis-screenplay-event-modeling/LICENSE +2 -2
  55. package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +28 -28
  56. package/package/corpus/skills/cratis-screenplay-event-modeling/references/nine-steps.md +7 -5
  57. package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +12 -9
  58. package/package/corpus/skills/cratis-screenplay-event-modeling/references/provenance.md +2 -3
  59. package/package/corpus/skills/cratis-screenplay-legacy-extraction/LICENSE +2 -2
  60. package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +26 -13
  61. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/candidate-inventory.md +6 -1
  62. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generate-notes.md +7 -0
  63. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/prologue-safety.md +22 -17
  64. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/provenance.md +2 -3
  65. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/rule-modeling.md +2 -2
  66. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/side-car-migration.md +1 -0
  67. package/package/corpus/skills/cratis-screenplay-legacy-extraction/verification.json +1 -1
  68. package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +2 -2
  69. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +3 -3
  70. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +3 -1
  71. package/package/corpus/skills/cratis-screenplay-model-review/LICENSE +2 -2
  72. package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +8 -8
  73. package/package/corpus/skills/cratis-screenplay-model-review/references/anti-patterns.md +2 -2
  74. package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +4 -4
  75. package/package/corpus/skills/cratis-screenplay-model-review/references/model-inventory-report.md +75 -0
  76. package/package/corpus/skills/cratis-screenplay-model-review/references/provenance.md +3 -4
  77. package/package/corpus/skills/cratis-screenplay-model-review/references/public-keys-and-routes.md +1 -1
  78. package/package/corpus/skills/cratis-screenplay-model-review/references/worked-example.md +4 -3
  79. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/LICENSE +2 -2
  80. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/SKILL.md +7 -5
  81. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/core-rules-digest.md +131 -0
  82. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/phases.md +1 -1
  83. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/provenance.md +25 -4
  84. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/reasoning-notes.md +2 -2
  85. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/verdicts-and-modes.md +1 -1
  86. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/vocabulary-map.md +5 -4
  87. package/package/corpus/skills/cratis-screenplay-projections/SKILL.md +9 -5
  88. package/package/corpus/skills/cratis-screenplay-projections/references/pdl-grammar.md +4 -2
  89. package/package/corpus/skills/cratis-screenplay-read-surface/LICENSE +7 -0
  90. package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +16 -8
  91. package/package/corpus/skills/cratis-screenplay-read-surface/references/provenance.md +21 -0
  92. package/package/corpus/skills/cratis-screenplay-read-surface/references/screen-patterns.md +130 -0
  93. package/package/corpus/skills/cratis-screenplay-read-surface/verification.json +1 -1
  94. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/LICENSE +2 -2
  95. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +58 -46
  96. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/delivery-protocol.md +17 -2
  97. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/drift-and-ledger.md +19 -2
  98. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +22 -4
  99. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/provenance.md +2 -3
  100. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +21 -16
  101. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/worked-example.md +34 -29
  102. package/package/corpus/skills/cratis-screenplay-scenario-coverage/LICENSE +2 -2
  103. package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +5 -4
  104. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/berth-reservations.md +1 -1
  105. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-design.md +5 -4
  106. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-example.md +32 -3
  107. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/provenance.md +3 -4
  108. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-catalogue.md +7 -6
  109. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-examples.md +3 -3
  110. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-workshop.md +15 -7
  111. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +8 -7
  112. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/view-and-story-specs.md +6 -4
  113. package/package/corpus/skills/cratis-screenplay-slice-design/LICENSE +2 -2
  114. package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +4 -3
  115. package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md +2 -2
  116. package/package/corpus/skills/cratis-screenplay-slice-design/references/derived-condition-events.md +68 -0
  117. package/package/corpus/skills/cratis-screenplay-slice-design/references/field-lineage.md +1 -1
  118. package/package/corpus/skills/cratis-screenplay-slice-design/references/provenance.md +5 -5
  119. package/package/corpus/skills/cratis-screenplay-slice-design/references/read-model-design.md +17 -0
  120. package/package/corpus/skills/cratis-screenplay-slice-design/references/rule-layers.md +6 -6
  121. package/package/corpus/skills/cratis-screenplay-slice-design/references/worked-example.md +3 -3
  122. package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +6 -4
  123. package/package/corpus/skills/cratis-screenplay-specifications/references/examples-and-routes.md +2 -1
  124. package/package/corpus/skills/cratis-screenplay-specifications/references/generated-fixtures.md +3 -2
  125. package/package/corpus/skills/cratis-screenplay-specifications/references/persona-callers-and-cases.md +3 -0
  126. package/package/corpus/skills/cratis-screenplay-specifications/references/reactions-and-cascades.md +3 -2
  127. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/LICENSE +2 -2
  128. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +9 -9
  129. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/boundaries.md +31 -3
  130. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/chronicle-boundaries.md +6 -6
  131. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +12 -11
  132. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution.md +1 -1
  133. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/provenance.md +4 -4
  134. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +1 -1
  135. package/package/corpus/skills/cratis-screenplay-toolchain/LICENSE +2 -2
  136. package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +14 -12
  137. package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet-example.md +3 -3
  138. package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet.md +1 -1
  139. package/package/corpus/skills/cratis-screenplay-toolchain/references/doc-contradictions.md +3 -1
  140. package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +24 -16
  141. package/package/corpus/skills/cratis-screenplay-toolchain/references/provenance.md +2 -3
  142. package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +41 -12
  143. package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +5 -5
  144. package/package/corpus/skills/cratis-screenplay-toolchain/references/verdicts.md +14 -9
  145. package/package/corpus/skills/cratis-screenplay-toolchain/references/versions.md +9 -3
  146. package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +4 -1
  147. package/package/corpus/skills/cratis-screenplay-ui-composition/LICENSE +2 -2
  148. package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +10 -10
  149. package/package/corpus/skills/cratis-screenplay-ui-composition/references/flow-review.md +1 -1
  150. package/package/corpus/skills/cratis-screenplay-ui-composition/references/provenance.md +2 -3
  151. package/package/corpus/skills/cratis-screenplay-ui-composition/references/screen-composition-contract.md +39 -14
  152. package/package/corpus/skills/cratis-screenplay-ui-composition/references/worked-flow.md +17 -9
  153. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +83 -74
  154. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +62 -12
  155. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/render-example.md +3 -1
  156. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/rendered-application.md +30 -15
  157. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/sandbox-and-specrunner.md +21 -1
  158. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +8 -3
  159. package/package/profile-catalog.json +1 -0
  160. package/package.json +1 -1
@@ -14,8 +14,9 @@ replaced by prose. The runnable counterpart, which holds no stored-state rule, i
14
14
  `invoicing-dues-example.md`; `scenario-examples.md` copies `ReversingAReceivedPayment` from here.
15
15
 
16
16
  The excerpt's Stage API-availability comment describes the historical Stage 4.24.x
17
- scaffold. Stage 4.51.3 pins Arc 22.50.5/Chronicle 19.32.0: protected-read APIs are
18
- available to gap-fill, not emitted protection or `.play` rule admission. The
17
+ scaffold. Stage 4.73.1 pins Arc 22.68.0/Chronicle 19.45.0: protected-read APIs are
18
+ available to gap-fill (the "not in a Stage-rendered application" comment in the source is
19
+ superseded), not emitted protection or `.play` rule admission. The
19
20
  original compiled source is retained unchanged.
20
21
 
21
22
  ```screenplay expect PLAY0516 test=unbound
@@ -24,7 +25,7 @@ original compiled source is retained unchanged.
24
25
  // blockers), so this model compiles but is not executable; the specifications below do not run. The runnable counterpart
25
26
  // is invoicing-dues-example.md.
26
27
  // Target enforcement of every rule here: Arc [ProtectedDecision] with DecisionRead<T> (Arc v22.39.0
27
- // or later, not in a Stage-rendered application), or a Chronicle DCB; Screenplay#129/#209.
28
+ // or later, not in a Stage-rendered application), or a Chronicle DCB; Screenplay#129.
28
29
 
29
30
  concept InvoiceId : Uuid
30
31
  concept MemberId : Uuid
@@ -107,7 +108,7 @@ module Invoicing
107
108
  event PaymentReceived
108
109
 
109
110
  slice StateChange SettleOrVoidInvoice
110
- description "An invoice ends either settled or voided, never both (SettleOrVoid, enforced at append). NOT enforced in the model today: that the invoice exists and is still open (settling) and that only an open, unpaid invoice may be voided. Stated as `reads OpenInvoice` + `require` (PLAY0271/PLAY0268 at binding; Screenplay#129/#209). Target: Arc [ProtectedDecision] with DecisionRead, or a Chronicle DCB. Requirements to test in the target: settling an unknown invoice is rejected; voiding a paid invoice is rejected; voiding an open invoice succeeds."
111
+ description "An invoice ends either settled or voided, never both (SettleOrVoid, enforced at append). NOT enforced in the model today: that the invoice exists and is still open (settling) and that only an open, unpaid invoice may be voided. Stated as `reads OpenInvoice` + `require` (PLAY0271/PLAY0268 at binding; Screenplay#129). Target: Arc [ProtectedDecision] with DecisionRead, or a Chronicle DCB. Requirements to test in the target: settling an unknown invoice is rejected; voiding a paid invoice is rejected; voiding an open invoice succeeds."
111
112
  command SettleInvoice
112
113
  invoiceId InvoiceId identifier
113
114
  reads OpenInvoice as invoice by invoiceId // stated intent, unprotected (PLAY0271 at binding)
@@ -259,6 +259,7 @@ module Invoicing
259
259
  amount Decimal
260
260
  query OpenInvoiceById => OpenInvoice optional
261
261
  by invoiceId InvoiceId
262
+ query ListOpenInvoices => OpenInvoice[]
262
263
  projection OpenInvoices => OpenInvoice
263
264
  from InvoiceIssued
264
265
  invoiceId = $eventSourceId
@@ -338,6 +339,34 @@ module Invoicing
338
339
  arguments
339
340
  invoiceId = "9c1f0a52-6a4e-4b1c-9f55-0d2c7b8e1a01"
340
341
 
342
+ specification OpenInvoicesListHoldsTheIssuedInvoice
343
+ description "The unkeyed list query returns one row per open invoice; each row states the read-model identifier."
344
+ given caller
345
+ authenticated
346
+ role "Accounts"
347
+ given InvoiceIssued
348
+ for "9c1f0a52-6a4e-4b1c-9f55-0d2c7b8e1a01"
349
+ member = "6f1c2a8e-0b1d-4d55-9a3e-2f6a7c1d0e11"
350
+ amount = 130
351
+ then query ListOpenInvoices
352
+ result
353
+ invoiceId = "9c1f0a52-6a4e-4b1c-9f55-0d2c7b8e1a01"
354
+ member = "6f1c2a8e-0b1d-4d55-9a3e-2f6a7c1d0e11"
355
+ amount = 130
356
+
357
+ specification OpenInvoicesListIsEmptyAfterPayment
358
+ description "A paid invoice leaves the list: a query with no result block is the empty list."
359
+ given caller
360
+ authenticated
361
+ role "Accounts"
362
+ given InvoiceIssued
363
+ for "9c1f0a52-6a4e-4b1c-9f55-0d2c7b8e1a01"
364
+ member = "6f1c2a8e-0b1d-4d55-9a3e-2f6a7c1d0e11"
365
+ amount = 130
366
+ when append PaymentReceived
367
+ for "9c1f0a52-6a4e-4b1c-9f55-0d2c7b8e1a01"
368
+ then query ListOpenInvoices
369
+
341
370
  slice StateChange TopUpCredit
342
371
  description "Adds credit to a member. Why an amount above zero: a zero top-up changes nothing and hides a mistake."
343
372
  command TopUpCredit
@@ -412,6 +441,6 @@ module Invoicing
412
441
  - The command that reverses a payment, the refund reaction and their specifications
413
442
  (`ReversingAReceivedPayment`, `RequestingARefundAfterAReversal`) are in
414
443
  `invoicing-dues-design.md`, because the command needs a stored-state rule.
415
- - The query answers "absent" with no `result` block; the whole-list query and the `OpenInvoices`
416
- list view in the excerpts are design-mode expectations (list queries compile but do not bind at
417
- 4.66.0, PLAY0268, `cratis-screenplay-toolchain`, so they are retained as design-mode expectations): see `view-and-story-specs.md`.
444
+ - The query answers "absent" with no `result` block. The `ListOpenInvoices` list query and its two
445
+ specifications bind and run (list queries bind since Screenplay 4.105.0; they compiled but did
446
+ not bind at 4.66.0); only `filter`, `scoped to` and `performer` queries stay design-mode: see `view-and-story-specs.md`.
@@ -15,15 +15,14 @@ Source: TrogonStack/agentskills at `7b249d3ee42d8b7e11fa564141ebd5fbc37aadf1`, M
15
15
  | same file, Quality Checklist and Gherkin Best Practices (explicit givens, explicit outcomes, named reasons), and its Workflow sections 1-5 (command, state validation, view, error path, compensation) | `SKILL.md` "Quality checklist", `references/scenario-examples.md` "Good and bad forms" and categories | Mapped onto `.play` specification style (exact events, pinned messages, `for`, one behavior per spec) |
16
16
  | same file, Scenario Organization (happy path, validation, state violation, duplicates, alternatives, error handling, compensation) | `references/scenario-catalogue.md` ordering, `references/scenario-examples.md` categories | Extended with denial, competing claim, ordering, evolution and view types |
17
17
 
18
- ## Adapted closely (Martin Dilger and Nebulit GmbH, with agreement)
18
+ ## Adapted closely (Martin Dilger and Nebulit GmbH)
19
19
 
20
20
  Source: https://github.com/Nebulit-GmbH/agentic-engineer at commit `07b0f30648d663cb588d7e2c7aa031af9dfc21f2`,
21
- by Martin Dilger and Nebulit GmbH (https://nebulit.de). The repository carries no licence file; this material
22
- is adapted with the agreement of Martin Dilger and Nebulit GmbH.
21
+ by Martin Dilger and Nebulit GmbH (https://nebulit.de), used with the explicit consent of Martin Dilger and Nebulit GmbH.
23
22
 
24
23
  | Source file | Used in | How |
25
24
  |---|---|---|
26
- | `.claude/skills/eventmodeling-elaborating-scenarios/SKILL.md`: Interview Phase, Workshop Facilitation Guide, Multi-Role Review, Common Workshop Mistakes, Tips for Rapid Creation | `SKILL.md` "Interview phase", `references/scenario-workshop.md` | Text shared with TrogonStack's version (rows above, MIT; rationale, "what if" capture and multi-role review passages are not Nebulit-only); the Nebulit file is recorded here for completeness. Time-boxes and per-command quotas still deliberately dropped |
25
+ | `.claude/skills/eventmodeling-elaborating-scenarios/SKILL.md`: Interview Phase, Workshop Facilitation Guide, Multi-Role Review, Common Workshop Mistakes, Tips for Rapid Creation | `SKILL.md` "Interview phase", `references/scenario-workshop.md` | Text shared with TrogonStack's version (rows above, MIT; rationale, "what if" capture and multi-role review passages are not Nebulit-only); the Nebulit file is recorded here for completeness. Time-boxes and the three-to-five quota are kept only as optional pacing (`scenario-workshop.md` "Optional pacing"), subordinate to the coverage matrix |
27
26
  | same file: GWT vs. Storyline decision rule, Workflow 0 (decide per read model before drafting any payload; one reused schema may indicate a skipped judgment), todo lists as the prime storyline candidate, repeated event type as a driver | `SKILL.md` Procedure 5, `references/view-and-story-specs.md` "Worked family: a todo list" | Restored from #493 and adapted closely; storylines become lifecycle families of independent specs because Screenplay has no multi-step specification (Screenplay#394); storyline JSON, beats and layout dropped (board transport) |
28
27
  | same file: Scenario Types (seven questions, "not a good/bad pair", skip only for a domain reason) | `references/scenario-catalogue.md` | Idea; our own, broader catalogue kept |
29
28
  | same file: Quality Checklist (no command has only two scenarios; read models a separate, equally mandatory pass; why behind rules documented) | `SKILL.md` "Quality checklist" | Adapted closely; board posting and `expectEmptyList` items dropped |
@@ -45,7 +45,7 @@ name them as unfinished.
45
45
  order, with full payloads and `for`. See `ReservingAGuestBerth`.
46
46
  - Traps: asserting a subset of events (lists are exact); leaving out `given caller` on a gated
47
47
  command; omitting `for` so the event lands on an allocated source.
48
- - Generated values and responses (ESM v7, standalone Screenplay 4.68.0; syntax in `cratis-screenplay-specifications`):
48
+ - Generated values and responses (ESM v7, standalone Screenplay 4.68.0 and later; syntax in `cratis-screenplay-specifications`):
49
49
  when the command has a `generated` property, the happy path supplies its fixtures (`for` on the generated
50
50
  identifier, `generated <name> = <value>`); only when the command declares a response does it assert
51
51
  `then returns` (a return expectation without a response is rejected at compile time). Add the failing
@@ -90,11 +90,11 @@ name them as unfinished.
90
90
  spec, not `then denied`); denial only when the whole gate is false.
91
91
  - Ownership policies (`claim ... matches subject|<property>`): the denial gives the right role
92
92
  and a claim with another value (`claim "ownerId" = "<other id>"`); the success spec gives the
93
- matching value. Both are needed. Ownership checks on Uuid-backed identifiers do not render
94
- today (STAGE-ESM-015): note it.
93
+ matching value. Both are needed. Ownership checks on text, Uuid, Date and DateTime subjects render at Stage 4.73.1;
94
+ other subjects are STAGE-ESM-015: note it.
95
95
  - Traps: `then error` for a denial; a denial spec whose inputs also break a rule (it still
96
- denies, but reads ambiguously); trusting a `cratis run` sandbox answer (it enforces neither
97
- authorization nor validation); counting another command's denial.
96
+ denies, but reads ambiguously); trusting a `cratis run` sandbox answer (the default engine's enforcement is unverified here;
97
+ the opt-in semantic engine enforces both but reads forgeable caller headers, so it is no security boundary); counting another command's denial.
98
98
 
99
99
  ## 4. State violation
100
100
  - Ask: "After which earlier facts must this request be refused?"
@@ -151,7 +151,8 @@ name them as unfinished.
151
151
  all conditions are false the unconditional productions still occur. See
152
152
  `RecordingACleanDeparture` (only `BoatDeparted`) and `RecordingADepartureWithDamage` (both).
153
153
  - Zero new facts: a command whose productions are all conditional may be accepted with no
154
- facts. There is no `then no events` syntax. A command spec with no `then` events but with a
154
+ facts. `then no events` parses but binding refuses it with PLAY0268 (#433): state the zero-fact outcome through a
155
+ read-model or query assertion, and an action with no outcome at all does not bind. A command spec with no `then` events but with a
155
156
  view or query assertion is still executable as a zero-fact check: the runner compares the
156
157
  command's facts with the (empty) expected list by exact count, so any fact produced fails it
157
158
  (Screenplay v4.66.0). Write it that way, name it for the zero-fact outcome, and keep the view
@@ -12,8 +12,8 @@
12
12
 
13
13
  Compact examples for each scenario category, in one invoicing domain so the shapes compare
14
14
  easily. Every excerpt below is copied verbatim from the complete document in
15
- `invoicing-dues-example.md`, which compiles with warnings as errors and whose 21 specifications
16
- pass in the reference evaluator; it also holds the declarations the excerpts depend on. The two
15
+ `invoicing-dues-example.md`, which compiles with warnings as errors and whose 23 specifications
16
+ pass in the reference evaluator (standalone 4.139.0); it also holds the declarations the excerpts depend on. The two
17
17
  compensation excerpts in section 4 come from `invoicing-dues-design.md` instead: that document
18
18
  holds the stored-state rules (`reads` + `require`), compiles but does not bind (PLAY0271,
19
19
  PLAY0268), so its specifications are design mode and do not run. A second
@@ -207,4 +207,4 @@ specification MemberCreditAccumulatesTopUps
207
207
  A list query asserts one `result` block per expected row (count and order are exact), and the
208
208
  empty-list intent is a separate claim from a keyed row being absent (`view-and-story-specs.md`
209
209
  "Removal is a positive obligation"). The backing example proves the keyed forms only; whole-list
210
- queries stay design-mode expectations and are recorded as such in the coverage matrix.
210
+ queries are executable too (`ListOpenInvoices` in the backing example); only `filter`, `scoped to` and `performer` queries stay design-mode expectations recorded in the coverage matrix.
@@ -9,7 +9,7 @@
9
9
  - Multi-role check (before leaving the room)
10
10
  - Common mistakes
11
11
  - Tips for rapid capture
12
- - Rules of thumb, deliberately different from the source guide
12
+ - Optional pacing
13
13
 
14
14
  Use this when scenarios are written together with business people, developers and testers
15
15
  instead of by one author. The facilitation structure is adapted from the Workshop Facilitation
@@ -38,7 +38,7 @@ specification with that name exists in the model.
38
38
  - Outcome lists from discovery and slice design (Cannot lines, "only if" rules, refusals,
39
39
  competition candidates, endings) as seeds.
40
40
  - One card per command or view, with the twelve matrix columns as prompts. A timer per card is
41
- optional; a card is finished when every column holds a value (see Rules of thumb), not when
41
+ optional; a card is finished when every column holds a value (see Optional pacing), not when
42
42
  the time is up.
43
43
 
44
44
  ## During: one command at a time
@@ -106,8 +106,16 @@ four approvals. Record who actually answered each question.
106
106
  - End with the open questions listed, owner and date, and the matrix saved as the workshop
107
107
  record.
108
108
 
109
- ## Rules of thumb, deliberately different from the source guide
110
- The source guide time-boxes 15-20 minutes per command and aims at three to five scenarios per
111
- command. Neither is a rule here: a command with three rules, a gate, two constraints and a
112
- conditional production needs the scenarios its declarations create, and a quota would drop
113
- cases. Time-box the discussion, never the matrix; unfinished cells stay `open`.
109
+ ## Optional pacing
110
+ A workshop that has to finish in a fixed time can use the source guide's pacing as a starting
111
+ point, subordinate to the matrix:
112
+ - About 15 to 20 minutes per command for the first pass, with a timer per card. A command with
113
+ few rules is quicker; one with several rules, a gate and constraints takes longer.
114
+ - Three to five scenarios per command is a typical range for a simple command, not a quota.
115
+ - Keep the rhythm of the "During" steps: capture, read back, move on. Parallel pairs take
116
+ different commands, then read back together.
117
+
118
+ The matrix, not the clock, decides when a card is finished. A command with three rules, a gate,
119
+ two constraints and a conditional production needs the scenarios its declarations create, and a
120
+ quota would drop cases. Time-box the discussion, never the matrix; unfinished cells stay `open`
121
+ and their owner and date go in the open-question list.
@@ -16,12 +16,13 @@ Typed example/override forms: `cratis-screenplay-specifications`
16
16
  | `given readmodel` | yes | yes (complete instance with key) | only as the query-only lookup below |
17
17
  | `when append <Event>` | yes | yes | no |
18
18
  | `then readmodel` / `then query` (keyed `ById`, `arguments`, `result`) | yes | yes | yes |
19
- | `then query` on list, filtered or observable queries | yes | no (query does not bind) | no |
19
+ | `then query` on an unfiltered list or a list narrowed by one `by` key (observable too) | yes | yes since 4.105.0: no `arguments` for an unkeyed list, one `result` per row stating the read-model identifier, no `result` = empty list | observable lists render, a non-observable list is `STAGE-ESM-010` (Stage 4.73.1) |
20
+ | `then query` on `filter`, `scoped to`, `performer` or `by ... from` queries | yes | no: PLAY0268 at binding | no |
20
21
  | `then no readmodel <RM> for "<key>"` | yes | yes | no |
21
22
  | `when query` -> `then result` / `then no result` | yes | yes | same as `then query`: only the query-only cases below |
22
- | `given clock` / `when clock`, `when trigger`, `given`/`when capture` | yes | Screenplay 4.61 or later yes (standalone, cratis 3.28.2 or later); a cratis before 3.28.2 bundle no (see versions.md) | no |
23
+ | `given clock` / `when clock`, `when trigger`, `given`/`when capture` | yes | yes (standalone and any current cratis; history: a cratis before 3.28.2 bundle no, see versions.md) | no |
23
24
  | Command spec listing reaction cascade events | yes (v6 semantics) | false PLAY0285 on a cratis before 3.28.2 bundle only; see SKILL.md "Version skew" | no (no reactions) |
24
- | `generated <name> = <value>` under `when`, `then returns` (ESM v7) | yes | yes on standalone Screenplay 4.68.0 or later; not on the 4.66.0 bundled in cratis 3.28.x (`PLAY0268`) | historically no at Stage 4.24.x; check current target admission |
25
+ | `generated <name> = <value>` under `when`, `then returns` (ESM v7) | yes | yes on standalone Screenplay 4.68.0 or later and the current cratis bundle (history: PLAY0268 on the 4.66.0 bundled in cratis 3.28.x) | no: Stage 4.73.1 admits v7 but refuses generated values (STAGE-ESM-028) and responses / `then returns` (STAGE-ESM-029); the spec pins the contract of a hand-written command |
25
26
  | `then events in any order` | yes | yes | yes |
26
27
  | Event `stream` / `no stream`, typed `for` and stream ids | yes | ESM v8 at 4.125.0 | The pinned CLI reaches Stage route checks (toolchain `references/versions.md`); routed read-model/query replay can still refuse STAGE-ESM-030 |
27
28
  | Typed examples and overrides | yes | expanded and type-checked before binding; required fields remain required | depends on expanded contract, not fixture reuse |
@@ -34,8 +35,8 @@ Typed example/override forms: `cratis-screenplay-specifications`
34
35
 
35
36
  ## Design mode
36
37
  Write the full intended behaviour, including scenarios the executable subset cannot run
37
- (list views; clock, trigger and capture scenarios when only a cratis before 3.28.2
38
- bundle is available). Mark each such spec in the coverage matrix as
38
+ (filtered, scoped and performer-backed views; clock, trigger and capture scenarios when only a
39
+ cratis before 3.28.2 bundle is available). Mark each such spec in the coverage matrix as
39
40
  `gap: <reason>` for the narrower modes so the verification and render phases know what will not execute.
40
41
 
41
42
  ## Executable mode
@@ -53,7 +54,7 @@ bundle is available). Mark each such spec in the coverage matrix as
53
54
  - Specs use given events, a command `when`, and then events / readmodel / query / error /
54
55
  denied. No `when append` or `then no readmodel`. `given readmodel` appears only in the
55
56
  query-only lookup below.
56
- - Query-only specs (no command `when`) are admitted by Stage v4.24.0 in exactly two cases, and
57
+ - Query-only specs (no command `when`) are admitted by Stage v4.24.0 in exactly two cases (a v4.24.0 reading, not re-probed at 4.73.1), and
57
58
  `when query` and `then query` are the same case: Screenplay normalises `when query` to the
58
59
  `then query` model, so the spelling never decides admission.
59
60
  - Denial: `given caller` (no role claims), no given events or read models, one query under a
@@ -68,7 +69,7 @@ bundle is available). Mark each such spec in the coverage matrix as
68
69
  executable, not renderable).
69
70
  - Prove projections with `given` events + `when <Command>` + `then query` (or `then readmodel`).
70
71
  Removal has no admitted form: record it as a gap for renderable scope.
71
- - A `then error` must name a constraint or rule that is actually rendered. Stage v4.24.0 admits
72
+ - A `then error` must name a constraint or rule that is actually rendered. Stage v4.24.0 (historical reading) admits
72
73
  a value constraint only when each target is a single, required, text-typed property (not
73
74
  composite, optional, collection or nontext), and rejects a command that produces more than one
74
75
  event affected by the same value constraint (claims or releases) in one batch. The number of
@@ -59,8 +59,9 @@ candidate for a family. Walk one row through three states (`OpenInvoices`: empty
59
59
  `InvoiceIssued`, empty again after `PaymentReceived`) as three independent specs, each with its
60
60
  own full givens. The excerpt is copied from `invoicing-dues-example.md`; the last spec asserts
61
61
  both that the stored row is gone and that the keyed query returns nothing. The whole-list query
62
- (no key) is a design-mode expectation here: a list-query collection check does not run on the
63
- reference route, so record it in the matrix rather than asserting it.
62
+ (no key) is executable too (Screenplay 4.105.0 or later): `invoicing-dues-example.md` adds
63
+ `ListOpenInvoices => OpenInvoice[]` with one spec that expects one `result` row and one that
64
+ expects the empty list after `PaymentReceived`. Only `filter`, `scoped to` and `performer` queries stay design-mode.
64
65
  The source document also asserts the other terminal outcomes (`InvoiceVoided`, `InvoiceSettled`) the same way; they are not copied here.
65
66
  ```screenplay excerpt parent=references/invoicing-dues-example.md#1
66
67
  specification OpenInvoicesLifecycle1Empty
@@ -119,8 +120,9 @@ Keep three claims apart:
119
120
  - a query returns no rows: `then query` without `result`, or `when query` + `then no result`;
120
121
  - a list-valued property is empty: assert that property as `[]`.
121
122
  List-query results use repeated `result` blocks; count and order are exact. A keyed lookup does
122
- not prove an entire list is empty. Keep the list contract in design mode and record the
123
- execution/rendering limit.
123
+ not prove an entire list is empty: assert the unkeyed list query itself (an unkeyed query takes no
124
+ `arguments`; each `result` row states the read-model identifier, else PLAY0351). A snapshot list does not render
125
+ (`STAGE-ESM-010`, Stage 4.73.1); an `observable` list does. Record that rendering limit.
124
126
 
125
127
  ## Ordering, lag and rebuild
126
128
  - **Out of order across sources**: if a joined or cross-context fact can arrive first, add a
@@ -31,5 +31,5 @@ SOFTWARE.
31
31
 
32
32
  This skill also adapts material from agentic-engineer by Martin Dilger and Nebulit GmbH
33
33
  (https://github.com/Nebulit-GmbH/agentic-engineer, commit 07b0f30648d663cb588d7e2c7aa031af9dfc21f2;
34
- https://nebulit.de), used with the agreement of Martin Dilger and Nebulit GmbH. That repository
35
- carries no licence file; the adapted material remains credited to Martin Dilger and Nebulit GmbH.
34
+ https://nebulit.de), used with the explicit consent of Martin Dilger and Nebulit GmbH. The adapted
35
+ material remains credited to Martin Dilger and Nebulit GmbH.
@@ -81,9 +81,9 @@ report and slice `documentation`, and continue.
81
81
  over stored state is written as `reads <View>` + `require ... message "..."` and marked
82
82
  **NOT enforced in the model today** in the slice `description`, with its target named (Arc
83
83
  `[ProtectedDecision]` + `DecisionRead<T>` on Arc 22.39.0+ (available to gap-fill
84
- code with Stage 4.51.3's Arc 22.50.5/Chronicle 19.32.0); Chronicle DCB; or a constraint). Never copy state
85
- into the command as input or hide a rule in `handler` / hint prose; descriptions are not
86
- rendered (Stage#178). Fill the **refusal inventory**: success, each distinct refusal with
84
+ code with Stage 4.73.1's Arc 22.68.0/Chronicle 19.45.0); Chronicle DCB; or a constraint). Never copy state
85
+ into the command as input or hide a rule in `handler` / hint prose; descriptions reach code
86
+ only as XML comments (Stage#178). Fill the **refusal inventory**: success, each distinct refusal with
87
87
  layer and message, and the denied persona.
88
88
  4. **Name and shape the event.** Past tense, the specific change that became true
89
89
  (`LockerRelocated`, `VolumeCorrected`); never `XUpdated`/`Changed`/`Edited`/`Saved`/
@@ -265,6 +265,7 @@ Examples compile with `screenplay` 4.68.0 `--warnaserror` and `cratis screenplay
265
265
  - `references/command-inventory.md` - command card, interview questions, refusal inventory.
266
266
  - `references/review-questions.md` - design review questions.
267
267
  - `references/rule-layers.md` - rule placement, executable authorization, PII.
268
+ - `references/derived-condition-events.md` - read when a computed condition might deserve its own event: the test, who produces it, which causes to fold.
268
269
  - `references/field-lineage.md` - origins per element, matrix, reason lines, chain edits.
269
270
  - `references/read-model-design.md` - components, fan-in, list vs keyed, singletons, scope.
270
271
  - `references/slicing.md` - slice naming, dependencies, state table, generic edits, coverage,
@@ -76,7 +76,7 @@ Rules for filling it:
76
76
  as a gap. Persona description text is intent only.
77
77
  - A refusal that depends on stored state is a row marked **NOT enforced in the model today**
78
78
  with its target (Arc `[ProtectedDecision]` + `DecisionRead<T>` where Arc 22.39.0 or later is
79
- available, including Stage 4.51.3's rendered package set for gap-fill, not emitted
79
+ available, including Stage 4.73.1's rendered package set for gap-fill, not emitted
80
80
  protection; Chronicle DCB, or a
81
81
  constraint). It still gets a spec row, because the intended behaviour is the contract.
82
82
  - A decided refusal never goes to open questions: it goes here, then to scenarios.
@@ -102,7 +102,7 @@ Rules for filling it:
102
102
  | AssignLocker | caller is not an attendant | `authorize IsAttendant` | denied: Customer | RefusingACustomerAssigningALocker |
103
103
  | AssignLocker | locker already has a request | constraint `OneRequestPerLocker` | "The locker is already assigned" | AppendingASecondAssignmentOfALocker (`when append`: the command's own `require` would reject first) |
104
104
  | AssignLocker | request already has a locker | constraint `OneLockerPerRequest` | "The request already has a locker" | gap |
105
- | AssignLocker | locker is not free | `reads` + `require`, NOT enforced today | "The locker is not free"; target: `[ProtectedDecision]` (Arc 22.39.0+; available to Stage 4.51.3 gap-fill, not emitted protection) or DCB on the locker stream | RejectingASecondAssignmentOfALocker (pins the message; blocked until the target exists) |
105
+ | AssignLocker | locker is not free | `reads` + `require`, NOT enforced today | "The locker is not free"; target: `[ProtectedDecision]` (Arc 22.39.0+; available to Stage 4.73.1 gap-fill, not emitted protection) or DCB on the locker stream | RejectingASecondAssignmentOfALocker (pins the message; blocked until the target exists) |
106
106
  | AssignLocker | request is not waiting | `reads` + `require`, NOT enforced today | "The request is not waiting for a locker" | gap (same) |
107
107
  | LockerById, ListLockers | caller is anonymous | module `authorize IsAuthenticated` | denied: no caller | RefusingAnAnonymousLockerLookup, RefusingAnAnonymousLockerList |
108
108
  | RequestById | caller is anonymous | module `authorize IsAuthenticated` | denied: no caller | RefusingAnAnonymousRequestLookup |
@@ -0,0 +1,68 @@
1
+ # Derived-condition events
2
+
3
+ Read this when a view computes a condition that something else in the process might act on
4
+ ("is this berth free right now", "has this application reached its next stage"), or when a read
5
+ model draws on many events and you ask whether one named fact is hiding behind them. It is a
6
+ business-modeling question, separate from the fan-in signal in `read-model-design.md`. Adapted
7
+ from Martin Dilger and Nebulit GmbH's orchestrating skill (see `provenance.md`), translated to
8
+ `reaction` and `produces`.
9
+
10
+ ## The question
11
+
12
+ **Is this fact worth a new event?**
13
+
14
+ A derived condition earns its own event when both hold:
15
+ 1. A domain expert would recognize and name it in its own right ("the berth was released"), not
16
+ just as a field someone computes.
17
+ 2. A later step needs it: another automation would react to it, another module would subscribe,
18
+ or a downstream process must start from it.
19
+
20
+ If both hold, record it as its own event and let the projection and the downstream steps consume
21
+ that event, instead of recomputing the condition from several raw events everywhere.
22
+
23
+ If the condition is only displayed and nothing would ever act on it, it stays a read-model field
24
+ derived from the raw events, however wide the resulting fan-in looks. No new event is needed.
25
+
26
+ ## It is not a fan-in fix
27
+ A read model that ends up fed by many events is at most a prompt to ask the question; it is never
28
+ the reason to answer it either way. The question is worth asking whatever the event count. Wide
29
+ fan-in on one field is handled by the checks in `read-model-design.md` ("Fan-in per field").
30
+
31
+ ## Who produces the event
32
+ The derived fact is established by something that notices the condition, so it is produced by an
33
+ Automation slice: a `reaction` that listens for the raw events that can cause the outcome and
34
+ `produces` the new event (or `invokes` a command that does). Decide the shape by the usual
35
+ automation test (`cratis-screenplay-automations-and-translations`):
36
+ - An immediate, internal, always-possible reaction needs no pending-work view when its reason is
37
+ recorded.
38
+ - Work that can wait, retry, fail or need people gets a pending-work view and a terminal fact, as
39
+ for any automation.
40
+ - A reaction that both `reads` and `produces` directly fails binding (`PLAY0268`, decision 0006).
41
+ When deriving the condition needs stored state, the reaction `invokes` a command that holds the
42
+ `reads` and the decision, and that command produces the event. A reaction that `produces`
43
+ directly may decide only from the triggering event's own fields.
44
+
45
+ ## Fold only redundant causes
46
+ The causes of a derived condition usually fall into two groups:
47
+ - **Redundant for the outcome.** Several events that mean the same thing to the business
48
+ (`BerthReservationReleased`, `BoatDeparted`, `BerthReturnedFromRepair` all mean "the berth is
49
+ free again"). These are safe to consolidate: one `BerthMarkedFree` collapses N reasons into one
50
+ reusable signal without losing information.
51
+ - **Distinct meanings the business still tells apart.** `BerthReserved`, `BoatArrived`,
52
+ `BerthSentForRepair`, `BerthWithdrawn` each say why the berth is not free. Do not collapse them
53
+ into a generic `BerthMarkedUnavailable`: that erases the why, and a downstream consumer may need
54
+ it. Leave them as separate events; the fan-in that remains is not a defect, it means the events
55
+ are individually meaningful.
56
+
57
+ Collapsing the second group is the modeling mistake, not the wide fan-in. Never rename or merge
58
+ persisted events to tidy a view (`cratis-screenplay-streams-and-consistency` `references/evolution.md`).
59
+
60
+ ## Do not record clock-relative state
61
+ "Overdue", "expired" and "due in 3 days" change with the clock, not with a fact. Store the
62
+ deadline and compare at the query or screen edge. Record an event only when passing the deadline
63
+ is itself a business fact (a fee charged, a reminder sent), produced by a clock-triggered
64
+ reaction. See `read-model-design.md`, "No clock-relative state".
65
+
66
+ ## Record the decision
67
+ Where the reason matters later, put it in the owning slice's `documentation`: which derived
68
+ condition, why it is (or is not) a fact worth an event, and which causes were folded and why.
@@ -21,7 +21,7 @@ event field goes nowhere, ask why it is recorded (audit and history are valid an
21
21
  | the user types or picks it | screen `action`, form or dialog input | default for business decisions |
22
22
  | shown before the user acts | form `populate via query` from a read model | the read model must exist and be traced |
23
23
  | the instance being acted on | the `identifier` property, carried from the screen row or route | |
24
- | allocated by the runtime | `Type generated` on a required `Uuid`-backed concept (ESM v7: binds and runs on standalone Screenplay 4.68.0, `PLAY0268` on the 4.66.0 bundled in cratis 3.28.x, not rendered by Stage 4.24.2; no concept rules) | never a request input or form field; no policy, rule or requirement may read it (`PLAY0273`); return it with `returns`; where a tool cannot bind it, executable scope needs explicit allocation |
24
+ | allocated by the runtime | `Type generated` on a required `Uuid`-backed concept (ESM v7: binds and runs on standalone Screenplay 4.68.0 and later, including the 4.137.0 bundled in CLI 3.53.1 (`PLAY0268` on the 4.66.0 bundled in cratis 3.28.x); Stage 4.73.1 refuses it with STAGE-ESM-028; no concept rules) | never a request input or form field; no policy, rule or requirement may read it (`PLAY0273`); return it with `returns`; where a tool cannot bind it, executable scope needs explicit allocation |
25
25
  | an outside party | capture field `$.x` or a reaction trigger value | `cratis-screenplay-automations-and-translations` |
26
26
  | the caller | not an input: `$context.identity.*` in `produces`; who may act in `authorize`; "acting on own X" is a claim policy matched to the identifier or a command property | never trust a caller-supplied "who am I" |
27
27
 
@@ -1,8 +1,7 @@
1
1
  # Provenance
2
2
 
3
3
  Sources are pinned. TrogonStack/agentskills is MIT, Copyright (c) 2025 Straw Hat, LLC (full
4
- notice in this skill's `LICENSE`). agentic-engineer by Martin Dilger and Nebulit GmbH carries no licence file; its material is adapted with
5
- the agreement of Martin Dilger and Nebulit GmbH (see *Adapted closely* below).
4
+ notice in this skill's `LICENSE`). agentic-engineer by Martin Dilger and Nebulit GmbH is used with their explicit consent (see *Adapted closely* below).
6
5
  Event Modeling practice (Adam Dymitruk, Martin Dilger) is cited as practice; no text taken.
7
6
 
8
7
  | Item | Source | Licence | Treatment | Where in this skill |
@@ -15,11 +14,10 @@ Event Modeling practice (Adam Dymitruk, Martin Dilger) is cited as practice; no
15
14
  | Slice dependency record (events consumed, producing slice) | TrogonStack/agentskills@7b249d3:.../eventmodeling-slicing-event-models/SKILL.md | MIT | ADAPT as a table | references/slicing.md |
16
15
  | Generic-edit ban, rule coverage, state-transition table, rule layers, refusal inventory, worked example | Cratis/AI corpus (original) | MIT | original | references/*.md |
17
16
 
18
- ## Adapted closely (Martin Dilger and Nebulit GmbH, with agreement)
17
+ ## Adapted closely (Martin Dilger and Nebulit GmbH)
19
18
 
20
19
  Source: https://github.com/Nebulit-GmbH/agentic-engineer at commit `07b0f30648d663cb588d7e2c7aa031af9dfc21f2`,
21
- by Martin Dilger and Nebulit GmbH (https://nebulit.de). The repository carries no licence file; this material
22
- is adapted with the agreement of Martin Dilger and Nebulit GmbH.
20
+ by Martin Dilger and Nebulit GmbH (https://nebulit.de), used with the explicit consent of Martin Dilger and Nebulit GmbH.
23
21
 
24
22
  | Source file | Used in | How |
25
23
  |---|---|---|
@@ -39,3 +37,5 @@ is adapted with the agreement of Martin Dilger and Nebulit GmbH.
39
37
  | `eventmodeling-designing-event-models/SKILL.md`: events as past-tense business facts, causality, state transitions | `SKILL.md` step 4; `references/slicing.md` state-transition table | idea; our own wording kept (our table is stricter) |
40
38
  | `storyboard-screen/SKILL.md`, `html-screen/SKILL.md`, `place-element/SKILL.md` | none | not adopted: board and HTML rendering mechanics; screen field mapping `derived:` already in `references/field-lineage.md` |
41
39
  | `.build-kit/.slices/restaurant/*/slice.json` | none in this skill | patterns only; passed to scenario coverage (spec example values that vary one rule) |
40
+ | `.claude/skills/eventmodeling-identifying-outputs/SKILL.md`, "Common Patterns": status, list, timeline and processor-decision view patterns | `references/read-model-design.md` "Common view patterns" | Adapted closely as a table over `readmodel`, projection and `query`; the pseudo-code blocks became prose |
41
+ | `.claude/skills/eventmodeling-orchestrating-event-modeling/SKILL.md`, "Recognizing a dedicated business event behind a derived condition": the "is this fact worth a new event" test, producing it by automation, fold only redundant causes, display-only conditions stay projections | `references/derived-condition-events.md` | Adapted closely; the todo-list translation pattern became a `reaction` that `produces` (a pending-work view only when the work can wait, retry or fail); the >3-events heuristic stays in `read-model-design.md`; board placement, 0,0-node scans and `validate_model` batch calls not adopted |
@@ -5,6 +5,7 @@
5
5
  - Start from the consumer
6
6
  - The typical slice pattern
7
7
  - Events or views
8
+ - Common view patterns
8
9
  - Components
9
10
  - Fan-in per field
10
11
  - Builder and freshness
@@ -71,6 +72,22 @@ and a recovery contract, or a pending-work view; only an immediate, internal, al
71
72
  effect may leave no trace
72
73
  (`cratis-screenplay-automations-and-translations`).
73
74
 
75
+ ## Common view patterns
76
+
77
+ Four shapes recur. Name the one a view is before choosing its fields, so the consumer and the
78
+ events line up.
79
+
80
+ | Pattern | Events feeding it | The view holds | Used for |
81
+ |---|---|---|---|
82
+ | Status view | The lifecycle events of one instance (booked, confirmed, arrived, cancelled) | The accumulated current state of that instance | A screen that shows where one thing stands and which actions are available |
83
+ | List view | Create, change and end events of many instances | One summary row per instance, with the fields people filter, sort or search by | Worklists, search, filtering; end events either `remove with` the row or set a status literal (see "Omissions are decisions") |
84
+ | Timeline or history view | Any events that carry a time | A chronological list, one entry per event, kept apart from the status view | History and audit trail; keep a growing history in its own view, never inside the status view |
85
+ | Processor decision view | The state-changing events a reaction cares about | Current state only, nothing a person would read | A `reaction` or `trigger` that reads it to decide the next action; a reaction that also `produces` directly cannot `reads` it (`PLAY0268`), so it `invokes` a command that holds the `reads` (a pending-work view is this pattern for work that can wait, retry or fail) |
86
+
87
+ The patterns describe what the view is for, not new syntax: each is a `readmodel`, a projection
88
+ and, where a person or caller reads it, a `query`. A view that fits two patterns at once is
89
+ usually two views.
90
+
74
91
  ## Components
75
92
 
76
93
  - A component is an area of a screen a person would describe as one thing ("the locker list",
@@ -1,7 +1,7 @@
1
1
  # Rule layers
2
2
 
3
- Put each rule in the lowest layer where it is true for every caller. Descriptions never reach
4
- rendered code (Stage#178): a rule that exists only in prose is unenforced in rendered scope.
3
+ Put each rule in the lowest layer where it is true for every caller. Descriptions reach rendered
4
+ code only as XML doc comments (Stage#178): a rule that exists only in prose is unenforced in rendered scope.
5
5
 
6
6
  | Rule is about | Layer | Notes |
7
7
  |---|---|---|
@@ -9,13 +9,13 @@ rendered code (Stage#178): a rule that exists only in prose is unenforced in ren
9
9
  | a predicate that is not a comparison (checksum, registry format) | `rule <Name>` on the property or concept | design mode; blocks V3 (PLAY0268) |
10
10
  | this command's own inputs | command `validate` / `require` | a rule that applies only sometimes is an implication: `require a == false or b > c` |
11
11
  | who may ask | `authorize` with a policy (role, claim, authenticated) | enclosing gates combine with AND and run first. Gates every command and query in a feature shares go on the feature or module so a new path inherits them |
12
- | whose instance | policy `claim "x" matches subject` (the command identifier) or `matches <command property>` | executable; renders only for text-backed subjects (Uuid: STAGE-ESM-015) |
12
+ | whose instance | policy `claim "x" matches subject` (the command identifier) or `matches <command property>` | executable; renders for text, Uuid, Date and DateTime subjects; an authorized command needs exactly one identifier (STAGE-ESM-015 otherwise) |
13
13
  | uniqueness, once-only facts | `constraint` (`unique ... on`, `unique event`) | append-time; the constraint name is its identity |
14
- | stored state (record exists, balance, current status) | `reads <View>` + `require <expr> message "..."` | stated intent, **NOT enforced in the model today** (PLAY0268/0271 at binding are expected in design mode; Screenplay#129/#209). Name the target: Arc `[ProtectedDecision]` + `DecisionRead<T>` (Arc 22.39.0 or later), Chronicle DCB (`concurrency` scope), or a constraint |
14
+ | stored state (record exists, balance, current status) | `reads <View>` + `require <expr> message "..."` | stated intent, **NOT enforced in the model today** (PLAY0268/0271 at binding are expected in design mode; Screenplay#129). Name the target: Arc `[ProtectedDecision]` + `DecisionRead<T>` (Arc 22.39.0 or later), Chronicle DCB (`concurrency` scope), or a constraint |
15
15
 
16
16
  An unguarded materialized read is unsafe for a protected decision; a guarded read is the
17
17
  supported route. Availability: `[ProtectedDecision]` and `DecisionRead<T>` exist in
18
- Stage 4.51.3's Arc 22.50.5/Chronicle 19.32.0 package set, but Stage does not emit
18
+ Stage 4.73.1's Arc 22.68.0/Chronicle 19.45.0 package set, but Stage does not emit
19
19
  protected decisions. Gap-fill must use an admitted projection/key shape and active
20
20
  unit-of-work enrollment; do not edit managed dependencies. Keep the `.play` rule
21
21
  NOT enforced until its target enforcement is separately verified. Forbidden: caller-supplied copies of state in `require`, boolean attestation
@@ -33,7 +33,7 @@ second caller with another claim value.
33
33
 
34
34
  Command property values are, by default, recorded in the causation chain of the events they
35
35
  produce, so treat them as permanent. Newer Chronicle versions can omit causation properties
36
- (`CausationPropertyRetention.Omit`, Chronicle v19.32.0); Stage 4.51.3 rendered apps pin 19.32.0.
36
+ (`CausationPropertyRetention.Omit`, Chronicle v19.32.0); Stage 4.73.1 rendered apps pin 19.45.0 (the latest Chronicle is 19.50.0).
37
37
  Verify the actual auditing and retention configuration before relying on omission, and never
38
38
  audit secrets. Classify personal values as bare `pii` and operational secrets as
39
39
  `secret` on their concepts, never the identifier concept. Use a surrogate identity
@@ -19,8 +19,8 @@ and record lineage reasoning in fenced Markdown `documentation` (`field-lineage.
19
19
  The historical source below stays unchanged; it is not the current placement recipe.
20
20
 
21
21
  The excerpt's Stage availability note is historical (Stage 4.24.x, Arc 22.25.0).
22
- Stage 4.51.3 pins Arc 22.50.5/Chronicle 19.32.0, so protected-read APIs are available
23
- to gap-fill; this neither admits these `.play` rules nor proves target protection.
22
+ Stage 4.73.1 pins Arc 22.68.0/Chronicle 19.45.0, so protected-read APIs are available
23
+ to gap-fill (the compiled description below saying they are "not available in Stage-rendered apps" is superseded); this neither admits these `.play` rules nor proves target protection.
24
24
  The original compiled excerpt is retained unchanged.
25
25
 
26
26
  ```screenplay expect PLAY0516 test=unbound
@@ -168,7 +168,7 @@ module Lockers
168
168
  then denied
169
169
 
170
170
  slice StateChange AssignLocker
171
- description "The attendant gives one waiting request one free locker. Constraints enforce one holder per locker and one locker per request at append time. The state rules (the locker is installed and free, the request exists and is still waiting) are written as reads plus require: stated intent, NOT enforced in the model today (PLAY0268/0271 at binding are expected in design mode; Screenplay#129 and #209). Target enforcement: Arc [ProtectedDecision] with DecisionRead<T> (Arc 22.39.0 or later; not available in Stage-rendered apps, where this stays a capability gap), or a Chronicle DCB concurrency scope on the locker stream; the constraints stay as the backstop."
171
+ description "The attendant gives one waiting request one free locker. Constraints enforce one holder per locker and one locker per request at append time. The state rules (the locker is installed and free, the request exists and is still waiting) are written as reads plus require: stated intent, NOT enforced in the model today (PLAY0268/0271 at binding are expected in design mode; Screenplay#129). Target enforcement: Arc [ProtectedDecision] with DecisionRead<T> (Arc 22.39.0 or later; not available in Stage-rendered apps, where this stays a capability gap), or a Chronicle DCB concurrency scope on the locker stream; the constraints stay as the backstop."
172
172
  command AssignLocker
173
173
  lockerId LockerId identifier
174
174
  requestId RequestId
@@ -124,7 +124,8 @@ for synthesis refusals, selection, provenance and a complete passing model.
124
124
  | `then events in any order` | compare the new events without regard to order |
125
125
  | `then readmodel <ReadModelType> [exactly]` | read-model state afterwards — must state the identifier |
126
126
  | `then no readmodel <ReadModelType> for <key>` | exactly that keyed instance is absent (v4.66.0); the key is concrete and typed |
127
- | `then query <Query> [exactly]` | query results for explicit `arguments`; one `result` per row; none means empty |
127
+ | `then query <Query> [exactly]` | query results for explicit `arguments` (none for an unkeyed list); one `result` per row, each stating the identifier; none means empty |
128
+ | `file <path>` | optional, once: the repository-relative file realizing the specification |
128
129
  | `then error "<message>"` | a validation or constraint rejection, for that reason; a localized rule is pinned by its quoted key, `then error "$strings.<key>"` |
129
130
  | `then error` | a validation or constraint rejection, reason unnamed |
130
131
  | `then denied` | an authorization denial (`Unauthorized`) |
@@ -158,7 +159,7 @@ Rules the binder enforces:
158
159
  - **`null` only in optional read-model values.** A `null` in a command or event
159
160
  value is `PLAY0350`: an optional fact is a separate event.
160
161
 
161
- `PLAY0358` is a syntax error. `PLAY0350`, `PLAY0352`, `PLAY0388`, `PLAY0389` and
162
+ `PLAY0358` is a syntax error (`PLAY0388` also at parse time for extra text after `then denied`). `PLAY0350`, `PLAY0352`, `PLAY0388` (mixed with another outcome), `PLAY0389` and
162
163
  the one-rejection rule (`PLAY0273`) are reported only when the model binds, so
163
164
  `screenplay --warnaserror` does not show them. Check executable diagnostics
164
165
  (the MCP authoring tools) as well.
@@ -221,8 +222,9 @@ stream ids are not guessed. Read [examples and routes](references/examples-and-r
221
222
 
222
223
  `given operation ... fails`, `then operation` and `then compensated` describe
223
224
  future external-work behavior. Reaction refusal branches, `when redelivered`
224
- and `then no events` are also authoring-only: compile them, but report their
225
- PLAY0268 binding refusal instead of an executed result. Preserve the contract.
225
+ and `then no events` (PLAY0268, #433) are also authoring-only: compile them, but report their
226
+ PLAY0268 binding refusal instead of an executed result. Preserve the contract; a read-model or
227
+ query assertion states a zero-fact outcome.
226
228
 
227
229
  ## Rejections and denials say different things
228
230
 
@@ -88,7 +88,8 @@ cannot be changed back to a wildcard. Literal compatibility/route contradiction
88
88
  checks use resolved source/stream types, not guessed text (PLAY0547–PLAY0551).
89
89
  At Screenplay 4.127.0, route literals must be nonempty, well-formed NFC text
90
90
  (refused, not normalized); Double integer ids are within ±(2^53−1), while Exact
91
- has no such bound but remains unadmitted. Invalid specification routes report
91
+ has no such bound but the `numbers exact` source mode remains unadmitted (PLAY0268; exact lowering of
92
+ qualifying Double literals is the separate, admitted v11). Invalid specification routes report
92
93
  PLAY0549. Contradictions compare canonical scalar ids and every composite part,
93
94
  so UUID casing is immaterial. Composite mappings supply each named part once,
94
95
  using literals only; encoding escapes `%`/`|` and preserves declaration order.
@@ -1,7 +1,8 @@
1
1
  ## Generated fixtures and return expectations (ESM v7)
2
2
 
3
- Standalone `screenplay` 4.68.0 or later binds and runs these; the cratis CLI 3.28.3 (bundled 4.66.0) does not
4
- bind them, and Stage does not render ESM v7 yet (`STAGE-ESM-016`, tracked in Stage#201), so they pin the
3
+ Standalone `screenplay` 4.68.0 or later binds and runs these, and so does the current cratis bundle (the
4
+ cratis 3.28.3 bundle, 4.66.0, did not); Stage 4.73.1 admits ESM v7 but refuses generated values
5
+ (`STAGE-ESM-028`) and responses (`STAGE-ESM-029`; Stage#175), so they pin the
5
6
  contract of a hand-written command. The model and rules are in `cratis-screenplay-command-surface`; the
6
7
  complete example is `cratis-screenplay-toolchain` `references/generated-responses-example.md`. Read that file when writing generated-value fixtures or scalar and record return expectations and needing a complete reference-executable model.
7
8
 
@@ -37,6 +37,9 @@ denial still uses `then denied`; a visitor persona is not an anonymous caller.
37
37
 
38
38
  ## Case tables
39
39
 
40
+ Two diagnostics to know: `PLAY0588` (warning) for a declared parameter no step references, and `PLAY0585`
41
+ (error) when an optional parameter feeds a required target.
42
+
40
43
  Use tables for validation matrices whose steps stay the same. Rows are **cases**,
41
44
  not examples: `example` means a named typed fixture. This complete model's five
42
45
  expanded specifications pass in the 4.127.0 reference runner: