@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.
- package/package/corpus/hooks/README.md +14 -4
- package/package/corpus/hooks/scripts/cratis-guard-shell-writes.sh +24 -6
- package/package/corpus/hooks/scripts/cratis-guard-writes.sh +48 -14
- package/package/corpus/skills/cratis-application-slice-conformance/references/worked-example.md +2 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/public-events-and-direction.md +2 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/statemachines-and-workflows.md +12 -1
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/todo-list-example.md +2 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translate-example.md +2 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/complete-examples.md +4 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/compliance.md +2 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/constraints-produces-concurrency.md +2 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/date-comparisons.md +2 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/described-handlers.md +2 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/enum-numbers.md +2 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/inline-events.md +2 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/operations.md +2 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/policy-persona-seed.md +2 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/protected-reads.md +2 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/shop-generation.md +4 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/uuid-equality.md +6 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/event-naming.md +2 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/personas-and-causes.md +2 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/invoicing-example.md +2 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/intent-example.md +4 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/re-entry-and-passes.md +4 -0
- package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +2 -2
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +2 -0
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +2 -1
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/screen-authoring-workflow.md +28 -25
- package/package/corpus/skills/cratis-screenplay-model-review/references/walkthrough.md +2 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/worked-example.md +8 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/SKILL.md +5 -1
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/version-migration.md +50 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/worked-example.md +2 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/verification.json +2 -0
- package/package/corpus/skills/cratis-screenplay-projections/references/reducer-identity.md +4 -0
- package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +5 -4
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +2 -2
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/worked-example.md +2 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/berth-reservations.md +6 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-design.md +7 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-example.md +9 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +8 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md +2 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/field-lineage.md +2 -1
- package/package/corpus/skills/cratis-screenplay-slice-design/references/model-reasoning.md +2 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/read-model-design.md +2 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +2 -0
- package/package/corpus/skills/cratis-screenplay-specifications/references/concept-rules.md +2 -0
- package/package/corpus/skills/cratis-screenplay-specifications/references/examples-and-routes.md +2 -0
- package/package/corpus/skills/cratis-screenplay-specifications/references/persona-callers-and-cases.md +2 -0
- package/package/corpus/skills/cratis-screenplay-specifications/references/reactions-and-cascades.md +2 -0
- package/package/corpus/skills/cratis-screenplay-specifications/references/whitespace-rules.md +4 -0
- package/package/corpus/skills/cratis-screenplay-specifications/references/worked-example.md +2 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution-example.md +6 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/multi-service-models.md +2 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +8 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +1 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/automation-translate-example.md +2 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet-example.md +6 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostic-arguments.md +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-example.md +2 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/generated-responses-example.md +4 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/generation-strategies-example.md +4 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/language-admission.md +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/pdl-example.md +16 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/production-routes-and-filters.md +2 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +6993 -2979
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/sources-and-streams.md +2 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +55 -70
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/action-subjects.md +4 -1
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/application-shell.md +304 -136
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/screen-composition-contract.md +46 -31
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/ui-profile-and-theme.md +2 -2
- package/package/corpus/skills/cratis-screenplay-ui-composition/verification.json +9 -9
- package/package/corpus/skills/cratis-specification-by-example/SKILL.md +2 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/case-tables-and-whole-numbers.md +4 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/render-example.md +4 -0
- package/package.json +1 -1
|
@@ -61,7 +61,7 @@ For a new canonical application this usually creates or changes:
|
|
|
61
61
|
- module/feature/slice documents;
|
|
62
62
|
- read models and queries that supply screen data;
|
|
63
63
|
- screen declarations with Level 1 data/actions;
|
|
64
|
-
- templates, components, forms, toolbar items, outlets and navigation bindings;
|
|
64
|
+
- templates and their slots, components, forms, toolbar items, outlets, `fits` and navigation bindings;
|
|
65
65
|
- localized `$strings` keys referenced by labels.
|
|
66
66
|
|
|
67
67
|
Use `referencePolicy: "Safe"` unless unresolved debt is explicitly part of the
|
|
@@ -144,40 +144,43 @@ edit.
|
|
|
144
144
|
Requires cratis CLI 3.44.0 or later (`cratis --version`) for `cratis render --check`.
|
|
145
145
|
|
|
146
146
|
For screens-release parity, the smoke check must assert that every authored
|
|
147
|
-
screen, template, component, form, toolbar, outlet, route and package/icon use is
|
|
147
|
+
screen, template, slot, component, form, toolbar, outlet, hook, route and package/icon use is
|
|
148
148
|
represented in the generated plan or runtime diagnostics. A consumer that cannot
|
|
149
149
|
implement one reports a blocking diagnostic. Silent fallback to the default screen
|
|
150
150
|
composition is a failure.
|
|
151
151
|
|
|
152
152
|
## Edit the application shell
|
|
153
153
|
|
|
154
|
-
|
|
155
|
-
open, read, propose, review, apply, reopen loop; the syntax and rules are in
|
|
154
|
+
Requires Screenplay 6.0 or later. Slots, outlets, hooks, blueprint template references and sample data are typed nodes
|
|
155
|
+
and follow the same open, read, propose, review, apply, reopen loop; the syntax and rules are in
|
|
156
156
|
`cratis-screenplay-ui-composition` (`references/application-shell.md`). The vectors to replay against are the
|
|
157
|
-
`screen-shell-navigation-positive` source case and its rejection vectors in `Cratis.Screenplay.CanonicalCorpus`.
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
`
|
|
165
|
-
|
|
157
|
+
`screen-shell-navigation-positive` source case and its rejection vectors in `Cratis.Screenplay.CanonicalCorpus`. A model
|
|
158
|
+
still written for Screenplay 5 is migrated first (`screenplay migrate --from 5 --to 6`, or the MCP `migrate` tool); never
|
|
159
|
+
hand-edit the old forms into the new ones through proposals.
|
|
160
|
+
|
|
161
|
+
1. `read-ast` with `kind` `OutletSyntax`, `NavigationItemSyntax`, `ToolbarButtonSyntax`, `TemplateAssignmentSyntax`,
|
|
162
|
+
`ScreenTemplateReferenceSyntax` or `SampleDataPackSyntax`, `includeContent: true`. Select the occurrence by its
|
|
163
|
+
parent: an outlet sits in the `outlets` member of a `LayoutSyntax`, `ScreenTemplateSyntax`, `DialogTemplateSyntax`,
|
|
164
|
+
`ModuleSyntax`, `FeatureSyntax` or `ScreenSyntax`, and the same outlet name and item id appear at several levels.
|
|
165
|
+
2. `propose-ast` with `replace` (copy the returned node, change its `mode`, `items`, `hides`, a button's `slice`,
|
|
166
|
+
`opens` or `enabledWhen`, a screen's `fits`, a `version` or a row value), `add` to a member the node kind declares
|
|
167
|
+
(`outlets`, `items`, `children`) or `remove`. A member that holds nothing is not in the node JSON; `add` still
|
|
168
|
+
accepts it. Resolve member names with `syntax-schema`, not from this prose.
|
|
166
169
|
3. Read the proposal's diagnostics before applying. A refusal such as `PLAY0750` (a module item targeting another
|
|
167
|
-
module), `
|
|
168
|
-
|
|
170
|
+
module), `PLAY0903` (an outlet nothing declares), `PLAY0905` (a repeated item id), `PLAY0762` (a hook on a State
|
|
171
|
+
View slice), `PLAY0911` (a slot the slice's screen does not fit), `PLAY0722` (a blueprint no profile lists) or
|
|
172
|
+
`PLAY0714` (an unknown active pack) is the answer; change the proposal, not the rule.
|
|
169
173
|
4. `apply` with both revisions. A `StaleRevision` means the model moved: reopen, re-read the nodes and propose again.
|
|
170
|
-
5. Switching a module from inherit to override copies the
|
|
171
|
-
features first or the proposal is refused.
|
|
174
|
+
5. Switching a module's outlet from inherit to override copies the inherited items; retarget each copy to the module's
|
|
175
|
+
own features first or the proposal is refused.
|
|
172
176
|
|
|
173
|
-
###
|
|
177
|
+
### Buttons shared by a feature's screens
|
|
174
178
|
|
|
175
|
-
|
|
176
|
-
`
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
(`references/application-shell.md`, "Feature and module toolbars"; Screenplay 4.238.0 or later).
|
|
179
|
+
Buttons shared by every screen of a feature extend the template's actions outlet: `add` an `OutletSyntax` with the
|
|
180
|
+
outlet's `name`, mode `extends` and its `ToolbarButtonSyntax` items to the feature's `outlets`, and `replace` a button to
|
|
181
|
+
set its `confirm`, `runs`, `opens` or `enabledWhen`; `remove` takes one away. `PLAY0903` means the template declares no
|
|
182
|
+
such outlet. The syntax and when to choose an outlet over a screen toolbar are in `cratis-screenplay-ui-composition`
|
|
183
|
+
(`references/application-shell.md`, "Outlets of actions, filters, tabs and stats" and "Hooks").
|
|
181
184
|
|
|
182
185
|
### The profile's shell
|
|
183
186
|
|
|
@@ -192,7 +195,7 @@ cannot start a screen). `PLAY0796` (an option the shell does not expose) and `PL
|
|
|
192
195
|
the proposal is accepted and `ui-profiles` shows them. Replay against the `ui-profile-root-positive` vector and its rejection
|
|
193
196
|
vectors (`ui-profile-root-unknown`, `ui-profile-root-not-a-shell`, `ui-profile-root-invalid`) in `Cratis.Screenplay.CanonicalCorpus`.
|
|
194
197
|
|
|
195
|
-
Requires Screenplay 4.188.0 or later (`screenplay --version`) to `add` the first
|
|
198
|
+
Requires Screenplay 4.188.0 or later (`screenplay --version`) to `add` the first outlet, item or sub-item to a member
|
|
196
199
|
the node JSON omits while empty; an older MCP server answers "Unknown typed syntax member".
|
|
197
200
|
|
|
198
201
|
## 6. Use Screenplay-owned fixtures
|
|
@@ -111,6 +111,8 @@ module Moorings
|
|
|
111
111
|
insurer String
|
|
112
112
|
produces event BoatInsuranceRecorded
|
|
113
113
|
insurer String = insurer
|
|
114
|
+
screen RecordBoatInsurance
|
|
115
|
+
action RecordBoatInsurance for screen
|
|
114
116
|
```
|
|
115
117
|
|
|
116
118
|
A new screen is described in words (what it shows, which action it offers). Screen design belongs
|
|
@@ -38,6 +38,8 @@ module Moorings
|
|
|
38
38
|
for berthId
|
|
39
39
|
name BerthName = name
|
|
40
40
|
maxLength BoatLength = maxLength
|
|
41
|
+
screen RegisterBerth
|
|
42
|
+
action RegisterBerth for screen
|
|
41
43
|
specification RegisteringABerth
|
|
42
44
|
given caller
|
|
43
45
|
authenticated
|
|
@@ -62,6 +64,8 @@ module Moorings
|
|
|
62
64
|
for berthId
|
|
63
65
|
name BerthName = name
|
|
64
66
|
maxLength BoatLength = maxLength
|
|
67
|
+
screen UpdateBerth
|
|
68
|
+
action UpdateBerth for screen
|
|
65
69
|
|
|
66
70
|
slice StateView BerthList
|
|
67
71
|
readmodel BerthSummary
|
|
@@ -194,6 +198,8 @@ module Moorings
|
|
|
194
198
|
for berthId
|
|
195
199
|
name BerthName = name
|
|
196
200
|
maxLength BoatLength = maxLength
|
|
201
|
+
screen RegisterBerth
|
|
202
|
+
action RegisterBerth for screen
|
|
197
203
|
specification RegisteringABerth
|
|
198
204
|
given caller
|
|
199
205
|
authenticated
|
|
@@ -225,6 +231,8 @@ module Moorings
|
|
|
225
231
|
produces event BerthLengthLimitRaised
|
|
226
232
|
for berthId
|
|
227
233
|
maxLength BoatLength = newMaxLength
|
|
234
|
+
screen RaiseBerthLengthLimit
|
|
235
|
+
action RaiseBerthLengthLimit for screen
|
|
228
236
|
specification RaisingTheLimit
|
|
229
237
|
given caller
|
|
230
238
|
authenticated
|
|
@@ -107,7 +107,11 @@ assume visibly unattended and never rerun completed phases.
|
|
|
107
107
|
## Run protocol: stop or assume
|
|
108
108
|
1. **Start**: read STATE.md; check the source identity; load the phase skill before authoring
|
|
109
109
|
or judging; read the slice, specs and skill fully before concluding something is missing.
|
|
110
|
-
Discover tool capabilities once per session (`cratis-screenplay-toolchain`).
|
|
110
|
+
Discover tool capabilities once per session (`cratis-screenplay-toolchain`). **A model older
|
|
111
|
+
than the compiler's major is migrated before any edit**: a Screenplay 5 model runs
|
|
112
|
+
`screenplay migrate <model-root> --from 5 --to 6` as its own change, then compiles clean.
|
|
113
|
+
Read `references/version-migration.md` when a model writes a retired form or the compiler
|
|
114
|
+
names `screenplay migrate`. One brief per
|
|
111
115
|
turn, one closed outcome: `references/per-turn-protocol.md`. Read `references/per-turn-protocol.md` when running a long-lived or delegated session that receives one brief at a time.
|
|
112
116
|
2. **Scope**: only the addresses and phase the brief names; other defects go in the packet.
|
|
113
117
|
One authoring agent per model root; reviewers and explainers are read-only.
|
package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/version-migration.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Migrate a model before editing it
|
|
2
|
+
|
|
3
|
+
Requires Screenplay 6.0 or later (`screenplay --version`) for `screenplay migrate` and the MCP `migrate` tool.
|
|
4
|
+
|
|
5
|
+
A Screenplay major version retires forms without a deprecation period: the old form is an error whose message names the
|
|
6
|
+
replacement and the migration that writes it, for example
|
|
7
|
+
`run 'screenplay migrate --from 5 --to 6' to rewrite the model (slots and outlets)`. Editing such a model by hand mixes
|
|
8
|
+
two changes in one diff and loses what the migration reports for review, so migrate first, as its own change.
|
|
9
|
+
|
|
10
|
+
## When
|
|
11
|
+
|
|
12
|
+
- The compiler reports a retired-form code (`PLAY0890`-`PLAY0896`), `PLAY0026` on a template `toolbar` slot that holds
|
|
13
|
+
buttons, or any message naming `screenplay migrate`.
|
|
14
|
+
- The model still writes a Screenplay 5 form: a region declared as `outlet <name>` with no kind, `destination outlet`,
|
|
15
|
+
`navigation topbar|sidebar`, `<slot> contributes <Point>`, or a `toolbar <name>` on a feature or module.
|
|
16
|
+
- The project records that its model targets Screenplay 5 and the installed compiler is 6.
|
|
17
|
+
|
|
18
|
+
A file does not say which version it was written for, so the author or the project decides `--from`.
|
|
19
|
+
|
|
20
|
+
## How
|
|
21
|
+
|
|
22
|
+
1. Start from a clean working tree under the model root, so the migration is the only diff.
|
|
23
|
+
2. Preview: `screenplay migrate <model-root> --from 5 --to 6 --dry-run --report .ai-work/<task>/migrate.json`.
|
|
24
|
+
3. Run: `screenplay migrate <model-root> --from 5 --to 6`. A folder migrates every `.play` file beneath it as one
|
|
25
|
+
application; never migrate one file of a split model on its own unless the brief names it.
|
|
26
|
+
4. Read the exit code:
|
|
27
|
+
|
|
28
|
+
| Exit | Meaning | Next |
|
|
29
|
+
| --- | --- | --- |
|
|
30
|
+
| `0` | Every file migrated and compiles warning-free with Screenplay 6 | Review the diff, then compile |
|
|
31
|
+
| `2` | A file needs review, or the result still has compiler errors | Decide each review item (below), then compile |
|
|
32
|
+
| `1` | The migration could not run (bad argument, no files, no step chain, a file a step could not rewrite) | Fix the cause; the files that could not be rewritten are unchanged |
|
|
33
|
+
|
|
34
|
+
5. Decide every review item the report lists, with its file and line. Common ones: a template slot that holds items and
|
|
35
|
+
something else (place the rest with a screen's `fits`, or remove it); a toolbar `item <name> action|navigate|dialog`
|
|
36
|
+
in a feature toolbar (write a `button ... slice <Slice>` hook or remove it); a `logo` below the layout (only the layout
|
|
37
|
+
declares it).
|
|
38
|
+
6. `screenplay <model-root> --warnaserror` is clean, and `screenplay test <model-root>` passes as before.
|
|
39
|
+
7. Record the migration as its own change (commit, or a separate proposal through MCP), then start the requested edit.
|
|
40
|
+
|
|
41
|
+
Through MCP, the `screenplay` server's `migrate` tool takes `from`, an optional `to` and an optional root-relative
|
|
42
|
+
`document`. It is read-only: it returns the report and, for a named document, the migrated source to write through the
|
|
43
|
+
usual file tools or a proposal. The VS Code command **Screenplay: Migrate document** migrates the open document.
|
|
44
|
+
|
|
45
|
+
## Never
|
|
46
|
+
|
|
47
|
+
- Never hand-translate the old forms instead of running the migration: it prints only the lines it changes and keeps
|
|
48
|
+
comments, alignment and every other line byte for byte.
|
|
49
|
+
- Never accept a review item silently or leave the model with the errors the migration reported.
|
|
50
|
+
- Never edit Stage-managed output to match; render again from the migrated model.
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
"fixtures": [],
|
|
5
5
|
"assertions": [
|
|
6
6
|
{ "kind": "play-compiles" },
|
|
7
|
+
{ "kind": "skill-contains", "value": "`screenplay migrate <model-root> --from 5 --to 6`" },
|
|
8
|
+
{ "kind": "skill-contains", "value": "Never hand-translate the old forms", "file": "references/version-migration.md" },
|
|
7
9
|
{ "kind": "skill-contains", "value": "record it as a `question` note anchored to the element" },
|
|
8
10
|
{ "kind": "skill-contains", "value": "`refs: [{ \"id\": \"D123\" }]`", "file": "references/stop-or-assume.md" },
|
|
9
11
|
{ "kind": "skill-contains", "value": "`by: \"external-decision\"`", "file": "references/stop-or-assume.md" },
|
|
@@ -43,6 +43,8 @@ module Work
|
|
|
43
43
|
for resource
|
|
44
44
|
month = month
|
|
45
45
|
hours = hours
|
|
46
|
+
screen Record
|
|
47
|
+
action Record for screen
|
|
46
48
|
```
|
|
47
49
|
|
|
48
50
|
## Fix
|
|
@@ -75,6 +77,8 @@ module Work
|
|
|
75
77
|
for resource
|
|
76
78
|
month = month
|
|
77
79
|
hours = hours
|
|
80
|
+
screen Record
|
|
81
|
+
action Record for screen
|
|
78
82
|
```
|
|
79
83
|
|
|
80
84
|
When instances already exist under their own identity and another event only enriches them, use a [join](joins.md) instead: it updates the existing instances and never creates one. There is no automatic repair from a reducer to a projection.
|
|
@@ -269,10 +269,11 @@ Constructs: `title`, `data … via query … [by <param>]`, `action <Command>` w
|
|
|
269
269
|
`label` and `navigate to <Screen> [by <param>]`, `section <name>`,
|
|
270
270
|
`table <target>` with `column <property> [label]` and
|
|
271
271
|
`on row-click navigate to <Screen> [by <param>]`, `summary <ReadModel>` with
|
|
272
|
-
`field <property> label`,
|
|
272
|
+
`field <property> label`, `template <Name>` with slot bodies, `show <Screen> by <param> from <table>.selection`
|
|
273
|
+
in a slot body, and `fits dialog, drawer, pane` (where a State Change screen opens; `cratis-screenplay-ui-composition`).
|
|
273
274
|
|
|
274
275
|
The screen's `data` and `action` declarations are the typed context for later UI
|
|
275
|
-
composition. Component `context`, toolbar parameters, dialog inputs,
|
|
276
|
+
composition. Component `context`, toolbar parameters, dialog inputs, slot routes
|
|
276
277
|
and manual form columns must all trace back to this screen contract, a form's
|
|
277
278
|
command, a selected item, or `$context`. If a generated app shows a default list
|
|
278
279
|
or empty panel because it could not consume one of those directives, treat that as
|
|
@@ -344,7 +345,7 @@ binding failures are errors.
|
|
|
344
345
|
- [ ] A reducer-built view's `by` type matches its events' event-source identity (`PLAY0690`).
|
|
345
346
|
- [ ] No screen reference is left ambiguous or unresolved.
|
|
346
347
|
- [ ] Every UI binding that consumes screen data (component context, toolbar
|
|
347
|
-
parameter, dialog input,
|
|
348
|
+
parameter, dialog input, slot route) has a source in the screen contract
|
|
348
349
|
or an explicitly provided template/form context.
|
|
349
350
|
|
|
350
351
|
Read `SKILL.md` in `cratis-screenplay-toolchain` when choosing a tool, reading installed versions, or assessing executable and renderable subsets. Where a construct sits in the
|
|
@@ -357,6 +358,6 @@ Read [screen patterns](references/screen-patterns.md) when deciding whether a sc
|
|
|
357
358
|
Attribution and licences: `references/provenance.md`.
|
|
358
359
|
|
|
359
360
|
- How events fill the read model: `cratis-screenplay-projections`.
|
|
360
|
-
- Layouts, templates, forms, component bindings, toolbars and
|
|
361
|
+
- Layouts, templates, forms, component bindings, toolbars, hooks and placement, slots, outlets, contributions, sample data, packages and themes: `cratis-screenplay-ui-composition`.
|
|
361
362
|
- Asserting query results: `cratis-screenplay-specifications`.
|
|
362
363
|
- Deciding which read models exist: `cratis-screenplay-event-modeling`.
|
|
@@ -141,7 +141,7 @@ model still compiles and binds) and its V5 states the scope.
|
|
|
141
141
|
with no business decisions, rebuild, retest. Never edit a managed file; never add behaviour the
|
|
142
142
|
model does not state. Detail: `references/delivery-protocol.md` section 4.
|
|
143
143
|
7. **Report authored-UI parity.** Require explicit plan/runtime evidence for each authored screen,
|
|
144
|
-
form, layout, template, toolbar, component, outlet, route, package/icon use, theme and persona view,
|
|
144
|
+
form, layout, template, slot, toolbar, hook, component, outlet, route, package/icon use, theme and persona view,
|
|
145
145
|
or a blocking diagnostic or "not rendered" with the responsible tool version; silent fallback to
|
|
146
146
|
default composition is a failure (Stage 4.24 rendered the default composition only).
|
|
147
147
|
8. **Drift:** `cratis render ... --check` (exit 6 pending); also compare the manifest's `semanticRevision`
|
|
@@ -224,7 +224,7 @@ Before reporting done:
|
|
|
224
224
|
- A passing test does not claim runtime guarantees (namespace, subject, constraint scope, guarded
|
|
225
225
|
reads, migrations, replay) or omitted UI were delivered.
|
|
226
226
|
- Re-render: drift line present. `Customizations/` changes name the seam and the model element served.
|
|
227
|
-
- Screen delivery: every authored screen/template/form/toolbar/component/outlet/route/package-icon use is either present in generated/runtime evidence or listed as not rendered/unsupported with the responsible tool version.
|
|
227
|
+
- Screen delivery: every authored screen/template/slot/form/toolbar/hook/component/outlet/route/package-icon use is either present in generated/runtime evidence or listed as not rendered/unsupported with the responsible tool version.
|
|
228
228
|
|
|
229
229
|
## Route near misses
|
|
230
230
|
|
package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/berth-reservations.md
CHANGED
|
@@ -57,6 +57,8 @@ module Berths
|
|
|
57
57
|
released by ReservationCancelled
|
|
58
58
|
constraint ReserveOnce
|
|
59
59
|
unique event BerthReserved
|
|
60
|
+
screen ReserveBerth
|
|
61
|
+
action ReserveBerth for screen
|
|
60
62
|
|
|
61
63
|
specification ReservingAGuestBerth
|
|
62
64
|
given caller
|
|
@@ -231,6 +233,8 @@ module Berths
|
|
|
231
233
|
constraint CancelOrDepart
|
|
232
234
|
unique event ReservationCancelled
|
|
233
235
|
unique event BoatDeparted
|
|
236
|
+
screen CancelReservation
|
|
237
|
+
action CancelReservation for screen
|
|
234
238
|
|
|
235
239
|
specification CancellingAReservation
|
|
236
240
|
given caller
|
|
@@ -353,6 +357,8 @@ module Berths
|
|
|
353
357
|
BerthDamageReported
|
|
354
358
|
for reservationId
|
|
355
359
|
event BerthDamageReported
|
|
360
|
+
screen RecordDeparture
|
|
361
|
+
action RecordDeparture for screen
|
|
356
362
|
|
|
357
363
|
specification RecordingACleanDeparture
|
|
358
364
|
given caller
|
|
@@ -58,6 +58,8 @@ module Invoicing
|
|
|
58
58
|
amount Decimal = amount
|
|
59
59
|
constraint IssueOnce
|
|
60
60
|
unique event InvoiceIssued
|
|
61
|
+
screen IssueInvoice
|
|
62
|
+
action IssueInvoice for screen
|
|
61
63
|
|
|
62
64
|
slice StateView OpenInvoices
|
|
63
65
|
description "Todo list: membership means 'still to collect'. The rules below read it (it lags: an unguarded read is not protection)."
|
|
@@ -138,6 +140,9 @@ module Invoicing
|
|
|
138
140
|
constraint SettleOrVoid
|
|
139
141
|
unique event InvoiceSettled
|
|
140
142
|
unique event InvoiceVoided
|
|
143
|
+
screen SettleOrVoidInvoice
|
|
144
|
+
action SettleInvoice for screen
|
|
145
|
+
action VoidInvoice for screen
|
|
141
146
|
|
|
142
147
|
specification SettlingAnOpenInvoice
|
|
143
148
|
given caller
|
|
@@ -186,6 +191,8 @@ module Invoicing
|
|
|
186
191
|
message "Only a received, not yet reversed payment can be reversed" // NOT enforced: the view lags (PLAY0268 at binding)
|
|
187
192
|
produces event PaymentReversed
|
|
188
193
|
amount Decimal = amount
|
|
194
|
+
screen ReversePayment
|
|
195
|
+
action ReversePayment for screen
|
|
189
196
|
|
|
190
197
|
specification ReversingAReceivedPayment
|
|
191
198
|
given caller
|
|
@@ -55,6 +55,8 @@ module Invoicing
|
|
|
55
55
|
amount Decimal = amount
|
|
56
56
|
constraint IssueOnce
|
|
57
57
|
unique event InvoiceIssued
|
|
58
|
+
screen IssueInvoice
|
|
59
|
+
action IssueInvoice for screen
|
|
58
60
|
|
|
59
61
|
specification IssuingAnInvoice
|
|
60
62
|
given caller
|
|
@@ -101,6 +103,9 @@ module Invoicing
|
|
|
101
103
|
constraint SettleOrVoid
|
|
102
104
|
unique event InvoiceSettled
|
|
103
105
|
unique event InvoiceVoided
|
|
106
|
+
screen SettleOrVoidInvoice
|
|
107
|
+
action SettleInvoice for screen
|
|
108
|
+
action VoidInvoice for screen
|
|
104
109
|
|
|
105
110
|
specification SettlingAnInvoice
|
|
106
111
|
given caller
|
|
@@ -164,6 +169,8 @@ module Invoicing
|
|
|
164
169
|
command RequestPayment
|
|
165
170
|
invoiceId InvoiceId identifier
|
|
166
171
|
produces event PaymentRequested
|
|
172
|
+
screen RequestPayment
|
|
173
|
+
action RequestPayment for screen
|
|
167
174
|
|
|
168
175
|
specification RequestingPayment
|
|
169
176
|
given caller
|
|
@@ -378,6 +385,8 @@ module Invoicing
|
|
|
378
385
|
amount > 0 message "A top-up needs an amount above zero"
|
|
379
386
|
produces event CreditToppedUp
|
|
380
387
|
amount Decimal = amount
|
|
388
|
+
screen TopUpCredit
|
|
389
|
+
action TopUpCredit for screen
|
|
381
390
|
|
|
382
391
|
specification ToppingUpCredit
|
|
383
392
|
given caller
|
|
@@ -101,6 +101,14 @@ Ask the batch below only for what the request leaves open: (1) origin of each ac
|
|
|
101
101
|
(`references/read-model-design.md`). One actor's point of view
|
|
102
102
|
per screen, at a real beat of the story, not one per persona for symmetry; know where the
|
|
103
103
|
actor sees each state change's result. Beyond Level 1: `cratis-screenplay-ui-composition`.
|
|
104
|
+
**Placement** (Screenplay 6): a State Change slice's screen says what it fits, in order of
|
|
105
|
+
preference (`fits dialog, drawer, pane`); the hook that starts it (a `button` naming the slice
|
|
106
|
+
in a template's actions outlet) picks the first fit the page has free, and names a place
|
|
107
|
+
(`opens dialog|drawer|in slot <name>`) only when it needs another one. A command whose inputs
|
|
108
|
+
all resolve from the selected row or generated values can be issued by a `runs` hook and needs
|
|
109
|
+
no screen. Every State Change command needs an issuer (a screen action, a hook, an attached
|
|
110
|
+
behavior `execute` or a reaction; a form alone is not one), or `PLAY0533` warns on every check. Once the application
|
|
111
|
+
declares navigation, a screen nothing reaches (no hook, navigation or action leads to it) issues nothing.
|
|
104
112
|
8. **Lineage pass.** After each field edit run `--check field-origins,input-surfaces`. Build the matrix in `references/field-lineage.md` from the `.play` files
|
|
105
113
|
(read them), not from memory or an earlier summary. For each read model, write one line per
|
|
106
114
|
contributing event in its StateView slice `documentation`: which fields it sets and why. An
|
package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md
CHANGED
|
@@ -114,6 +114,8 @@ module Rentals
|
|
|
114
114
|
bikeId BikeId = bikeId
|
|
115
115
|
startTime DateTime = startTime
|
|
116
116
|
reservedAt DateTime = $context.occurred
|
|
117
|
+
screen ReserveBike
|
|
118
|
+
action ReserveBike for screen
|
|
117
119
|
|
|
118
120
|
specification RejectingAStartTimeInThePast
|
|
119
121
|
given clock "2026-06-01T09:00:00Z"
|
|
@@ -58,7 +58,8 @@ implication rule. Never leave it implicit.
|
|
|
58
58
|
|
|
59
59
|
After every edit that adds, renames or removes a field, run the opt-in structural checks on
|
|
60
60
|
the model root rather than waiting for the audit: `field-origins` (a read-model field with no
|
|
61
|
-
origin), `input-surfaces` (a command nothing issues
|
|
61
|
+
origin), `input-surfaces` (an action with no issuing screen or form; a command nothing issues is
|
|
62
|
+
`PLAY0533` on every check since Screenplay 6), `data-bindings`, `query-keys` and
|
|
62
63
|
`event-consumers`. Use `--check` on the standalone tool or the MCP `diagnostics` `checks`;
|
|
63
64
|
flags and versions are in `cratis-screenplay-toolchain`. They run only when the whole model
|
|
64
65
|
has no source errors, so fix those first and never read a skipped check as clean.
|
|
@@ -39,6 +39,8 @@ module Billing
|
|
|
39
39
|
amount Int
|
|
40
40
|
produces event AmountRecorded
|
|
41
41
|
amount Int = amount
|
|
42
|
+
screen RecordAmount
|
|
43
|
+
action RecordAmount for screen
|
|
42
44
|
specification RecordingAnAmount
|
|
43
45
|
description "Witnesses that the agreed amount is retained"
|
|
44
46
|
when RecordAmount amount = 10
|
|
@@ -45,6 +45,8 @@ module Invoicing
|
|
|
45
45
|
discount DiscountPercentage
|
|
46
46
|
produces event DiscountGranted
|
|
47
47
|
discount DiscountPercentage = discount
|
|
48
|
+
screen GrantDiscount
|
|
49
|
+
action GrantDiscount for screen
|
|
48
50
|
specification GrantingAValidDiscount
|
|
49
51
|
when GrantDiscount
|
|
50
52
|
invoiceId = "9c858901-8a57-4791-81fe-4c455b099bc9"
|
package/package/corpus/skills/cratis-screenplay-specifications/references/examples-and-routes.md
CHANGED
|
@@ -37,6 +37,8 @@ module Projects
|
|
|
37
37
|
name String
|
|
38
38
|
produces event ProjectRegistered
|
|
39
39
|
name String = name
|
|
40
|
+
screen Register
|
|
41
|
+
action RegisterProject for screen
|
|
40
42
|
specification RegisteringTheDefault
|
|
41
43
|
when DefaultProject
|
|
42
44
|
projectId = "3fa85f64-5717-4562-b3fc-2c963f66afa6"
|
|
@@ -65,6 +65,8 @@ module Billing
|
|
|
65
65
|
message "The amount must be positive"
|
|
66
66
|
produces event AmountRecorded
|
|
67
67
|
amount Int = amount
|
|
68
|
+
screen RecordAmount
|
|
69
|
+
action RecordAmount for screen
|
|
68
70
|
specification RecordingAmounts
|
|
69
71
|
description "An accountant can record a positive amount"
|
|
70
72
|
parameter amount Int
|
package/package/corpus/skills/cratis-screenplay-specifications/references/whitespace-rules.md
CHANGED
|
@@ -53,6 +53,8 @@ module Names
|
|
|
53
53
|
name = name
|
|
54
54
|
event NameRegistered
|
|
55
55
|
name Name
|
|
56
|
+
screen RegisterConcept
|
|
57
|
+
action RegisterConcept for screen
|
|
56
58
|
specification RejectingWhitespaceOnAConcept
|
|
57
59
|
when RegisterConcept
|
|
58
60
|
id = "name-1"
|
|
@@ -90,6 +92,8 @@ module Names
|
|
|
90
92
|
name = name
|
|
91
93
|
event TextRegistered
|
|
92
94
|
name String
|
|
95
|
+
screen RegisterProperty
|
|
96
|
+
action RegisterProperty for screen
|
|
93
97
|
specification RejectingWhitespaceOnAProperty
|
|
94
98
|
when RegisterProperty
|
|
95
99
|
id = "name-1"
|
|
@@ -25,6 +25,8 @@ module Invoicing
|
|
|
25
25
|
invoiceNumber InvoiceNumber = invoiceNumber
|
|
26
26
|
constraint UniqueInvoiceNumber
|
|
27
27
|
unique invoiceNumber on InvoiceRegistered
|
|
28
|
+
screen RegisterInvoice
|
|
29
|
+
action RegisterInvoice for screen
|
|
28
30
|
specification RegisteringAnInvoice
|
|
29
31
|
given caller
|
|
30
32
|
authenticated
|
|
@@ -36,6 +36,8 @@ module Membership
|
|
|
36
36
|
event MembershipRenewed generation 1
|
|
37
37
|
event MembershipRenewed generation 2
|
|
38
38
|
months Int
|
|
39
|
+
screen RenewMembership
|
|
40
|
+
action RenewMembership for screen
|
|
39
41
|
specification RenewingForSixMonths
|
|
40
42
|
when RenewMembership
|
|
41
43
|
membershipId = "5b0f4c3e-2d1a-4e6b-8f7c-9a1b2c3d4e05"
|
|
@@ -51,6 +53,8 @@ module Membership
|
|
|
51
53
|
for membershipId
|
|
52
54
|
event MembershipPaused
|
|
53
55
|
id "MembershipSuspended"
|
|
56
|
+
screen PauseMembership
|
|
57
|
+
action PauseMembership for screen
|
|
54
58
|
|
|
55
59
|
slice StateChange EndMembership
|
|
56
60
|
description "Ending by the member and termination for breach are different facts"
|
|
@@ -65,6 +69,8 @@ module Membership
|
|
|
65
69
|
for membershipId
|
|
66
70
|
event MembershipEnded
|
|
67
71
|
event MembershipTerminatedForBreach
|
|
72
|
+
screen EndMembership
|
|
73
|
+
action EndMembership for screen
|
|
68
74
|
specification EndingByChoice
|
|
69
75
|
when EndMembership
|
|
70
76
|
membershipId = "5b0f4c3e-2d1a-4e6b-8f7c-9a1b2c3d4e05"
|
|
@@ -62,6 +62,8 @@ module Membership
|
|
|
62
62
|
constraint UniqueMemberEmail
|
|
63
63
|
unique email on MemberRegistered
|
|
64
64
|
ignore casing
|
|
65
|
+
screen RegisterMember
|
|
66
|
+
action RegisterMember for screen
|
|
65
67
|
specification RegisteringAMember
|
|
66
68
|
given caller
|
|
67
69
|
authenticated
|
|
@@ -107,6 +109,8 @@ module Courses
|
|
|
107
109
|
seats Int
|
|
108
110
|
produces event CourseOpened
|
|
109
111
|
seats Int = seats
|
|
112
|
+
screen OpenCourse
|
|
113
|
+
action OpenCourse for screen
|
|
110
114
|
specification OpeningACourse
|
|
111
115
|
given caller
|
|
112
116
|
authenticated
|
|
@@ -184,6 +188,8 @@ module Courses
|
|
|
184
188
|
released by EnrolmentWithdrawn
|
|
185
189
|
constraint EnrolOnce
|
|
186
190
|
unique event MemberEnrolled
|
|
191
|
+
screen EnrolMember
|
|
192
|
+
action EnrolMember for screen
|
|
187
193
|
specification EnrollingAMember
|
|
188
194
|
given caller
|
|
189
195
|
authenticated
|
|
@@ -276,6 +282,8 @@ module Courses
|
|
|
276
282
|
courseId CourseId = courseId
|
|
277
283
|
constraint WithdrawOnce
|
|
278
284
|
unique event EnrolmentWithdrawn
|
|
285
|
+
screen WithdrawEnrolment
|
|
286
|
+
action WithdrawEnrolment for screen
|
|
279
287
|
specification WithdrawingAnEnrolment
|
|
280
288
|
given caller
|
|
281
289
|
authenticated
|
|
@@ -70,6 +70,7 @@ superseded statement needs context; exceptions do not change the contract.
|
|
|
70
70
|
| Scope/checks | `--scope <address>`, `--check <names>`; a scoped pass is not whole-application success | `validate --executable` (bundled binder, no write), `--check <names>`, `--scope`; `render --scope`/`--check`; `cratis screenplay conform`, `cratis screenplay conform-namespace` |
|
|
71
71
|
| Declared gate | `screenplay <root> --print-gate`, `--format json`, `--no-gate-file` | `validate <root> --print-gate`, `--no-gate-file`; the same `screenplay.json` |
|
|
72
72
|
| Reference execution | `screenplay test <root>` or MCP `run-specifications` | Discover bundled MCP capability; target tests are not V4 |
|
|
73
|
+
| Version migration | `screenplay migrate <root> --from <major> [--to <major>] [--dry-run] [--report <file>]` or MCP `migrate` (read-only); exit 2 means review | Use the standalone tool; see `cratis-screenplay-modeling-lifecycle` |
|
|
73
74
|
| MCP | `screenplay mcp <root>`; discover schemas | `cratis screenplay mcp [root]`; registered by `cratis ai install` |
|
|
74
75
|
| Render boundary | Binder admission is not Stage admission | The CLI renders only ESM versions it knows; a newer bound model gets `CLI-RENDER-004` |
|
|
75
76
|
|
package/package/corpus/skills/cratis-screenplay-toolchain/references/automation-translate-example.md
CHANGED
|
@@ -19,6 +19,8 @@ module Membership
|
|
|
19
19
|
memberId MemberId identifier
|
|
20
20
|
produces event MemberSubscribed
|
|
21
21
|
subscribedAt DateTime = $context.occurred
|
|
22
|
+
screen Subscribe
|
|
23
|
+
action Subscribe for screen
|
|
22
24
|
specification SubscribingAMember
|
|
23
25
|
given clock "2026-10-05T09:00:00Z"
|
|
24
26
|
when Subscribe
|