@cratis/pi 7.139.0 → 7.141.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-chronicle-hosting/SKILL.md +7 -0
- package/package/corpus/skills/cratis-chronicle-hosting/references/sinks.md +119 -0
- package/package/corpus/skills/cratis-chronicle-hosting/verification.json +5 -1
- package/package/corpus/skills/cratis-chronicle-projection/SKILL.md +8 -0
- package/package/corpus/skills/cratis-chronicle-projection/references/graph-projections.md +25 -0
- package/package/corpus/skills/cratis-chronicle-read-model/SKILL.md +5 -0
- package/package/corpus/skills/cratis-chronicle-read-model/references/sinks.md +133 -0
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +29 -2
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +3 -1
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/screen-authoring-workflow.md +15 -3
- package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +4 -1
- package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +5 -1
- package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +4 -3
- package/package/corpus/skills/cratis-screenplay-model-review/verification.json +3 -2
- package/package/corpus/skills/cratis-screenplay-projections/SKILL.md +6 -1
- package/package/corpus/skills/cratis-screenplay-projections/references/graphs.md +56 -0
- package/package/corpus/skills/cratis-screenplay-projections/verification.json +4 -1
- package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +11 -6
- package/package/corpus/skills/cratis-screenplay-read-surface/references/sinks.md +166 -0
- package/package/corpus/skills/cratis-screenplay-read-surface/verification.json +7 -1
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +8 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/verification.json +2 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +45 -2
- package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +6 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/preferred-syntax.md +2 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +1318 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +4 -1
- package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +6 -8
- 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/ui-profile-and-theme.md +8 -8
- package/package/corpus/skills/cratis-screenplay-ui-composition/verification.json +3 -0
- package/package.json +1 -1
|
@@ -63,6 +63,13 @@ trigger/command reads, all-parts fixtures, PLAY0660–0662 and command-read-only
|
|
|
63
63
|
A `=>` target resolving to an event is an event-target builder, not a read model;
|
|
64
64
|
keep event and read-model names distinct (see projections' public-event targets).
|
|
65
65
|
|
|
66
|
+
## Where a read model is stored
|
|
67
|
+
|
|
68
|
+
No `sink` line means the default sink. `sink <Name>` stores it in a root-declared
|
|
69
|
+
`sink <Name> for readmodels`, never on a `passive` read model (`PLAY0935`); it is the directive only
|
|
70
|
+
when `<Name>` is a declared sink, else a property. `@sink <Type>` is always the property.
|
|
71
|
+
Read [sinks](references/sinks.md) before naming a sink.
|
|
72
|
+
|
|
66
73
|
## `query`
|
|
67
74
|
|
|
68
75
|
Excerpt: the concepts, the read model and the policy are declared elsewhere.
|
|
@@ -86,7 +93,7 @@ bind, including `observable`. Caller-supplied equality
|
|
|
86
93
|
filters on collections bind as ESM v14; `from`, single-result filters, `scoped to`,
|
|
87
94
|
and a `by` block on a list query (or on a non-optional single result) remain PLAY0268, each with its reason. A `performer` query is not refused: it is an opaque read (PLAY0270 information) left out of the executable model ([version gate](../cratis-screenplay-toolchain/references/executable-subset.md#code-attachments-what-binds-what-never-does)). Read
|
|
88
95
|
[equality filters](references/equality-filters.md) for the admitted shape, a complete
|
|
89
|
-
compiled specification model and the Stage/CLI ceilings.
|
|
96
|
+
compiled specification model and the Stage/CLI ceilings.
|
|
90
97
|
|
|
91
98
|
Concept keys/supplied filters validate after authorization: invalid means Validation,
|
|
92
99
|
not absence; omitted optional filters are unchecked. Read [query rejections](../cratis-screenplay-specifications/references/query-rejections.md) when specifying this.
|
|
@@ -129,9 +136,7 @@ query Everyones => Timesheet[]
|
|
|
129
136
|
|
|
130
137
|
⚠️ **The tenant is the default and stays unstated.** A query is scoped to the
|
|
131
138
|
tenant it runs for unless it says otherwise, so `scoped to global` is how a query
|
|
132
|
-
*opts out* and reaches past the tenant
|
|
133
|
-
narrow case the default means the dangerous case is the one you have to write
|
|
134
|
-
down, rather than the one you get by forgetting."*
|
|
139
|
+
*opts out* and reaches past the tenant: the dangerous case is the one you write down.
|
|
135
140
|
|
|
136
141
|
**The scope is a name, not a closed set.** `identity` and `global` are the two the
|
|
137
142
|
language documents, but the grammar accepts any name — what scopes exist follows
|
|
@@ -156,7 +161,7 @@ to a live query exactly as it binds to a one-shot one. The delivery itself is th
|
|
|
156
161
|
target runtime's: the executable model binds `observable` queries (delivery `live`) that
|
|
157
162
|
have no opaque scope/performer and, when filtered, only admitted caller-supplied equality filters (ESM v14).
|
|
158
163
|
|
|
159
|
-
Paging, sorting and change-set delivery for queries are
|
|
164
|
+
Paging, sorting and change-set delivery for queries are planned but **not in the language yet**. Do not invent syntax for them.
|
|
160
165
|
|
|
161
166
|
### `performer`
|
|
162
167
|
|
|
@@ -218,7 +223,7 @@ Authorization runs before lookup, ANDed with module/feature gates; policies see
|
|
|
218
223
|
only `by`, never filters. Pin denial with `given caller` and `then denied`.
|
|
219
224
|
Specs pass `by` and filters by name (PLAY0468 for unknown, repeated or missing
|
|
220
225
|
required arguments); collection results match by read model/key regardless of
|
|
221
|
-
row order.
|
|
226
|
+
row order.
|
|
222
227
|
|
|
223
228
|
A reducer-built view is keyed by event-source id, so a single-instance `by` of another
|
|
224
229
|
nominal type warns `PLAY0690`. Rebuild it as a projection keyed on each `from`: projections
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# Where a read model is stored
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- Default and named sinks
|
|
6
|
+
- Choose a sink
|
|
7
|
+
- A property named `sink`
|
|
8
|
+
- Passive read models have no sink
|
|
9
|
+
- What the deployment and the compiler do with it
|
|
10
|
+
- Diagnostics
|
|
11
|
+
|
|
12
|
+
Requires Screenplay 6.4.0 (`screenplay --version`); older compilers do not know sinks and read
|
|
13
|
+
`sink <Name>` in a read model as a property.
|
|
14
|
+
|
|
15
|
+
## Default and named sinks
|
|
16
|
+
|
|
17
|
+
A sink is where a read model or a graph is stored. Every application has two implicit sinks, one
|
|
18
|
+
for read models and one for graphs, and anything that names no sink uses the default for its kind.
|
|
19
|
+
Never declare a default sink: a model with no `sink` lines keeps its meaning.
|
|
20
|
+
|
|
21
|
+
Declare a **named** sink only when part of the state belongs somewhere else, such as reporting read
|
|
22
|
+
models in a separate database. Declare each one once, at the application root (beside `concept` and
|
|
23
|
+
`module`, never inside one), with the kind it stores: `sink <Name> for readmodels` or
|
|
24
|
+
`sink <Name> for graphs`. Names are unique across the application, compared ignoring case.
|
|
25
|
+
|
|
26
|
+
The model never names a database, an engine or a connection. The deployment binds each sink name
|
|
27
|
+
to storage, so moving reporting read models to another database changes the deployment, not the
|
|
28
|
+
model.
|
|
29
|
+
|
|
30
|
+
## Choose a sink
|
|
31
|
+
|
|
32
|
+
A bare `sink <Name>` line in the read model body chooses it, the same way `passive` is a bare
|
|
33
|
+
directive; it may sit anywhere among the body's directives and properties. The model below is
|
|
34
|
+
complete:
|
|
35
|
+
|
|
36
|
+
```screenplay
|
|
37
|
+
sink Reporting for readmodels
|
|
38
|
+
|
|
39
|
+
concept CustomerId : Uuid
|
|
40
|
+
concept Money : Decimal
|
|
41
|
+
|
|
42
|
+
module Sales
|
|
43
|
+
feature Revenue
|
|
44
|
+
slice StateView CustomerRevenue
|
|
45
|
+
event OrderPlaced
|
|
46
|
+
customerId CustomerId
|
|
47
|
+
amount Money
|
|
48
|
+
|
|
49
|
+
readmodel CustomerRevenue
|
|
50
|
+
sink Reporting
|
|
51
|
+
customerId CustomerId key
|
|
52
|
+
total Money
|
|
53
|
+
|
|
54
|
+
projection CustomerRevenueProjection => CustomerRevenue
|
|
55
|
+
from OrderPlaced key customerId
|
|
56
|
+
add total by amount
|
|
57
|
+
|
|
58
|
+
query RevenueForCustomer => CustomerRevenue optional
|
|
59
|
+
by customerId CustomerId
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Nothing else names a sink. The projection writes to `Reporting` because its target is stored
|
|
63
|
+
there, and the query reads from `Reporting` because its read model is. Do not add a sink to a
|
|
64
|
+
projection, reducer or query: what builds or reads a read model follows the read model's sink.
|
|
65
|
+
|
|
66
|
+
## A property named `sink`
|
|
67
|
+
|
|
68
|
+
A read model has always been able to declare a property called `sink`, so the line is ambiguous on
|
|
69
|
+
its own. `sink <Name>` is the **directive** only when `<Name>` is a sink the application declares,
|
|
70
|
+
spelled exactly as declared, in any file of the model (a declaration in another file counts once the
|
|
71
|
+
files are merged). Otherwise it is a **property** named `sink` of type `<Name>`, as it always was.
|
|
72
|
+
|
|
73
|
+
- `sink Warehouse` with no sink called `Warehouse` declares a property `sink` of type `Warehouse`.
|
|
74
|
+
- `@sink <Type>` is always the property, even when a sink has that name. Write it that way when a
|
|
75
|
+
property's type shares a sink's name; the printer writes it that way too.
|
|
76
|
+
- A collection (`sink Reporting[]`), an optional type or a modifier also makes the line a property.
|
|
77
|
+
|
|
78
|
+
```screenplay
|
|
79
|
+
sink Reporting for readmodels
|
|
80
|
+
|
|
81
|
+
concept OrderId : Uuid
|
|
82
|
+
concept Warehouse : String
|
|
83
|
+
concept Reporting : String
|
|
84
|
+
|
|
85
|
+
module Shipping
|
|
86
|
+
feature Dispatch
|
|
87
|
+
slice StateView Shipments
|
|
88
|
+
readmodel Shipment
|
|
89
|
+
sink Reporting
|
|
90
|
+
orderId OrderId key
|
|
91
|
+
|
|
92
|
+
readmodel Dispatch
|
|
93
|
+
orderId OrderId key
|
|
94
|
+
sink Warehouse
|
|
95
|
+
|
|
96
|
+
readmodel Audit
|
|
97
|
+
orderId OrderId key
|
|
98
|
+
@sink Reporting
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
`Shipment` is stored in `Reporting`. `Dispatch` uses the default sink and has a property `sink` of
|
|
102
|
+
type `Warehouse`, because no sink is called `Warehouse`. `Audit` uses the default sink and has a
|
|
103
|
+
property `sink` of type `Reporting`.
|
|
104
|
+
|
|
105
|
+
A property type that differs from a declared sink only in case keeps its meaning but warns, because
|
|
106
|
+
the author probably meant the directive:
|
|
107
|
+
|
|
108
|
+
```screenplay expect PLAY0939
|
|
109
|
+
sink Reporting for readmodels
|
|
110
|
+
|
|
111
|
+
concept OrderId : Uuid
|
|
112
|
+
concept reporting : String
|
|
113
|
+
|
|
114
|
+
module Shipping
|
|
115
|
+
feature Dispatch
|
|
116
|
+
slice StateView Shipments
|
|
117
|
+
readmodel Shipment
|
|
118
|
+
sink Reporting
|
|
119
|
+
orderId OrderId key
|
|
120
|
+
|
|
121
|
+
readmodel Audit
|
|
122
|
+
orderId OrderId key
|
|
123
|
+
sink reporting
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Fix `PLAY0939` by spelling the sink exactly (`sink Reporting`) when the directive was meant, or by
|
|
127
|
+
writing `@sink reporting` when the property was.
|
|
128
|
+
|
|
129
|
+
## Passive read models have no sink
|
|
130
|
+
|
|
131
|
+
A `passive` read model is never materialized: it is replayed for command decisions, so it has
|
|
132
|
+
nowhere to be stored. Naming a sink on it is error `PLAY0935`; remove the `sink` line, or remove
|
|
133
|
+
`passive` when the read model should be stored.
|
|
134
|
+
|
|
135
|
+
```screenplay excerpt
|
|
136
|
+
readmodel PendingShipment
|
|
137
|
+
passive
|
|
138
|
+
sink Reporting
|
|
139
|
+
orderId OrderId key
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## What the deployment and the compiler do with it
|
|
143
|
+
|
|
144
|
+
A sink is realization metadata, not part of the executable semantic model (ESM). Adding, removing
|
|
145
|
+
or changing a `sink` line leaves the ESM bytes and its revision unchanged, and the compiler reports
|
|
146
|
+
each one as information `PLAY0270`. A renderer that keys on the ESM revision alone misses a sink
|
|
147
|
+
change: see `cratis-screenplay-render-and-gap-fill`.
|
|
148
|
+
|
|
149
|
+
In Chronicle the same choice is `[Sink("name")]` on the read model type and a `sinks` entry in the
|
|
150
|
+
Kernel configuration (`cratis-chronicle-read-model`, `cratis-chronicle-hosting`).
|
|
151
|
+
|
|
152
|
+
## Diagnostics
|
|
153
|
+
|
|
154
|
+
| Code | Severity | Cause | Fix |
|
|
155
|
+
| --- | --- | --- | --- |
|
|
156
|
+
| `PLAY0931` | Error | A malformed sink declaration or graph `sink` line, or lines under a declaration | `sink <Name> for readmodels\|graphs` at the root; `sink <Name>` in a body |
|
|
157
|
+
| `PLAY0932` | Error | Two sinks share a name, ignoring case | Rename one |
|
|
158
|
+
| `PLAY0933` | Error | A graph names an undeclared sink | Declare it `for graphs`, or fix the name |
|
|
159
|
+
| `PLAY0934` | Error | A read model names a `for graphs` sink, or a graph a `for readmodels` sink | Name a sink of the right kind |
|
|
160
|
+
| `PLAY0935` | Error | A `passive` read model names a sink | Remove the `sink` line or `passive` |
|
|
161
|
+
| `PLAY0936` | Error | A read model or graph names two different sinks | Keep one |
|
|
162
|
+
| `PLAY0937` | Warning | The same `sink` line repeated | Remove the repeat |
|
|
163
|
+
| `PLAY0938` | Warning | A declared sink nothing uses | Use it or remove the declaration |
|
|
164
|
+
| `PLAY0939` | Warning | A property `sink` whose type differs only in case from a declared sink | Spell the sink exactly, or write `@sink <Type>` |
|
|
165
|
+
|
|
166
|
+
A read model's `sink <Name>` naming no declared sink is never `PLAY0933`: it is a property.
|
|
@@ -25,6 +25,12 @@
|
|
|
25
25
|
{ "kind": "skill-contains", "value": "a `Decimal` part or a concept over `Decimal` is always refused", "file": "references/named-keys.md" },
|
|
26
26
|
{ "kind": "skill-contains", "value": "a replay can split `1.0` and `1.00` into two instances", "file": "references/named-keys.md" },
|
|
27
27
|
{ "kind": "skill-contains", "value": "the decimal refusal lifts with Stage#847 once Chronicle#5427 lands", "file": "references/named-keys.md" },
|
|
28
|
-
{ "kind": "skill-contains", "value": "`when`/`otherwise` on click, double click, select or change:" }
|
|
28
|
+
{ "kind": "skill-contains", "value": "`when`/`otherwise` on click, double click, select or change:" },
|
|
29
|
+
{ "kind": "skill-contains", "value": "`sink <Name>` is the **directive** only when `<Name>` is a sink the application declares", "file": "references/sinks.md" },
|
|
30
|
+
{ "kind": "skill-contains", "value": "`sink Warehouse` with no sink called `Warehouse` declares a property `sink` of type `Warehouse`", "file": "references/sinks.md" },
|
|
31
|
+
{ "kind": "skill-contains", "value": "`@sink <Type>` is always the property", "file": "references/sinks.md" },
|
|
32
|
+
{ "kind": "skill-contains", "value": "| `PLAY0935` | Error | A `passive` read model names a sink |", "file": "references/sinks.md" },
|
|
33
|
+
{ "kind": "skill-contains", "value": "The model never names a database", "file": "references/sinks.md" },
|
|
34
|
+
{ "kind": "skill-contains", "value": "Read [sinks](references/sinks.md) before naming a sink." }
|
|
29
35
|
]
|
|
30
36
|
}
|
|
@@ -144,10 +144,18 @@ model still compiles and binds) and its V5 states the scope.
|
|
|
144
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
|
+
The design is the same: Stage reads the resolved theme (the profile's theme, else the design system's `default theme`, in the mode
|
|
148
|
+
its `color scheme` selects) once Cratis/Stage adopts it; until then Stage keeps reading the profile's `appearance` `accent`, `corners` and
|
|
149
|
+
`font`, so a model that moved them into a theme renders with the default look. Report that as a UI omission naming the Stage version,
|
|
150
|
+
not as a model defect, and do not put the values back in `appearance` to make it render.
|
|
147
151
|
8. **Drift:** `cratis render ... --check` (exit 6 pending); also compare the manifest's `semanticRevision`
|
|
148
152
|
with a fresh render under the same inputs. For hand-written scope, `cratis screenplay conform` gives
|
|
149
153
|
structural code-vs-model evidence (`references/drift-and-fallback-record.md`). For changes since verification,
|
|
150
154
|
follow that reference's "Hand-written code changed since it was last verified" procedure.
|
|
155
|
+
A sink change does not move `semanticRevision`: sinks are realization metadata outside the ESM,
|
|
156
|
+
so a renderer or drift check must hash `SemanticCompilation.Sinks`, `ReadModelSinks` and
|
|
157
|
+
`GraphSinks` into its render input, or a changed `sink` line never triggers a re-render.
|
|
158
|
+
Map each sink name to deployment storage; never emit a database name from the model.
|
|
151
159
|
9. **Hand off** the packet: verdict lines, spec mapping, edit requests for the modeler, fallback record
|
|
152
160
|
entries, UI omissions, learning candidates (at most 3).
|
|
153
161
|
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
{ "kind": "skill-contains", "value": "Requires Stage 4.146.0" },
|
|
50
50
|
{ "kind": "skill-contains", "value": "Unsupported generated\ntypes (`STAGE-ESM-028`) and result combinations (`-038`)" },
|
|
51
51
|
{ "kind": "skill-contains", "value": "authored-UI parity" },
|
|
52
|
-
{ "kind": "skill-contains", "value": "responsible tool version" }
|
|
52
|
+
{ "kind": "skill-contains", "value": "responsible tool version" },
|
|
53
|
+
{ "kind": "skill-contains", "value": "`GraphSinks` into its render input, or a changed `sink` line never triggers a re-render" }
|
|
53
54
|
]
|
|
54
55
|
}
|
|
@@ -184,7 +184,7 @@ unknown apply outcome requires recovery, not retry.
|
|
|
184
184
|
|
|
185
185
|
All 44 traps, with fixes: `references/traps.md`. Read `references/traps.md` when diagnosing an unexpected compile, binding, rendering or MCP result.
|
|
186
186
|
|
|
187
|
-
Read [references/diagnostics.md](references/diagnostics.md) when a PLAY, STAGE or CLI-RENDER diagnostic needs its meaning and fix. When the Screenplay documentation and the compiler disagree, follow the compiler for what is accepted, keep the intended semantics in the model, and record the gap.
|
|
187
|
+
Read [references/diagnostics.md](references/diagnostics.md) when a PLAY, STAGE or CLI-RENDER diagnostic needs its meaning and fix. Sink lines (`PLAY0931`–`PLAY0939`) are realization metadata (PLAY0270): a sink change leaves the ESM revision unchanged. When the Screenplay documentation and the compiler disagree, follow the compiler for what is accepted, keep the intended semantics in the model, and record the gap.
|
|
188
188
|
|
|
189
189
|
1. Clean V1 is not executable: only MCP (V2) or `render` binds.
|
|
190
190
|
2. Prefer inline `produces event` for a command-owned event; plain command productions need explicit `for <identifier>`.
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
- Specification metadata, callers, cases and locators
|
|
17
17
|
- Guarded interaction diagnostics
|
|
18
18
|
- UI profile shell: root template, options, appearance
|
|
19
|
+
- Design systems and themes (PLAY0916-PLAY0930)
|
|
20
|
+
- Sinks (PLAY0931-PLAY0939)
|
|
19
21
|
- Structural completeness and timeline checks
|
|
20
22
|
- Editor versus C# verdicts
|
|
21
23
|
- Consistency errors (V1: the model contradicts itself)
|
|
@@ -315,7 +317,7 @@ Requires Screenplay 4.200.0 or later (`screenplay --version`); 4.197.0 reads the
|
|
|
315
317
|
| Code | Severity | Meaning / fix |
|
|
316
318
|
| --- | --- | --- |
|
|
317
319
|
| PLAY0788 | E | A `root template` / `new screens use template` line is malformed, or pins a version on an own template. |
|
|
318
|
-
| PLAY0789 | E | A malformed or repeated `identity` or `appearance` line, or a second `identity` or `appearance` block. |
|
|
320
|
+
| PLAY0789 | E | A malformed or repeated `identity` or `appearance` line (the deprecated `accent`, `corners` and `font` are still lines it accepts, `PLAY0929`), or a second `identity` or `appearance` block. |
|
|
319
321
|
| PLAY0790 | E | The template is not declared (or the blueprint does not ship it). Declare it or take it from a blueprint. |
|
|
320
322
|
| PLAY0791 | W | The profile selects its shell with the legacy `layout <Name>`. Write `root template <Name>`; the quick fix rewrites it (or removes the ignored line beside a `root template`). |
|
|
321
323
|
| PLAY0792 | E | The blueprint is not in the profile's `packages` (or not installed). |
|
|
@@ -323,10 +325,51 @@ Requires Screenplay 4.200.0 or later (`screenplay --version`); 4.197.0 reads the
|
|
|
323
325
|
| PLAY0794 | E | The root template cannot be the shell (not a layout or application-scope template, fits a slot, `scopes` without `application`). |
|
|
324
326
|
| PLAY0795 | E | The root template has no `content` slot. |
|
|
325
327
|
| PLAY0796 | W | An `option` the shell does not expose. |
|
|
326
|
-
| PLAY0797 | E | Color scheme is not `light`, `dark` or `system`,
|
|
328
|
+
| PLAY0797 | E | Color scheme is not `light`, `dark` or `system`, or an `identity` value is outside Scene's rules (initials longer than 2, unknown icon, image that is not a PNG, JPG, SVG or WebP data URI of at most 400 KB). The deprecated `accent` and `corners` values are still checked while they read; move them to the theme (`PLAY0929`). |
|
|
327
329
|
| PLAY0798 | E | More than one `root template` in a profile. |
|
|
328
330
|
| PLAY0799 | E | `new screens use template` cannot start a screen in a feature. |
|
|
329
331
|
|
|
332
|
+
## Design systems and themes (PLAY0916-PLAY0930)
|
|
333
|
+
|
|
334
|
+
Requires a Screenplay release that carries design systems (next minor after 6.2.0, 6.3.0; `screenplay --version`); earlier compilers do not know the codes, and `screenplay-contract.json` lists them only once the pin moves. Fixes: `../../cratis-screenplay-ui-composition/references/design-system-and-themes.md`.
|
|
335
|
+
|
|
336
|
+
| Code | Severity | Meaning / fix |
|
|
337
|
+
| --- | --- | --- |
|
|
338
|
+
| PLAY0916 | E | Malformed `design system`: unknown section, token category, component part or state, bad line shape, a part the component does not declare, or a section twice. |
|
|
339
|
+
| PLAY0917 | E | A second `design system`; an application has exactly one. |
|
|
340
|
+
| PLAY0918 | E | A theme block for a mode the design system's `modes` does not declare. |
|
|
341
|
+
| PLAY0919 | E | A mode, token, component, variant, part, palette entry, value or word declared twice. |
|
|
342
|
+
| PLAY0920 | E | A theme assigns a token the design system does not declare. |
|
|
343
|
+
| PLAY0921 | E | An implementing theme gives a `color` token no value in a declared mode. |
|
|
344
|
+
| PLAY0922 | E | A design reference (`palette.<name>`, `<category>.<token>`) names something undeclared, or a token with no value. |
|
|
345
|
+
| PLAY0923 | E | Design references loop. |
|
|
346
|
+
| PLAY0924 | E | A component part takes a token of a category it cannot take (`background = space.sm`). |
|
|
347
|
+
| PLAY0925 | E | A theme `implements` a design system the application does not declare. |
|
|
348
|
+
| PLAY0926 | E | A `ui profile` selects a theme that does not implement the design system. |
|
|
349
|
+
| PLAY0927 | E | No `default theme`, or it is undeclared or does not implement the design system. |
|
|
350
|
+
| PLAY0928 | W | In some theme and mode a text/background pair is below a `contrast` rule (`disabled` not checked). |
|
|
351
|
+
| PLAY0929 | W | `accent`, `corners` or `font` in a profile's `appearance` is deprecated; put the value in the theme. |
|
|
352
|
+
| PLAY0930 | E | A theme's `implements`, `palette`, `values` or mode block is malformed or repeated. |
|
|
353
|
+
|
|
354
|
+
## Sinks (PLAY0931-PLAY0939)
|
|
355
|
+
|
|
356
|
+
Requires Screenplay 6.4.0 (`screenplay --version`). A `sink <Name> for readmodels|graphs`
|
|
357
|
+
declaration and a `sink <Name>` line in a read model or graph body choose where it is stored; each
|
|
358
|
+
is information PLAY0270, outside the ESM. The fixes are in
|
|
359
|
+
`../../cratis-screenplay-read-surface/references/sinks.md`.
|
|
360
|
+
|
|
361
|
+
| Code | Severity | Meaning / fix |
|
|
362
|
+
| --- | --- | --- |
|
|
363
|
+
| PLAY0931 | E | A malformed sink declaration or graph `sink` line, or lines under a declaration. |
|
|
364
|
+
| PLAY0932 | E | Two sinks share a name, compared ignoring case. Rename one. |
|
|
365
|
+
| PLAY0933 | E | A graph names an undeclared sink. A read model's line naming no declared sink is a property instead. |
|
|
366
|
+
| PLAY0934 | E | A read model names a `for graphs` sink, or a graph a `for readmodels` sink. |
|
|
367
|
+
| PLAY0935 | E | A `passive` read model names a sink; it is never materialized. Remove one of the two. |
|
|
368
|
+
| PLAY0936 | E | A read model or graph names two different sinks. |
|
|
369
|
+
| PLAY0937 | W | A read model or graph repeats the same `sink` line. |
|
|
370
|
+
| PLAY0938 | W | A declared sink no read model or graph uses. |
|
|
371
|
+
| PLAY0939 | W | A read-model property `sink` whose type differs only in case from a declared sink. Spell the sink exactly, or write `@sink <Type>`. |
|
|
372
|
+
|
|
330
373
|
## Structural completeness and timeline checks
|
|
331
374
|
|
|
332
375
|
Opt in with `--check <names>` or MCP diagnostics `checks`, then treat warnings
|
|
@@ -102,6 +102,12 @@ Requires Screenplay 4.141.0 or later (`screenplay --version`) to bind concept co
|
|
|
102
102
|
specifications ending in `then query` or `then readmodel`.
|
|
103
103
|
- `seed`. Personas, screens and descriptions are PLAY0270/PLAY0269 information, not
|
|
104
104
|
blocking.
|
|
105
|
+
- Sinks. `sink <Name> for readmodels|graphs` and a body's `sink <Name>` are PLAY0270 realization
|
|
106
|
+
metadata outside the ESM: the ESM bytes and revision do not change with them. A compilation
|
|
107
|
+
exposes them as `SemanticCompilation.Sinks` (declared sinks, defaults never listed),
|
|
108
|
+
`ReadModelSinks` (by read model identity) and `GraphSinks` (by graph name); in the syntax tree as
|
|
109
|
+
`ApplicationSyntax.sinks` (`SinkSyntax` with `name`, `stores`), `ReadModelSyntax.sink` and
|
|
110
|
+
`GraphSyntax.sink`, omitted from JSON when empty. Older tools reject syntax JSON that carries them.
|
|
105
111
|
|
|
106
112
|
## Text `not empty` reference correction
|
|
107
113
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Use these forms when writing or reviewing `.play`. Acceptance of an older
|
|
7
7
|
spelling is not a recommendation to teach it. Information diagnostics do not
|
|
8
|
-
fail `--warnaserror`; the corpus verification gate rejects the
|
|
8
|
+
fail `--warnaserror`; the corpus verification gate rejects the fourteen style codes
|
|
9
9
|
below even when a fence declares `expect`, unless an exact, reasoned migration
|
|
10
10
|
exception exists in the verifier's preferred-syntax allowlist. That allowlist also
|
|
11
11
|
covers deliberate legacy explanations in prose; stale entries fail.
|
|
@@ -27,6 +27,7 @@ covers deliberate legacy explanations in prose; stale entries fail.
|
|
|
27
27
|
| Combined policies | `authorize A and B` | `authorize A B` (adjacent policies mean `and`) | PLAY0825 (information; repair writes `and`) |
|
|
28
28
|
| Composite key | Indented key parts under `key` | `key {` ... `}` around parts the indentation already groups | PLAY0824 (information; repair removes the braces) |
|
|
29
29
|
| Profile shell | `root template <Name>` in a `ui profile` | `layout <Name>` in a `ui profile` | PLAY0791 (warning; quick fix) |
|
|
30
|
+
| Profile appearance | `color scheme` in `appearance`; the accent, corner style and font as a palette entry and token values in the selected `theme` of the `design system` | `accent`, `corners` or `font` in a `ui profile`'s `appearance` | PLAY0929 (warning; quick fix moves the values into the theme) |
|
|
30
31
|
| Literal text rules | `starts with`, `ends with`, `contains`, `not contains` or equality, preserving message and severity | Exact deprecated Studio `matches` shapes | PLAY0787 (warning; not arbitrary regex rewriting) |
|
|
31
32
|
| Objects and lists | An indented block under the name: `member = value` lines, one `item` line per element, `<name> none` for an empty list | Inline JSON (`= {...}`, `= [...]`) - not accepted; Screenplay has no JSON | PLAY0833 (error; quick fix, and printing converts) |
|
|
32
33
|
|