@cratis/pi 7.131.0 → 7.131.1
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 +1 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/public-events-and-direction.md +3 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/realization-and-gap-fill.md +2 -1
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +2 -2
- package/package/corpus/skills/cratis-screenplay-model-review/references/report-template.md +1 -1
- package/package/corpus/skills/cratis-screenplay-read-surface/references/screen-patterns.md +5 -0
- package/package/corpus/skills/cratis-screenplay-specifications/references/actions-beyond-commands.md +1 -1
- package/package/corpus/skills/cratis-screenplay-specifications/references/source-notes.md +2 -1
- package/package/corpus/skills/cratis-screenplay-specifications/references/vocabulary.md +3 -2
- package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +3 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +2 -2
- package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +3 -3
- package/package.json +1 -1
|
@@ -59,6 +59,7 @@ A todo list + reaction + unique constraint proves the first. It does **not** pro
|
|
|
59
59
|
the send can succeed and the append fail (crash, lost reply, constraint race), and the retry
|
|
60
60
|
sends again.
|
|
61
61
|
|
|
62
|
+
- A specification runs its own slice only: to prove an automation that invokes another slice's command, state `then invokes <Command>` with the values passed (ESM v34); that command's own slice states its events. A command spec never states what another slice's reaction appends.
|
|
62
63
|
- A reaction cascade is not one transaction: earlier accepted facts stay when a later invoked
|
|
63
64
|
command rejects (Screenplay `reactions.md`). Design each step to be retried on its own.
|
|
64
65
|
- Read `references/effects-and-idempotency.md` when specifying redelivery,
|
|
@@ -178,6 +178,9 @@ append without `when` holds on any change, not on every delivery. Maps apply to
|
|
|
178
178
|
before and after states; `$.field` reads the mapped merged state. An expression
|
|
179
179
|
guard evaluates the after state only on a change. Root `when removed` never holds.
|
|
180
180
|
|
|
181
|
+
A command's specification never states the public event an outbound Translate slice publishes
|
|
182
|
+
(`PLAY0285`, decision 0115); the outbound slice's own specification does.
|
|
183
|
+
|
|
181
184
|
Captures run after reactions to the same input settle; each capture append settles
|
|
182
185
|
its own cascade before the next. Mixed capture/reaction assertions may need
|
|
183
186
|
`then events in any order`: reference order does not prove independent observer
|
|
@@ -9,7 +9,8 @@ The CLI and Stage render supported event-triggered Automation slices as Chronicl
|
|
|
9
9
|
reactors. Translate/captures, non-event triggers and opaque bodies remain `STAGE-ESM-024`;
|
|
10
10
|
Claim-reading/opaque `runs as` gates (`-034`), legacy `from` (`-035`), mixed effects (`-037`), unsupported mappings (`-039`)
|
|
11
11
|
and protected destinations (`-040`) also remain refused. Command specs that cascade into
|
|
12
|
-
reactions remain `-011
|
|
12
|
+
reactions remain `-011`. Specifications that state the commands their reactions invoke
|
|
13
|
+
(`then invokes`, ESM v34) are not yet admitted either: check current boundaries. Supported single-hop append specs now render, as do semantic
|
|
13
14
|
reaction `from` and role/authenticated system identities. Only refused scope is hand-written delivery with the model as
|
|
14
15
|
its contract. Source: Stage `Documentation/reference/reaction-rendering.md`;
|
|
15
16
|
full admission: `cratis-stage-rendering-and-sandbox` `references/admission.md`.
|
|
@@ -28,7 +28,7 @@ Language claims follow Screenplay `reactions.md`, `triggers.md`, `captures.md` a
|
|
|
28
28
|
|
|
29
29
|
The compiler's ESM admission decides, not the slice type. Reactions, triggers and
|
|
30
30
|
captures bind/reference-execute from v6; older compilers refuse them. Read toolchain
|
|
31
|
-
`references/diagnostics.md` when diagnosing skew or
|
|
31
|
+
`references/diagnostics.md` when diagnosing skew or `PLAY0285`/`PLAY0816` on a specification.
|
|
32
32
|
- **Stage realization:** read `cratis-stage-rendering-and-sandbox` `references/admission.md`
|
|
33
33
|
before claiming rendering. Supported event-triggered Automation renders; captures,
|
|
34
34
|
Translate, clocks and opaque bodies remain gap-fill (`-024`).
|
|
@@ -225,7 +225,7 @@ Requires Screenplay 4.176.0 or later (`screenplay --version`) for PLAY0694; olde
|
|
|
225
225
|
|
|
226
226
|
- [ ] `screenplay <model> --warnaserror` reports zero errors and zero warnings
|
|
227
227
|
(standalone, or a `cratis` whose compiler admits ESM v6). Under an older compiler expect
|
|
228
|
-
`PLAY0268` at binding and
|
|
228
|
+
`PLAY0268` at binding, and `then invokes` unreadable before 4.246.0 (ESM v34); report them
|
|
229
229
|
as tool skew.
|
|
230
230
|
- [ ] The tool that bound the model is named (standalone, or a `cratis` whose compiler admits ESM v6, for ESM v6 constructs); reference scenarios use
|
|
231
231
|
`screenplay test`/MCP. Unadmitted refusal/redelivery is not executed evidence.
|
|
@@ -40,7 +40,7 @@ V2 executable diagnostics: <clean | n diagnostics: codes | not run: reason>
|
|
|
40
40
|
V3 binding-ready: <ready | blocked: codes | not run: reason>
|
|
41
41
|
V4 reference specs run: <route, expected vs discovered, passed/failed/unsupported; overall unbound | not run: no route>
|
|
42
42
|
V5 rendered, target-verified: admission <...>; publication <...>; build <...>; tests <...> (each "not run: reason" when absent)
|
|
43
|
-
Gaps: <capability gaps and tool-version gaps, e.g.
|
|
43
|
+
Gaps: <capability gaps and tool-version gaps, e.g. `then invokes` unreadable by a compiler older than 4.246.0>
|
|
44
44
|
|
|
45
45
|
## Inventory (read-only audit; MCP describe-application view=summary, find-assertion-gaps)
|
|
46
46
|
Modules n, features n, slices n (StateChange n, StateView n, Automation n, Translate n),
|
|
@@ -118,6 +118,11 @@ module Berths
|
|
|
118
118
|
action BookBerth for screen
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
+
State what an action acts on: `action CancelBooking for item` acts on the selected row or the record the screen shows,
|
|
122
|
+
`action BookBerth for screen` does not depend on a selection. An omitted subject is inferred from the declared data
|
|
123
|
+
and identifier types and reported as `PLAY0818` (and `PLAY0819` when the row binding differs from legacy name matching),
|
|
124
|
+
so write the clause. Source: Screenplay v5.1.0 `Documentation/screenplay/action-subjects.md`.
|
|
125
|
+
|
|
121
126
|
## What a screen pattern is not
|
|
122
127
|
|
|
123
128
|
- Not a column or a lane: a screen is a declaration in a slice, not a position on a timeline.
|
package/package/corpus/skills/cratis-screenplay-specifications/references/actions-beyond-commands.md
CHANGED
|
@@ -29,7 +29,7 @@ projection is the fact's occurrence time: the reference runner executes it in `f
|
|
|
29
29
|
**Which tools bind these actions.** A compiler that admits ESM v6 binds the clock, trigger
|
|
30
30
|
and capture actions, and the `Automation` and `Translate` slices, reactions and captures they
|
|
31
31
|
drive; the reference runner executes them through `screenplay test` or MCP `run-specifications`,
|
|
32
|
-
with the semantics in [Reactions and
|
|
32
|
+
with the semantics in [Reactions and one slice per specification](reactions-and-cascades.md). The complete example in
|
|
33
33
|
that reference reports `executableReady` with no executable error in `open-workspace` readiness
|
|
34
34
|
and `read-workspace` view `executable-diagnostics`.
|
|
35
35
|
|
|
@@ -16,7 +16,8 @@ Actions beyond commands (`given clock`, `when clock`, `when trigger`, `given cap
|
|
|
16
16
|
| Parser, binder and reference execution | Original evidence for the worked example |
|
|
17
17
|
| Inline facts, `optional` and clock spelling | Changed examples compile; the reference runner was not rerun for them |
|
|
18
18
|
| ESM v7 | Generated fixtures and `then returns` (`specifications.md` "Generated fixtures and return expectations"): the excerpt matches the compiled example in `cratis-screenplay-toolchain`, whose specifications run in the reference runner |
|
|
19
|
-
| ESM
|
|
19
|
+
| ESM v34 | `then invokes`; a specification runs its own slice only (Screenplay decision 0115, `Documentation/screenplay/specifications.md`) |
|
|
20
|
+
| ESM v6 | Specification actions and same-slice reactions, `then no readmodel`, `$strings` rejections, `invokes` caller rule |
|
|
20
21
|
|
|
21
22
|
The inline-facts update followed `commands.md`, `events.md`, `types.md` and
|
|
22
23
|
`specifications.md`. That pass compiled the changed examples; it did not rerun the reference
|
|
@@ -13,7 +13,7 @@ This reference holds the given/when/then construct table and the enumeration and
|
|
|
13
13
|
| `given readmodel <ReadModelType>` | prior read-model state, established directly — a **complete** instance including its identifier |
|
|
14
14
|
| `given caller` / `given caller as <Persona>` | explicit caller (`authenticated`, roles, claims; empty means anonymous), or an authenticated synthesized persona witness |
|
|
15
15
|
| `when <CommandType>` | run a command |
|
|
16
|
-
| `when append <EventType>` | append one event: constraints and projections run, the command does not; reactions run
|
|
16
|
+
| `when append <EventType>` | append one event: constraints and projections run, the command does not; only the specification's own slice's reactions run (ESM v6), and `then` lists what followed |
|
|
17
17
|
| `when query <Query>` | perform a query with the argument values beneath it |
|
|
18
18
|
| `then result [exactly]` | one expected row of the performed query; repeat for several |
|
|
19
19
|
| `then no result` | the performed query returns nothing |
|
|
@@ -23,7 +23,8 @@ This reference holds the given/when/then construct table and the enumeration and
|
|
|
23
23
|
| `given capture` / `when capture <Capture>` | earlier/current records for non-event sources; for `source events` use typed `given <Event>` / `when append <Event>` (PLAY0701) |
|
|
24
24
|
| `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 |
|
|
25
25
|
| `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 |
|
|
26
|
-
| `then <EventType>` | an expected new event |
|
|
26
|
+
| `then <EventType>` | an expected new event of the specification's own slice |
|
|
27
|
+
| `then invokes <Command>` | a command the slice's own reactions invoke, with the values passed beneath it (ESM v34, Screenplay 4.246.0) |
|
|
27
28
|
| `then events in any order` | compare the new events without regard to order |
|
|
28
29
|
| `then readmodel <ReadModelType> [exactly]` | read-model state afterwards — must state the identifier |
|
|
29
30
|
| `then no readmodel <ReadModelType> for <key>` | exactly that keyed instance is absent; the key is concrete and typed |
|
|
@@ -396,7 +396,9 @@ or V4 execution. Run the CLI or MCP for those verdicts.
|
|
|
396
396
|
| PLAY0282 | `validate` rule targets a field absent from the command |
|
|
397
397
|
| PLAY0283 | `reads View by field` type matches no `by` param of the view's queries |
|
|
398
398
|
| PLAY0284 | `children`/`nested` never populates a declared element field |
|
|
399
|
-
| PLAY0285 | a spec's `then` event contradicts every possible declared producer of its `when` command (decidable literals, property copies, equality conditions).
|
|
399
|
+
| PLAY0285 | a spec's `then` event contradicts every possible declared producer of its `when` command (decidable literals, property copies, equality conditions). Follows only reactions, invocations and publications declared in the specification's own slice (decision 0115), so stating another slice's reaction event or an outbound publication is refused; move the `then` to that slice or state `then invokes <Command>`. Fix the model or the spec deliberately |
|
|
400
|
+
| PLAY0815 | a specification `then invokes` line is not `then invokes <Command>` |
|
|
401
|
+
| PLAY0816 | a specification states `then invokes <Command>`, but no reaction declared in its own slice invokes that command; a specification runs its own slice only, so the invocation can never be made |
|
|
400
402
|
| PLAY0286 | spec value is not a member of the enum |
|
|
401
403
|
| PLAY0287 | producer/capture/spec assigns a field the event lacks |
|
|
402
404
|
| PLAY0291-0294 | bad single-line JSON / unknown key / wrong shape / duplicate key |
|
|
@@ -161,10 +161,10 @@ Requires Screenplay 4.105.0 or later (`screenplay --version`) for list queries (
|
|
|
161
161
|
due **after** the given clock and **at or before** the when clock, once each, in time
|
|
162
162
|
order. `when clock` needs `given clock`. Limits: 10,000 occurrences per advance, 1,000
|
|
163
163
|
facts per scenario. A scenario with given equal to when fires nothing.
|
|
164
|
-
- Command specifications that list reaction
|
|
164
|
+
- Command specifications that list another slice's reaction events (`PLAY0285`; decision 0115).
|
|
165
165
|
- In a `then` list after `when append`, only what followed the appended event.
|
|
166
166
|
|
|
167
|
-
Requires Screenplay 4.61 or later (`screenplay --version`) for ESM v6 constructs, and Cratis CLI 3.28.2 or later for the bundled compiler; older compilers refuse them with PLAY0268
|
|
167
|
+
Requires Screenplay 4.61 or later (`screenplay --version`) for ESM v6 constructs, and Cratis CLI 3.28.2 or later for the bundled compiler; older compilers refuse them with PLAY0268. `then invokes` needs Screenplay 4.246.0 (ESM v34).
|
|
168
168
|
|
|
169
169
|
Requires Screenplay 4.125.0 or later (`screenplay --version`) for reaction `runs as system`.
|
|
170
170
|
|
|
@@ -17,9 +17,9 @@ Compiler syntax: `cheat-sheet.md`. Negative capability claims depend on the tool
|
|
|
17
17
|
13. Projection `key` routes only on `from` (projection-level: PLAY0381). `all` is per event source. Joins never create instances and match the joined event's source id.
|
|
18
18
|
14. AutoMap is on by default: same-named event properties fill read-model properties silently (scoped: case-insensitive, same type only; flat-bound: exact name, no type check, so a type mismatch invalidates the model). Use `no automap` for control.
|
|
19
19
|
15. `given readmodel` bypasses the projection; prove a projection with `given` events + `when append`/command + `then readmodel`/`then query`.
|
|
20
|
-
16. PLAY0285/0286/0287 are static spec checks: do not edit expectations blindly.
|
|
20
|
+
16. PLAY0285/0286/0287 are static spec checks: do not edit expectations blindly. A spec runs its own slice only (decision 0115): PLAY0285 on an event another slice's reaction appends is correct, so move the `then` to that slice or state `then invokes <Command>` (ESM v34, PLAY0815/0816).
|
|
21
21
|
17. `null` in specs only for optional read-model properties (PLAY0350). A `when` command or `then` event states every property with a concrete value, optional ones too (PLAY0524); whether an optional detail is really a separate fact is a review question, not the fix for this code.
|
|
22
|
-
18. `then` events are exhaustive and ordered (use `then events in any order` for order only).
|
|
22
|
+
18. `then` events are exhaustive and ordered (use `then events in any order` for order only). They are the facts of the specification's own slice (its reactions follow, other slices' do not); after `when append` they list only what followed the append.
|
|
23
23
|
19. Under `command reads protected`, omitted `by` uses the command identifier; absent identifier is PLAY0782. Eligible reads bind v25; legacy reads and `concurrency` retain PLAY0271. Combining reads/concurrency under opt-in is PLAY0783.
|
|
24
24
|
20. Declare each event once, in its producing slice; renaming a persisted event needs `id "OldName"`; renaming a constraint discards its index.
|
|
25
25
|
21. Quoted `import "x/*.play"` = my files; unquoted `import Ctx.Event` = another context's contract (does not bind: PLAY0268).
|
|
@@ -36,7 +36,7 @@ Compiler syntax: `cheat-sheet.md`. Negative capability claims depend on the tool
|
|
|
36
36
|
30. Claims compare with `matches` (`claim "dept" matches "Finance"`); `==` is PLAY0120. Conditions with `contains`/`starts with` compile but do not bind.
|
|
37
37
|
31. One `every`/`all` block per projection level for V3; `$eventContext.occurred.Week` does not bind.
|
|
38
38
|
32. Concept rules: `min`/`max`/`length ==`, not `length 3 to 10` (PLAY0141).
|
|
39
|
-
33. Which compiler matters: an older cratis bundle can reject constructs the standalone tool binds (ESM v6 Automation/Translate) and
|
|
39
|
+
33. Which compiler matters: an older cratis bundle can reject constructs the standalone tool binds (ESM v6 Automation/Translate) and cannot read `then invokes` (ESM v34). Check `cratis --version` and name the tool in every verdict.
|
|
40
40
|
|
|
41
41
|
34. A `from <Event> key <property>` routes only if every such event carries that property: an event that frees or updates a row keyed by another stream's id must carry that id in its payload, or the row never changes. The compiler may not report a missing key property; check by hand.
|
|
42
42
|
35. `description`/`documentation` are authoring metadata: board, MCP and Prologue show them; `cratis render` emits them only as XML doc comments (invalid XML characters are CLI-RENDER-005), never as behavior. A rule only in prose is unenforced in rendered code; make it a rule layer, a spec or a recorded target requirement.
|