@cratis/pi 7.11.2 → 7.11.4
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-automations-and-translations/SKILL.md +3 -3
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/realization-and-gap-fill.md +3 -3
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +4 -4
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/complete-examples.md +1 -1
- package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +49 -7
- package/package/corpus/skills/cratis-screenplay-command-surface/verification.json +8 -2
- package/package/corpus/skills/cratis-screenplay-discovery/SKILL.md +2 -2
- package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +12 -8
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/nine-steps.md +1 -1
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +11 -6
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +2 -2
- package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +7 -5
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +20 -13
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +3 -3
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +12 -4
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/provenance.md +1 -1
- package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +1 -1
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/SKILL.md +3 -3
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/vocabulary-map.md +1 -1
- package/package/corpus/skills/cratis-screenplay-projections/SKILL.md +1 -1
- package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +1 -1
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +13 -5
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/provenance.md +1 -1
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +5 -4
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/verification.json +7 -1
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +3 -2
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-catalogue.md +8 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +1 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/verification.json +1 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +2 -2
- package/package/corpus/skills/cratis-screenplay-slice-design/references/field-lineage.md +1 -1
- package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +49 -6
- package/package/corpus/skills/cratis-screenplay-specifications/verification.json +4 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +8 -4
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +1 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution.md +4 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-patterns.md +2 -2
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/verification.json +4 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +15 -14
- package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet.md +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +5 -3
- package/package/corpus/skills/cratis-screenplay-toolchain/references/doc-contradictions.md +3 -3
- package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +41 -4
- package/package/corpus/skills/cratis-screenplay-toolchain/references/generated-responses-example.md +59 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/provenance.md +1 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +3 -4
- package/package/corpus/skills/cratis-screenplay-toolchain/references/sources-and-streams.md +6 -6
- package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +3 -3
- package/package/corpus/skills/cratis-screenplay-toolchain/references/verdicts.md +3 -3
- package/package/corpus/skills/cratis-screenplay-toolchain/references/versions.md +20 -18
- package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +5 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +4 -3
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/worked-flow.md +3 -3
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +7 -7
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +6 -4
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/render-example.md +2 -2
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +4 -1
- package/package.json +1 -1
package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/provenance.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
## Moved and rewritten (Cratis)
|
|
4
4
|
- The render workflow of the earlier model skill set: capability probe, renderability
|
|
5
5
|
classification, delivery protocol, drift and fallback ledger. Rewritten for Stage 4.24 and cli
|
|
6
|
-
3.27.1, then re-verified on cli 3.28.2 (Stage 4.24.1) by running `cratis render`; the
|
|
6
|
+
3.27.1, then re-verified on cli 3.28.2 (Stage 4.24.1) and 3.28.3 (Stage 4.24.2) by running `cratis render`; the
|
|
7
7
|
helper scripts are not shipped (their steps are the manual commands in `references/delivery-protocol.md`).
|
|
8
8
|
- The fallback-conformance checklist moved into `cratis-application-slice-conformance`
|
|
9
9
|
(`references/checklists.md`); this skill links it and keeps no copy.
|
package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md
CHANGED
|
@@ -13,9 +13,10 @@ probe reports and choosing what to do. Do not copy the code table here.
|
|
|
13
13
|
(a specification shape).
|
|
14
14
|
2. Execution planning builds the plan and can emit `PLAN-*` diagnostics before Stage runs.
|
|
15
15
|
3. Stage plans the target and admits or rejects each member: `STAGE-ESM-0xx`; profile and path
|
|
16
|
-
problems `STAGE-CRATIS-0xx`.
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
problems `STAGE-CRATIS-0xx`. An ESM v4 model with an evolved event is reported with Stage's
|
|
17
|
+
own `STAGE-ESM-026` (Stage 4.24.2 admits v4 but not evolved events); the CLI adds nothing
|
|
18
|
+
since 3.28.3 (3.28.2 also reported `CLI-RENDER-003`, and refused a v4 model
|
|
19
|
+
with `STAGE-ESM-016` on its bundled Stage 4.24.1).
|
|
19
20
|
4. Any error anywhere publishes nothing: the run ends with exit 5 and the diagnostics.
|
|
20
21
|
|
|
21
22
|
The standalone `screenplay` tool can report V3 ready where the bundled binder refuses (newer
|
|
@@ -26,7 +27,7 @@ ESM). Only the probe answers renderability. `PLAY0270` entries are information,
|
|
|
26
27
|
| Class | Meaning | Typical examples (each verified in `admission.md`) | Action |
|
|
27
28
|
| --- | --- | --- | --- |
|
|
28
29
|
| **Model fix (in mode)** | the model is in, or the user chose, renderable mode and breaks its own subset in a way that has a renderable equivalent with the same meaning | a `produces` whose `for` is not the command identifier; one `StateChange` slice with two commands (`STAGE-ESM-004`); two projections for one read model (`-007`); a policy without `authenticated` (`-015`) | edit request to the modeler session with address, change and rationale |
|
|
29
|
-
| **Capability gap** | the intended meaning needs a construct Stage does not render yet | list, observable and filtered queries (`PLAY0268` "must declare one caller-supplied 'by'", `-010`); Automation and Translate slices (`PLAY0268` "not admitted by ESM v1", `-001`, Stage#79); reactions, clocks, captures and triggers (v6, `-016`);
|
|
30
|
+
| **Capability gap** | the intended meaning needs a construct Stage does not render yet | list, observable and filtered queries (`PLAY0268` "must declare one caller-supplied 'by'", `-010`); Automation and Translate slices (`PLAY0268` "not admitted by ESM v1", `-001`, Stage#79); reactions, clocks, captures and triggers (v6, `-016`); generated values and responses (v7: `-016`, and `PLAY0268` on the bundled 4.66.0; tracked in Stage#201); evolved events (`STAGE-ESM-026`); conditional `produces when` (`-006`); `reads` (`PLAY0271`); code validation (`-005`); opaque policies (`-015`); compliance attributes (`PLAY0268` "require portable data-subject semantics"); a command `handler` (`PLAY0268`) | keep the model; ledger entry; options a to c in `SKILL.md`; link the Stage issue |
|
|
30
31
|
| **Tool skew** | the bundled compiler disagrees with documented semantics | the false `PLAY0285` on reaction cascades from a cratis before 3.28.2 bundle (cli#242); codes the standalone compiler does not raise | record in the session state and the ledger; never "fix" a correct model |
|
|
31
32
|
| **Environment** | not the model | restore failures, missing SDK, a destination that is not writable | fix the environment or report blocked |
|
|
32
33
|
|
|
@@ -38,6 +38,12 @@
|
|
|
38
38
|
{
|
|
39
39
|
"kind": "skill-contains",
|
|
40
40
|
"value": "case A or C today"
|
|
41
|
-
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"kind": "skill-contains",
|
|
44
|
+
"value": "STAGE-ESM-026"
|
|
45
|
+
},
|
|
46
|
+
{ "kind": "skill-contains", "value": "Generated command values and `returns` responses (ESM v7) bind and run" },
|
|
47
|
+
{ "kind": "skill-contains", "value": "tracked in Stage#201" }
|
|
42
48
|
]
|
|
43
49
|
}
|
|
@@ -24,8 +24,9 @@ language cannot express today are recorded, not faked. Grammar and outcome compa
|
|
|
24
24
|
`cratis-specification-by-example`); a full audit (`cratis-screenplay-model-review`).
|
|
25
25
|
|
|
26
26
|
## Verified product sources
|
|
27
|
-
Screenplay v4.66.0 (`c89198b`)
|
|
28
|
-
|
|
27
|
+
Screenplay v4.66.0 (`c89198b`) and v4.68.0 (`79801bf`, ESM v7 fixtures and `then returns`):
|
|
28
|
+
`Documentation/screenplay/specifications.md` and the standalone compiler; `cratis` 3.28.2 and
|
|
29
|
+
3.28.3 bundle Screenplay 4.66.0 (before 3.28.2 it bundled 4.60.1). The full pin table and the probes are in
|
|
29
30
|
`cratis-screenplay-toolchain` `references/versions.md`. Specification obligations reported by
|
|
30
31
|
the MCP (Screenplay#390) and multi-step storylines (Screenplay#394) are **not available**: the
|
|
31
32
|
coverage matrix is built by hand and lifecycle families emulate storylines.
|
package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-catalogue.md
CHANGED
|
@@ -28,6 +28,14 @@ name them as unfinished.
|
|
|
28
28
|
order, with full payloads and `for`. See `ReservingAGuestBerth`.
|
|
29
29
|
- Traps: asserting a subset of events (lists are exact); leaving out `given caller` on a gated
|
|
30
30
|
command; omitting `for` so the event lands on an allocated source.
|
|
31
|
+
- Generated values and responses (ESM v7, standalone Screenplay 4.68.0; syntax in `cratis-screenplay-specifications`):
|
|
32
|
+
when the command has a `generated` property, the happy path supplies its fixtures (`for` on the generated
|
|
33
|
+
identifier, `generated <name> = <value>`); only when the command declares a response does it assert
|
|
34
|
+
`then returns` (a return expectation without a response is rejected at compile time). Add the failing
|
|
35
|
+
counterparts as separate specs: a rule rejection or denial (which happens before generation and has no
|
|
36
|
+
response). A reached generated value without a fixture is `Unsupported(IdentityAllocation)`: the runner
|
|
37
|
+
reports it as not passed, so it is a known capability limit to record, not a specification to write.
|
|
38
|
+
A generated identifier is no retry identity (section 5).
|
|
31
39
|
|
|
32
40
|
## 2. Rule rejection (one per rule)
|
|
33
41
|
- Ask: "Which values would you refuse, and what would you tell the person?"
|
package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md
CHANGED
|
@@ -17,6 +17,7 @@ design model: keep it and record the gap.
|
|
|
17
17
|
| `when query` -> `then result` / `then no result` | yes | yes | same as `then query`: only the query-only cases below |
|
|
18
18
|
| `given clock` / `when clock`, `when trigger`, `given`/`when capture` | yes | Screenplay 4.61 or later yes (standalone, cratis 3.28.2 or later); a cratis before 3.28.2 bundle no (see versions.md) | no |
|
|
19
19
|
| Command spec listing reaction cascade events | yes (v6 semantics) | false PLAY0285 on a cratis before 3.28.2 bundle only; see SKILL.md "Version skew" | no (no reactions) |
|
|
20
|
+
| `generated <name> = <value>` under `when`, `then returns` (ESM v7) | yes | yes on standalone Screenplay 4.68.0 or later; not on the 4.66.0 bundled in cratis 3.28.x (`PLAY0268`) | no (Stage does not render ESM v7) |
|
|
20
21
|
| `then events in any order` | yes | yes | yes |
|
|
21
22
|
| Composite (JSON) values in specs | yes | yes | no |
|
|
22
23
|
| Rules over dates or `today`, nested paths | spec them in design | rule does not bind: `recorded` | `recorded` |
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
{ "kind": "skill-contains", "value": "Once, idempotent, exactly once are different claims" },
|
|
8
8
|
{ "kind": "skill-contains", "value": "Unauthorized is never `then error`" },
|
|
9
9
|
{ "kind": "skill-contains", "value": "Screenplay#390" },
|
|
10
|
+
{ "kind": "skill-contains", "value": "v4.68.0" },
|
|
10
11
|
{ "kind": "skill-contains", "value": "false PLAY0285" },
|
|
11
12
|
{ "kind": "skill-contains", "value": "One behaviour per spec" },
|
|
12
13
|
{ "kind": "skill-contains", "value": "No command has only two specs" },
|
|
@@ -203,8 +203,8 @@ Slice design is done when these hold; otherwise report what is open.
|
|
|
203
203
|
| --- | --- | --- |
|
|
204
204
|
| Screenplay | `v4.66.0` (`c89198b`) | `commands.md`, `constraints.md`, `specifications.md`, `diagnostics.md` (`PLAY0191`, `PLAY0268`, `PLAY0271`, `PLAY0350`, `PLAY0381`, `PLAY0397`), `projections/keys.md` |
|
|
205
205
|
|
|
206
|
-
Examples compile with `screenplay` 4.
|
|
207
|
-
--warnings-as-errors` (cratis 3.28.2); other pins: `cratis-screenplay-toolchain`
|
|
206
|
+
Examples compile with `screenplay` 4.68.0 `--warnaserror` and `cratis screenplay validate
|
|
207
|
+
--warnings-as-errors` (cratis 3.28.2 or later); other pins: `cratis-screenplay-toolchain`
|
|
208
208
|
`references/versions.md`. Compiling proves syntax, not that the model is executable or renders.
|
|
209
209
|
|
|
210
210
|
## Verify
|
|
@@ -13,7 +13,7 @@ event field goes nowhere, ask why it is recorded (audit and history are valid an
|
|
|
13
13
|
| the user types or picks it | screen `action`, form or dialog input | default for business decisions |
|
|
14
14
|
| shown before the user acts | form `populate via query` from a read model | the read model must exist and be traced |
|
|
15
15
|
| the instance being acted on | the `identifier` property, carried from the screen row or route | |
|
|
16
|
-
| allocated by the runtime |
|
|
16
|
+
| allocated by the runtime | `Type generated` on a required `Uuid`-backed concept (ESM v7: binds and runs on standalone Screenplay 4.68.0, `PLAY0268` on the 4.66.0 bundled in cratis 3.28.x, not rendered by Stage 4.24.2; no concept rules) | never a request input or form field; no policy, rule or requirement may read it (`PLAY0273`); return it with `returns`; where a tool cannot bind it, executable scope needs explicit allocation |
|
|
17
17
|
| an outside party | capture field `$.x` or a reaction trigger value | `cratis-screenplay-automations-and-translations` |
|
|
18
18
|
| the caller | not an input: `$context.identity.*` in `produces`; who may act in `authorize`; "acting on own X" is a claim policy matched to the identifier or a command property | never trust a caller-supplied "who am I" |
|
|
19
19
|
|
|
@@ -30,14 +30,15 @@ source is the single flow model.
|
|
|
30
30
|
| --- | --- | --- |
|
|
31
31
|
| `Cratis.Screenplay` | `4.31.0` | Original parser, binder and reference execution evidence |
|
|
32
32
|
| `Cratis.Screenplay` | main `fd18129` | Inline facts, `optional` and clock spelling; changed examples compiled |
|
|
33
|
+
| `Cratis.Screenplay` | `4.68.0` (`79801bf`) | ESM v7 generated fixtures and `then returns` (decision 0026, `specifications.md` "Generated fixtures and return expectations"): the excerpt matches the compiled example in `cratis-screenplay-toolchain`, whose specifications run in the reference runner |
|
|
33
34
|
| `Cratis.Screenplay` | `4.66.0` (`c89198b`) | ESM v6 specification actions and reaction cascades, `then no readmodel`, `$strings` rejections, `invokes` caller rule; probed with the standalone tool and its MCP server |
|
|
34
35
|
|
|
35
36
|
The update follows `commands.md`, `events.md`, `types.md` and
|
|
36
37
|
`specifications.md` at that main commit (after v4.52.0). This pass compiles the
|
|
37
38
|
changed examples; it does not rerun the reference runner.
|
|
38
39
|
|
|
39
|
-
**Which tool says what.** The standalone `screenplay` tool 4.
|
|
40
|
-
The `cratis` CLI 3.28.2
|
|
40
|
+
**Which tool says what.** The standalone `screenplay` tool 4.68.0 admits ESM v1-v7.
|
|
41
|
+
The `cratis` CLI 3.28.2 and 3.28.3 bundle Screenplay 4.66.0 (ESM v1-v6: generated fixtures and `then returns` report `PLAY0268`). Before `cratis` 3.28.2 the
|
|
41
42
|
bundle was Screenplay 4.60.1, which admitted ESM v1-v5 only and reported a false
|
|
42
43
|
`PLAY0285` on reaction cascades (see "Version skew"). Facts below marked **ESM v6**
|
|
43
44
|
hold for Screenplay 4.61.0 and later: the standalone tool and `cratis` 3.28.2 or later. The full table is in `cratis-screenplay-toolchain`
|
|
@@ -74,6 +75,8 @@ decision 0022. They do not exist before v4.48.0.
|
|
|
74
75
|
| `when clock "<instant>"` | the clock reaches an instant; scheduled reactions that are due run (v4.48.0) |
|
|
75
76
|
| `when trigger <Trigger>` | an application trigger fires with the values beneath it (v4.48.0) |
|
|
76
77
|
| `given capture` / `when capture <Capture>` | an earlier and the current record of a capture's source (v4.48.0) |
|
|
78
|
+
| `generated <name> = <value>` | beneath `when <Command>`: the fixture for a generated property other than the identifier (ESM v7); `for` beneath the `when` supplies the generated identifier |
|
|
79
|
+
| `then returns [<value>]` | the command's response (ESM v7): `then returns "<uuid>"` for a scalar, `then returns` with named `field = value` lines for a subset of a record |
|
|
77
80
|
| `then <EventType>` | an expected new event |
|
|
78
81
|
| `then events in any order` | compare the new events without regard to order |
|
|
79
82
|
| `then readmodel <ReadModelType> [exactly]` | read-model state afterwards — must state the identifier |
|
|
@@ -241,6 +244,46 @@ module Invoicing
|
|
|
241
244
|
exactly what `then query` with `arguments` and `result` would, so on a version
|
|
242
245
|
before v4.48.0 write it that way instead.
|
|
243
246
|
|
|
247
|
+
## Generated fixtures and return expectations (ESM v7)
|
|
248
|
+
|
|
249
|
+
Standalone `screenplay` 4.68.0 or later binds and runs these; the cratis CLI 3.28.3 (bundled 4.66.0) does not
|
|
250
|
+
bind them, and Stage does not render ESM v7 yet (`STAGE-ESM-016`, tracked in Stage#201), so they pin the
|
|
251
|
+
contract of a hand-written command. The model and rules are in `cratis-screenplay-command-surface`; the
|
|
252
|
+
complete example is `cratis-screenplay-toolchain` `references/generated-responses-example.md`.
|
|
253
|
+
|
|
254
|
+
```screenplay excerpt
|
|
255
|
+
specification RegisteringReturnsIdentifiers
|
|
256
|
+
when RegisterProject
|
|
257
|
+
for "11111111-1111-1111-1111-111111111111"
|
|
258
|
+
generated receiptId = "22222222-2222-2222-2222-222222222222"
|
|
259
|
+
name = "Apollo"
|
|
260
|
+
then ProjectRegistered
|
|
261
|
+
for "11111111-1111-1111-1111-111111111111"
|
|
262
|
+
name = "Apollo"
|
|
263
|
+
then returns
|
|
264
|
+
receiptId = "22222222-2222-2222-2222-222222222222"
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
- `for` beneath `when` supplies the generated identifier and an indented `generated <name> = <value>` supplies any other
|
|
268
|
+
generated value; neither goes on the `when` header, and neither is a request mapping. Ordinary `generated = <value>`
|
|
269
|
+
is an input mapping for a property named `generated`.
|
|
270
|
+
- A scalar response is `then returns <value>`; a record uses `then returns` with a non-empty subset of its named
|
|
271
|
+
fields (unknown, duplicate, nongenerated or identifier fixture targets are rejected). Values are concrete literals or
|
|
272
|
+
structured values. A return expectation needs a command action, occurs at most once and cannot accompany
|
|
273
|
+
`then error` or `then denied`; event and state assertions may coexist.
|
|
274
|
+
- The reference runner compares scalar values by semantic equality and records by the asserted subset, reporting
|
|
275
|
+
differences in response field order. An absent optional source yields `Null`; arrays compare in order.
|
|
276
|
+
- `then returns` counts as a success outcome but does not relax event comparison: a command specification with
|
|
277
|
+
no expected events still asserts that no facts were produced.
|
|
278
|
+
- If execution reaches generation without every generated value supplied, the run is `Unsupported(IdentityAllocation)` and
|
|
279
|
+
the specification never passes; nothing is invented. A denial or validation failure happens before generation and
|
|
280
|
+
keeps its own outcome.
|
|
281
|
+
- For a generated identifier `for` is the generation fixture, not a destination assertion: expected events state their
|
|
282
|
+
own destinations. For commands without a generated identifier `when ... for` keeps the destination assertion.
|
|
283
|
+
UUID spellings on generated values normalize to lowercase hyphenated form.
|
|
284
|
+
- A reaction-invoked command that reaches generation is `Unsupported(IdentityAllocation)` (no fixture channel); a
|
|
285
|
+
response-only command runs and its response is discarded.
|
|
286
|
+
|
|
244
287
|
## Actions beyond commands
|
|
245
288
|
|
|
246
289
|
A slice is not always set off by a command. Name what does:
|
|
@@ -332,8 +375,8 @@ module Collections
|
|
|
332
375
|
- A reached reaction with a code body (`file` or inline) returns unsupported, as
|
|
333
376
|
does a reaction that never settles. The reference stops at 1,000 new facts per
|
|
334
377
|
scenario and 10,000 due occurrences per clock advance.
|
|
335
|
-
- A model that uses these forms selects ESM v6 (`schemaVersion: 6`). Stage 4.24.
|
|
336
|
-
admits ESM v1-
|
|
378
|
+
- A model that uses these forms selects ESM v6 (`schemaVersion: 6`). Stage 4.24.2
|
|
379
|
+
admits ESM v1-v4 and renders no `Automation` or `Translate` slice, so the whole
|
|
337
380
|
automation is gap-fill against this contract: `cratis-screenplay-render-and-gap-fill`.
|
|
338
381
|
|
|
339
382
|
### Version skew: cascades and the false `PLAY0285` (cratis before 3.28.2)
|
|
@@ -341,7 +384,7 @@ module Collections
|
|
|
341
384
|
`PLAY0285` (a specification's expected event contradicts every producer of its
|
|
342
385
|
`when` command) runs in the syntax pass, with no binding. Reachability through
|
|
343
386
|
reactions and `invokes` was added after Screenplay 4.60.1. So the example above
|
|
344
|
-
passes `screenplay` 4.
|
|
387
|
+
passes `screenplay` 4.68.0 (and is executable-ready over its MCP server) and also passes
|
|
345
388
|
`cratis screenplay validate` 3.28.2 (probed); it failed `cratis screenplay validate` 3.27.1 with
|
|
346
389
|
`PLAY0285` "Specification outcome 'ReminderScheduled' cannot be produced by 'SendInvoice'",
|
|
347
390
|
exit 5 (Cratis/cli#242). If an older bundle still reports it, it is a tool skew, not a
|
|
@@ -518,7 +561,7 @@ For view specifications:
|
|
|
518
561
|
## Verify
|
|
519
562
|
|
|
520
563
|
- [ ] `screenplay <model> --warnaserror` reports zero errors and zero warnings
|
|
521
|
-
(standalone 4.
|
|
564
|
+
(standalone 4.68.0 or `cratis` 3.28.2 or later, bundling 4.66.0; under `cratis` before 3.28.2 expect the false
|
|
522
565
|
`PLAY0285` on reaction cascades and record that it is skew).
|
|
523
566
|
- [ ] Executable diagnostics are clean too: `PLAY0350`, `PLAY0352`, `PLAY0388`,
|
|
524
567
|
`PLAY0389` and `PLAY0273` are only reported at binding.
|
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
"kind": "skill-contains",
|
|
8
8
|
"value": "main `fd18129`"
|
|
9
9
|
},
|
|
10
|
+
{ "kind": "skill-contains", "value": "Generated fixtures and return expectations (ESM v7)" },
|
|
11
|
+
{ "kind": "skill-contains", "value": "`then returns` counts as a success outcome but does not relax event comparison" },
|
|
12
|
+
{ "kind": "skill-contains", "value": "`Unsupported(IdentityAllocation)`" },
|
|
13
|
+
{ "kind": "skill-contains", "value": "4.68.0" },
|
|
10
14
|
{
|
|
11
15
|
"kind": "skill-contains",
|
|
12
16
|
"value": "Inline events are ordinary named facts"
|
|
@@ -16,10 +16,10 @@ lives only in code, or only in a description, is a finding, not a solution.
|
|
|
16
16
|
|
|
17
17
|
| Product | Pin | Used for |
|
|
18
18
|
| --- | --- | --- |
|
|
19
|
-
| Screenplay | v4.
|
|
19
|
+
| Screenplay | v4.68.0 (`79801bf`) | ESM v7 generated values (`generated identifier`, decision 0026) and decision 0025's numbering; the diagnostics below were read at v4.66.0 (`c89198b`): `identifier`, `for`, constraints, generations, `id` pins, diagnostics PLAY0019/0135/0268/0271/0273/0391-0393/0446-0449/0469/0471 |
|
|
20
20
|
| Chronicle | v19.32.0 (`f17a2ff`) | CHR0012, CHR0034; open defects #3744, #4123, #4131 |
|
|
21
21
|
| Arc | v22.50.5 | `[ProtectedDecision]` and `DecisionRead<T>` (since v22.39.0) |
|
|
22
|
-
| Stage | v4.24.
|
|
22
|
+
| Stage | v4.24.2 | rendered apps pin Arc 22.25.0 and Chronicle client 19.8.1 (unchanged from 4.24.0); admits ESM v4 but refuses evolved events with `STAGE-ESM-026` (migrations not rendered, Stage#204) |
|
|
23
23
|
|
|
24
24
|
Full pin table: `references/versions.md` in `cratis-screenplay-toolchain`. Re-check the three
|
|
25
25
|
Chronicle issues before relying on a constraint in a later release.
|
|
@@ -70,7 +70,11 @@ option, mark it `ASSUMED` in the slice or module `description` and in the sessio
|
|
|
70
70
|
(`references/chronicle-boundaries.md`). Declared `eventsource`/`stream`/`streamId` and
|
|
71
71
|
command routes can be authored and validated but not bound, run or rendered today
|
|
72
72
|
(`PLAY0268`, `STAGE-ESM-016`): keep them as intent and hand-write the routing
|
|
73
|
-
(`cratis-screenplay-toolchain` `references/sources-and-streams.md`)
|
|
73
|
+
(`cratis-screenplay-toolchain` `references/sources-and-streams.md`); no supported ESM version
|
|
74
|
+
admits them. A `generated identifier` (ESM v7, standalone 4.68.0; not rendered by Stage yet) is
|
|
75
|
+
generated fresh on every acceptance: it is not a retry identity, and generated values give no
|
|
76
|
+
idempotency, retry or deduplication guarantee. When a retry must find the same stream, the caller
|
|
77
|
+
supplies the identifier before the first attempt.
|
|
74
78
|
2. **Account for every invariant.** One row per rule in the table from
|
|
75
79
|
`references/consistency-and-concurrency.md`: rule, authoritative inputs, all paths that can
|
|
76
80
|
affect it, intended atomic decision point, exact construct, status (`enforced` / `recorded` /
|
|
@@ -110,7 +114,7 @@ option, mark it `ASSUMED` in the slice or module `description` and in the sessio
|
|
|
110
114
|
decisions and capability gaps in `STATE.md`. Then the gate below.
|
|
111
115
|
|
|
112
116
|
## Rules
|
|
113
|
-
**Compiler contracts** (diagnostics at Screenplay v4.66.0; capability per tool in `versions.md`)
|
|
117
|
+
**Compiler contracts** (diagnostics at Screenplay v4.66.0 and v4.68.0; capability per tool in `versions.md`)
|
|
114
118
|
- `identifier` on an event property is PLAY0019; the source id is never payload by declaration.
|
|
115
119
|
Copying it as a payload value is PLAY0469 (information, warning for inline events).
|
|
116
120
|
- In the executable model a production's `for` must resolve to the command's scalar identifier:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Consistency and concurrency
|
|
2
2
|
|
|
3
|
-
Pins: Screenplay v4.66.0, Chronicle v19.32.0, Arc v22.50.5, Stage v4.24.
|
|
3
|
+
Pins: Screenplay v4.66.0, Chronicle v19.32.0, Arc v22.50.5, Stage v4.24.2 (table in `versions.md` of
|
|
4
4
|
`cratis-screenplay-toolchain`).
|
|
5
5
|
|
|
6
6
|
## 1. Invariant table (fill before writing constraints)
|
package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution.md
CHANGED
|
@@ -60,6 +60,9 @@ Procedure and ownership: the identity procedure in `cratis-screenplay-modeling-l
|
|
|
60
60
|
owning session, or a brief that asks for the rename, applies it; a subagent without MCP returns
|
|
61
61
|
the catalog-changing request to the owner; never leave a requested change silently unapplied).
|
|
62
62
|
- Several generations select ESM v4; that binds executably on both tools (compiled
|
|
63
|
-
with `evolution-example.md`).
|
|
63
|
+
with `evolution-example.md`). Stage 4.24.2 admits v4 but refuses any evolved event and its
|
|
64
|
+
dependent scope with `STAGE-ESM-026` (it cannot render event-type migrations yet, Stage#204,
|
|
65
|
+
which depends on Screenplay#71), and its runtime still refuses evolved events: the evolved
|
|
66
|
+
events are gap-fill, with migrations hand-written per `cratis-chronicle-event-type-migration`.
|
|
64
67
|
|
|
65
68
|
Complete compiled example: `evolution-example.md` (generation, rename pin, meaning change).
|
|
@@ -26,7 +26,7 @@ Facts about another thing go on that thing's stream with a reference as payload
|
|
|
26
26
|
keyed by the reference (`from MemberEnrolled key courseId`), never a shared stream. A command
|
|
27
27
|
with no identifier allocates a new stream (executable mode needs explicit allocation, see
|
|
28
28
|
`cratis-screenplay-toolchain`). Prefer an identifier the caller chooses before the first attempt: it
|
|
29
|
-
is also the retry identity; one allocated afresh per retry can create a second history.
|
|
29
|
+
is also the retry identity; one allocated afresh per retry (including a `generated identifier`, which is generated on every acceptance) can create a second history.
|
|
30
30
|
Never use personal data as the identifier (see `chronicle-boundaries.md`).
|
|
31
31
|
|
|
32
32
|
### Event-by-event identity check (record the result)
|
|
@@ -189,7 +189,7 @@ Ask for each stream:
|
|
|
189
189
|
Some event stores decide consistency by a query over tagged events instead of one stream
|
|
190
190
|
(often called dynamic consistency boundaries). Chronicle's concurrency scopes can narrow a
|
|
191
191
|
check to event types, source type or stream (`concurrency` block, Screenplay
|
|
192
|
-
`commands.md`), and Screenplay has syntax-only event-source/stream declarations (
|
|
192
|
+
`commands.md`), and Screenplay has syntax-only event-source/stream declarations (not admitted by any supported ESM version;
|
|
193
193
|
`event-sources.md`). None of this binds on either compiler (`versions.md` in `cratis-screenplay-toolchain`). Model the stream by business
|
|
194
194
|
identity; when a rule truly needs a cross-stream decision, record it (see
|
|
195
195
|
`consistency-and-concurrency.md`) rather than inventing a construct.
|
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
{ "kind": "skill-contains", "value": "CHR0034" },
|
|
13
13
|
{ "kind": "skill-contains", "value": "No calculated events" },
|
|
14
14
|
{ "kind": "skill-contains", "value": "decision tree and red flags" },
|
|
15
|
-
{ "kind": "skill-contains", "value": "not bound, run or rendered" }
|
|
15
|
+
{ "kind": "skill-contains", "value": "not bound, run or rendered" },
|
|
16
|
+
{ "kind": "skill-contains", "value": "STAGE-ESM-026" },
|
|
17
|
+
{ "kind": "skill-contains", "value": "generated values give no\n idempotency, retry or deduplication guarantee" },
|
|
18
|
+
{ "kind": "skill-contains", "value": "no supported ESM version\n admits them" }
|
|
16
19
|
]
|
|
17
20
|
}
|
|
@@ -24,13 +24,13 @@ The only version table is `references/versions.md`; other skills point to it.
|
|
|
24
24
|
|
|
25
25
|
| Package | Version | Purpose |
|
|
26
26
|
| --- | --- | --- |
|
|
27
|
-
| `Cratis.Screenplay.Tool` | `4.
|
|
28
|
-
| cratis CLI | `3.28.
|
|
29
|
-
| Stage | `4.24.
|
|
27
|
+
| `Cratis.Screenplay.Tool` | `4.68.0` (`79801bf`) | standalone compiler, binder and MCP server; admits ESM v7 (generated values and responses) |
|
|
28
|
+
| cratis CLI | `3.28.3` (`8b43fef`) | bundles Screenplay 4.66.0 (ESM v1 to v6) and Stage 4.24.2 (3.28.2: Stage 4.24.1; 3.28.1 and earlier bundled 4.60.1 and 4.24.0); `render`, `generate`, `prologue`, and the same compiler for `screenplay validate` and `screenplay mcp` |
|
|
29
|
+
| Stage | `4.24.2` (`32dcac4`) | renders ESM v1 to v4 (C# backend plus a React/Vite scaffold on Arc 22.25.0); an evolved event is refused with `STAGE-ESM-026`; the cratis CLI bundles it since 3.28.3 |
|
|
30
30
|
| Arc / Chronicle | `22.50.5` / `19.32.0` | code-level facts cited here |
|
|
31
31
|
|
|
32
32
|
Facts were read with `git show <tag>:<path>` and probed on the installed tools. Behaviour
|
|
33
|
-
was probed on 4.63.1 and re-checked on 4.66.0. 4.65.0 adds command named-rule `implementation` blocks (handlers and operation phases already had the wrapper; it is rejected on concept rules, built-in property rules and whole-command `require`/`validate` bodies); 4.66.0 is editor tooling only. Neither changes execution.
|
|
33
|
+
was probed on 4.63.1 and re-checked on 4.66.0 and 4.68.0 (the example gates). 4.65.0 adds command named-rule `implementation` blocks (handlers and operation phases already had the wrapper; it is rejected on concept rules, built-in property rules and whole-command `require`/`validate` bodies); 4.66.0 is editor tooling only. Neither changes execution.
|
|
34
34
|
Re-verify before claiming another version behaves the same.
|
|
35
35
|
|
|
36
36
|
## Ground rules
|
|
@@ -42,7 +42,7 @@ Re-verify before claiming another version behaves the same.
|
|
|
42
42
|
`cratis screenplay validate <folder> --warnings-as-errors`. Warnings hide defects:
|
|
43
43
|
PLAY0029 (a misspelt keyword or a `type` inside a slice) drops a construct silently.
|
|
44
44
|
3. **Pick the compiler deliberately and name it.** Standalone `screenplay` for V1 to V3 (file
|
|
45
|
-
mode follows imports); `cratis` 3.28.2 or later bundles the
|
|
45
|
+
mode follows imports); `cratis` 3.28.2 or later bundles the 4.66.0 compiler (same up to ESM v6, no ESM v7) and is the
|
|
46
46
|
route for `render`. A cratis before 3.28.2 bundle (4.60.1) rejects ESM v6 and reports a
|
|
47
47
|
false PLAY0285 on cascades (cli#242). Report tool and version with every verdict.
|
|
48
48
|
4. **Know the mode** (design, executable, renderable) and write from its subset.
|
|
@@ -61,10 +61,10 @@ Re-verify before claiming another version behaves the same.
|
|
|
61
61
|
|
|
62
62
|
## The two compilers
|
|
63
63
|
|
|
64
|
-
| | Standalone `screenplay` 4.
|
|
64
|
+
| | Standalone `screenplay` 4.68.0 | `cratis screenplay ...` 3.28.3 and 3.28.2 (bundle Screenplay 4.66.0) |
|
|
65
65
|
| --- | --- | --- |
|
|
66
66
|
| Check a folder | `screenplay <folder> --warnaserror --no-color` (exit 0 pass, 1 fail; an empty folder also exits 0, so read "N file(s) compiled") | `cratis screenplay validate <folder> --warnings-as-errors -o json-compact` (0 pass, 5 fail, 1 missing path or no files) |
|
|
67
|
-
| ESM admitted | v1 to
|
|
67
|
+
| ESM admitted | v1 to v7 | v1 to v6 (generated values and responses report `PLAY0268`; before 3.28.2 bundled 4.60.1: v1 to v5) |
|
|
68
68
|
| Automation, Translate, reactions, captures, clocks, triggers | bind | bind (before 3.28.2: PLAY0268 "Slice '<name>' of type '<type>' is not admitted by ESM v1.") |
|
|
69
69
|
| Cascade specs | compile | compile (before 3.28.2: false PLAY0285, cli#242) |
|
|
70
70
|
| File argument | follows imports | ignores imports, false PLAY0165 warnings (cli#244, probed on 3.28.2): validate the folder |
|
|
@@ -86,9 +86,9 @@ Independent results, not a ladder. Commands and report format: `references/verdi
|
|
|
86
86
|
|
|
87
87
|
V2 and V3 need MCP: send `initialize`, then `notifications/initialized`, and start the
|
|
88
88
|
server with a fixed root when the tool is older than 4.63.2 (the roots bug hit 4.63.1 and the
|
|
89
|
-
4.60.1 bundled by cratis before 3.28.2; 4.66.0 and cratis 3.28.2 are fine). A subagent without MCP reports "V2 not run: no MCP in this agent".
|
|
89
|
+
4.60.1 bundled by cratis before 3.28.2; 4.66.0 and later and cratis 3.28.2 are fine). A subagent without MCP reports "V2 not run: no MCP in this agent".
|
|
90
90
|
|
|
91
|
-
One line per verdict, tool first, for example `V1 pass (screenplay 4.
|
|
91
|
+
One line per verdict, tool first, for example `V1 pass (screenplay 4.68.0, 3 files)` and
|
|
92
92
|
`V3 blocked: PLAY0268 x3 (list query, @pii)`. Name the source identity (commit plus the digest from
|
|
93
93
|
the source-identity helper (`cratis-screenplay-modeling-lifecycle` `references/verdicts-and-modes.md` "Source identity")) the verdict ran on; keep it apart from the MCP
|
|
94
94
|
`modelRevision`, which is semantic and, without `.screenplay/identities.json`,
|
|
@@ -101,11 +101,12 @@ changes with the root folder name.
|
|
|
101
101
|
- **Executable** (binds, V3): `references/executable-subset.md`. Keyed optional queries
|
|
102
102
|
only; no handler (PLAY0268, with or without `implementation`/`hint`); `reads` and
|
|
103
103
|
`concurrency` do not bind (PLAY0271); no `@pii`; v6 constructs bind on Screenplay 4.61 or
|
|
104
|
-
later (standalone, and cratis 3.28.2 or later)
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
-
|
|
108
|
-
|
|
104
|
+
later (standalone, and cratis 3.28.2 or later); generated values and `returns` responses bind (ESM v7)
|
|
105
|
+
only on standalone 4.68.0 or later (`references/generated-responses-example.md`).
|
|
106
|
+
- **Renderable** (V5): `references/renderable-subset.md`. Stage 4.24.2 renders ESM v1 to v4 (evolved events refused, `STAGE-ESM-026`)
|
|
107
|
+
`StateChange`/`StateView` slices; Automation and Translate are gap-fill (Stage#79), and so are generated values and responses (ESM v7: Stage refuses it with `STAGE-ESM-016`, tracked in Stage#201).
|
|
108
|
+
- **Event sources, streams and command routes** (and operations): authorable and validatable, but never
|
|
109
|
+
bound (`PLAY0268`: not admitted by any supported ESM version), run or rendered
|
|
109
110
|
(`STAGE-ESM-016`); gap-fill with the model as contract (`references/sources-and-streams.md`).
|
|
110
111
|
|
|
111
112
|
## Edit strategy
|
|
@@ -16,7 +16,7 @@ Screenplay sources: `Documentation/screenplay/grammar.md` (EBNF; checked against
|
|
|
16
16
|
by `for_Documentation/when_comparing_the_grammar_against_the_parsers.cs`),
|
|
17
17
|
`projections/grammar.md`, `captures/grammar.md`. Documentation examples compile in
|
|
18
18
|
Screenplay CI (`when_compiling_every_example.cs`) against repository main: the standalone
|
|
19
|
-
compiler (4.
|
|
19
|
+
compiler (4.68.0; `cratis` 3.28.2 or later bundles 4.66.0, which lacks ESM v7); older cratis bundles differ (`versions.md`).
|
|
20
20
|
|
|
21
21
|
## Lexical and structural rules
|
|
22
22
|
- Spaces only, 2 per level (tabs: PLAY0006 W). Offside rule.
|
|
@@ -92,9 +92,11 @@ Report each as `code file:line one-line meaning`; never paste more than about 30
|
|
|
92
92
|
Full table with causes: `renderable-subset.md`. Codes you meet most:
|
|
93
93
|
| Code | Meaning |
|
|
94
94
|
|---|---|
|
|
95
|
-
| STAGE-ESM-016 | model above ESM schema
|
|
96
|
-
| STAGE-ESM-
|
|
97
|
-
|
|
|
95
|
+
| STAGE-ESM-016 | model above the admitted ESM schema (v4 on Stage 4.24.2: v5 absence and v6 constructs; 4.24.1 admitted v3, so a v4 model with generations was refused): whole model refused |
|
|
96
|
+
| STAGE-ESM-025 | Stage 4.24.2: a typed-context member references a historical event revision or property identity; only the current revision renders |
|
|
97
|
+
| STAGE-ESM-026 | Stage 4.24.2: a selected event, or an event a selected scope depends on, is above its initial revision; Stage cannot render event-type migrations yet (Stage#204, needs Screenplay#71); gap-fill and hand-write the migrations |
|
|
98
|
+
| STAGE-ESM-024 | ledger-only (Stage 4.24.1 and later): the ESM v6 members are dispositioned Rejected; a v6 model is still refused whole by STAGE-ESM-016, so this is not the code a user sees |
|
|
99
|
+
| CLI-RENDER-003 | historical: reported by cratis 3.28.2 for an ESM v4 model with generations; not emitted since 3.28.3, which reports an evolved event with `STAGE-ESM-026` |
|
|
98
100
|
| STAGE-ESM-001 | slice kind is not `StateChange`/`StateView` (Automation, Translate: Stage#79) |
|
|
99
101
|
| STAGE-ESM-004 / 006 / 013 | more than one command per `StateChange`; conditional or value-expression production; other context value |
|
|
100
102
|
| STAGE-ESM-005 / 015 | code rule or code validation; opaque policy or an ownership claim against a Uuid-backed target |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
that tag. Rule: the compiler you ran decides what the tool accepts today; the documentation
|
|
5
5
|
and the domain decide what the model should mean. When they disagree, follow the compiler
|
|
6
6
|
for syntax, keep the intended semantics in the model, and record the gap (an issue).
|
|
7
|
-
Tool names mean the standalone `screenplay` 4.
|
|
7
|
+
Tool names mean the standalone `screenplay` 4.68.0 and `cratis` 3.28.2 (bundled Screenplay
|
|
8
8
|
4.66.0; before 3.28.2 bundled 4.60.1); see `versions.md`. [probed] marks a row re-checked by running a tool; the rest are
|
|
9
9
|
read from source or documentation.
|
|
10
10
|
|
|
@@ -32,9 +32,9 @@ read from source or documentation.
|
|
|
32
32
|
| 19 | `$strings` constraint messages | `D/constraints.md:31` vs `D/internationalization.md:55` | the compiler keeps the key; realization localizes |
|
|
33
33
|
| 20 | composite key braces | optional in the EBNF; both forms in docs | both fine |
|
|
34
34
|
| 21 | counters list | `D/projections/index.md:54` lists only increment and decrement | `count` exists too [probed] |
|
|
35
|
-
| 22 | ESM version allocation |
|
|
35
|
+
| 22 | ESM version allocation | older text and decisions 0023 and 0024 give exact numbers, operations, streams and reads fixed numbers (v7 to v11) | decision 0025 (accepted 2026-10-06): v7 is generated values and responses (decision 0026, released in 4.68.0); every other feature has no number until its release-ready admission, so say "not admitted by any supported ESM version" |
|
|
36
36
|
| 23 | claim conditions | the condition grammar lists `==` | claims need `matches` (PLAY0120) [probed] |
|
|
37
|
-
| 24 | `numbers exact` | released in 4.64.0 as syntax only, but absent from `D/grammar.md`; documented only in `D/diagnostics.md` (PLAY0508 to PLAY0513) | the compiler: it parses, never binds (PLAY0268), PLAY0001 on older compilers [probed] |
|
|
37
|
+
| 24 | `numbers exact` | released in 4.64.0 as syntax only, but absent from `D/grammar.md`; documented only in `D/diagnostics.md` (PLAY0508 to PLAY0513) | the compiler: it parses, never binds (PLAY0268, "not admitted by any supported executable model (ESM) version yet"), PLAY0001 on older compilers [probed] |
|
|
38
38
|
| 25 | command `concurrency` | `D/commands.md:609` says the executable model "does not bind the `concurrency` block yet" | the binder reports PLAY0271 as an **error**, not a silent skip (`SemanticModelBinder.Commands.cs:32-38`) |
|
|
39
39
|
| 26 | MCP approval policy | `D/mcp/reference.md:37` "Keep client approval enabled for both" vs the server instructions (`McpConnection.cs:14`) "hosts need not confirm them each time" | keep approval on; this skill's rule is explicit user approval before `apply` |
|
|
40
40
|
| 27 | decision index | `decisions/README.md` row 0020 shows stage `none` while v5 is implemented | the code: v5 `then no readmodel` binds |
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# Executable subset (what binds: V2 and V3)
|
|
2
2
|
|
|
3
3
|
What the binder admits, and what it refuses with which code. The answer depends on the
|
|
4
|
-
compiler version: Screenplay 4.
|
|
5
|
-
v6; the 4.60.1 compiler bundled in cratis before 3.28.2 admits v1 to v5.
|
|
4
|
+
compiler version: standalone Screenplay 4.68.0 admits ESM v1 to v7; the 4.66.0 compiler bundled in
|
|
5
|
+
cratis 3.28.2 and 3.28.3 admits v1 to v6; the 4.60.1 compiler bundled in cratis before 3.28.2 admits v1 to v5.
|
|
6
|
+
Tool facts and the exact v6 messages: `versions.md`. Always name
|
|
6
7
|
the tool with a V2 or V3 result. When tool and documentation disagree, the tool decides
|
|
7
8
|
current capability; the documentation and the domain decide intended correctness. Record
|
|
8
9
|
the gap, never strip the model to pass.
|
|
@@ -12,7 +13,8 @@ render. `screenplay <folder>` and `cratis screenplay validate` never bind (`verd
|
|
|
12
13
|
|
|
13
14
|
Complete examples that bind live in `executable-example.md` (both compilers),
|
|
14
15
|
`pdl-example.md` (projections, both compilers) and `automation-translate-example.md`
|
|
15
|
-
(ESM v6; standalone tool and cratis 3.28.2 or later).
|
|
16
|
+
(ESM v6; standalone tool and cratis 3.28.2 or later) and `generated-responses-example.md`
|
|
17
|
+
(ESM v7; standalone tool 4.68.0 or later only).
|
|
16
18
|
|
|
17
19
|
## Admitted on both compilers
|
|
18
20
|
|
|
@@ -64,6 +66,40 @@ Complete examples that bind live in `executable-example.md` (both compilers),
|
|
|
64
66
|
- Command specifications that list reaction cascades (no false PLAY0285).
|
|
65
67
|
- In a `then` list after `when append`, only what followed the appended event.
|
|
66
68
|
|
|
69
|
+
## Generated values and responses (ESM v7): standalone 4.68.0 or later only
|
|
70
|
+
|
|
71
|
+
Facts read at `v4.68.0`: decision 0026 and `Documentation/screenplay/{commands,specifications,interoperability}.md`.
|
|
72
|
+
A model selects ESM v7 only when it uses a generated property, a response, a generated fixture or a `then returns`
|
|
73
|
+
expectation; every other model keeps its version, bytes and revision. The cratis CLI 3.28.3 (bundled 4.66.0)
|
|
74
|
+
reports `PLAY0268` for these constructs, and Stage 4.24.2 refuses ESM v7 with `STAGE-ESM-016` (tracked in
|
|
75
|
+
Stage#201), so they bind and run but are not rendered: gap-fill with the model as contract. Complete example:
|
|
76
|
+
`generated-responses-example.md`.
|
|
77
|
+
|
|
78
|
+
- A generated property is command-only, required, scalar and a concept backed by `Uuid`; bare `Uuid`, optional and collection
|
|
79
|
+
types are invalid. Modifier order is `Type optional generated identifier`.
|
|
80
|
+
- Generated values are not request inputs, form fields, invocation arguments or ordinary `when` values. Generation
|
|
81
|
+
runs after authorization and validation and before productions, so a denial or a validation failure never
|
|
82
|
+
reaches it.
|
|
83
|
+
- A policy (including inherited or composed ones and the implicit `subject` of a generated identifier), a property
|
|
84
|
+
rule or a requirement that references a generated value reports `PLAY0273`; reference input properties only. A
|
|
85
|
+
generated property whose concept declares any validation rule (declarative, named or code) reports `PLAY0268`.
|
|
86
|
+
A reaction mapping into a generated property is invalid.
|
|
87
|
+
- Responses: `returns <property>` is scalar; bare `returns` opens an ordered record of `<name> [<Type>] = <property>` fields
|
|
88
|
+
over direct properties of the same command (collections, read aliases, arithmetic and whole read models are not
|
|
89
|
+
supported). A response exists only on acceptance; a later reaction or scenario-query failure keeps the accepted facts and
|
|
90
|
+
no response. No response differs from a response whose optional source is `Null`.
|
|
91
|
+
- A two-token `returns name` is a response when `name` is another property of this command; otherwise it declares a
|
|
92
|
+
property named `returns`. Use `returns @name` or `@returns Type` to force one reading.
|
|
93
|
+
- Specifications: `when ... for "<uuid>"` supplies the generated identifier, an indented `generated <name> = <value>`
|
|
94
|
+
any other generated value, and `then returns` asserts the response (scalar value, or a non-empty named subset of a
|
|
95
|
+
record). A reached generated value without a fixture is `Unsupported(IdentityAllocation)`; the specification never
|
|
96
|
+
passes. `then returns` is a success outcome but does not relax the events comparison.
|
|
97
|
+
- `for` on a generated identifier does not assert that explicitly routed productions target it. A plain `produces`
|
|
98
|
+
without `for` keeps its own allocation channel, which a fixture never satisfies; a generated identifier combined
|
|
99
|
+
with a reached plain production is `Unsupported(IdentityAllocation)` from source specifications.
|
|
100
|
+
- A reaction-invoked command that reaches generation is `Unsupported(IdentityAllocation)`; response-only commands run
|
|
101
|
+
and discard the response. Generated values give no idempotency, retry or deduplication guarantee.
|
|
102
|
+
|
|
67
103
|
## Code attachments (what binds, what never does)
|
|
68
104
|
|
|
69
105
|
Inline fences (`csharp`, `typescript`, `react`, `html`, `sql`) and `file <path>` attach
|
|
@@ -126,7 +162,8 @@ bodies still leave their owner non-executable.
|
|
|
126
162
|
| `join`, `children` or `remove via join` inside `nested` | blocked plan | binds; `UnsupportedProjectionBlock` |
|
|
127
163
|
| `$eventContext.occurred.Week` | PLAY0273 | derived value |
|
|
128
164
|
| Projection `parent p` where `p` is not on the child event | PLAY0273 | "Event property not found" |
|
|
129
|
-
| `generated` or `returns`
|
|
165
|
+
| `generated` or `returns` on a compiler before 4.68.0 (4.66.0 and 4.67.0 refuse; 4.66.0 is bundled in cratis 3.28.x) | PLAY0268 | admitted from standalone 4.68.0 (ESM v7), see above |
|
|
166
|
+
| Operations or systems, `numbers exact`, eventsource or stream | PLAY0268 | not admitted by any supported ESM version; syntax only (`sources-and-streams.md`); one such construct leaves the **whole** application without an executable model |
|
|
130
167
|
| Spec of a gated command or query without `given caller` | PLAY0389 | module and feature gates count |
|
|
131
168
|
| `given` or `then readmodel` missing the key property | PLAY0351 | key is the keyed query's `by` |
|
|
132
169
|
| When-less spec asserting events or errors | PLAY0352 | |
|
package/package/corpus/skills/cratis-screenplay-toolchain/references/generated-responses-example.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Generated values and responses example (ESM v7)
|
|
2
|
+
|
|
3
|
+
A small model with a generated identifier, a second generated value, an ordered record response, a scalar
|
|
4
|
+
response, and specifications that pin both the emitted events and the response. It compiles with 0
|
|
5
|
+
diagnostics, binds, and its two specifications pass in the reference runner on Screenplay 4.68.0
|
|
6
|
+
(`Documentation/screenplay/fixtures/generated-responses.play` at `v4.68.0`). It needs the standalone
|
|
7
|
+
`screenplay` 4.68.0 or later: the cratis CLI 3.28.3 bundles 4.66.0, which does not bind these constructs
|
|
8
|
+
(`PLAY0268`), and `cratis render` does not render ESM v7 (Stage 4.24.2 refuses it with `STAGE-ESM-016`,
|
|
9
|
+
Cratis/tracked in Stage#201). Rules and refusals: [executable-subset.md](executable-subset.md#generated-values-and-responses-esm-v7).
|
|
10
|
+
|
|
11
|
+
```screenplay
|
|
12
|
+
// ESM v7 reference-executable example: deterministic generated fixtures, events and command responses.
|
|
13
|
+
concept ProjectId : Uuid
|
|
14
|
+
concept ReceiptId : Uuid
|
|
15
|
+
concept ProjectName : String
|
|
16
|
+
module Projects
|
|
17
|
+
feature Registration
|
|
18
|
+
slice StateChange Register
|
|
19
|
+
command RegisterProject
|
|
20
|
+
projectId ProjectId generated identifier
|
|
21
|
+
receiptId ReceiptId generated
|
|
22
|
+
name ProjectName
|
|
23
|
+
produces event ProjectRegistered
|
|
24
|
+
name ProjectName = name
|
|
25
|
+
returns
|
|
26
|
+
projectId = projectId
|
|
27
|
+
receiptId ReceiptId = receiptId
|
|
28
|
+
specification RegisteringReturnsIdentifiers
|
|
29
|
+
when RegisterProject
|
|
30
|
+
for "11111111-1111-1111-1111-111111111111"
|
|
31
|
+
generated receiptId = "22222222-2222-2222-2222-222222222222"
|
|
32
|
+
name = "Apollo"
|
|
33
|
+
then ProjectRegistered
|
|
34
|
+
for "11111111-1111-1111-1111-111111111111"
|
|
35
|
+
name = "Apollo"
|
|
36
|
+
then returns
|
|
37
|
+
receiptId = "22222222-2222-2222-2222-222222222222"
|
|
38
|
+
slice StateChange Rename
|
|
39
|
+
command RenameProject
|
|
40
|
+
projectId ProjectId identifier
|
|
41
|
+
name ProjectName
|
|
42
|
+
produces event ProjectRenamed
|
|
43
|
+
name ProjectName = name
|
|
44
|
+
returns projectId
|
|
45
|
+
specification RenamingReturnsIdentifier
|
|
46
|
+
when RenameProject
|
|
47
|
+
projectId = "11111111-1111-1111-1111-111111111111"
|
|
48
|
+
name = "Apollo"
|
|
49
|
+
then ProjectRenamed
|
|
50
|
+
for "11111111-1111-1111-1111-111111111111"
|
|
51
|
+
name = "Apollo"
|
|
52
|
+
then returns "11111111-1111-1111-1111-111111111111"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
What each part pins:
|
|
56
|
+
|
|
57
|
+
- `for "<uuid>"` in `when` supplies the generated identifier's fixture; an indented `generated <name> = <value>` supplies any other generated value. Neither is a request input.
|
|
58
|
+
- `then returns` with a named field asserts a subset of the record; `then returns "<uuid>"` asserts a scalar response.
|
|
59
|
+
- Without a fixture for a reached generated value the run is `Unsupported(IdentityAllocation)` and the specification never passes.
|
|
@@ -45,6 +45,7 @@ is adapted with the agreement of Martin Dilger and Nebulit GmbH.
|
|
|
45
45
|
## Changes from the earlier toolkit
|
|
46
46
|
|
|
47
47
|
- Folded the version facts into one `versions.md` (the only version table in the corpus).
|
|
48
|
+
- Moved the pin to Screenplay 4.68.0 (ESM v7: generated values and responses, decision 0026, `generated-responses-example.md`); re-ran the example compile and reference-runner gates unchanged; replaced every fixed number for unadmitted features with "not admitted by any supported ESM version" (decision 0025).
|
|
48
49
|
- Replaced the readiness script with the MCP view and field that carry the same result; no
|
|
49
50
|
script ships.
|
|
50
51
|
- Moved the MCP loop to `cratis-screenplay-model-authoring`; this skill keeps only the facts
|