@cratis/pi 7.138.1 → 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 (78) hide show
  1. package/package/corpus/skills/cratis-application-slice-conformance/references/worked-example.md +2 -0
  2. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/public-events-and-direction.md +2 -0
  3. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/statemachines-and-workflows.md +12 -1
  4. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/todo-list-example.md +2 -0
  5. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translate-example.md +2 -0
  6. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/complete-examples.md +4 -0
  7. package/package/corpus/skills/cratis-screenplay-command-surface/references/compliance.md +2 -0
  8. package/package/corpus/skills/cratis-screenplay-command-surface/references/constraints-produces-concurrency.md +2 -0
  9. package/package/corpus/skills/cratis-screenplay-command-surface/references/date-comparisons.md +2 -0
  10. package/package/corpus/skills/cratis-screenplay-command-surface/references/described-handlers.md +2 -0
  11. package/package/corpus/skills/cratis-screenplay-command-surface/references/enum-numbers.md +2 -0
  12. package/package/corpus/skills/cratis-screenplay-command-surface/references/inline-events.md +2 -0
  13. package/package/corpus/skills/cratis-screenplay-command-surface/references/operations.md +2 -0
  14. package/package/corpus/skills/cratis-screenplay-command-surface/references/policy-persona-seed.md +2 -0
  15. package/package/corpus/skills/cratis-screenplay-command-surface/references/protected-reads.md +2 -0
  16. package/package/corpus/skills/cratis-screenplay-command-surface/references/shop-generation.md +4 -0
  17. package/package/corpus/skills/cratis-screenplay-command-surface/references/uuid-equality.md +6 -0
  18. package/package/corpus/skills/cratis-screenplay-discovery/references/event-naming.md +2 -0
  19. package/package/corpus/skills/cratis-screenplay-discovery/references/personas-and-causes.md +2 -0
  20. package/package/corpus/skills/cratis-screenplay-event-modeling/references/invoicing-example.md +2 -0
  21. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/intent-example.md +4 -0
  22. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/re-entry-and-passes.md +4 -0
  23. package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +2 -2
  24. package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +2 -0
  25. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +2 -1
  26. package/package/corpus/skills/cratis-screenplay-model-authoring/references/screen-authoring-workflow.md +28 -25
  27. package/package/corpus/skills/cratis-screenplay-model-review/references/walkthrough.md +2 -0
  28. package/package/corpus/skills/cratis-screenplay-model-review/references/worked-example.md +8 -0
  29. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/SKILL.md +5 -1
  30. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/version-migration.md +50 -0
  31. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/worked-example.md +2 -0
  32. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/verification.json +2 -0
  33. package/package/corpus/skills/cratis-screenplay-projections/references/reducer-identity.md +4 -0
  34. package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +5 -4
  35. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +2 -2
  36. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/worked-example.md +2 -0
  37. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/berth-reservations.md +6 -0
  38. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-design.md +7 -0
  39. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-example.md +9 -0
  40. package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +8 -0
  41. package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md +2 -0
  42. package/package/corpus/skills/cratis-screenplay-slice-design/references/field-lineage.md +2 -1
  43. package/package/corpus/skills/cratis-screenplay-slice-design/references/model-reasoning.md +2 -0
  44. package/package/corpus/skills/cratis-screenplay-slice-design/references/read-model-design.md +2 -0
  45. package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +2 -0
  46. package/package/corpus/skills/cratis-screenplay-specifications/references/concept-rules.md +2 -0
  47. package/package/corpus/skills/cratis-screenplay-specifications/references/examples-and-routes.md +2 -0
  48. package/package/corpus/skills/cratis-screenplay-specifications/references/persona-callers-and-cases.md +2 -0
  49. package/package/corpus/skills/cratis-screenplay-specifications/references/reactions-and-cascades.md +2 -0
  50. package/package/corpus/skills/cratis-screenplay-specifications/references/whitespace-rules.md +4 -0
  51. package/package/corpus/skills/cratis-screenplay-specifications/references/worked-example.md +2 -0
  52. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution-example.md +6 -0
  53. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/multi-service-models.md +2 -0
  54. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +8 -0
  55. package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +1 -0
  56. package/package/corpus/skills/cratis-screenplay-toolchain/references/automation-translate-example.md +2 -0
  57. package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet-example.md +6 -0
  58. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostic-arguments.md +1 -1
  59. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +1 -1
  60. package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-example.md +2 -0
  61. package/package/corpus/skills/cratis-screenplay-toolchain/references/generated-responses-example.md +4 -0
  62. package/package/corpus/skills/cratis-screenplay-toolchain/references/generation-strategies-example.md +4 -0
  63. package/package/corpus/skills/cratis-screenplay-toolchain/references/language-admission.md +1 -1
  64. package/package/corpus/skills/cratis-screenplay-toolchain/references/pdl-example.md +16 -0
  65. package/package/corpus/skills/cratis-screenplay-toolchain/references/production-routes-and-filters.md +2 -0
  66. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +6993 -2979
  67. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
  68. package/package/corpus/skills/cratis-screenplay-toolchain/references/sources-and-streams.md +2 -0
  69. package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +55 -70
  70. package/package/corpus/skills/cratis-screenplay-ui-composition/references/action-subjects.md +4 -1
  71. package/package/corpus/skills/cratis-screenplay-ui-composition/references/application-shell.md +304 -136
  72. package/package/corpus/skills/cratis-screenplay-ui-composition/references/screen-composition-contract.md +46 -31
  73. package/package/corpus/skills/cratis-screenplay-ui-composition/references/ui-profile-and-theme.md +2 -2
  74. package/package/corpus/skills/cratis-screenplay-ui-composition/verification.json +9 -9
  75. package/package/corpus/skills/cratis-specification-by-example/SKILL.md +2 -0
  76. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/case-tables-and-whole-numbers.md +4 -0
  77. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/render-example.md +4 -0
  78. package/package.json +1 -1
