@cratis/pi 7.138.0 → 7.139.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 (81) hide show
  1. package/package/corpus/hooks/README.md +14 -4
  2. package/package/corpus/hooks/scripts/cratis-guard-shell-writes.sh +24 -6
  3. package/package/corpus/hooks/scripts/cratis-guard-writes.sh +48 -14
  4. package/package/corpus/skills/cratis-application-slice-conformance/references/worked-example.md +2 -0
  5. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/public-events-and-direction.md +2 -0
  6. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/statemachines-and-workflows.md +12 -1
  7. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/todo-list-example.md +2 -0
  8. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translate-example.md +2 -0
  9. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/complete-examples.md +4 -0
  10. package/package/corpus/skills/cratis-screenplay-command-surface/references/compliance.md +2 -0
  11. package/package/corpus/skills/cratis-screenplay-command-surface/references/constraints-produces-concurrency.md +2 -0
  12. package/package/corpus/skills/cratis-screenplay-command-surface/references/date-comparisons.md +2 -0
  13. package/package/corpus/skills/cratis-screenplay-command-surface/references/described-handlers.md +2 -0
  14. package/package/corpus/skills/cratis-screenplay-command-surface/references/enum-numbers.md +2 -0
  15. package/package/corpus/skills/cratis-screenplay-command-surface/references/inline-events.md +2 -0
  16. package/package/corpus/skills/cratis-screenplay-command-surface/references/operations.md +2 -0
  17. package/package/corpus/skills/cratis-screenplay-command-surface/references/policy-persona-seed.md +2 -0
  18. package/package/corpus/skills/cratis-screenplay-command-surface/references/protected-reads.md +2 -0
  19. package/package/corpus/skills/cratis-screenplay-command-surface/references/shop-generation.md +4 -0
  20. package/package/corpus/skills/cratis-screenplay-command-surface/references/uuid-equality.md +6 -0
  21. package/package/corpus/skills/cratis-screenplay-discovery/references/event-naming.md +2 -0
  22. package/package/corpus/skills/cratis-screenplay-discovery/references/personas-and-causes.md +2 -0
  23. package/package/corpus/skills/cratis-screenplay-event-modeling/references/invoicing-example.md +2 -0
  24. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/intent-example.md +4 -0
  25. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/re-entry-and-passes.md +4 -0
  26. package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +2 -2
  27. package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +2 -0
  28. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +2 -1
  29. package/package/corpus/skills/cratis-screenplay-model-authoring/references/screen-authoring-workflow.md +28 -25
  30. package/package/corpus/skills/cratis-screenplay-model-review/references/walkthrough.md +2 -0
  31. package/package/corpus/skills/cratis-screenplay-model-review/references/worked-example.md +8 -0
  32. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/SKILL.md +5 -1
  33. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/version-migration.md +50 -0
  34. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/worked-example.md +2 -0
  35. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/verification.json +2 -0
  36. package/package/corpus/skills/cratis-screenplay-projections/references/reducer-identity.md +4 -0
  37. package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +5 -4
  38. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +2 -2
  39. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/worked-example.md +2 -0
  40. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/berth-reservations.md +6 -0
  41. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-design.md +7 -0
  42. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-example.md +9 -0
  43. package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +8 -0
  44. package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md +2 -0
  45. package/package/corpus/skills/cratis-screenplay-slice-design/references/field-lineage.md +2 -1
  46. package/package/corpus/skills/cratis-screenplay-slice-design/references/model-reasoning.md +2 -0
  47. package/package/corpus/skills/cratis-screenplay-slice-design/references/read-model-design.md +2 -0
  48. package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +2 -0
  49. package/package/corpus/skills/cratis-screenplay-specifications/references/concept-rules.md +2 -0
  50. package/package/corpus/skills/cratis-screenplay-specifications/references/examples-and-routes.md +2 -0
  51. package/package/corpus/skills/cratis-screenplay-specifications/references/persona-callers-and-cases.md +2 -0
  52. package/package/corpus/skills/cratis-screenplay-specifications/references/reactions-and-cascades.md +2 -0
  53. package/package/corpus/skills/cratis-screenplay-specifications/references/whitespace-rules.md +4 -0
  54. package/package/corpus/skills/cratis-screenplay-specifications/references/worked-example.md +2 -0
  55. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution-example.md +6 -0
  56. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/multi-service-models.md +2 -0
  57. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +8 -0
  58. package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +1 -0
  59. package/package/corpus/skills/cratis-screenplay-toolchain/references/automation-translate-example.md +2 -0
  60. package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet-example.md +6 -0
  61. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostic-arguments.md +1 -1
  62. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +1 -1
  63. package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-example.md +2 -0
  64. package/package/corpus/skills/cratis-screenplay-toolchain/references/generated-responses-example.md +4 -0
  65. package/package/corpus/skills/cratis-screenplay-toolchain/references/generation-strategies-example.md +4 -0
  66. package/package/corpus/skills/cratis-screenplay-toolchain/references/language-admission.md +1 -1
  67. package/package/corpus/skills/cratis-screenplay-toolchain/references/pdl-example.md +16 -0
  68. package/package/corpus/skills/cratis-screenplay-toolchain/references/production-routes-and-filters.md +2 -0
  69. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +6993 -2979
  70. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
  71. package/package/corpus/skills/cratis-screenplay-toolchain/references/sources-and-streams.md +2 -0
  72. package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +55 -70
  73. package/package/corpus/skills/cratis-screenplay-ui-composition/references/action-subjects.md +4 -1
  74. package/package/corpus/skills/cratis-screenplay-ui-composition/references/application-shell.md +304 -136
  75. package/package/corpus/skills/cratis-screenplay-ui-composition/references/screen-composition-contract.md +46 -31
  76. package/package/corpus/skills/cratis-screenplay-ui-composition/references/ui-profile-and-theme.md +2 -2
  77. package/package/corpus/skills/cratis-screenplay-ui-composition/verification.json +9 -9
  78. package/package/corpus/skills/cratis-specification-by-example/SKILL.md +2 -0
  79. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/case-tables-and-whole-numbers.md +4 -0
  80. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/render-example.md +4 -0
  81. package/package.json +1 -1
