@cratis/pi 7.160.1 → 7.160.3
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-screenplay-command-surface/references/validate-rules.md +14 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/verification.json +2 -1
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +2 -2
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/model-notes.md +28 -1
- package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +2 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/mode-compliance.md +4 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/quick-self-check.md +1 -0
- package/package/corpus/skills/cratis-screenplay-model-review/verification.json +2 -1
- package/package/corpus/skills/cratis-screenplay-projections/SKILL.md +12 -4
- package/package/corpus/skills/cratis-screenplay-projections/references/graphs.md +112 -0
- package/package/corpus/skills/cratis-screenplay-projections/references/secret-concepts.md +23 -0
- package/package/corpus/skills/cratis-screenplay-projections/verification.json +8 -1
- package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +2 -0
- package/package/corpus/skills/cratis-screenplay-read-surface/references/graph-queries.md +22 -0
- package/package/corpus/skills/cratis-screenplay-read-surface/references/screen-patterns.md +3 -1
- package/package/corpus/skills/cratis-screenplay-read-surface/verification.json +2 -1
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +4 -1
- package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +38 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/verification.json +2 -0
- package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +8 -11
- package/package/corpus/skills/cratis-screenplay-specifications/references/date-comparisons.md +21 -0
- package/package/corpus/skills/cratis-screenplay-specifications/references/graph-steps.md +85 -2
- package/package/corpus/skills/cratis-screenplay-specifications/references/host-body-execution.md +29 -0
- package/package/corpus/skills/cratis-screenplay-specifications/verification.json +6 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +39 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +11 -7
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +22 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +6 -1
- package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +5 -34
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/deliverable-identity.md +41 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/screen-visuals.md +43 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/verification.json +4 -1
- package/package.json +1 -1
package/package/corpus/skills/cratis-screenplay-command-surface/references/validate-rules.md
CHANGED
|
@@ -103,6 +103,20 @@ validate
|
|
|
103
103
|
file Validations/BeAValidOrganizationNumber.cs
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
+
A concept or command-property imperative `validate` body can also live in a file instead of a fence
|
|
107
|
+
(compiled with the pinned 6.26.0 tool; the shipped version is not tag-verified, so no minimum is
|
|
108
|
+
stated). The path is relative to the model root and stays inside it; the file holds the body that
|
|
109
|
+
would sit inside the fence, including its `yield return` lines:
|
|
110
|
+
|
|
111
|
+
```text
|
|
112
|
+
concept EmailAddress : String pii
|
|
113
|
+
validate
|
|
114
|
+
file Validations/AllowedEmailDomain.cs
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
A missing or refused path reports the attachment diagnostics `PLAY0432` or `PLAY0430`; consumers
|
|
118
|
+
see the same opaque requirement with file provenance instead of an inline span.
|
|
119
|
+
|
|
106
120
|
A bodied rule or fenced block on a validation, rule or policy binds as opaque code
|
|
107
121
|
(ESM v3): the reference runner reports it unsupported, and a target must supply the
|
|
108
122
|
implementation. Attached command handlers bind beside unconditional `produces` with a
|
|
@@ -113,6 +113,7 @@
|
|
|
113
113
|
{ "kind": "skill-contains", "value": "`Concurrency`", "file": "references/generated-values-and-responses.md" },
|
|
114
114
|
{ "kind": "skill-contains", "value": "PLAY0682", "file": "references/generated-values-and-responses.md" },
|
|
115
115
|
{ "kind": "skill-contains", "value": "zero trailing bits", "file": "references/generated-values-and-responses.md" },
|
|
116
|
-
{ "kind": "skill-contains", "value": "STAGE-ESM-038", "file": "references/generated-values-and-responses.md" }
|
|
116
|
+
{ "kind": "skill-contains", "value": "STAGE-ESM-038", "file": "references/generated-values-and-responses.md" },
|
|
117
|
+
{ "kind": "skill-contains", "value": "file Validations/AllowedEmailDomain.cs", "file": "references/validate-rules.md" }
|
|
117
118
|
]
|
|
118
119
|
}
|
package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md
CHANGED
|
@@ -279,8 +279,8 @@ canonical bytes. Event `description`, `documentation` and rename-only `id` are
|
|
|
279
279
|
authoring metadata, not new ESM bytes or replacements for catalog identity.
|
|
280
280
|
|
|
281
281
|
Binding is not the last gate before the reference runner. The runner needs an
|
|
282
|
-
execution plan.
|
|
283
|
-
specification in the model runs. An unadmitted projection (for example
|
|
282
|
+
execution plan. Under strict binding an application-level refused construct blocks the whole plan, so no
|
|
283
|
+
specification in the model runs (a host using `CompileAdmissible` excludes it instead). An unadmitted projection (for example
|
|
284
284
|
`UnsupportedEventContext` or `UnsupportedProjectionBlock`) is scoped per specification:
|
|
285
285
|
only specifications whose given, appended, produced or cascaded events reach it, or that
|
|
286
286
|
supply, read, query or assert its read model, report unsupported; the others run and
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
- Choose the artifact
|
|
9
9
|
- Anchors and independent state
|
|
10
|
+
- Link elements to issues
|
|
10
11
|
- List with bounded, pinned reads
|
|
11
12
|
- Propose, review, apply
|
|
12
13
|
- Resolve by evidence, then carry the answer into the model
|
|
@@ -121,6 +122,32 @@ The file header uses `schema: "cratis.screenplay.notes"`, `schemaVersion: 1` and
|
|
|
121
122
|
key order, LF plus a trailing newline, and one note object per line sorted by ID.
|
|
122
123
|
Commit it with the model; never hand-author a sidecar to bypass proposals.
|
|
123
124
|
|
|
125
|
+
## Link elements to issues
|
|
126
|
+
|
|
127
|
+
An `issue` note links its anchored element (a slice, command or screen) to one or more issues in an
|
|
128
|
+
external tracker. Requires Screenplay 6.7.0 or later (`screenplay --version`).
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"kind": "issue",
|
|
133
|
+
"text": "Build the cancellation flow",
|
|
134
|
+
"anchor": { "semanticId": "..." },
|
|
135
|
+
"refs": [
|
|
136
|
+
{ "tracker": "github", "id": "Cratis/Shop#412", "url": "https://github.com/Cratis/Shop/issues/412" },
|
|
137
|
+
{ "tracker": "jira", "id": "SHOP-77" }
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
- `tracker` is `github`, `jira`, `linear` or `other`; `id` is the issue key as the tracker shows
|
|
143
|
+
it; `url` is optional. An issue note needs at least one reference, and a reference without a
|
|
144
|
+
tracker is refused.
|
|
145
|
+
- The note is anchored by stable identity, so the link survives renames and moves.
|
|
146
|
+
- `list-model-notes` with `kind: "issue"` lists every link; `ref: "SHOP-77"` finds the elements an
|
|
147
|
+
issue covers.
|
|
148
|
+
- The server never calls the tracker. Keeping the issue's status current is the tracker's job;
|
|
149
|
+
resolving the note records that the link no longer needs attention.
|
|
150
|
+
|
|
124
151
|
## List with bounded, pinned reads
|
|
125
152
|
|
|
126
153
|
Open the workspace, inspect `notes` status and retain workspace/catalog revisions.
|
|
@@ -131,7 +158,7 @@ Open the workspace, inspect `notes` status and retain workspace/catalog revision
|
|
|
131
158
|
| --- | --- |
|
|
132
159
|
| `anchor` | `{ semanticId }`, including an orphan ID, or `{ address, kind }` |
|
|
133
160
|
| `scope` | Dotted module/feature/slice; descendants and ancestor notes |
|
|
134
|
-
| `kind` | `question`, `task`, `note`; omitted selects all |
|
|
161
|
+
| `kind` | `question`, `task`, `note`, `issue`; omitted selects all |
|
|
135
162
|
| `state` | `open` by default; `resolved`, `orphaned`, `all` |
|
|
136
163
|
| `ref` | Exact identifier in `refs` or `resolution.ref`, e.g. `D123` |
|
|
137
164
|
| `view` | `items` by default, or `findings` |
|
|
@@ -34,6 +34,8 @@
|
|
|
34
34
|
{ "kind": "skill-contains", "value": "A renderer admits only the ESM versions it bundles", "file": "references/mcp-tools.md", "file": "references/mcp-tools.md" },
|
|
35
35
|
{ "kind": "skill-contains", "value": "Existing `All` history reads as", "file": "references/mcp-tools.md" },
|
|
36
36
|
{ "kind": "play-compiles" },
|
|
37
|
+
{ "kind": "skill-contains", "value": "## Link elements to issues", "file": "references/model-notes.md" },
|
|
38
|
+
{ "kind": "skill-contains", "value": "`question`, `task`, `note`, `issue`", "file": "references/model-notes.md" },
|
|
37
39
|
{ "kind": "skill-contains", "value": "Edit through MCP proposals, not hand-edited text" },
|
|
38
40
|
{ "kind": "skill-contains", "value": "The CLI-bundled MCP can be older than the standalone tool" },
|
|
39
41
|
{ "kind": "skill-contains", "value": "`previewArguments`", "file": "references/mcp-tools.md" },
|
|
@@ -3,3 +3,7 @@
|
|
|
3
3
|
Apply with procedure step 11.
|
|
4
4
|
|
|
5
5
|
Check bare `pii`/`secret`, special/criminal qualifiers and purpose coverage (`--check purposes`); reasons are value notes, not legal declarations. Event `subject` is report-only, unprotected and scalar; never claim runtime lineage or erasure from it. Trace identity details to valid sources and preserve the executable-read gap. Elevated reaction paths also need `--check privilege` and least-privilege roles; unknown/opaque findings are not proven safe. Syntax/limits: command-surface context/compliance references.
|
|
6
|
+
|
|
7
|
+
Check that no read model exposes a `secret` concept: the model is `PLAY1142` clean and no AutoMap fills a read-model property from a same-named secret event property.
|
|
8
|
+
|
|
9
|
+
Requires Screenplay 6.28.0 or later (`screenplay --version`) for the `PLAY1142` check.
|
|
@@ -18,4 +18,5 @@ About ten minutes, before the independent review.
|
|
|
18
18
|
summaries in `description`, open questions as anchored `question` notes,
|
|
19
19
|
with note IDs in session state, never only chat or description text.
|
|
20
20
|
11. Every Automation has a pending-work view or a stated reason it needs none (F8-F13).
|
|
21
|
+
12. No read model exposes a `secret` concept: PLAY1142 clean, and AutoMap does not leak one.
|
|
21
22
|
Any "no" is fixed or explained before P5.
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
{ "kind": "skill-contains", "value": "eleven phases, 90 checks" },
|
|
24
24
|
{ "kind": "skill-contains", "value": "could a non-technical product owner read it and immediately understand" },
|
|
25
25
|
{ "kind": "skill-contains", "value": "a \"simple relay\" is not exempt from having pending work" },
|
|
26
|
-
{ "kind": "skill-contains", "value": "| H5 | Sinks: every declared `sink` is used by a read model or graph (`PLAY0938`), names differ ignoring case (`PLAY0932`)", "file": "references/checklist.md" }
|
|
26
|
+
{ "kind": "skill-contains", "value": "| H5 | Sinks: every declared `sink` is used by a read model or graph (`PLAY0938`), names differ ignoring case (`PLAY0932`)", "file": "references/checklist.md" },
|
|
27
|
+
{ "kind": "skill-contains", "value": "no read model exposes a `secret` concept", "file": "references/mode-compliance.md" }
|
|
27
28
|
]
|
|
28
29
|
}
|
|
@@ -160,8 +160,11 @@ Requires Screenplay 4.212.4 (`screenplay --version`) for joined-event auto-map
|
|
|
160
160
|
overrides in executable binding; older binders replace the setting with the level's.
|
|
161
161
|
|
|
162
162
|
Mapping sources are a property path, a literal, `$eventSourceId` and `$eventContext.<path>`.
|
|
163
|
-
|
|
164
|
-
|
|
163
|
+
`$eventContext.occurred` in a property assignment of `from`, `every` (including `all`) and
|
|
164
|
+
`children` runs in the reference runner as UTC text. Keys, joins, arithmetic, `every` with joins,
|
|
165
|
+
nested-object scopes and other paths (`sequenceNumber`, `correlationId`) still bind but their
|
|
166
|
+
specifications cannot run there. A missing occurrence fails the projection with no partial state:
|
|
167
|
+
supply it with `given clock` or an explicit fact timestamp.
|
|
165
168
|
`clear <property>` removes a value; prefer it to `= null`. Read
|
|
166
169
|
[mapping sources](references/mapping-sources.md) for the catalog, `PLAY0295` and `clear` paths.
|
|
167
170
|
|
|
@@ -228,7 +231,7 @@ Choose a graph for traversals and a document read model for lookups by key. Desi
|
|
|
228
231
|
**reading the graph backwards**: write each question as a path, make every hop an edge type
|
|
229
232
|
and every stop a node label, then name the event that creates and removes each. Read
|
|
230
233
|
[references/graphs.md](references/graphs.md) for syntax, operations, a graph in a named sink
|
|
231
|
-
(`sink People for graphs`) and `PLAY0862`–`
|
|
234
|
+
(`sink People for graphs`), graph queries (`match`/`return`), `foreach` over an event's list and `PLAY0862`–`PLAY0886`.
|
|
232
235
|
|
|
233
236
|
## When PDL is not enough — the reducer
|
|
234
237
|
|
|
@@ -270,6 +273,11 @@ of a document a reader cannot check at a glance.
|
|
|
270
273
|
|
|
271
274
|
Read [pdl-grammar.md](references/pdl-grammar.md) when checking exact syntax, interpreting a projection diagnostic code, or needing a worked example.
|
|
272
275
|
|
|
276
|
+
## Secret concepts and read models
|
|
277
|
+
|
|
278
|
+
A `secret` concept copied into a read-model property (explicit mapping, AutoMap or reducer) raises warning
|
|
279
|
+
`PLAY1142`. Read [secret concepts](references/secret-concepts.md) before projecting a protected event value.
|
|
280
|
+
|
|
273
281
|
## `STAGE-ESM-017` passes `validate` and fails at `render`
|
|
274
282
|
|
|
275
283
|
`validate --executable` binds only Screenplay's model; Stage's admission runs only in `render`.
|
|
@@ -291,7 +299,7 @@ with `STAGE-ESM-017` after `validate` exits 0.
|
|
|
291
299
|
- [ ] Every `children` block's `from` declares `parent`.
|
|
292
300
|
- [ ] Every `nested` block contains at least one `from`.
|
|
293
301
|
- [ ] Where the model must run: no `$causedBy`, template or `sequence`; no `$eventContext`
|
|
294
|
-
path other than `eventSourceId
|
|
302
|
+
path other than `eventSourceId` or an `occurred` property assignment, no projection-level `remove via join`, no
|
|
295
303
|
`all` beside removals, `children` or `nested`, and no `join`, `children` or
|
|
296
304
|
`remove via join` inside `nested`.
|
|
297
305
|
- [ ] Variant entering events use the event source identity as the entity's
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
- Declaring a graph
|
|
6
6
|
- Projecting events onto it
|
|
7
|
+
- One element per item of a collection (`foreach`)
|
|
7
8
|
- Storing a graph in a named sink
|
|
8
9
|
- Reading the graph backwards
|
|
10
|
+
- Reading a graph with a query
|
|
9
11
|
- The five operations
|
|
10
12
|
- What a graph projection cannot say
|
|
11
13
|
- Diagnostics
|
|
@@ -104,6 +106,49 @@ module Organization
|
|
|
104
106
|
edge before the events that create its nodes arrive. A projection owns the edges
|
|
105
107
|
and node properties it declares and never deletes a node it did not declare.
|
|
106
108
|
|
|
109
|
+
## One element per item of a collection (`foreach`)
|
|
110
|
+
|
|
111
|
+
An event that carries a list can draw one node or edge per item. Write `foreach <collection>` after
|
|
112
|
+
the event name in `from` or `remove with` (`from <Event> foreach <collection> key ...`, `from <Event>
|
|
113
|
+
foreach <collection> source ... target ...`). Requires Screenplay 5.10.0 or later
|
|
114
|
+
(`screenplay --version`); a model that uses it selects ESM version 41.
|
|
115
|
+
|
|
116
|
+
```screenplay
|
|
117
|
+
type ModelSlot
|
|
118
|
+
slot String
|
|
119
|
+
series Uuid
|
|
120
|
+
|
|
121
|
+
module Scoring
|
|
122
|
+
feature Models
|
|
123
|
+
slice StateView ModelScores
|
|
124
|
+
event ModelDefined
|
|
125
|
+
slots ModelSlot[]
|
|
126
|
+
|
|
127
|
+
event ModelRetired
|
|
128
|
+
slots ModelSlot[]
|
|
129
|
+
|
|
130
|
+
graph Scoring
|
|
131
|
+
node Model
|
|
132
|
+
modelId Uuid key
|
|
133
|
+
node Series
|
|
134
|
+
seriesId Uuid key
|
|
135
|
+
edge SCORES source Model target Series identified by slot
|
|
136
|
+
slot String
|
|
137
|
+
|
|
138
|
+
projection ModelScores => graph Scoring
|
|
139
|
+
edge SCORES
|
|
140
|
+
from ModelDefined foreach slots source $eventSourceId target slots.series identified by slots.slot
|
|
141
|
+
slot = slots.slot
|
|
142
|
+
remove with ModelRetired foreach slots source $eventSourceId target slots.series identified by slots.slot
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
- The handler runs once per item. An item's properties are written `<collection>.<property>`
|
|
146
|
+
(`slots.series`); every other expression is the event's (`$eventSourceId`).
|
|
147
|
+
- The collection is a property of the event that is a list of a composite type; anything else, and
|
|
148
|
+
a collection inside another (`foreach slots.parts`), is `PLAY0886`. Iteration goes one level deep.
|
|
149
|
+
- An absent or empty list does nothing.
|
|
150
|
+
- Chronicle runs the handler once per item (Chronicle 19.134 and later).
|
|
151
|
+
|
|
107
152
|
## Storing a graph in a named sink
|
|
108
153
|
|
|
109
154
|
A graph names no sink by default and is stored in the application's default graph sink. To keep one
|
|
@@ -169,6 +214,64 @@ full `PLAY0931`–`PLAY0939` table are in the read surface's
|
|
|
169
214
|
to the graph.
|
|
170
215
|
5. Add `detach` to any node removal whose label has attached edges.
|
|
171
216
|
6. A question that is a lookup by key, not a path, belongs in a document read model.
|
|
217
|
+
7. Write each path question as a `query` ending in `graph <Graph>`; see
|
|
218
|
+
[Reading a graph with a query](#reading-a-graph-with-a-query).
|
|
219
|
+
|
|
220
|
+
## Reading a graph with a query
|
|
221
|
+
|
|
222
|
+
A query that ends in `graph <Graph>` follows a path over the graph's declared nodes and edges and
|
|
223
|
+
returns an ordinary read model. Requires Screenplay 5.8.0 or later (`screenplay --version`).
|
|
224
|
+
|
|
225
|
+
```screenplay
|
|
226
|
+
concept PersonId : Uuid
|
|
227
|
+
concept GroupId : Uuid
|
|
228
|
+
concept Name : String
|
|
229
|
+
|
|
230
|
+
module Organization
|
|
231
|
+
feature Chart
|
|
232
|
+
slice StateView OrganizationChart
|
|
233
|
+
graph Organization
|
|
234
|
+
node Person
|
|
235
|
+
personId PersonId key
|
|
236
|
+
name Name
|
|
237
|
+
node Group
|
|
238
|
+
groupId GroupId key
|
|
239
|
+
title Name
|
|
240
|
+
edge MEMBER_OF source Person target Group
|
|
241
|
+
since DateTime optional
|
|
242
|
+
|
|
243
|
+
readmodel Membership
|
|
244
|
+
personId PersonId key
|
|
245
|
+
person Name
|
|
246
|
+
since DateTime optional
|
|
247
|
+
|
|
248
|
+
query MembersOf => Membership[] graph Organization
|
|
249
|
+
filter groupId GroupId
|
|
250
|
+
match person:Person -link:MEMBER_OF-> group:Group
|
|
251
|
+
where group.groupId = $groupId
|
|
252
|
+
return
|
|
253
|
+
personId = person.personId
|
|
254
|
+
person = person.name
|
|
255
|
+
since = link.since
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
- `match` is a path of `alias:Label`, `-alias:TYPE->` (outgoing) and `<-alias:TYPE-` (incoming)
|
|
259
|
+
steps; an alias is needed only where `where` or `return` names it.
|
|
260
|
+
- `optional match` follows a path that may be absent, so what it returns must go to optional
|
|
261
|
+
read-model properties (`PLAY0883`).
|
|
262
|
+
- `where` joins equality tests with `and`; each compares a node or edge property with a
|
|
263
|
+
`$argument` the query declares or a literal.
|
|
264
|
+
- `return` assigns exactly the read model's required properties, each from a node or edge
|
|
265
|
+
property of the pattern with the same type (`PLAY0881`).
|
|
266
|
+
- Variable-length paths, `or`, ranges, functions and aggregates do not exist (`PLAY0885`); there
|
|
267
|
+
is no engine-native query text.
|
|
268
|
+
- A hop must use an edge that connects those two labels in that direction (`PLAY0880`); an
|
|
269
|
+
alias is used once (`PLAY0884`).
|
|
270
|
+
|
|
271
|
+
The read-surface side is in
|
|
272
|
+
[graph queries](../../cratis-screenplay-read-surface/references/graph-queries.md); assert a graph
|
|
273
|
+
query in a specification with `then query`
|
|
274
|
+
([graph steps](../../cratis-screenplay-specifications/references/graph-steps.md)).
|
|
172
275
|
|
|
173
276
|
## The five operations
|
|
174
277
|
|
|
@@ -204,3 +307,12 @@ an event leaves a graph projection reported as unknown.
|
|
|
204
307
|
| `PLAY0875` | Malformed `given graph` / `then graph` step |
|
|
205
308
|
| `PLAY0876` | Specification names an undeclared graph, label or edge type |
|
|
206
309
|
| `PLAY0877` | Graph projection declared outside a slice |
|
|
310
|
+
| `PLAY0878` | Malformed graph query: header, `match` pattern, `where` condition or `return` block |
|
|
311
|
+
| `PLAY0879` | Graph query names an undeclared graph, node label, edge type, alias or property |
|
|
312
|
+
| `PLAY0880` | Graph query hop uses an edge that does not connect those labels in that direction |
|
|
313
|
+
| `PLAY0881` | Graph query does not return exactly the read model's required properties, or returns the wrong type |
|
|
314
|
+
| `PLAY0882` | Graph query condition uses an undeclared argument or compares different types |
|
|
315
|
+
| `PLAY0883` | Optional-match value assigned to a read-model property that is not optional |
|
|
316
|
+
| `PLAY0884` | Graph query uses the same alias twice |
|
|
317
|
+
| `PLAY0885` | Graph query uses variable-length paths, `or`, ranges, functions or aggregates |
|
|
318
|
+
| `PLAY0886` | `foreach` names a collection inside another, or something that is not a list of a composite type of the event |
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Secret concepts in read models (`PLAY1142`)
|
|
2
|
+
|
|
3
|
+
Read this when a projection or reducer builds a read model from events that carry a `secret` (or `pii secret`) concept.
|
|
4
|
+
Requires Screenplay 6.28.0 or later (`screenplay --version`).
|
|
5
|
+
|
|
6
|
+
A `secret` value belongs on the event, not in a read model. Copying it into a read-model property makes it part of the read model and of every query result over it, so the compiler warns with `PLAY1142` (`SecretConceptProjected`).
|
|
7
|
+
|
|
8
|
+
## What is reported
|
|
9
|
+
|
|
10
|
+
- An explicit mapping whose target property or source event property has a secret concept.
|
|
11
|
+
- A property that AutoMap fills from a same-named secret event property, including `children` and `nested` scopes that inherit AutoMap from the root.
|
|
12
|
+
- A reducer that builds a read-model property with a secret concept.
|
|
13
|
+
|
|
14
|
+
Metadata, literal and aggregate sources are not reported. The message names the projection or reducer, the concept and the read-model property path.
|
|
15
|
+
|
|
16
|
+
## Fix
|
|
17
|
+
|
|
18
|
+
There is no automatic repair; decide whether the read model needs the value at all.
|
|
19
|
+
|
|
20
|
+
- Leave the property out of the read model (and use `no automap` or a differently named property where AutoMap would fill it).
|
|
21
|
+
- Or map a non-secret derived value, for example a flag that the value is set, or a masked form computed elsewhere.
|
|
22
|
+
|
|
23
|
+
The code is a warning, so `--warnings-as-errors` turns it into a failure. See the toolchain diagnostics reference for the full warning list.
|
|
@@ -31,6 +31,13 @@
|
|
|
31
31
|
{ "kind": "skill-contains", "value": "**A builder never names a sink.**" },
|
|
32
32
|
{ "kind": "skill-contains", "value": "sink People for graphs", "file": "references/graphs.md" },
|
|
33
33
|
{ "kind": "skill-contains", "value": "every `sink` line in it is the directive", "file": "references/graphs.md" },
|
|
34
|
-
{ "kind": "skill-contains", "value": "read-model-property-order.md" }
|
|
34
|
+
{ "kind": "skill-contains", "value": "read-model-property-order.md" },
|
|
35
|
+
{ "kind": "skill-contains", "value": "## Reading a graph with a query", "file": "references/graphs.md" },
|
|
36
|
+
{ "kind": "skill-contains", "value": "`PLAY0885` | Graph query uses variable-length paths", "file": "references/graphs.md" },
|
|
37
|
+
{ "kind": "skill-contains", "value": "from ModelDefined foreach slots source", "file": "references/graphs.md" },
|
|
38
|
+
{ "kind": "skill-contains", "value": "Requires Screenplay 5.10.0 or later", "file": "references/graphs.md" },
|
|
39
|
+
{ "kind": "skill-contains", "value": "runs in the reference runner as UTC text" },
|
|
40
|
+
{ "kind": "skill-contains", "value": "`PLAY1142` (`SecretConceptProjected`)", "file": "references/secret-concepts.md" },
|
|
41
|
+
{ "kind": "skill-contains", "value": "references/secret-concepts.md" }
|
|
35
42
|
]
|
|
36
43
|
}
|
|
@@ -74,6 +74,8 @@ It is never inferred, and a query or screen that consumes it is error `PLAY0859`
|
|
|
74
74
|
|
|
75
75
|
## `query`
|
|
76
76
|
|
|
77
|
+
A query that ends in `graph <Graph>` reads a graph: see [graph queries](references/graph-queries.md).
|
|
78
|
+
|
|
77
79
|
Excerpt: the concepts, the read model and the policy are declared elsewhere.
|
|
78
80
|
|
|
79
81
|
```screenplay excerpt
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Graph queries
|
|
2
|
+
|
|
3
|
+
A graph query is a query: it has a name, filters, and returns a read model. Only its header and
|
|
4
|
+
body differ.
|
|
5
|
+
|
|
6
|
+
Requires Screenplay 5.8.0 or later (`screenplay --version`).
|
|
7
|
+
|
|
8
|
+
- The header ends in `graph <Graph>` instead of reading a stored read model:
|
|
9
|
+
`query MembersOf => Membership[] graph Organization`.
|
|
10
|
+
- `filter <name> <Type>` lines declare the arguments; `where` compares a node or edge property
|
|
11
|
+
with `$<name>` or a literal.
|
|
12
|
+
- `match` / `optional match` give the path and `return` fills the read model, one assignment per
|
|
13
|
+
required property.
|
|
14
|
+
- The result read model is an ordinary `readmodel`; it is not a node or an edge, and no
|
|
15
|
+
projection builds it. A screen's `data` line binds the query like any other.
|
|
16
|
+
|
|
17
|
+
Do not restate the grammar here. The complete model, the rules and `PLAY0878`–`PLAY0885` are in
|
|
18
|
+
[reading a graph with a query](../../cratis-screenplay-projections/references/graphs.md#reading-a-graph-with-a-query);
|
|
19
|
+
the specification step is in
|
|
20
|
+
[graph steps](../../cratis-screenplay-specifications/references/graph-steps.md#asserting-a-graph-query).
|
|
21
|
+
Choose a graph query for a path question; a lookup by key stays a document read model with a
|
|
22
|
+
projection.
|
|
@@ -136,6 +136,8 @@ but it does not let a model control a generated constructor (see
|
|
|
136
136
|
One screen per step is not a rule; a screen hosts every action the person can reasonably take
|
|
137
137
|
there, and an action may be reachable from several screens.
|
|
138
138
|
- Not a mockup: a drawn page is never evidence for the model, and a Level 1 screen is a data and
|
|
139
|
-
action contract that a renderer or a person fills in (`cratis-screenplay-ui-composition`).
|
|
139
|
+
action contract that a renderer or a person fills in (`cratis-screenplay-ui-composition`). A
|
|
140
|
+
sketch, mockup or screenshot may still travel with the screen as `sketch`, `mockup` or `image`
|
|
141
|
+
lines, which are authoring metadata ([screen visuals](../../cratis-screenplay-ui-composition/references/screen-visuals.md)).
|
|
140
142
|
- Not mandatory to render: a screen that stays design-only is still a contract for lineage and
|
|
141
143
|
review.
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
{ "kind": "skill-contains", "value": "Property declaration order is not preserved by default", "file": "references/screen-patterns.md" },
|
|
37
37
|
{ "kind": "skill-contains", "value": "[passive read models](references/passive.md) before declaring one" },
|
|
38
38
|
{ "kind": "skill-contains", "value": "| `PLAY0859` | Error | A `query` returns a passive read model", "file": "references/passive.md" },
|
|
39
|
-
{ "kind": "skill-contains", "value": "Requires Screenplay 5.3.0", "file": "references/passive.md" }
|
|
39
|
+
{ "kind": "skill-contains", "value": "Requires Screenplay 5.3.0", "file": "references/passive.md" },
|
|
40
|
+
{ "kind": "skill-contains", "value": "[graph queries](references/graph-queries.md)" }
|
|
40
41
|
]
|
|
41
42
|
}
|
package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md
CHANGED
|
@@ -8,7 +8,10 @@ probe reports and choosing what to do. Do not copy the code table here.
|
|
|
8
8
|
|
|
9
9
|
## Pipeline that produces the codes
|
|
10
10
|
1. The CLI compiles and binds the **whole** model with its **bundled** Screenplay (the ESM level it renders is bounded by the bundle; older bundles bound less). Binding is never scoped:
|
|
11
|
-
any binding error blocks even a `--scope` render.
|
|
11
|
+
any binding error blocks even a `--scope` render. That is strict `Compile` and the standalone tool;
|
|
12
|
+
a host that opts in to `CompileAdmissible` (Requires Screenplay 4.254.0) excludes the refused
|
|
13
|
+
specifications, slices, imports and policies and reports them instead, which does not establish
|
|
14
|
+
runtime identity safety. Binding errors are `PLAY0268` (outside the admitted vertical), `PLAY0269`
|
|
12
15
|
(deferred), `PLAY0270` (report-only information), `PLAY0271` (legacy semantics) and `PLAY0273`
|
|
13
16
|
(a specification shape). A file/inline command handler without unconditional `produces`
|
|
14
17
|
or a resolved body instead reports PLAY0800 (`CommandHandlerRequiresAttachment`); beside
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
- Slices are the authoring unit
|
|
6
6
|
- Declare in story order
|
|
7
|
+
- Showing an element in another slice
|
|
7
8
|
- Slice dependencies
|
|
8
9
|
- State-transition table (per entity)
|
|
9
10
|
- Generic edits
|
|
@@ -94,6 +95,43 @@ module Moorings
|
|
|
94
95
|
berthNumber BerthNumber = berthNumber
|
|
95
96
|
```
|
|
96
97
|
|
|
98
|
+
## Showing an element in another slice
|
|
99
|
+
|
|
100
|
+
An event or read model often belongs on the timeline twice: where it is produced, and again where
|
|
101
|
+
a later slice reads it. Declare it once and place it with `shows event <Name>` or
|
|
102
|
+
`shows readmodel <Name>`. Never declare it a second time: a copied declaration is a second
|
|
103
|
+
declaration, with its own identity and no link to the first. Requires Screenplay 6.7.0 or later
|
|
104
|
+
(`screenplay --version`).
|
|
105
|
+
|
|
106
|
+
```screenplay
|
|
107
|
+
concept OrderId : Uuid
|
|
108
|
+
concept Item : String
|
|
109
|
+
|
|
110
|
+
module Ordering
|
|
111
|
+
feature Orders
|
|
112
|
+
slice StateChange PlaceOrder
|
|
113
|
+
event OrderPlaced
|
|
114
|
+
orderId OrderId
|
|
115
|
+
item Item
|
|
116
|
+
|
|
117
|
+
slice StateView OpenOrdersView
|
|
118
|
+
readmodel OpenOrders
|
|
119
|
+
orderId OrderId key
|
|
120
|
+
item Item
|
|
121
|
+
|
|
122
|
+
slice StateView ShipOrder
|
|
123
|
+
shows event OrderPlaced
|
|
124
|
+
shows readmodel OpenOrders
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
- A placement is a linked copy: a board draws both occurrences as one element, editing either
|
|
128
|
+
edits the one declaration, and renaming the declaration renames every placement.
|
|
129
|
+
- It is presentation only. It adds nothing to the executable model and changes no behavior, so it
|
|
130
|
+
does not make the slice produce the event or build the read model.
|
|
131
|
+
- `PLAY0953` (error) is a line that is not `shows event <Name>` or `shows readmodel <Name>`;
|
|
132
|
+
`PLAY0954` (warning) names no declared event or read model; `PLAY0955` (warning) shows an
|
|
133
|
+
element the slice declares itself, or shows it twice.
|
|
134
|
+
|
|
97
135
|
## Slice dependencies
|
|
98
136
|
|
|
99
137
|
Record, per slice, the events it consumes and which slice produces each. This is for
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
"fixtures": [],
|
|
5
5
|
"assertions": [
|
|
6
6
|
{ "kind": "play-compiles" },
|
|
7
|
+
{ "kind": "skill-contains", "value": "shows readmodel OpenOrders", "file": "references/slicing.md" },
|
|
8
|
+
{ "kind": "skill-contains", "value": "Requires Screenplay 6.7.0 or later", "file": "references/slicing.md" },
|
|
7
9
|
{
|
|
8
10
|
"kind": "skill-contains",
|
|
9
11
|
"value": "NOT enforced in the model today"
|
|
@@ -98,21 +98,18 @@ or target tests; name engine, version and expected/discovered selection.
|
|
|
98
98
|
UnsupportedValidation, not a successful check. Read
|
|
99
99
|
[text and match rules](../cratis-screenplay-command-surface/references/text-and-match-rules.md)
|
|
100
100
|
for boundary values and PLAY0699/0787. Reference success is not Stage admission.
|
|
101
|
+
- Opaque rule, validation and reducer bodies run only when a host supplies a body execution
|
|
102
|
+
provider; the standalone tool never does. Read
|
|
103
|
+
[host body execution](references/host-body-execution.md).
|
|
101
104
|
|
|
102
105
|
## Chronological command date comparisons
|
|
103
106
|
|
|
104
107
|
Requires Screenplay 4.199.0 (ESM v26; `screenplay --version`); older binders refuse
|
|
105
|
-
these comparisons with PLAY0268.
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
`then` matching stays ordinal: expected event values keep the exact produced text,
|
|
111
|
-
not an equivalent offset. Read the complete [retention-window specifications](../cratis-screenplay-command-surface/references/date-comparisons.md)
|
|
112
|
-
for `require to >= from`, PLAY0268/0273 and Stage's v26 refusal. The missing-offset
|
|
113
|
-
runtime case needs an evaluator-request or target input test: putting the invalid
|
|
114
|
-
value in a typed `.play` fixture instead fails binding with PLAY0273; `then error`
|
|
115
|
-
does not exercise runtime validation.
|
|
108
|
+
these comparisons with PLAY0268.
|
|
109
|
+
|
|
110
|
+
DateTime conditions compare UTC instants at tick precision, and an input without an
|
|
111
|
+
offset rejects with Validation before rules. Read [date comparisons](references/date-comparisons.md)
|
|
112
|
+
for the cases to cover, ordinal `then` matching and the runtime-validation test.
|
|
116
113
|
|
|
117
114
|
## Descriptions, persona callers and case tables
|
|
118
115
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Chronological command date comparisons
|
|
2
|
+
|
|
3
|
+
Requires Screenplay 4.199.0 (ESM v26; `screenplay --version`); older binders refuse
|
|
4
|
+
these comparisons with PLAY0268.
|
|
5
|
+
|
|
6
|
+
## What to cover
|
|
7
|
+
|
|
8
|
+
DateTime conditions compare UTC instants at tick precision: cover equal instants with
|
|
9
|
+
different offsets, increasing endpoints, an inverted interval and a one-tick boundary.
|
|
10
|
+
Every participating DateTime input without an offset or `Z` rejects with Validation
|
|
11
|
+
before rules, even when its comparison is skipped; add a missing-offset rejection, not
|
|
12
|
+
a clock fixture workaround.
|
|
13
|
+
|
|
14
|
+
## Matching and runtime cases
|
|
15
|
+
|
|
16
|
+
`then` matching stays ordinal: expected event values keep the exact produced text,
|
|
17
|
+
not an equivalent offset. Read the complete [retention-window specifications](../../cratis-screenplay-command-surface/references/date-comparisons.md)
|
|
18
|
+
for `require to >= from`, PLAY0268/0273 and Stage's v26 refusal. The missing-offset
|
|
19
|
+
runtime case needs an evaluator-request or target input test: putting the invalid
|
|
20
|
+
value in a typed `.play` fixture instead fails binding with PLAY0273; `then error`
|
|
21
|
+
does not exercise runtime validation.
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
- Steps
|
|
6
6
|
- Example
|
|
7
|
+
- Asserting a graph query
|
|
7
8
|
- Rules
|
|
8
9
|
|
|
9
10
|
## Steps
|
|
@@ -14,6 +15,8 @@
|
|
|
14
15
|
| `has edge <TYPE> from <source> to <target> [identified by <value>]` | The edge exists and the properties listed under it hold the given values. |
|
|
15
16
|
| `no node <Label> <key>` | The node does not exist. `then graph` only. |
|
|
16
17
|
| `no edge <TYPE> from <source> to <target> [identified by <value>]` | The edge does not exist. `then graph` only. |
|
|
18
|
+
| `then query <Name>` | Runs a graph query and compares its `result` rows; see below. |
|
|
19
|
+
| `given clock "<instant>"` | Fixes `$eventContext.occurred` for the events the specification appends. |
|
|
17
20
|
|
|
18
21
|
## Example
|
|
19
22
|
|
|
@@ -79,6 +82,85 @@ module Organization
|
|
|
79
82
|
The specification sits in the slice that declares the graph and its projection; they give
|
|
80
83
|
the steps their labels and keys. Check with `screenplay --warnaserror` and `screenplay test`.
|
|
81
84
|
|
|
85
|
+
## Asserting a graph query
|
|
86
|
+
|
|
87
|
+
Requires Screenplay 5.8.0 or later (`screenplay --version`). A query that ends in `graph <Graph>`
|
|
88
|
+
(see [reading a graph](../../cratis-screenplay-projections/references/graphs.md#reading-a-graph-with-a-query))
|
|
89
|
+
is asserted with `then query <Name>`, after `given graph` or after events a projection turns into
|
|
90
|
+
nodes and edges. `given clock` is stated once, before the events:
|
|
91
|
+
|
|
92
|
+
```screenplay
|
|
93
|
+
concept PersonId : Uuid
|
|
94
|
+
concept GroupId : Uuid
|
|
95
|
+
concept Name : String
|
|
96
|
+
|
|
97
|
+
module Organization
|
|
98
|
+
feature Chart
|
|
99
|
+
slice StateView OrganizationChart
|
|
100
|
+
event PersonRegistered
|
|
101
|
+
name Name
|
|
102
|
+
|
|
103
|
+
event GroupCreated
|
|
104
|
+
title Name
|
|
105
|
+
|
|
106
|
+
event MemberAdded
|
|
107
|
+
groupId GroupId
|
|
108
|
+
|
|
109
|
+
graph Organization
|
|
110
|
+
node Person
|
|
111
|
+
personId PersonId key
|
|
112
|
+
name Name
|
|
113
|
+
node Group
|
|
114
|
+
groupId GroupId key
|
|
115
|
+
title Name
|
|
116
|
+
edge MEMBER_OF source Person target Group
|
|
117
|
+
since DateTime optional
|
|
118
|
+
|
|
119
|
+
projection OrganizationChart => graph Organization
|
|
120
|
+
node Person
|
|
121
|
+
from PersonRegistered key $eventSourceId
|
|
122
|
+
name = name
|
|
123
|
+
node Group
|
|
124
|
+
from GroupCreated key $eventSourceId
|
|
125
|
+
title = title
|
|
126
|
+
edge MEMBER_OF
|
|
127
|
+
from MemberAdded source $eventSourceId target groupId
|
|
128
|
+
since = $eventContext.occurred
|
|
129
|
+
|
|
130
|
+
readmodel Membership
|
|
131
|
+
personId PersonId key
|
|
132
|
+
person Name
|
|
133
|
+
since DateTime optional
|
|
134
|
+
|
|
135
|
+
query MembersOf => Membership[] graph Organization
|
|
136
|
+
filter groupId GroupId
|
|
137
|
+
match person:Person -link:MEMBER_OF-> group:Group
|
|
138
|
+
where group.groupId = $groupId
|
|
139
|
+
return
|
|
140
|
+
personId = person.personId
|
|
141
|
+
person = person.name
|
|
142
|
+
since = link.since
|
|
143
|
+
|
|
144
|
+
specification MembersAreListed
|
|
145
|
+
given clock "2026-10-05T07:00:00Z"
|
|
146
|
+
given PersonRegistered
|
|
147
|
+
name = "Ada Lovelace"
|
|
148
|
+
for "6fa459ea-ee8a-4ca4-894e-db77e160355e"
|
|
149
|
+
given GroupCreated
|
|
150
|
+
title = "Analysts"
|
|
151
|
+
for "0f8fad5b-d9cb-469f-a165-70867728950e"
|
|
152
|
+
given MemberAdded
|
|
153
|
+
groupId = "0f8fad5b-d9cb-469f-a165-70867728950e"
|
|
154
|
+
for "6fa459ea-ee8a-4ca4-894e-db77e160355e"
|
|
155
|
+
then query MembersOf
|
|
156
|
+
arguments
|
|
157
|
+
groupId = "0f8fad5b-d9cb-469f-a165-70867728950e"
|
|
158
|
+
result
|
|
159
|
+
personId = "6fa459ea-ee8a-4ca4-894e-db77e160355e"
|
|
160
|
+
person = "Ada Lovelace"
|
|
161
|
+
since = "2026-10-05T07:00:00Z"
|
|
162
|
+
```
|
|
163
|
+
|
|
82
164
|
## Rules
|
|
83
165
|
|
|
84
166
|
- Keys are the values of the node's `key` property, written as literals.
|
|
@@ -86,5 +168,6 @@ the steps their labels and keys. Check with `screenplay --warnaserror` and `scre
|
|
|
86
168
|
- A malformed step is `PLAY0875`; an undeclared graph, node label or edge type is
|
|
87
169
|
`PLAY0876`; a property the node or edge does not declare is `PLAY0868`.
|
|
88
170
|
- The reference runner keeps an in-memory graph and applies the five operations of the
|
|
89
|
-
projection.
|
|
90
|
-
|
|
171
|
+
projection.
|
|
172
|
+
- `$eventContext.occurred` is materialized. Without `given clock` the runner uses a fixed
|
|
173
|
+
instant, so state the clock whenever an asserted node or edge property is mapped from it.
|
package/package/corpus/skills/cratis-screenplay-specifications/references/host-body-execution.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Host execution of validation and reducer bodies
|
|
2
|
+
|
|
3
|
+
Rule, `validate` and reducer bodies are opaque code. The standalone `screenplay` tool supplies no
|
|
4
|
+
provider, so a specification that reaches one is Unsupported, never passing. A host program can opt
|
|
5
|
+
in to running them. Reaction bodies are covered in
|
|
6
|
+
[reaction bodies](../../cratis-screenplay-captures-and-reactions/references/reaction-forms.md#reaction-bodies-run-through-a-host-provider);
|
|
7
|
+
this page does not repeat them.
|
|
8
|
+
|
|
9
|
+
- **Seam.** The host supplies an `ISemanticBodyExecutionProviderFactory` and resolved bodies to
|
|
10
|
+
`SemanticEvaluator` or `SemanticSpecificationRunner`, or runs the MCP server with
|
|
11
|
+
`ScreenplayMcpServer.RunConfigured(new ScreenplayMcpRun(root, factory, cancellationToken), input, output)`.
|
|
12
|
+
One isolated provider is created per execution or selected specification run and disposed before
|
|
13
|
+
it returns.
|
|
14
|
+
- **Validation bodies.** `ValidateAsync` returns `Valid()`, `Invalid(params string[] messages)` or
|
|
15
|
+
`Unsupported(diagnostic)`. Every rejection message is kept, in order, one error-severity failure
|
|
16
|
+
per message. Command blocks and concept blocks both run, in the documented order, and every
|
|
17
|
+
reached block runs once; the first Unsupported block stops execution. Execution the host cannot
|
|
18
|
+
perform stays Unsupported, never a rejection.
|
|
19
|
+
- **Reducers.** `ReduceAsync` receives the prior state, the event and `Occurred` from the fact (the
|
|
20
|
+
clock is never read) and returns `Next(composite)` or `Delete()`. History folds in order, per
|
|
21
|
+
read model and event-source identity; any Unsupported reducer returns the original world.
|
|
22
|
+
Requires Screenplay 4.255.0 or later (`screenplay --version`).
|
|
23
|
+
- **Without a provider** nothing changes: opaque bodies are Unsupported and a specification that
|
|
24
|
+
needs one never passes.
|
|
25
|
+
- **Limits.** Screenplay ships no C# executor; the host enforces API admission, isolation and
|
|
26
|
+
resource limits, and capability `pure` is not a sandbox. Do not claim a target such as Stage
|
|
27
|
+
executes these bodies: what Stage renders is stated in `cratis-stage-rendering-and-sandbox`.
|
|
28
|
+
|
|
29
|
+
Source: released `commands.md` (named rule bodies) and `readmodels.md` (reducer transitions).
|
|
@@ -87,6 +87,11 @@
|
|
|
87
87
|
{ "kind": "skill-contains", "value": "`PLAY0520`", "file": "references/examples-and-routes.md" },
|
|
88
88
|
{ "kind": "skill-contains", "value": "Requires Screenplay 6.15.0", "file": "references/producerless-events.md" },
|
|
89
89
|
{ "kind": "skill-contains", "value": "Never\nadd a producer command only to make a specification compile", "file": "references/producerless-events.md" },
|
|
90
|
-
{ "kind": "skill-contains", "value": "references/producerless-events.md" }
|
|
90
|
+
{ "kind": "skill-contains", "value": "references/producerless-events.md" },
|
|
91
|
+
{ "kind": "skill-contains", "value": "`$eventContext.occurred` is materialized", "file": "references/graph-steps.md" },
|
|
92
|
+
{ "kind": "skill-contains", "value": "given clock \"2026-10-05T07:00:00Z\"", "file": "references/graph-steps.md" },
|
|
93
|
+
{ "kind": "skill-contains", "value": "references/host-body-execution.md" },
|
|
94
|
+
{ "kind": "skill-contains", "value": "ScreenplayMcpRun", "file": "references/host-body-execution.md" },
|
|
95
|
+
{ "kind": "skill-contains", "value": "Requires Screenplay 4.255.0 or later", "file": "references/host-body-execution.md" }
|
|
91
96
|
]
|
|
92
97
|
}
|
|
@@ -21,6 +21,8 @@
|
|
|
21
21
|
- Audiences and availability (PLAY1130-PLAY1141)
|
|
22
22
|
- Sinks (PLAY0931-PLAY0939)
|
|
23
23
|
- Passive read models (PLAY0858-PLAY0860)
|
|
24
|
+
- Graph queries and `foreach` (PLAY0878-PLAY0886)
|
|
25
|
+
- Screen visuals and slice placements (PLAY0950-PLAY0955)
|
|
24
26
|
- Structural completeness and timeline checks
|
|
25
27
|
- Editor versus C# verdicts
|
|
26
28
|
- Consistency errors (V1: the model contradicts itself)
|
|
@@ -51,6 +53,7 @@ then STAGE (V5 admission). Tool differences: `../SKILL.md` ("Tool versions and t
|
|
|
51
53
|
| PLAY0381 | projection-level `key` routes nothing | put `key` on each `from` |
|
|
52
54
|
| PLAY0455 | quoted import glob matches no file | fix the glob |
|
|
53
55
|
| PLAY0196/0197/0198 | unknown query/screen; ambiguous bare name | declare or qualify `Slice.Name` |
|
|
56
|
+
| PLAY1142 | a projection mapping, AutoMap or reducer copies a `secret` concept into a read model (Screenplay 6.28.0+) | leave it out or map a non-secret derived value |
|
|
54
57
|
|
|
55
58
|
## Source reference and identifier checks
|
|
56
59
|
|
|
@@ -60,6 +63,7 @@ These are V1 source checks, not binding-only gaps:
|
|
|
60
63
|
| --- | --- | --- |
|
|
61
64
|
| PLAY0514 | W | Projection mapping, children or nested target absent from the declared read-model/element shape; unknown/imported shapes are not guessed |
|
|
62
65
|
| PLAY0166 | W | Unknown event, including `remove with`, `remove via join on` and capture `append` |
|
|
66
|
+
| PLAY1142 | W | Projection or reducer copies a `secret` (incl. `pii secret`) concept into a read-model property; no automatic repair (Screenplay 6.28.0+) |
|
|
63
67
|
| PLAY0515 | E | Personal/secret concept in a command identifier, typed `for` destination, event-source identity, stream-id type/part or route mapping source (including nested paths); keep a surrogate identity and protected data in payload |
|
|
64
68
|
|
|
65
69
|
Legacy compliance spellings (`@pii`/`@sensitive`) do not evade PLAY0515.
|
|
@@ -416,6 +420,41 @@ marks one that only informs command decisions. The fixes are in
|
|
|
416
420
|
|
|
417
421
|
Only the C# compiler reports PLAY0859 and PLAY0860; the TypeScript compiler reports PLAY0858 only.
|
|
418
422
|
|
|
423
|
+
## Graph queries and `foreach` (PLAY0878-PLAY0886)
|
|
424
|
+
|
|
425
|
+
Requires Screenplay 5.8.0 or later (`screenplay --version`); `foreach` (PLAY0886) needs 5.10.0. A
|
|
426
|
+
`query` ending in `graph <Graph>` follows a path with `match` and `return`. The complete model and
|
|
427
|
+
fixes are in
|
|
428
|
+
`../../cratis-screenplay-projections/references/graphs.md`; the graph declaration and projection
|
|
429
|
+
codes PLAY0862-PLAY0877 are listed there too.
|
|
430
|
+
|
|
431
|
+
| Code | Severity | Meaning / fix |
|
|
432
|
+
| --- | --- | --- |
|
|
433
|
+
| PLAY0878 | E | A graph query is malformed: header, `match` pattern, `where` condition or `return` block. |
|
|
434
|
+
| PLAY0879 | E | It names an undeclared graph, node label, edge type, alias or property. |
|
|
435
|
+
| PLAY0880 | E | A hop uses an edge that does not connect those two labels in that direction. |
|
|
436
|
+
| PLAY0881 | E | It does not return exactly the properties its read model requires, or returns the wrong type. |
|
|
437
|
+
| PLAY0882 | E | A condition uses an undeclared argument or compares values of different types. |
|
|
438
|
+
| PLAY0883 | E | An `optional match` value goes to a read-model property that is not optional. Make it optional. |
|
|
439
|
+
| PLAY0884 | E | The same alias is used twice. |
|
|
440
|
+
| PLAY0885 | E | It uses variable-length paths, `or`, ranges, functions or aggregates; none exist. |
|
|
441
|
+
| PLAY0886 | E | A graph handler's `foreach` names a collection inside another, or something that is not a list of a composite type of the event. |
|
|
442
|
+
|
|
443
|
+
## Screen visuals and slice placements (PLAY0950-PLAY0955)
|
|
444
|
+
|
|
445
|
+
Requires Screenplay 6.7.0 or later (`screenplay --version`). Both are presentation-only; neither
|
|
446
|
+
changes the executable model. Details: `../../cratis-screenplay-ui-composition/references/screen-visuals.md`
|
|
447
|
+
and `../../cratis-screenplay-slice-design/references/slicing.md`.
|
|
448
|
+
|
|
449
|
+
| Code | Severity | Meaning / fix |
|
|
450
|
+
| --- | --- | --- |
|
|
451
|
+
| PLAY0950 | E | A screen `sketch`, `mockup` or `image` line names no file. |
|
|
452
|
+
| PLAY0951 | W | An `image` is not PNG, JPG, GIF, SVG or WebP, or a `mockup` is not an HTML page. |
|
|
453
|
+
| PLAY0952 | W | The file does not exist beside the model, or its path leaves the model root. |
|
|
454
|
+
| PLAY0953 | E | A slice `shows` line is not `shows event <Name>` or `shows readmodel <Name>`. |
|
|
455
|
+
| PLAY0954 | W | A `shows` line names no declared event or read model. |
|
|
456
|
+
| PLAY0955 | W | A slice shows an element it declares itself, or shows the same element twice. |
|
|
457
|
+
|
|
419
458
|
## Structural completeness and timeline checks
|
|
420
459
|
|
|
421
460
|
Opt in with `--check <names>` or MCP diagnostics `checks`, then treat warnings
|
|
@@ -373,13 +373,17 @@ standalone single-event reaction body (Requires Screenplay 4.258.0; see
|
|
|
373
373
|
- Stage admits only pure reducer bodies (Roslyn allowlist, STAGE-ESM-019 and 022);
|
|
374
374
|
code validation is refused (STAGE-ESM-005). Opaque pure policies render.
|
|
375
375
|
- The reference runner returns Unsupported for the opaque bodies that do bind (rule and
|
|
376
|
-
policy predicates, code validation, reducer transitions)
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
376
|
+
policy predicates, code validation, reducer transitions) when no host body execution provider
|
|
377
|
+
is supplied (the standalone tool supplies none); a specification that needs one never passes.
|
|
378
|
+
A host can opt in: [host body execution](../../cratis-screenplay-specifications/references/host-body-execution.md). Attached handlers and file constraints (and reaction effects on a trigger with
|
|
379
|
+
`reads`) are different: under strict binding (`ISemanticModelCompiler.Compile`, which the standalone
|
|
380
|
+
tool uses) they leave the whole model unbound, so no specification runs at all.
|
|
381
|
+
- **Admissible compilation is narrower than that.** `CompileAdmissible` (the opt-in host API
|
|
382
|
+
`IAdmissibleSemanticModelCompiler`; Requires Screenplay 4.254.0 or later) binds the supported
|
|
383
|
+
subset of a source-valid application and lists what it removed in `Exclusions`: refused
|
|
384
|
+
specifications, slices, imports and policies, each with a typed `Cause` (`Root` or `Dependent`)
|
|
385
|
+
and `DependsOn`. Security dependencies fail closed: a refused policy or protected read removes
|
|
386
|
+
everything it protects. It does not establish runtime identity safety. A top-level `trigger` that fails to bind is excluded
|
|
383
387
|
(kind `Trigger`, cause `Root`, carrying the original binder diagnostic; it has no code of its own).
|
|
384
388
|
The reactions and specifications it sets off stop binding and are excluded on later passes as
|
|
385
389
|
`Dependent` exclusions whose `DependsOn` names the trigger. Independent slices stay in the
|
package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json
CHANGED
|
@@ -79426,6 +79426,28 @@
|
|
|
79426
79426
|
"title": "A parenthesis in an available line is never closed.",
|
|
79427
79427
|
"reserved": false,
|
|
79428
79428
|
"retired": false
|
|
79429
|
+
},
|
|
79430
|
+
{
|
|
79431
|
+
"code": "PLAY1142",
|
|
79432
|
+
"name": "SecretConceptProjected",
|
|
79433
|
+
"severity": "warning",
|
|
79434
|
+
"severities": [
|
|
79435
|
+
"warning"
|
|
79436
|
+
],
|
|
79437
|
+
"title": "A projection mapping, an auto-mapped property or a reducer copies a value whose concept is marked secret into a read-model property, so the value becomes part of the read model and its query results.",
|
|
79438
|
+
"reserved": false,
|
|
79439
|
+
"retired": false
|
|
79440
|
+
},
|
|
79441
|
+
{
|
|
79442
|
+
"code": "PLAY1143",
|
|
79443
|
+
"name": "ScreenWithoutPersona",
|
|
79444
|
+
"severity": "warning",
|
|
79445
|
+
"severities": [
|
|
79446
|
+
"warning"
|
|
79447
|
+
],
|
|
79448
|
+
"title": "An opt-in check found a screen whose bound commands and queries are definitely denied to every declared persona.",
|
|
79449
|
+
"reserved": false,
|
|
79450
|
+
"retired": false
|
|
79429
79451
|
}
|
|
79430
79452
|
],
|
|
79431
79453
|
"mcpTools": [
|
package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.
|
|
1
|
+
6.28.0
|
|
@@ -99,6 +99,11 @@
|
|
|
99
99
|
{ "kind": "skill-contains", "value": "PropertyOrderMetadataRefusal", "file": "references/read-model-property-order.md" },
|
|
100
100
|
{ "kind": "skill-contains", "value": "is **not** preserved by default", "file": "references/read-model-property-order.md" },
|
|
101
101
|
{ "kind": "skill-contains", "value": "references/read-model-property-order.md" },
|
|
102
|
-
{ "kind": "skill-contains", "value": "references/unknown-preserving-reader.md" }
|
|
102
|
+
{ "kind": "skill-contains", "value": "references/unknown-preserving-reader.md" },
|
|
103
|
+
{ "kind": "skill-contains", "value": "| PLAY0885 | E |", "file": "references/diagnostics.md" },
|
|
104
|
+
{ "kind": "skill-contains", "value": "| PLAY0886 | E |", "file": "references/diagnostics.md" },
|
|
105
|
+
{ "kind": "skill-contains", "value": "| PLAY0955 | W |", "file": "references/diagnostics.md" },
|
|
106
|
+
{ "kind": "skill-contains", "value": "does not establish runtime identity safety", "file": "references/executable-subset.md" },
|
|
107
|
+
{ "kind": "skill-contains", "value": "| PLAY1142 | W |", "file": "references/diagnostics.md" }
|
|
103
108
|
]
|
|
104
109
|
}
|
|
@@ -276,40 +276,9 @@ A `ui profile` selects the application shell with `root template` (an own layout
|
|
|
276
276
|
## A deliverable app declares its identity, titles and labels
|
|
277
277
|
|
|
278
278
|
Symptom: a rendered app titled "Cratis Stage" whose buttons and dialogs show raw command names. The renderer
|
|
279
|
-
defaults to those when the model is silent, so declare,
|
|
280
|
-
|
|
281
|
-
- the
|
|
282
|
-
application title the shell shows; `logo initials` is only valid in a profile's `identity`);
|
|
283
|
-
- a `ui profile` with `root template`, shell `option` lines such as `option showFooter false`, and an `identity`
|
|
284
|
-
block (`name`, `logo initials`);
|
|
285
|
-
- a `title "<text>"` in each screen and a navigation item `<id> title "<text>" target <Module.Feature>` per screen;
|
|
286
|
-
- `label "<text>"` on **every** `action`.
|
|
287
|
-
|
|
288
|
-
```screenplay excerpt
|
|
289
|
-
layout AppShell
|
|
290
|
-
category application
|
|
291
|
-
content page routed primary
|
|
292
|
-
|
|
293
|
-
outlet sidebar of navigation
|
|
294
|
-
logo image "/assets/shop.svg" title "Shopfront"
|
|
295
|
-
default organizations title "Organizations" target Crm.Organizations
|
|
296
|
-
|
|
297
|
-
ui profile Desktop
|
|
298
|
-
target platform web
|
|
299
|
-
root template AppShell
|
|
300
|
-
option showFooter false
|
|
301
|
-
identity
|
|
302
|
-
name "Shopfront"
|
|
303
|
-
logo initials "SF"
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
```screenplay excerpt
|
|
307
|
-
screen Organizations
|
|
308
|
-
data OrganizationOverview[] via query AllOrganizations
|
|
309
|
-
title "Organizations"
|
|
310
|
-
action RegisterOrganization
|
|
311
|
-
label "New organization"
|
|
312
|
-
```
|
|
279
|
+
defaults to those when the model is silent, so declare the layout logo and title, a `ui profile` with `identity`,
|
|
280
|
+
a `title` per screen and navigation item, and a `label` on **every** `action`. Read
|
|
281
|
+
[references/deliverable-identity.md](references/deliverable-identity.md) for the full list and an example.
|
|
313
282
|
|
|
314
283
|
## Localized strings
|
|
315
284
|
|
|
@@ -319,6 +288,8 @@ Localized text lives in companion `.strings` files and is referenced unquoted as
|
|
|
319
288
|
|
|
320
289
|
`file` is a backend attachment, a screen realization file or declaration provenance; use repository-relative paths (`PLAY0264`) and never let it replace the declaration. **Loaded is not run.** Read [references/file-references.md](references/file-references.md) when attaching or checking a `file`, or diagnosing `PLAY0430`–`PLAY0434`.
|
|
321
290
|
|
|
291
|
+
A screen can also keep `sketch`, `mockup` and `image` lines: authoring metadata, never part of the executable model. Read [references/screen-visuals.md](references/screen-visuals.md) for the lines and `PLAY0950`–`PLAY0952`.
|
|
292
|
+
|
|
322
293
|
## Verify
|
|
323
294
|
|
|
324
295
|
- [ ] `screenplay <model> --warnaserror` (standalone) reports zero errors and zero
|
package/package/corpus/skills/cratis-screenplay-ui-composition/references/deliverable-identity.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# A deliverable app declares its identity, titles and labels
|
|
2
|
+
|
|
3
|
+
## Symptom and fix
|
|
4
|
+
|
|
5
|
+
Symptom: a rendered app titled "Cratis Stage" whose buttons and dialogs show raw command names. The renderer
|
|
6
|
+
defaults to those when the model is silent, so declare, in every deliverable app:
|
|
7
|
+
|
|
8
|
+
- the layout's `logo image "<path>" title "<text>"` inside a navigation outlet (the
|
|
9
|
+
application title the shell shows; `logo initials` is only valid in a profile's `identity`);
|
|
10
|
+
- a `ui profile` with `root template`, shell `option` lines such as `option showFooter false`, and an `identity`
|
|
11
|
+
block (`name`, `logo initials`);
|
|
12
|
+
- a `title "<text>"` in each screen and a navigation item `<id> title "<text>" target <Module.Feature>` per screen;
|
|
13
|
+
- `label "<text>"` on **every** `action`.
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```screenplay excerpt
|
|
18
|
+
layout AppShell
|
|
19
|
+
category application
|
|
20
|
+
content page routed primary
|
|
21
|
+
|
|
22
|
+
outlet sidebar of navigation
|
|
23
|
+
logo image "/assets/shop.svg" title "Shopfront"
|
|
24
|
+
default organizations title "Organizations" target Crm.Organizations
|
|
25
|
+
|
|
26
|
+
ui profile Desktop
|
|
27
|
+
target platform web
|
|
28
|
+
root template AppShell
|
|
29
|
+
option showFooter false
|
|
30
|
+
identity
|
|
31
|
+
name "Shopfront"
|
|
32
|
+
logo initials "SF"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
```screenplay excerpt
|
|
36
|
+
screen Organizations
|
|
37
|
+
data OrganizationOverview[] via query AllOrganizations
|
|
38
|
+
title "Organizations"
|
|
39
|
+
action RegisterOrganization
|
|
40
|
+
label "New organization"
|
|
41
|
+
```
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Sketches, mockups and images on a screen
|
|
2
|
+
|
|
3
|
+
Early in modeling a screen is often a quick sketch, a screenshot of the system being replaced or a
|
|
4
|
+
hand-written HTML page. Keep them with the screen so they travel with the model and reach whoever
|
|
5
|
+
builds it. Requires Screenplay 6.7.0 or later (`screenplay --version`).
|
|
6
|
+
|
|
7
|
+
The compiler warns `PLAY0952` while a named file is missing, so this fence asserts that code; a
|
|
8
|
+
model whose files exist beside it compiles clean.
|
|
9
|
+
|
|
10
|
+
```screenplay expect PLAY0952
|
|
11
|
+
module Ordering
|
|
12
|
+
feature Orders
|
|
13
|
+
slice StateView OpenOrdersView
|
|
14
|
+
screen OpenOrdersScreen
|
|
15
|
+
sketch Screens/open-orders.sketch.json
|
|
16
|
+
mockup Screens/open-orders/index.html
|
|
17
|
+
mockup Screens/open-orders/confirm.html
|
|
18
|
+
image Screens/open-orders-today.png
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
| Line | Holds |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| `sketch <path>` | A drawing of the screen as vector drawing data, such as a board sketch export. |
|
|
24
|
+
| `mockup <path>` | One HTML/CSS page of a coded mockup. Repeat the line per page, in reading order. |
|
|
25
|
+
| `image <path>` | A screenshot or design export: PNG, JPG, GIF, SVG or WebP. |
|
|
26
|
+
|
|
27
|
+
- A screen can carry any number of each, beside or instead of its structure.
|
|
28
|
+
- Paths are relative to the model root, like the `file` directive, and the files live in the
|
|
29
|
+
repository next to the `.play` files.
|
|
30
|
+
- They are authoring metadata. The printer keeps them in the order written, after `description`,
|
|
31
|
+
`file` and `fits`; the AST and MCP editing tools carry them; they never change what the screen
|
|
32
|
+
does and never reach the executable semantic model.
|
|
33
|
+
- Do not use them to replace a composed screen once the screen is designed: they record the origin
|
|
34
|
+
or the intent, the `data`, `action` and layout lines state the contract.
|
|
35
|
+
|
|
36
|
+
| Code | Severity | Meaning |
|
|
37
|
+
| --- | --- | --- |
|
|
38
|
+
| `PLAY0950` | Error | A `sketch`, `mockup` or `image` line names no file. |
|
|
39
|
+
| `PLAY0951` | Warning | An `image` is not PNG, JPG, GIF, SVG or WebP, or a `mockup` is not an HTML page (`.html`, `.htm`). |
|
|
40
|
+
| `PLAY0952` | Warning | The file does not exist beside the model, or its path leaves the model root. |
|
|
41
|
+
|
|
42
|
+
`PLAY0952` needs the files, so the product reports it where a model root is opened (the MCP server,
|
|
43
|
+
`open-workspace`); the standalone tool reports it for a folder it compiles, as the fence above shows.
|
|
@@ -266,6 +266,9 @@
|
|
|
266
266
|
{ "kind": "skill-contains", "value": "## Table narrowing", "file": "references/action-subjects.md" },
|
|
267
267
|
{ "kind": "skill-contains", "value": "Requires Screenplay 6.18.0", "file": "references/action-subjects.md" },
|
|
268
268
|
{ "kind": "skill-contains", "value": "PLAY0346 names the candidate", "file": "references/action-subjects.md" },
|
|
269
|
-
{ "kind": "skill-contains", "value": "action-subjects.md#table-narrowing", "file": "references/guarded-interactions.md" }
|
|
269
|
+
{ "kind": "skill-contains", "value": "action-subjects.md#table-narrowing", "file": "references/guarded-interactions.md" },
|
|
270
|
+
{ "kind": "skill-contains", "value": "references/screen-visuals.md" },
|
|
271
|
+
{ "kind": "skill-contains", "value": "Requires Screenplay 6.7.0 or later", "file": "references/screen-visuals.md" },
|
|
272
|
+
{ "kind": "skill-contains", "value": "`PLAY0951` | Warning", "file": "references/screen-visuals.md" }
|
|
270
273
|
]
|
|
271
274
|
}
|