@cratis/pi 7.138.1 → 7.140.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/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 +3 -1
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +5 -2
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/screen-authoring-workflow.md +43 -28
- package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +4 -0
- 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 +6 -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 +26 -3
- 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/preferred-syntax.md +2 -1
- 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 +22173 -17449
- 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 +61 -78
- 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/design-system-and-themes.md +257 -0
- 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 +10 -10
- package/package/corpus/skills/cratis-screenplay-ui-composition/verification.json +12 -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
|
@@ -41,22 +41,32 @@ module Billing
|
|
|
41
41
|
command SendInvoice
|
|
42
42
|
invoiceId InvoiceId identifier
|
|
43
43
|
produces event InvoiceSent
|
|
44
|
+
screen SendInvoice
|
|
45
|
+
action SendInvoice for screen
|
|
44
46
|
slice StateChange MarkOverdue
|
|
45
47
|
command MarkOverdue
|
|
46
48
|
invoiceId InvoiceId identifier
|
|
47
49
|
produces event InvoiceMarkedOverdue
|
|
50
|
+
screen MarkOverdue
|
|
51
|
+
action MarkOverdue for screen
|
|
48
52
|
slice StateChange PayInvoice
|
|
49
53
|
command PayInvoice
|
|
50
54
|
invoiceId InvoiceId identifier
|
|
51
55
|
produces event InvoicePaid
|
|
56
|
+
screen PayInvoice
|
|
57
|
+
action PayInvoice for screen
|
|
52
58
|
slice StateChange SendReminder
|
|
53
59
|
command SendReminder
|
|
54
60
|
invoiceId InvoiceId identifier
|
|
55
61
|
produces event ReminderSent
|
|
62
|
+
screen SendReminder
|
|
63
|
+
action SendReminder for screen
|
|
56
64
|
slice StateChange WriteOffInvoice
|
|
57
65
|
command WriteOffInvoice
|
|
58
66
|
invoiceId InvoiceId identifier
|
|
59
67
|
produces event InvoiceWrittenOff
|
|
68
|
+
screen WriteOffInvoice
|
|
69
|
+
action WriteOffInvoice for screen
|
|
60
70
|
slice StateView InvoiceStatus
|
|
61
71
|
readmodel Invoice
|
|
62
72
|
invoiceId InvoiceId key
|
|
@@ -136,7 +146,8 @@ workflow CollectOverdue
|
|
|
136
146
|
`at`, `manual`), `action <Name> sends <Command> [attempts n] [timeout] [retry after]`,
|
|
137
147
|
`decide <Name> when <condition>` with exactly two outlets, `wait` for an event or a
|
|
138
148
|
duration, `approval <Name> by <Persona or Policy>`, `foreach <Name> over <collection>` and
|
|
139
|
-
`join all|any|at least n`. Edges are `<outlet> -> <Node>` under their node
|
|
149
|
+
`join all|any|at least n`. Edges are `<outlet> -> <Node>` under their node; a workflow
|
|
150
|
+
outlet is a node's outcome, unrelated to a template's UI outlet.
|
|
140
151
|
- An unconnected negative outlet (`failed`, `rejected`, `expired`) fails the run; an
|
|
141
152
|
unconnected positive outlet ends that branch. Give every event wait and approval an
|
|
142
153
|
`expires after` (PLAY0849 warns otherwise).
|
|
@@ -110,6 +110,8 @@ module Onboarding
|
|
|
110
110
|
workspaceId WorkspaceId
|
|
111
111
|
produces event InvitationAccepted
|
|
112
112
|
workspaceId WorkspaceId = workspaceId
|
|
113
|
+
screen AcceptInvitation
|
|
114
|
+
action AcceptInvitation for screen
|
|
113
115
|
slice StateChange SendWelcomeMail
|
|
114
116
|
command SendWelcomeMail
|
|
115
117
|
workspaceId WorkspaceId identifier
|
|
@@ -215,6 +217,8 @@ module Collections
|
|
|
215
217
|
invoiceId InvoiceId
|
|
216
218
|
amount Decimal
|
|
217
219
|
sentAt DateTime
|
|
220
|
+
screen SendInvoice
|
|
221
|
+
action SendInvoice for screen
|
|
218
222
|
slice StateChange CloseInvoice
|
|
219
223
|
command CloseInvoice
|
|
220
224
|
invoiceId InvoiceId identifier
|
|
@@ -155,6 +155,8 @@ module Finance
|
|
|
155
155
|
slice StateChange RecordContact
|
|
156
156
|
command RecordContact
|
|
157
157
|
name ContactName
|
|
158
|
+
screen RecordContact
|
|
159
|
+
action RecordContact for screen
|
|
158
160
|
```
|
|
159
161
|
|
|
160
162
|
A top-level `purpose` has optional singleton `description`, `basis` (optional
|
package/package/corpus/skills/cratis-screenplay-command-surface/references/date-comparisons.md
CHANGED
|
@@ -70,6 +70,8 @@ module Retention
|
|
|
70
70
|
produces event WindowKept
|
|
71
71
|
from DateTime = from
|
|
72
72
|
to DateTime = to
|
|
73
|
+
screen KeepWindow
|
|
74
|
+
action KeepWindow for screen
|
|
73
75
|
specification AcceptingEqualInstantsWithDifferentOffsets
|
|
74
76
|
when KeepWindow
|
|
75
77
|
windowId = "3fa85f64-5717-4562-b3fc-2c963f66afa6"
|
|
@@ -23,6 +23,8 @@ module Invoicing
|
|
|
23
23
|
status InvoiceStatus
|
|
24
24
|
produces event InvoiceSent
|
|
25
25
|
status InvoiceStatus = status
|
|
26
|
+
screen SendingInvoice
|
|
27
|
+
action SendInvoice for screen
|
|
26
28
|
specification Sending
|
|
27
29
|
when SendInvoice
|
|
28
30
|
invoiceId = "6f9619ff-8b86-d011-b42d-00c04fc964ff"
|
package/package/corpus/skills/cratis-screenplay-command-surface/references/policy-persona-seed.md
CHANGED
|
@@ -58,6 +58,8 @@ module Newsletter
|
|
|
58
58
|
authorize PublicAccess
|
|
59
59
|
produces event SubscriberSignedUp
|
|
60
60
|
email EmailAddress = email
|
|
61
|
+
screen SubscribeToNewsletter
|
|
62
|
+
action SubscribeToNewsletter for screen
|
|
61
63
|
specification SubscribingWithoutAnIdentity
|
|
62
64
|
when SubscribeToNewsletter
|
|
63
65
|
subscriberId = "3fa85f64-5717-4562-b3fc-2c963f66afa6"
|
package/package/corpus/skills/cratis-screenplay-command-surface/references/shop-generation.md
CHANGED
|
@@ -59,6 +59,8 @@ module Shop
|
|
|
59
59
|
returns
|
|
60
60
|
customerId = customerId
|
|
61
61
|
inviteCode = inviteCode
|
|
62
|
+
screen Register
|
|
63
|
+
action RegisterCustomer for screen
|
|
62
64
|
specification RegistersWithPinnedValues
|
|
63
65
|
when RegisterCustomer
|
|
64
66
|
for "cus_01ARZ3NDEKTSV4RRFFQ69G5FAV"
|
|
@@ -83,6 +85,8 @@ module Shop
|
|
|
83
85
|
invoiceNumber InvoiceNumber = invoiceNumber
|
|
84
86
|
pickupTicket TicketNumber = pickupTicket
|
|
85
87
|
returns orderId
|
|
88
|
+
screen Place
|
|
89
|
+
action PlaceOrder for screen
|
|
86
90
|
specification PlacesWithPinnedValue
|
|
87
91
|
given clock "2026-10-02T09:00:00Z"
|
|
88
92
|
when PlaceOrder
|
|
@@ -43,6 +43,8 @@ module Library
|
|
|
43
43
|
produces DocumentCreated
|
|
44
44
|
for id
|
|
45
45
|
owner = owner
|
|
46
|
+
screen CreateDocument
|
|
47
|
+
action CreateDocument for screen
|
|
46
48
|
slice StateChange RenameDocument
|
|
47
49
|
command RenameDocument
|
|
48
50
|
id DocumentId identifier
|
|
@@ -57,6 +59,8 @@ module Library
|
|
|
57
59
|
title = title
|
|
58
60
|
event DocumentRenamed
|
|
59
61
|
title String
|
|
62
|
+
screen RenameDocument
|
|
63
|
+
action RenameDocument for screen
|
|
60
64
|
specification OwnerRenames
|
|
61
65
|
given DocumentCreated
|
|
62
66
|
for "3fa85f64-5717-4562-b3fc-2c963f66afa6"
|
|
@@ -89,6 +93,8 @@ module Library
|
|
|
89
93
|
for id
|
|
90
94
|
event DocumentReviewed
|
|
91
95
|
event ReviewIndependent
|
|
96
|
+
screen ReviewDocument
|
|
97
|
+
action ReviewDocument for screen
|
|
92
98
|
specification IndependentReview
|
|
93
99
|
when ReviewDocument
|
|
94
100
|
id = "3fa85f64-5717-4562-b3fc-2c963f66afa6"
|
|
@@ -89,6 +89,8 @@ module Moorings
|
|
|
89
89
|
damage DamageDescription
|
|
90
90
|
produces event HullDamageReported
|
|
91
91
|
damage DamageDescription = damage
|
|
92
|
+
screen ReportHullDamage
|
|
93
|
+
action ReportHullDamage for screen
|
|
92
94
|
specification ReportingScratchedBow
|
|
93
95
|
when ReportHullDamage
|
|
94
96
|
berthNumber = "A-12"
|
|
@@ -154,6 +154,8 @@ module Moorings
|
|
|
154
154
|
authorize IsHarbourmaster
|
|
155
155
|
produces event BerthAssigned
|
|
156
156
|
berthNumber BerthNumber = berthNumber
|
|
157
|
+
screen AssignBerth
|
|
158
|
+
action AssignBerth for screen
|
|
157
159
|
specification AssigningABerthAsHarbourmaster
|
|
158
160
|
given caller
|
|
159
161
|
authenticated
|
package/package/corpus/skills/cratis-screenplay-event-modeling/references/invoicing-example.md
CHANGED
|
@@ -30,6 +30,8 @@ module Invoicing
|
|
|
30
30
|
invoiceNumber InvoiceNumber = invoiceNumber
|
|
31
31
|
registeredAt DateTime = $context.occurred
|
|
32
32
|
event InvoiceSent
|
|
33
|
+
screen RegisterInvoice
|
|
34
|
+
action RegisterInvoice for screen
|
|
33
35
|
|
|
34
36
|
slice StateView InvoiceList
|
|
35
37
|
readmodel InvoiceListReadModel
|
package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/intent-example.md
CHANGED
|
@@ -65,6 +65,8 @@ module Cloakroom
|
|
|
65
65
|
unique ticketNumber on CoatTakenIn
|
|
66
66
|
released by CoatHandedBack
|
|
67
67
|
message "That ticket number is already in use"
|
|
68
|
+
screen TakeInCoat
|
|
69
|
+
action TakeInCoat for screen
|
|
68
70
|
specification TakingInACoat
|
|
69
71
|
given caller
|
|
70
72
|
authenticated
|
|
@@ -122,6 +124,8 @@ module Cloakroom
|
|
|
122
124
|
require CoatStatus.onHook == true
|
|
123
125
|
message "That coat is not on a hook"
|
|
124
126
|
produces event CoatHandedBack
|
|
127
|
+
screen HandBackCoat
|
|
128
|
+
action HandBackCoat for screen
|
|
125
129
|
specification HandingBackACoat
|
|
126
130
|
given caller
|
|
127
131
|
authenticated
|
package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/re-entry-and-passes.md
CHANGED
|
@@ -98,6 +98,8 @@ module Visits
|
|
|
98
98
|
reason VisitReason
|
|
99
99
|
produces event VisitBooked
|
|
100
100
|
reason VisitReason = reason
|
|
101
|
+
screen BookVisit
|
|
102
|
+
action BookVisit for screen
|
|
101
103
|
specification BookingATypicalVisit
|
|
102
104
|
when TypicalBooking
|
|
103
105
|
petId = "3f2a1b0c-9d8e-4f7a-b6c5-d4e3f2a1b001"
|
|
@@ -131,6 +133,8 @@ module Visits
|
|
|
131
133
|
description "Pass 0. Evidence: E1"
|
|
132
134
|
command BookVisit
|
|
133
135
|
produces event VisitBooked
|
|
136
|
+
screen BookVisit
|
|
137
|
+
action BookVisit for screen
|
|
134
138
|
```
|
|
135
139
|
|
|
136
140
|
## 3. Asking during extraction
|
|
@@ -89,8 +89,8 @@ editing. Existing standalone `screenplay mcp` users may retain that entry point.
|
|
|
89
89
|
skipped completeness checks are not passes. Details: `references/mcp-tools.md`.
|
|
90
90
|
5. Echo `sourceRevision` on subsequent pages. Restart the query after drift;
|
|
91
91
|
never combine pages from different snapshots.
|
|
92
|
-
6. For screens, also discover the template, form,
|
|
93
|
-
|
|
92
|
+
6. For screens, also discover the template (its slots and outlets), form,
|
|
93
|
+
toolbar and package/icon declarations that provide context. A component binding with no traced
|
|
94
94
|
data source is not a shortcut; fix the model source.
|
|
95
95
|
|
|
96
96
|
Scope reads to the relevant container/document, not the whole merged AST.
|
package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md
CHANGED
|
@@ -22,7 +22,7 @@ repository is the full list; this page is the authoring summary.
|
|
|
22
22
|
## Accepted constructs
|
|
23
23
|
|
|
24
24
|
**Top level:** `domain`, `import`, `concept`, `type`, `policy`, `persona`,
|
|
25
|
-
`authentication`, `identity`, `purpose`, `trigger`, `theme`, `layout`, `ui profile`, `behavior`,
|
|
25
|
+
`authentication`, `identity`, `purpose`, `trigger`, `design system` (one per application: `modes`, `default theme`, `tokens`, `components`, `words`, `rules`), `theme` (`implements`, `compatible with`, `palette`, `values`, a block per mode), `layout`, `ui profile`, `behavior`,
|
|
26
26
|
`module`, `seed`, authoring-only `system`, and admitted `eventsource` with its `stream`s (ESM v8).
|
|
27
27
|
|
|
28
28
|
**Inside a module:** `description`, `authorize`, `import "<glob>"`,
|
|
@@ -150,6 +150,8 @@ module Projects
|
|
|
150
150
|
name not empty message "Project name is required"
|
|
151
151
|
produces event ProjectRegistered
|
|
152
152
|
name ProjectName = name
|
|
153
|
+
screen RegisterProject
|
|
154
|
+
action RegisterProject for screen
|
|
153
155
|
specification RegisteringAProject
|
|
154
156
|
when RegisterProject
|
|
155
157
|
projectId = "3fa85f64-5717-4562-b3fc-2c963f66afa6"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
- Formatting and recovery limits
|
|
26
26
|
- Code attachments
|
|
27
27
|
|
|
28
|
-
The standalone MCP server lists
|
|
28
|
+
The standalone MCP server lists 47 tools from Screenplay 6.0 (including the MCP-Apps visualization tool and `migrate`); `tools/list` is the authority for the installed server, and the CLI-bundled MCP (`cratis screenplay mcp`) can be an older Screenplay that lacks newer tools.
|
|
29
29
|
|
|
30
30
|
The supported CLI launch is `cratis screenplay mcp <model-root>`, or `cratis screenplay mcp`
|
|
31
31
|
alone inside a project, where the CLI reuses existing model/workspace roots.
|
|
@@ -68,12 +68,15 @@ the [MCP loop](mcp-loop.md).
|
|
|
68
68
|
| --- | --- | --- |
|
|
69
69
|
| Understanding | `describe-application`, `search-declarations`, `find-declaration`, `declaration-details` | Navigate logical hierarchy and inspect bounded details |
|
|
70
70
|
| References and examples | `find-references`, `dependencies`, `dependency-graph`, `find-fixtures`, `find-assertion-gaps`, `find-specification-obligations`, `find-modeling-smells`, `trace-lineage`, `semantic-diff` | Inspect declared relationships and authored examples, not executed coverage |
|
|
71
|
-
| Source and validation | `diagnostics`, `ui-profiles
|
|
71
|
+
| Source and validation | `diagnostics`, `ui-profiles` (also the design system, themes and resolved values per mode), `read-document`, `merged-document`, `syntax-schema` | Read exact source or typed structure and diagnose problems |
|
|
72
72
|
| Workspace inspection | `open-workspace`, `read-workspace`, `read-ast`, `workspace-state`, `export-workspace`, `repair-capabilities` | Obtain current identities, handles, readiness, code attachment requirements, source-map locations, durable-state status and the repair catalog |
|
|
73
73
|
| Visual (MCP-Apps hosts only) | `visualize-model` | Draw the board for the model or a `proposalId`; its `sketch` argument previews a what-if of whole documents. Reads only |
|
|
74
74
|
| Planning | `propose-source`, `propose-ast`, `propose-rename`, `propose-move`, `propose-repair`, `propose-property`, `propose-number-enum-members`, `propose-extract-inline-event`, `propose-inline-event`, `propose`, `recommend-layout`, `expand-layout` | Produce validated, reviewable candidates without writing them |
|
|
75
75
|
| Review | `read-proposal`, `discard-proposal` | Inspect exact changes, dropped comments and proposed attachments, or abandon a connection-local proposal |
|
|
76
76
|
| Reference execution | `run-specifications` | Run the workspace or a retained proposal candidate read-only; not attached code or target tests |
|
|
77
|
+
|
|
78
|
+
`propose-ast` node kinds for the design (Screenplay with design systems): `DesignSystemSyntax`, `DesignTokenCategorySyntax`, `DesignTokenSyntax`, `DesignComponentSyntax`, `DesignVariantSyntax`, `DesignStateSyntax`, `DesignAssignmentSyntax`, `DesignWordsSyntax`, `DesignContrastRuleSyntax`, `ThemeModeValuesSyntax`; `ThemeSyntax` gains `implements`, `palette`, `values` and `modeValues`. The tool count is unchanged: `ui-profiles` carries the read.
|
|
79
|
+
| Version migration | `migrate` | Read-only: report what `screenplay migrate --from <major> [--to <major>]` rewrites and, for a named `document`, its migrated source to write through a proposal (`cratis-screenplay-modeling-lifecycle`) |
|
|
77
80
|
| Effects | `apply`, `recover-workspace` | Apply an accepted plan or explicitly recover an interrupted write |
|
|
78
81
|
|
|
79
82
|
`propose-move` moves a slice to another feature, a feature to another module or feature, or a single command, event, read model, projection, query, reaction or capture to another slice, keeping identities: copy the `target` and `newParent` `{kind, parts}` addresses from the identity inventory (`newParent` is the destination slice for a declaration) and pass `expectedRevision` and `expectedCatalogRevision`. It repairs qualified references and `depends on`, and refuses identity loss, collisions, descendant destinations, name capture (a reference that would resolve to a different declaration), inherited authorization or screen-interaction changes and glob imports; review `moveReport` (`identityMigrations`, `referenceRepairs`, `fragmentsMoved`, and `specificationsCarried` for a declaration). It does not rename events, change pins or move files. Use it for legacy re-slicing instead of retyping declarations. Its report document fields are plain strings, not nested identity objects.
|
|
@@ -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,55 +144,70 @@ 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
|
|
|
184
|
-
`ui-profiles` (Screenplay 4.201.0 or later) reads each `ui profile`'s root template, shell options, appearance, new screens default and
|
|
187
|
+
`ui-profiles` (Screenplay 4.201.0 or later) reads each `ui profile`'s root template, shell options, appearance, theme (and `resolvedTheme`, the theme and mode it resolves to), new screens default and
|
|
185
188
|
shell diagnostics, and lists the own templates that could be the root template (`applicableRootTemplates`) or the new screens
|
|
186
189
|
default (`applicableNewScreenTemplates`); pick from those instead of guessing. Edit `RootTemplateSyntax` (`name`, `blueprint`,
|
|
187
190
|
`version`), `ShellOptionSyntax` (`add` to the root's `options`; `syntaxKind` is `Word`, `Text`, `Number` or `Flag`),
|
|
188
|
-
`ProfileAppearanceSyntax` (`colorScheme
|
|
191
|
+
`ProfileAppearanceSyntax` (`colorScheme`; `accent`, `corners` and `font` are deprecated, `PLAY0929`) and `NewScreenTemplateSyntax` with `propose-ast`. A refusal is the answer:
|
|
189
192
|
`PLAY0790` (a template nothing declares), `PLAY0792` (a blueprint the profile does not list), `PLAY0794` (a template that cannot
|
|
190
|
-
be the shell), `PLAY0795` (no `content` slot), `PLAY0797` (a bad color scheme
|
|
193
|
+
be the shell), `PLAY0795` (no `content` slot), `PLAY0797` (a bad color scheme or identity value), `PLAY0799` (a new screens default that
|
|
191
194
|
cannot start a screen). `PLAY0796` (an option the shell does not expose) and `PLAY0791` (the legacy `layout` line) are warnings:
|
|
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
|
-
|
|
198
|
+
### The design system and its themes
|
|
199
|
+
|
|
200
|
+
The same `ui-profiles` read (no new tool; the tool count is unchanged) also returns the application's `design system` (modes, tokens,
|
|
201
|
+
components, words, rules), every theme with its palette, values and per-mode values, each theme's resolved tokens and components per mode,
|
|
202
|
+
the design diagnostics `PLAY0916` to `PLAY0930` and the closed vocabulary of token categories, component parts and states: choose from
|
|
203
|
+
those, do not guess. Edit with `propose-ast` on `DesignSystemSyntax`, `DesignTokenCategorySyntax`, `DesignTokenSyntax`,
|
|
204
|
+
`DesignComponentSyntax`, `DesignVariantSyntax`, `DesignStateSyntax`, `DesignAssignmentSyntax`, `DesignWordsSyntax`,
|
|
205
|
+
`DesignContrastRuleSyntax` and `ThemeModeValuesSyntax`; `ThemeSyntax` gains `implements`, `palette`, `values` and `modeValues`. A refusal is
|
|
206
|
+
the answer (`PLAY0916` a malformed design, `PLAY0920` an undeclared token, `PLAY0921` a color token without a value in a mode,
|
|
207
|
+
`PLAY0925` or `PLAY0926` a theme that does not implement the design system); `PLAY0928` (contrast below a rule) and `PLAY0929`
|
|
208
|
+
(deprecated `appearance` member) are warnings. Grammar and examples: the ui-composition skill's `design-system-and-themes.md`.
|
|
209
|
+
|
|
210
|
+
Requires Screenplay 4.188.0 or later (`screenplay --version`) to `add` the first outlet, item or sub-item to a member
|
|
196
211
|
the node JSON omits while empty; an older MCP server answers "Unknown typed syntax member".
|
|
197
212
|
|
|
198
213
|
## 6. Use Screenplay-owned fixtures
|
|
@@ -99,6 +99,10 @@ model's behalf.
|
|
|
99
99
|
Protection and reaction-privilege checks: [mode compliance](references/mode-compliance.md).
|
|
100
100
|
A client id, secret, authority, sender or mail server in a model is a critical finding: those
|
|
101
101
|
belong in the environment (`cratis-screenplay-authentication-and-onboarding`).
|
|
102
|
+
**Design system check** (when the model draws a UI): exactly one `design system` with a `default theme` (`PLAY0917`, `PLAY0927`);
|
|
103
|
+
every theme a profile selects `implements` it and gives each `color` token a value in every mode (`PLAY0926`, `PLAY0921`); no raw
|
|
104
|
+
`accent`, `corners` or `font` left in a profile's `appearance` (`PLAY0929`); `contrast` rules declared for the text/background pairs
|
|
105
|
+
components use, and no `PLAY0928` waived without a reason. Detail: `cratis-screenplay-ui-composition`.
|
|
102
106
|
12. **Root causes, classify, report** (`references/report-template.md`). Group findings that share
|
|
103
107
|
a declaration; report the root cause with its symptoms under it; severity critical, major or
|
|
104
108
|
minor; kind defect, question or note; verdict with confidence. Never apply changes.
|
|
@@ -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" },
|