@@ -138,6 +138,8 @@ module Billing
138
138
  invoiceId InvoiceId identifier
139
139
  authorize CanManage
140
140
  produces event InvoiceCancelled
141
+ screen CancelInvoice
142
+ action CancelInvoice for screen
141
143
  specification CancellingAnInvoice
142
144
  given caller
143
145
  authenticated
@@ -218,6 +220,8 @@ module Billing
218
220
  produces event PaymentRecorded
219
221
  invoiceId InvoiceId = invoiceId // cross-stream reference is payload
220
222
  amount Decimal = amount
223
+ screen RecordPayment
224
+ action RecordPayment for screen
221
225
  specification RecordingAPayment
222
226
  given caller
223
227
  authenticated
@@ -252,6 +256,8 @@ module Housekeeping // no gates: this reaction
252
256
  // No command spec here: under ESM v6 it must list the ReminderSent cascade. The file is
253
257
  // RecordingAPayment's cascade: an older bundled compiler reported a false PLAY0285 here.
254
258
  // The cascade form: automation-translate-example.md (SubscribingAMember).
259
+ screen MarkOverdue
260
+ action MarkOverdue for screen
255
261
 
256
262
  slice Automation RemindOverdue
257
263
  reaction Reminder
@@ -57,7 +57,7 @@ a separate `case` names an expansion. Argument order is immaterial.
57
57
  | PLAY0791 | `profile`, `template` (the layout name) |
58
58
  | PLAY0792 | `profile`, `template`, `blueprint` |
59
59
  | PLAY0793 | `profile`, `template`, `blueprint`, `version` |
60
- | PLAY0795 | `profile`, `template`, `blueprint?`, `outlet` |
60
+ | PLAY0795 | `profile`, `template`, `blueprint?`, `slot` |
61
61
  | PLAY0796 | `profile`, `template`, `blueprint?`, `option` |