@@ -11,7 +11,7 @@
11
11
  - Exposed template configuration
12
12
  - Forms and columns
13
13
  - Packages, icons and template catalogs
14
- - Routes, outlets, toolbars and dialogs
14
+ - Routes, slots, toolbars and dialogs
15
15
  - Design-time generation results
16
16
  - Canonical fixture ownership
17
17
 
@@ -75,7 +75,7 @@ component <Package.Component> <instanceName>
75
75
  icon <IconName>
76
76
  presentation <key> "value"
77
77
  exposes <name> from component <stable-id>.<outputPath>
78
- outlet <name>
78
+ slot <name>
79
79
  ...nested screen directives...
80
80
  on click
81
81
  open dialog <DialogTemplate>
@@ -101,9 +101,13 @@ Rules for agents:
101
101
  - `presentation` keys are renderer/package inputs. They are authoring data, not a
102
102
  styling escape hatch; unknown keys must be surfaced by the consumer contract,
103
103
  not ignored.
104
- - An `outlet` is a nested replacement surface; it can hold screen directives and
104
+ - A `slot` is a nested replacement surface; it can hold screen directives and
105
105
  can be targeted by navigation or a dialog route when the runtime contract
106
- supports it.
106
+ supports it. Screenplay 5 wrote it `outlet <name>`; that form is `PLAY0890`
107
+ since Screenplay 6 (run `screenplay migrate --from 5 --to 6`).
108
+ - A component on a slice screen bound to nothing and given no value can only show
109
+ sample text, so it warns (`PLAY0912`): bind it, or give it static text with
110
+ `property <path> = "..."`.
107
111
 
108
112
  ## Guarded actions
109
113
 
@@ -127,16 +131,17 @@ unsupported screen actions with STAGE-SCENE-ACTION-001; a current Stage evaluate
127
131
 
128
132
  ## Exposed template configuration
129
133
 
130
- Reusable templates can expose configuration and typed outlets:
134
+ Reusable templates can expose configuration, recursive slots and outlets:
131
135
 
132
136
  ```screenplay excerpt
133
137
  screen template MasterDetail
134
138
  category workflow
135
139
  type master-detail
136
140
  exposes selectedInvoice InvoiceId
137
- outlet toolbar
138
- sidebar
139
- main
141
+ slot details
142
+ sidebar pane routed by invoiceId optional
143
+ main panel
144
+ outlet toolbar of actions in main
140
145
  ```