62
62
  | PLAY0797 | `profile`, `value` |
63
63
  | PLAY0800 | `subject` (required declaration: command) |
@@ -335,7 +335,7 @@ as errors if gating. Ordinary compile success does not imply these ran:
335
335
  | Family | Codes | Checks |
336
336
  | --- | --- | --- |
337
337
  | data-bindings | PLAY0530/0531 | Conflicting visible bindings; binding/query read-model or cardinality mismatch |
338
- | input-surfaces | PLAY0532/0533 | Missing command input form/issuing screen; missing reachable issuer |
338
+ | input-surfaces | PLAY0532 | Missing command input form/issuing screen. Since Screenplay 6, PLAY0533 (no reachable issuer) runs on every check and is no longer selected here |
339
339
  | field-origins | PLAY0534 | Missing read-model builder or top-level field origin (AutoMap, identity and variants considered) |
340
340
  | query-keys | PLAY0535 | Query argument not representable by known identity/fields |
341
341
  | event-consumers | PLAY0536 | Latest local event generation lacks an operational consumer; a terminal fact can legitimately be reported |
@@ -33,6 +33,8 @@ module Gallery
33
33
  insuredValue Decimal
34
34
  constraint UniqueArtworkTitle
35
35
  unique title on ArtworkRegistered
36
+ screen RegisterArtwork
37
+ action RegisterArtwork for screen
36
38
  specification RegisteringAnArtwork
37
39
  given caller
38
40
  authenticated
@@ -24,6 +24,8 @@ module Projects
24
24
  returns
25
25
  projectId = projectId
26
26
  receiptId ReceiptId = receiptId
27
+ screen Register
28
+ action RegisterProject for screen
27
29
  specification RegisteringReturnsIdentifiers
28
30
  when RegisterProject
29
31
  for "11111111-1111-1111-1111-111111111111"
@@ -41,6 +43,8 @@ module Projects
41
43
  produces event ProjectRenamed
42
44
  name ProjectName = name
43
45
  returns projectId
46
+ screen Rename
47
+ action RenameProject for screen
44
48
  specification RenamingReturnsIdentifier
45
49
  when RenameProject
46
50
  projectId = "11111111-1111-1111-1111-111111111111"
@@ -52,6 +52,8 @@ module Shop
52
52
  invoiceNumber InvoiceNumber = invoiceNumber
53
53
  pickupTicket TicketNumber = pickupTicket
54
54
  returns orderId
55
+ screen Place
56
+ action PlaceOrder for screen
55
57
  specification PlacesWithPinnedValues
56
58
  given clock "2026-10-02T09:00:00Z"
57
59
  when PlaceOrder
@@ -103,6 +105,8 @@ module Shop
103
105
  command ReserveReference
104
106
  reference TenantOrderReference generated
105
107
  returns reference
108
+ screen ReserveReference
109
+ action ReserveReference for screen
106
110
  specification UsesThePinnedReference
107
111
  when ReserveReference
108
112
  generated reference = "shop-eu:order_example"
@@ -34,7 +34,7 @@ exact language/semantic pairs; binding, reference execution and rendering are se
34
34
  | v35 | Reserved for handler result contract v2 (decision 0119); no construct selects it | | |
35
35
  | v36 | `statemachine` and `workflow` declarations (decision 0124; PLAY0834-PLAY0851) | Serializes `stateMachines` and `workflows`; specifications run them; earlier models keep their version and bytes | Stage refuses v36 models with `STAGE-ESM-016` |
36
36
 