141
146
 
142
147
  - `category` is used for template discovery and scope-aware catalogs. Suggested
@@ -144,8 +149,13 @@ screen template MasterDetail
144
149
  - `type` is the template kind a runtime/package recognizes.
145
150
  - `exposes` declares values that slot bodies or nested components may bind to; a
146
151
  use site must provide or derive each required exposed value.
147
- - `outlet` declares an addressable child surface. It is different from a static
148
- slot such as `sidebar` or `main`.
152
+ - `slot <name>` declares an addressable, recursive child surface for package
153
+ components and design-time tools. A plain line such as `sidebar` or `main` is a
154
+ static slot; its role (`page`, `pane`, `panel`), `routed [by <param>]`,
155
+ `primary` and `optional` say what goes in it.
156
+ - `outlet <name> of actions|filters|tabs|stats|navigation` declares a list of items
157
+ the template offers; lower levels inherit, extend or override it (see
158
+ `application-shell.md`). Screenplay 5's kindless `outlet <name>` is `PLAY0893`.
149
159
 
150
160
  A template may also declare `content <slot>` (screen directives the template renders in that slot itself;
151
161
  the slot must be declared, `PLAY0629`; templates may not nest in a cycle, `PLAY0656`), `display` and
@@ -154,7 +164,7 @@ the slot must be declared, `PLAY0629`; templates may not nest in a cycle, `PLAY0
154
164
  top-level **exposure** (`exposure for <Owner>`, owner a layout or template, `PLAY0622`; `reexposes <Owner>`,
155
165
  `PLAY0623`/`PLAY0624`), and a screen or template configures it with a top-level `instance <Screen>`
156
166
  (`set <component>.<path> = <value>`, `items <component>.<path>` with `item <id>` lines; `PLAY0626` to
157
- `PLAY0628`). Layouts take `category`, `type`, `exposes` and `outlet` too.
167
+ `PLAY0628`). Layouts take `category`, `type`, `exposes`, `slot` and `outlet` too.
158
168
 
159
169
  A module, feature or slice may select a default template for contained screens:
160
170
 
@@ -216,24 +226,29 @@ ui profile Desktop
216
226
  - Template categories are scope-aware: application templates, module templates and
217
227
  package templates can share labels. Qualify where the tool reports ambiguity.
218
228
 
219
- ## Routes, outlets, toolbars and dialogs
229
+ ## Routes, slots, toolbars and dialogs
220
230
 
221
231
  Navigation and toolbar items target the same typed destination contract: screen,
222
- named outlet, optional route parameters, and optionally a dialog.
232
+ named slot, optional route parameters, and optionally a dialog. A State Change
233
+ slice's hook instead lets the slice's `fits` choose the place (see
234
+ `application-shell.md`).
223
235
 
224
236
  ```screenplay excerpt
225
- toolbar InvoiceToolbar
226
- item register action RegisterInvoice
227
- label "Register"
228
- icon Add
229
- item details navigate to InvoiceDetails
230
- parameter invoiceId from component invoices.selectedItem.id
231
- item compose dialog InvoiceComposer
237
+ screen InvoiceList
238
+ toolbar InvoiceToolbar
239
+ item register action RegisterInvoice for screen
240
+ label "Register"
241
+ icon Add
242
+ item details navigate to InvoiceDetails
243
+ parameter invoiceId from component invoices.selectedItem.id
244
+ item compose dialog InvoiceComposer
232
245
  ```
233
246
 
234
- A toolbar item is `item <name> action <Command>`, `item <name> navigate to <Screen>` or
235
- `item <name> dialog <DialogTemplate>`. Use a toolbar for reusable groups of actions; use inline `action`
236
- when a single screen owns the button. A parameter that reads a selection is a typed
247
+ A screen's toolbar item is `item <name> action <Command>`, `item <name> navigate to <Screen>` or
248
+ `item <name> dialog <DialogTemplate>`. Use a screen toolbar for a group of actions one screen owns, and
249
+ inline `action` for a single button. A group of actions a layout or template offers to every screen below
250
+ it is an `outlet <name> of actions` instead (see `application-shell.md`); a feature or module `toolbar` is
251
+ the Screenplay 5 form and reports `PLAY0896`. A parameter that reads a selection is a typed
237
252
  `from component <stableId>.<path>` binding (the bare `selected.invoiceId` form parses only as a legacy
238
253
  data-context path). A dialog destination must state every input with a typed `with`/`parameter`
239
254
  binding; a runtime default is not an authored contract.
@@ -261,13 +276,13 @@ release. The current Stage scaffold pins a newer Scene release (Stage skill
261
276
  announce `cratis.scene.command` with resolved parameters; Navigate/Dialog
262
277
  items execute through the navigation host (or announce a navigation event
263
278
  outside one). This is not a promise that the command executes without a host.
264
- - **Nested outlets.** A `core:outlet` component declares a named nested outlet on a
265
- screen. A destination into it opens its screen there and keeps the declaring
266
- screen on the page; the opened screen may declare outlets of its own, so
267
- composition nests to any depth. A deep link to the innermost level composes
268
- every level above it, and back closes the innermost level only. An outlet
269
- declares the template types it accepts; a destination into a missing or
270
- incompatible outlet is a navigation diagnostic, not a fallback.
279
+ - **Nested slots.** A `core:slot` component (Scene 4 named it `core:outlet`)
280
+ declares a named nested slot on a screen. A destination into it opens its screen
281
+ there and keeps the declaring screen on the page; the opened screen may declare
282
+ slots of its own, so composition nests to any depth. A deep link to the innermost
283
+ level composes every level above it, and back closes the innermost level only. A
284
+ slot declares the template types it accepts; a destination into a missing or
285
+ incompatible slot is a navigation diagnostic, not a fallback.
271
286
  - **Toolbar buttons open destinations.** The Cratis Components toolbar button runs
272
287
  its attached interactions and opens its authored `destination` (a dialog or a
273
288
  slice screen) through the enclosing navigation host. Label, icon, text and
@@ -318,7 +333,7 @@ an agent:
318
333
 
319
334
  Generated design-time output is evidence only when it is compared with the model:
320
335
 
321
- - every screen, template, form, toolbar, component instance and outlet has an
336
+ - every screen, template, form, toolbar, component instance, slot and outlet has an
322
337
  entry in the generated plan/report;
323
338
  - every unsupported construct is reported as a blocking diagnostic, not silently
324
339
  dropped;
@@ -11,7 +11,7 @@ This reference holds the `ui profile` and `theme` excerpts and their rules: the
11
11
  ## The shell: `root template`
12
12
 
13
13
  A `ui profile` names the template the whole application is drawn in with `root template`. Every screen's template chain is placed in the
14
- shell's primary outlet (`content`). The reference is the one a `template` assignment uses: an own `layout` or application-scope
14
+ shell's primary slot (the one marked `primary`, such as `content page routed primary`). The reference is the one a `template` assignment uses: an own `layout` or application-scope
15
15
  screen template by name, or a template a blueprint ships, `blueprint <Blueprint> <Name>`, with an optional `version "<range>"` pin.
16
16
  `ui profile` is the only place that selects the shell; a screen never names it.
17
17
 
@@ -102,7 +102,7 @@ ui profile Web
102
102
  | `PLAY0799` | Error | The `new screens use template` default cannot start a screen in a feature | Name a feature-scope screen template |
103
103
 
104
104
  What a blueprint ships is only known where the blueprint is installed, so its checks (`PLAY0790` for a template it lacks, `PLAY0793`,
105
- the options and outlets of its templates) come from the host that has the catalog (Stage, the `cratis` CLI, the MCP server); the compiler
105
+ the options, slots and outlets of its templates) come from the host that has the catalog (Stage, the `cratis` CLI, the MCP server); the compiler
106
106
  decides everything the document alone decides.
107
107
 
108
108
  ### Negative example: the legacy `layout` line
@@ -124,7 +124,7 @@
124
124
  },
125
125
  {
126
126
  "kind": "skill-contains",
127
- "value": "hierarchical outlets"
127
+ "value": "hierarchical slots"
128
128
  },
129
129
  {
130
130
  "kind": "skill-contains",
@@ -140,15 +140,15 @@
140
140
  },
141
141
  {
142
142
  "kind": "skill-contains",
143
- "value": "application navigation regions (topbar/sidebar, module inherit/extend/override)"
143
+ "value": "navigation outlets (topbar/sidebar, inherit/extend/override)"
144
144
  },
145
145
  {
146
146
  "kind": "skill-contains",
147
- "value": "toolbar slice buttons"
147
+ "value": "`contribute to`, hooks and placement"
148
148
  },
149
149
  {
150
150
  "kind": "skill-contains",
151
- "value": "## The application shell: regions, slice buttons, blueprint references, sample data"
151
+ "value": "## The application shell: slots, outlets, hooks, blueprint references, sample data"
152
152
  },
153
153
  {
154
154
  "kind": "skill-contains",
@@ -186,22 +186,22 @@
186
186
  },
187
187
  {
188
188
  "kind": "skill-contains",
189
- "value": "`navigation <region> extends`",
189
+ "value": "`outlet <name> extends`",
190
190
  "file": "references/application-shell.md"
191
191
  },
192
192
  {
193
193
  "kind": "skill-contains",
194
- "value": "`navigation <region> overrides`",
194
+ "value": "`outlet <name> overrides`",
195
195
  "file": "references/application-shell.md"
196
196
  },
197
197
  {
198
198
  "kind": "skill-contains",
199
- "value": "Hierarchy is sidebar only",
199
+ "value": "`hide <id>` drops an",
200
200
  "file": "references/application-shell.md"
201
201
  },
202
202
  {
203
203
  "kind": "skill-contains",
204
- "value": "retargeted to\n the module's own features",
204
+ "value": "retarget the copied items to the module's own features",
205
205
  "file": "references/application-shell.md"
206
206
  },
207
207
  {
@@ -211,7 +211,7 @@
211
211
  },
212
212
  {
213
213
  "kind": "skill-contains",
214
- "value": "Stage refuses a screen that\nmixes a top-level `template` directive with other top-level directives",
214
+ "value": "Stage refuses a screen mixing a top-level `template`",
215
215
  "file": "references/application-shell.md"
216
216
  },
217
217
  {
@@ -203,6 +203,8 @@ module Invoicing
203
203
  invoiceNumber not empty message "Invoice number is required"
204
204
  produces event InvoiceRegistered
205
205
  invoiceNumber InvoiceNumber = invoiceNumber
206
+ screen RegisterInvoice
207
+ action RegisterInvoice for screen
206
208
  specification RejectingAnEmptyInvoiceNumber
207
209
  when RegisterInvoice
208
210
  invoiceId = "9c858901-8a57-4791-81fe-4c455b099bc9"
@@ -40,6 +40,8 @@ module Projects
40
40
  name = name
41
41
  event ProjectRegistered
42
42
  name ProjectName
43
+ screen Register
44
+ action RegisterProject for screen
43
45
  specification Registering
44
46
  parameter name ProjectName
45
47
  case Small name = "small"
@@ -93,6 +95,8 @@ module Inventory
93
95
  quantity = quantity
94
96
  event StockRecorded
95
97
  quantity Quantity
98
+ screen Record
99
+ action RecordStock for screen
96
100
  specification RecordingLargeQuantity
97
101
  when RecordStock
98
102
  stockId = "stock-1"
@@ -39,6 +39,8 @@ module Berths
39
39
  boatName = boatName
40
40
  event BerthReserved
41
41
  boatName BoatName
42
+ screen ReserveBerth
43
+ action ReserveBerth for screen
42
44
  specification ReservingABerth
43
45
  given caller
44
46
  authenticated
@@ -73,6 +75,8 @@ module Berths
73
75
  produces BerthReleased
74
76
  for berthId
75
77
  event BerthReleased
78
+ screen ReleaseBerth
79
+ action ReleaseBerth for screen
76
80
  specification ReleasingABerth
77
81
  given caller
78
82
  authenticated
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/pi",
3
- "version": "7.138.1",
3
+ "version": "7.139.0",
4
4
  "description": "Configuration-aware Cratis AI integration for Pi",
5
5
  "type": "module",
6
6
  "files": [