37
- Constructs of decision 0098 with no executable-model content need no version: application-level toolbar buttons in the layout's `navigation topbar` region (`button <id> title "..." slice <Slice>` with an optional indented `authorize <Policy>`), and a capture over events that copies a list (`lines = $.lines`) or fans out with `children lines identified by sku`. Check `screenplay --version` against the release that admitted v29 and v30 before relying on them. Decision 0115 withdrew 0098's command specification that states the public event its outbound Translate slice publishes: a specification runs only its own slice, so the Translate slice states the public event in its own `when append` specification.
37
+ Constructs of decision 0098 with no executable-model content need no version: application-level hooks in a layout's actions outlet (`default <id> title "..." slice <Slice>` with an optional indented `authorize <Policy>`), and a capture over events that copies a list (`lines = $.lines`) or fans out with `children lines identified by sku`. Check `screenplay --version` against the release that admitted v29 and v30 before relying on them. Decision 0115 withdrew 0098's command specification that states the public event its outbound Translate slice publishes: a specification runs only its own slice, so the Translate slice states the public event in its own `when append` specification.
38
38
 
39
39
  ## Compiler and target minimums
40
40
 
@@ -31,6 +31,8 @@ module Shop
31
31
  produces event LineAdded
32
32
  lineNumber Int = 1
33
33
  sku String = "A-1"
34
+ screen PlaceOrder
35
+ action PlaceOrder for screen
34
36
  specification PlacingAnOrder
35
37
  when PlaceOrder
36
38
  orderId = "7a1c2e30-4b5d-4e6f-8a9b-0c1d2e3f4a5b"
@@ -58,6 +60,8 @@ module Shop
58
60
  lineNumber Int
59
61
  produces event LineRemoved
60
62
  lineNumber Int = lineNumber
63
+ screen RemoveLine
64
+ action RemoveLine for screen
61
65
  slice StateChange ShipOrder
62
66
  command ShipOrder
63
67
  orderId OrderId identifier
@@ -65,10 +69,14 @@ module Shop
65
69
  produces event Shipped
66
70
  carrier String = carrier
67
71
  produces event ShippingCleared
72
+ screen ShipOrder
73
+ action ShipOrder for screen
68
74
  slice StateChange CancelOrder
69
75
  command CancelOrder
70
76
  orderId OrderId identifier
71
77
  produces event OrderCancelled
78
+ screen CancelOrder
79
+ action CancelOrder for screen
72
80
  specification CancellingAnOrder
73
81
  given OrderPlaced
74
82
  for "7a1c2e30-4b5d-4e6f-8a9b-0c1d2e3f4a5b"
@@ -86,6 +94,8 @@ module Shop
86
94
  produces event CustomerRenamed
87
95
  name String = name
88
96
  produces event CustomerDeleted
97
+ screen RenameCustomer
98
+ action RenameCustomer for screen
89
99
  slice StateView OrderOverview
90
100
  readmodel OrderView
91
101
  orderId OrderId
@@ -137,6 +147,8 @@ module Work
137
147
  title String = title
138
148
  produces event IssueTitleCorrected
139
149
  title String = title
150
+ screen OpenIssue
151
+ action OpenIssue for screen
140
152
  slice StateChange OpenPullRequest
141
153
  command OpenPullRequest
142
154
  issueId IssueId identifier
@@ -144,6 +156,8 @@ module Work
144
156
  produces event PullRequestCreated
145
157
  produces event BuildCompleted
146
158
  status String = status
159
+ screen OpenPullRequest
160
+ action OpenPullRequest for screen
147
161
  slice StateView WorkItems
148
162
  readmodel BacklogItem
149
163
  issueId IssueId
@@ -178,6 +192,8 @@ module Bank
178
192
  produces event Withdrawn
179
193
  amount Decimal = amount
180
194
  produces event Frozen
195
+ screen Deposit
196
+ action Deposit for screen
181
197
  specification Depositing
182
198
  when Deposit
183
199
  accountId = "5d1f0c2e-8a47-4c1b-9b3e-6f2a7c9d1e10"
@@ -78,6 +78,8 @@ module Accounts
78
78
  streamId = period
79
79
  produces event BookRecorded
80
80
  for accountId
81
+ screen Book
82
+ action Book for screen
81
83
  slice Automation FollowBooking
82
84
  event Followed
83
85
  reaction Follow