@cratis/pi 7.20.0 → 7.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/package/corpus/rules/concepts.md +10 -2
  2. package/package/corpus/rules/vertical-slices.md +4 -2
  3. package/package/corpus/skills/cratis-fundamentals-concept/SKILL.md +58 -5
  4. package/package/corpus/skills/cratis-fundamentals-concept/verification.json +4 -1
  5. package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +19 -12
  6. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/audit-format.md +4 -3
  7. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/automation-patterns.md +13 -15
  8. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/cases-to-specify.md +4 -4
  9. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/effects-and-idempotency.md +21 -0
  10. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/provenance.md +4 -2
  11. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/todo-list-example.md +7 -4
  12. package/package/corpus/skills/cratis-screenplay-automations-and-translations/verification.json +4 -4
  13. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +38 -36
  14. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/complete-examples.md +1 -1
  15. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/invocation-identity.md +84 -0
  16. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/refusals-and-redelivery.md +102 -0
  17. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/specifying-triggers-and-clock.md +4 -2
  18. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/verification.json +1 -1
  19. package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +28 -16
  20. package/package/corpus/skills/cratis-screenplay-command-surface/references/context.md +9 -0
  21. package/package/corpus/skills/cratis-screenplay-command-surface/references/generated-values-and-responses.md +15 -13
  22. package/package/corpus/skills/cratis-screenplay-command-surface/references/operations.md +80 -0
  23. package/package/corpus/skills/cratis-screenplay-command-surface/references/policy-persona-seed.md +23 -1
  24. package/package/corpus/skills/cratis-screenplay-command-surface/verification.json +2 -2
  25. package/package/corpus/skills/cratis-screenplay-discovery/SKILL.md +9 -6
  26. package/package/corpus/skills/cratis-screenplay-discovery/references/storming-loop.md +6 -5
  27. package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +7 -5
  28. package/package/corpus/skills/cratis-screenplay-event-modeling/references/nine-steps.md +6 -5
  29. package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +39 -49
  30. package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +5 -3
  31. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generate-notes.md +48 -8
  32. package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +44 -42
  33. package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +46 -9
  34. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +35 -11
  35. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +118 -13
  36. package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +3 -3
  37. package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +11 -6
  38. package/package/corpus/skills/cratis-screenplay-model-review/references/anti-patterns.md +1 -1
  39. package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +11 -2
  40. package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +10 -0
  41. package/package/corpus/skills/cratis-screenplay-read-surface/references/guarded-actions.md +79 -0
  42. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +9 -7
  43. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +6 -3
  44. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/verification.json +2 -2
  45. package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +3 -2
  46. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +13 -2
  47. package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +3 -2
  48. package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md +3 -2
  49. package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +40 -0
  50. package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +24 -16
  51. package/package/corpus/skills/cratis-screenplay-specifications/references/examples-and-routes.md +103 -0
  52. package/package/corpus/skills/cratis-screenplay-specifications/references/reactions-and-cascades.md +5 -6
  53. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +4 -4
  54. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-patterns.md +4 -2
  55. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/verification.json +2 -2
  56. package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +34 -32
  57. package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet-example.md +1 -1
  58. package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet.md +47 -2
  59. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +57 -9
  60. package/package/corpus/skills/cratis-screenplay-toolchain/references/doc-contradictions.md +6 -1
  61. package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +19 -10
  62. package/package/corpus/skills/cratis-screenplay-toolchain/references/provenance.md +4 -2
  63. package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +8 -1
  64. package/package/corpus/skills/cratis-screenplay-toolchain/references/sources-and-streams.md +90 -27
  65. package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +10 -6
  66. package/package/corpus/skills/cratis-screenplay-toolchain/references/verdicts.md +29 -12
  67. package/package/corpus/skills/cratis-screenplay-toolchain/references/versions.md +91 -136
  68. package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +7 -5
  69. package/package/corpus/skills/cratis-screenplay-ui-composition/references/screen-composition-contract.md +20 -0
  70. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +9 -5
  71. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +8 -1
  72. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +2 -2
  73. package/package.json +1 -1
@@ -37,15 +37,12 @@ The update follows `commands.md`, `events.md`, `types.md` and
37
37
  `specifications.md` at that main commit (after v4.52.0). This pass compiles the
38
38
  changed examples; it does not rerun the reference runner.
39
39
 
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
42
- bundle was Screenplay 4.60.1, which admitted ESM v1-v5 only and reported a false
43
- `PLAY0285` on reaction cascades (see "Version skew" in [references/reactions-and-cascades.md](references/reactions-and-cascades.md)). Facts below marked **ESM v6**
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`
45
- (`references/versions.md`; read it before choosing a compiler or interpreting version-dependent binding diagnostics). Neither tool runs specifications: `screenplay` and
46
- `cratis screenplay validate` parse and check consistency, the MCP server also binds,
47
- and spec outcomes come only from the reference runner as a library, Stage's
48
- specification runner or a rendered application's tests.
40
+ Current specification syntax follows Screenplay v4.125.0 `specifications.md`;
41
+ older probes in the table remain historical. Pins: `cratis-screenplay-toolchain`
42
+ `references/versions.md`. Compile commands check source, not reference execution.
43
+ Use `screenplay test` or MCP `run-specifications` for V4; Stage/target tests are
44
+ separate evidence. Unsupported/unbound is never a pass. Typed examples and
45
+ route assertions are in [examples and routes](references/examples-and-routes.md).
49
46
 
50
47
  Checked against the Screenplay repository at tag `v4.31.0` (commit `355dffb`):
51
48
  `Documentation/screenplay/{specifications,policies,constraints,readmodels,diagnostics}.md`.
@@ -95,9 +92,8 @@ target has one normalized behavior to match.
95
92
  rejects, the earlier accepted facts and their projections remain.
96
93
 
97
94
  Unsupported is not passed. Report it as "needs a target", not as green. "Specified"
98
- and "bound" are never "passing": no command-line tool runs these specifications, so a
99
- pass is claimed only from the reference runner, Stage's specification runner or a
100
- rendered application's tests, and named as such.
95
+ and "bound" are never "passing": run the reference CLI/MCP route or the owning
96
+ target tests, and name the engine, version and expected/discovered selection.
101
97
 
102
98
  ## The vocabulary
103
99
 
@@ -184,7 +180,7 @@ Read [references/worked-example.md](references/worked-example.md) when writing o
184
180
 
185
181
  ## Generated fixtures and return expectations (ESM v7)
186
182
 
187
- Standalone `screenplay` 4.68.0 or later binds and runs generated fixtures (`generated <name> = <value>`, `for` beneath `when`) and `then returns`; the cratis CLI 3.28.3 does not. If execution reaches generation without every generated value supplied, the run is unsupported and never passes.
183
+ Current standalone and bundled compilers bind generated fixtures (`generated <name> = <value>`, `for` beneath `when`) and `then returns` as ESM v7. If execution reaches generation without every generated value supplied, the run is unsupported and never passes.
188
184
  Read [references/generated-fixtures.md](references/generated-fixtures.md) when writing generated-value fixtures or scalar and record return expectations for a command.
189
185
 
190
186
  ## Actions beyond commands
@@ -197,6 +193,18 @@ Read [references/actions-beyond-commands.md](references/actions-beyond-commands.
197
193
  From ESM v6 every action sets reactions off and `then` events compare every new fact, the action's and the reactions'. A specification whose action is a command goes in the slice that declares the command. A false `PLAY0285` on a cascade under `cratis` before 3.28.2 is tool skew, not a modeling error: never delete the `then` line to silence it.
198
194
  Read [references/reactions-and-cascades.md](references/reactions-and-cascades.md) when a specification's expected events include what a reaction appends, when a cascade, clock tick or invoked command is involved, or when `cratis` reports `PLAY0285` on a model that `screenplay` accepts (it holds the "Version skew: cascades and the false `PLAY0285` (cratis before 3.28.2)" section).
199
195
 
196
+ ## Reusable fixtures, routes and recovery intent
197
+
198
+ Use typed `example` declarations for repeated event/command/read-model values;
199
+ step overrides keep the action/outcome visible and carry authored/example/override
200
+ provenance. Event `stream`/`no stream` assertions bind as ESM v8; typed `for` and
201
+ stream ids are not guessed. Read [examples and routes](references/examples-and-routes.md).
202
+
203
+ `given operation ... fails`, `then operation` and `then compensated` describe
204
+ future external-work behavior. Reaction refusal branches, `when redelivered`
205
+ and `then no events` are also authoring-only: compile them, but report their
206
+ PLAY0268 binding refusal instead of an executed result. Preserve the contract.
207
+
200
208
  ## Rejections and denials say different things
201
209
 
202
210
  `then error "<message>"` says **rejected, for this reason** — pin it when the
@@ -252,9 +260,9 @@ For view specifications:
252
260
 
253
261
  ## Verify
254
262
 
255
- - [ ] `screenplay <model> --warnaserror` reports zero errors and zero warnings
256
- (standalone 4.68.0 or `cratis` 3.28.2 or later, bundling 4.66.0; under `cratis` before 3.28.2 expect the false
257
- `PLAY0285` on reaction cascades and record that it is skew).
263
+ - [ ] Validate the complete root with warnings as errors, naming tool/version.
264
+ Current standalone pin: 4.125.0. Run specification examples through
265
+ `screenplay test`; expected unadmitted syntax reports unbound, not passed.
258
266
  - [ ] Executable diagnostics are clean too: `PLAY0350`, `PLAY0352`, `PLAY0388`,
259
267
  `PLAY0389` and `PLAY0273` are only reported at binding.
260
268
  - [ ] Every slice has at least one boundary specification.
@@ -0,0 +1,103 @@
1
+ <!-- Copyright (c) Cratis. All rights reserved. -->
2
+ <!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
3
+
4
+ # Typed examples, overrides and event routes
5
+
6
+ ## Contents
7
+
8
+ - Typed examples
9
+ - Effective values
10
+ - Event routes
11
+ - Operation and recovery intent
12
+
13
+ ## Typed examples
14
+
15
+ `example <Name> : <EventOrCommandOrReadModel>` declares a possibly partial typed
16
+ fixture at document/module/feature/slice scope. Its underlying type resolves in
17
+ the declaration scope, not the use scope. It can state properties, description,
18
+ `for` and command generated fixtures, not callers/clocks or a whole scenario.
19
+ Examples share the type namespace and use the current event generation. They
20
+ cannot inherit from examples or serve as query results/returns/trigger/capture
21
+ fixtures. They are specification data, not operational `seed` events.
22
+
23
+ This complete example compiled and its two reference scenarios passed on 4.125.0:
24
+
25
+ ```screenplay
26
+ concept ProjectId : Uuid
27
+ module Projects
28
+ feature Registration
29
+ example DefaultProject : RegisterProject
30
+ name = "Default"
31
+ slice StateChange Register
32
+ command RegisterProject
33
+ projectId ProjectId identifier
34
+ name String
35
+ produces event ProjectRegistered
36
+ name String = name
37
+ specification RegisteringTheDefault
38
+ when DefaultProject
39
+ projectId = "3fa85f64-5717-4562-b3fc-2c963f66afa6"
40
+ then ProjectRegistered
41
+ for "3fa85f64-5717-4562-b3fc-2c963f66afa6"
42
+ name = "Default"
43
+ specification OverridingTheName
44
+ when DefaultProject name = "Override"
45
+ projectId = "3fa85f64-5717-4562-b3fc-2c963f66afa6"
46
+ then ProjectRegistered
47
+ for "3fa85f64-5717-4562-b3fc-2c963f66afa6"
48
+ name = "Override"
49
+ ```
50
+
51
+ ## Effective values
52
+
53
+ An example occupies the ordinary name slot in given/event, given readmodel,
54
+ when command, when append, then event or then readmodel. One assignment may be
55
+ inline after the name; more stay indented. There is **no with keyword**.
56
+ Step values override example values by property name; objects/lists replace
57
+ whole values, never recursively merge. Indented `for` replaces its destination;
58
+ generated fixtures merge by name. A new step-only value is authored, not an
59
+ override. Each step/declaration assigns a property once (PLAY0519); malformed
60
+ headers are PLAY0518.
61
+
62
+ After expansion, required given-event/read-model, command, append and expected
63
+ event fields must be complete (binding PLAY0524); examples can remain partial.
64
+ Read-model assertions retain subset matching unless `exactly` is authored.
65
+ Even unused example values or values overridden at every use are type-checked.
66
+ No default fixture values are invented. A command action must belong to the
67
+ specification's own slice even when a qualified example resolves elsewhere.
68
+
69
+ MCP `find-fixtures` reports effective authored/example/override origins and
70
+ replaced values. Source-bound runner failures retain that provenance; canonical
71
+ ESM contains merged values only, equivalent to hand-expansion. ESM-only runners
72
+ cannot reconstruct source origins.
73
+
74
+ ## Event routes
75
+
76
+ Event occurrences in `given`, `when append` and `then` accept `stream Source.Stream`
77
+ with nested scalar `streamId = <literal>` or a complete composite part block.
78
+ These select ESM v8 and reference-execute at 4.125.0; the complete checked model
79
+ is in toolchain `references/sources-and-streams.md`. Command actions take their
80
+ route from the command declaration, never the fixture.
81
+
82
+ Routed history/appends need typed concrete `for`; routed expectations may omit
83
+ it. `then ... no stream` expects no route; no route in a then is a wildcard.
84
+ `no stream` is invalid on given/appends. Event examples can supply routes, but
85
+ steps replace the entire route, independently of `for`; an inherited route
86
+ cannot be changed back to a wildcard. Literal compatibility/route contradiction
87
+ checks use resolved source/stream types, not guessed text (PLAY0547–PLAY0551).
88
+ CLI 3.41.0 rendering rejects versions above v7 before planning, even though
89
+ source compilation and reference routing pass.
90
+
91
+ ## Operation and recovery intent
92
+
93
+ Operation failure/request/compensation forms are authoring-only (PLAY0268):
94
+ `given operation <Name> fails`, `then operation <Name>` with a partial input
95
+ subset, and leaf `then compensated <Name>`. See command-surface
96
+ `references/operations.md` for the complete checked authoring fixture.
97
+
98
+ Refusal selectors, redelivery to one observer and `then no events` likewise
99
+ remain unadmitted; they are not executed append scenarios. Forms, matching,
100
+ acknowledgement and their whole-model refusal boundary are in
101
+ captures-and-reactions `references/refusals-and-redelivery.md`.
102
+
103
+ Authority: Screenplay `v4.125.0:Documentation/screenplay/specifications.md`.
@@ -42,12 +42,11 @@ module Collections
42
42
  - A specification whose action is a command goes in the slice that declares that
43
43
  command, here `SendInvoice`, not in the `Automation` slice that reacts: a command
44
44
  from another slice is `PLAY0273` "command is unresolved in its slice" at binding.
45
- - A command a reaction `invokes` runs through its full pipeline **with no caller**.
46
- A command that needs one rejects, and that rejection ends the scenario. Each
47
- invoked command is atomic; the cascade is not, so earlier accepted facts stay.
48
- There is no syntax for an identity (Screenplay#383). See
49
- `cratis-screenplay-automations-and-translations` and
50
- `cratis-screenplay-captures-and-reactions`.
45
+ - A reaction invocation without a declared actor has no caller and a gated
46
+ command denies. At 4.125.0 reaction `runs as system role "<Role>"` supplies the
47
+ authenticated system actor (ESM v10); `given caller` does not. Each command is
48
+ atomic, not the cascade. Checked actor scenario and CLI/Stage limitations:
49
+ captures-and-reactions `references/invocation-identity.md`.
51
50
  - The clock is UTC and exact. An `every` or `at` occurrence fires once when it is
52
51
  due after `given clock` and at or before `when clock`; `when clock` needs
53
52
  `given clock`, so the same instant twice fires nothing.
@@ -87,10 +87,10 @@ option, mark it `ASSUMED` in the slice or module `description` and in the sessio
87
87
  invariant consequences, not names or length. For Chronicle keep event-source identity,
88
88
  namespace, process-stream routing and concurrency scope apart
89
89
  (`references/chronicle-boundaries.md`). Declared `eventsource`/`stream`/`streamId` and
90
- command routes can be authored and validated but not bound, run or rendered today
91
- (`PLAY0268`, `STAGE-ESM-016`): keep them as intent and hand-write the routing
92
- (`cratis-screenplay-toolchain` `references/sources-and-streams.md`); no supported ESM version
93
- admits them. A `generated identifier` (ESM v7, standalone 4.68.0; not rendered by Stage yet) is
90
+ command/specification routes bind and reference-execute as ESM v8 on 4.125.0.
91
+ CLI 3.41.0 rendering admits through v7 only (CLI-RENDER-004); keep the routing
92
+ contract and gap-fill its target realization. Forms/boundaries:
93
+ toolchain `references/sources-and-streams.md`. A `generated identifier` (ESM v7, standalone 4.68.0; not rendered by Stage yet) is
94
94
  generated fresh on every acceptance: it is not a retry identity, and generated values give no
95
95
  idempotency, retry or deduplication guarantee. When a retry must find the same stream, the caller
96
96
  supplies the identifier before the first attempt.
@@ -205,8 +205,10 @@ Ask for each stream:
205
205
  Some event stores decide consistency by a query over tagged events instead of one stream
206
206
  (often called dynamic consistency boundaries). Chronicle's concurrency scopes can narrow a
207
207
  check to event types, source type or stream (`concurrency` block, Screenplay
208
- `commands.md`), and Screenplay has syntax-only event-source/stream declarations (not admitted by any supported ESM version;
209
- `event-sources.md`). None of this binds on either compiler (`versions.md` in `cratis-screenplay-toolchain`). Model the stream by business
208
+ `commands.md`). Legacy concurrency metadata still fails binding (PLAY0271),
209
+ but sources/streams/routes bind and reference-execute as ESM v8 on 4.125.0.
210
+ Route admission does not make a view read protected. CLI 3.41.0's render boundary
211
+ is v7; see toolchain `references/versions.md`. Model the stream by business
210
212
  identity; when a rule truly needs a cross-stream decision, record it (see
211
213
  `consistency-and-concurrency.md`) rather than inventing a construct.
212
214
 
@@ -12,9 +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": "bind and reference-execute as ESM v8" },
16
16
  { "kind": "skill-contains", "value": "STAGE-ESM-026" },
17
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" }
18
+ { "kind": "skill-contains", "value": "CLI-RENDER-004" }
19
19
  ]
20
20
  }
@@ -22,17 +22,16 @@ files is one application: always check the folder, never one file of it.
22
22
 
23
23
  When choosing or upgrading a tool, or checking version-specific capabilities, read `references/versions.md`; it is the only version table, and other skills point to it.
24
24
 
25
- | Package | Version | Purpose |
26
- | --- | --- | --- |
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.40.7` (`v3.40.7`, `af9f18e`) | Tag pins Stage 4.51.1 and Screenplay 4.114.0, with `cratis/stage:4.51.1` as the runtime image. The public CLI executed render publication, the browser acceptance run and the real stdio MCP transcript harness (37 tools, `executableReady true`). Reading baselines: 3.40.3, 3.39.0 and 3.28.3 (`8b43fef`) |
29
- | Screenplay | bundled `4.114.0`; latest language package `4.122.0` | CLI 3.40.7 bundles 4.114.0 and reports `sourceSuccess true`, `semanticSuccess true`, `executableReady true` for the canonical corpus; the repo tool compiles it with `10 file(s) compiled - 0 error(s), 0 warning(s)`. Language features newer than 4.114.0 need the standalone 4.122.0 tool until a CLI bundles them |
30
- | Stage | `4.51.1` (CLI default; latest package 4.51.3) | Docker image `cratis/stage:4.51.1`; renders the canonical screen corpus with Arc `CommandForm` shells and query bindings, and refuses guarded Close and double-click with `STAGE-SCENE-ACTION-001` / `STAGE-SCENE-INTERACTION-001`. Check generated package sets before claiming exact Scene 4.14 runtime parity |
31
- | Arc / Chronicle | `22.50.5` / `19.32.0` | code-level facts cited here |
25
+ The standalone pin is Screenplay 4.125.0. CLI 3.41.0 bundles Screenplay 4.114.0,
26
+ Stage 4.51.3 and Cratis.Arc.Screenplay 22.54.0. The single version table records
27
+ released source evidence and historical probes separately; do not relabel an old
28
+ render/browser result as a probe of the current packages.
32
29
 
33
- Facts were read with `git show <tag>:<path>` and probed on the installed tools. Behaviour
34
- 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.
35
- Re-verify before claiming another version behaves the same.
30
+ Historical screens-release evidence: CLI 3.40.7 / Stage 4.51.1 / bundled
31
+ Screenplay 4.114.0 opened the canonical corpus with `executableReady true`
32
+ and the stdio transcript exposed 37 tools; standalone language 4.122.0 was
33
+ recorded in that vector. These retained results are not a rerun on CLI 3.41.0
34
+ or Screenplay 4.125.0.
36
35
 
37
36
  ## Ground rules
38
37
 
@@ -42,10 +41,10 @@ Re-verify before claiming another version behaves the same.
42
41
  2. **Check the folder, warnings as errors.** `screenplay <folder> --warnaserror` or
43
42
  `cratis screenplay validate <folder> --warnings-as-errors`. Warnings hide defects:
44
43
  PLAY0029 (a misspelt keyword or a `type` inside a slice) drops a construct silently.
45
- 3. **Pick the compiler deliberately and name it.** Standalone `screenplay` for V1 to V3 (file
46
- 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
47
- route for `render`. A cratis before 3.28.2 bundle (4.60.1) rejects ESM v6 and reports a
48
- false PLAY0285 on cascades (cli#242). Report tool and version with every verdict.
44
+ 3. **Pick the compiler deliberately and name it.** Standalone `screenplay` for
45
+ current language checks and reference specifications; `cratis` for rendering
46
+ and generation. Bundled and standalone versions differ. Report both tool and
47
+ version, rather than transferring a verdict across releases.
49
48
  4. **Know the mode** (design, executable, renderable) and write from its subset.
50
49
  5. **Capability is not correctness.** The tool you ran decides what is accepted today; the
51
50
  domain and the documented semantics decide what is correct. On conflict keep the correct
@@ -62,14 +61,13 @@ Re-verify before claiming another version behaves the same.
62
61
 
63
62
  ## The two compilers
64
63
 
65
- | | Standalone `screenplay` 4.68.0 | `cratis screenplay ...` 3.28.3 and 3.28.2 (bundle Screenplay 4.66.0) |
64
+ | | Standalone `screenplay` | `cratis screenplay ...` |
66
65
  | --- | --- | --- |
67
- | 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) |
68
- | 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) |
69
- | Automation, Translate, reactions, captures, clocks, triggers | bind | bind (before 3.28.2: PLAY0268 "Slice '<name>' of type '<type>' is not admitted by ESM v1.") |
70
- | Cascade specs | compile | compile (before 3.28.2: false PLAY0285, cli#242) |
71
- | File argument | follows imports | ignores imports, false PLAY0165 warnings (cli#244, probed on 3.28.2): validate the folder |
72
- | MCP | `screenplay mcp <folder>`; 29 tools | `cratis screenplay mcp [root]`; 29 tools; registered by `cratis ai install` |
66
+ | Check root | `screenplay <root> --warnaserror --no-color` | `cratis screenplay validate <root> --warnings-as-errors -o json-compact` |
67
+ | Scope/checks | `--scope <address>`, `--check <names>`; a scoped pass is not whole-application success | Discover installed validation options |
68
+ | Reference execution | `screenplay test <root>` or MCP `run-specifications` | Discover bundled MCP capability; target tests are not V4 |
69
+ | MCP | `screenplay mcp <root>`; discover schemas | `cratis screenplay mcp [root]`; registered by `cratis ai install` |
70
+ | Render version boundary | Binder admission is not Stage admission | CLI 3.41.0 passes up to ESM v7 to Stage; newer versions: `CLI-RENDER-004` |
73
71
 
74
72
  Read `references/versions.md` when you need the exact messages, exit codes or the MCP roots bug.
75
73
 
@@ -84,7 +82,7 @@ Independent results, not a ladder. Read `references/verdicts.md` for the command
84
82
  | V1 | authorable (compiles, warnings as errors) | the folder command above |
85
83
  | V2 | executable diagnostics read | MCP `open-workspace`, then `read-workspace view=executable-diagnostics` |
86
84
  | V3 | binding-ready (binds, no blocking executable diagnostics) | `executableReady` true and no error-severity diagnostic in V2; informational PLAY0269/0270 are reported separately |
87
- | V4 | reference specifications run | the Screenplay reference execution route only (none ships in the pinned tools: `V4 not run: no route`); rendered Debug tests are V5.tests, never V4 |
85
+ | V4 | reference specifications run | `screenplay test` or MCP `run-specifications`; unsupported/unbound is not a pass; rendered Debug tests are V5.tests, never V4 |
88
86
  | V5 | rendered and target-verified | `cratis render`, then Debug build and tests; report admission, publication, build and tests separately |
89
87
 
90
88
  V2 and V3 need MCP: send `initialize`, then `notifications/initialized`, and start the
@@ -105,12 +103,14 @@ changes with the root folder name.
105
103
  only; no handler (PLAY0268, with or without `implementation`/`hint`); `reads` and
106
104
  `concurrency` do not bind (PLAY0271); no `@pii`; v6 constructs bind on Screenplay 4.61 or
107
105
  later (standalone, and cratis 3.28.2 or later); generated values and `returns` responses bind (ESM v7)
108
- only on standalone 4.68.0 or later (`references/generated-responses-example.md`). Read [references/executable-example.md](references/executable-example.md) when you need a small StateChange and StateView model that binds executable, [references/pdl-example.md](references/pdl-example.md) when writing projection forms that bind and run, and [references/automation-translate-example.md](references/automation-translate-example.md) when writing Automation and Translate slices (ESM v6).
109
- - **Renderable** (V5): `references/renderable-subset.md`. Stage 4.24.2 renders ESM v1 to v4 (evolved events refused, `STAGE-ESM-026`)
110
- `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).
111
- - **Event sources, streams and command routes** (and operations): authorable and validatable, but never
112
- bound (`PLAY0268`: not admitted by any supported ESM version), run or rendered
113
- (`STAGE-ESM-016`); gap-fill with the model as contract (`references/sources-and-streams.md`).
106
+ from Screenplay 4.68.0 (also in the current CLI bundle) (`references/generated-responses-example.md`). Read [references/executable-example.md](references/executable-example.md) when you need a small StateChange and StateView model that binds executable, [references/pdl-example.md](references/pdl-example.md) when writing projection forms that bind and run, and [references/automation-translate-example.md](references/automation-translate-example.md) when writing Automation and Translate slices (ESM v6).
107
+ - **Renderable** (V5): `references/renderable-subset.md` retains explicitly labeled
108
+ older Stage probes. Current CLI admits v7 to planning, but its v7 corpus gets
109
+ Stage generated-value/response refusals `STAGE-ESM-028`/`029`, not a blanket
110
+ compiler refusal. Run admission before claiming a particular model renders.
111
+ - **Event sources, streams and routes** bind as ESM v8 at 4.125.0; CLI 3.41.0
112
+ render refuses versions above v7 (`CLI-RENDER-004`). Operations and exact numeric
113
+ mode remain authorable/unadmitted. Details: `references/sources-and-streams.md`.
114
114
 
115
115
  ## Edit strategy
116
116
 
@@ -144,10 +144,12 @@ Read [references/diagnostics.md](references/diagnostics.md) when a PLAY, STAGE o
144
144
  2. Write `for <identifier>` on every `produces`.
145
145
  3. PLAY0029 is a warning: validate with warnings as errors.
146
146
  4. Validate the folder; name the compiler (cli#244, cli#242).
147
- 5. Mappings to undeclared projection targets and undeclared events in `remove with`/capture
148
- `append` pass V1 and fail binding (V2/V3, PLAY0273); a declared read-model property that
149
- nothing maps is reported by no tool: run V3 and walk field lineage by hand.
150
- 6. A reaction's `invokes` has no caller: a gated command rejects it; keep the gate.
147
+ 5. V1 warns on undeclared projection targets (`PLAY0514`) and removal/capture
148
+ event references (`PLAY0166`). Unmapped declared fields can be reported by
149
+ opt-in `--check field-origins` (`PLAY0534`); unknown coverage is skipped, so
150
+ still walk lineage. See diagnostics for editor versus C#-only checks.
151
+ 6. Without reaction `runs as` an invoke is caller-less. Declare its trusted role
152
+ (ESM v10), keep the gate, and reference-test; CLI/Stage support is separate.
151
153
  7. Read-model identity is one `query XById => RM optional` with `by xId XId`, and the identifier equal to the
152
154
  projection's key (see trap 12); never `identifier` on a read model.
153
155
  8. Projection `key` routes only on `from`; joins never create; `all` is per source.
@@ -230,7 +230,7 @@ module Billing
230
230
  then InvoiceClosed // ESM v6: the Reconciler cascade (amount > 0)
231
231
  for "9c858901-8a57-4791-81fe-4c455b099bc9"
232
232
 
233
- module Housekeeping // no gates: a reaction's `invokes` has no caller
233
+ module Housekeeping // no gates: this reaction declares no `runs as`, so its `invokes` has no caller
234
234
  description "Background follow-up"
235
235
  feature FollowUp
236
236
  slice StateChange CloseInvoice
@@ -1,5 +1,20 @@
1
1
  # Screenplay cheat-sheet (tool versions: versions.md)
2
2
 
3
+ ## Contents
4
+
5
+ - Samples and preview fixtures
6
+ - Lexical and structural rules
7
+ - Exact numeric source mode
8
+ - Clause order inside a command (canonical)
9
+ - Slice contents (typical)
10
+ - `$context.` paths (command `produces`)
11
+ - `$eventContext.` (projections)
12
+ - PDL quick reference (most forms are compiled in `pdl-example.md` or `cheat-sheet-example.md`; `remove via join` and `$eventContext.occurred` are not)
13
+ - Specification forms
14
+
15
+ Current pins: standalone Screenplay 4.125.0 / CLI 3.41.0; `versions.md` is the
16
+ single table. Compile evidence below keeps its historical tool labels.
17
+
3
18
  The syntax lives in compiled example files next to this one (each is a Markdown file holding
4
19
  one complete `screenplay` fence). Copy shapes from them; do not write a form that none of
5
20
  them (or a compiled documentation example) shows. This file holds the prose rules; the
@@ -18,11 +33,31 @@ by `for_Documentation/when_comparing_the_grammar_against_the_parsers.cs`),
18
33
  Screenplay CI (`when_compiling_every_example.cs`) against repository main: the standalone
19
34
  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
35
 
36
+ ## Samples and preview fixtures
37
+
38
+ Invoicing is a warning-free syntax showcase, not a runnable whole-language proof.
39
+ The released samples policy excepts these preview families and points to dedicated
40
+ fixtures; do not infer binder admission from the sample's coverage list:
41
+
42
+ | Family | Screenplay v4.125.0 fixture |
43
+ | --- | --- |
44
+ | Exact numbers | `Source/Screenplay/Compiler/Conformance/exact-named-rule-intent.play` |
45
+ | Sources/streams/command routes | `Documentation/screenplay/fixtures/source-streams.play` |
46
+ | Specification routes | `Source/Screenplay/Compiler/Conformance/specification-streams.play` |
47
+ | Systems/operations/specification steps | `Documentation/screenplay/fixtures/operations.play` |
48
+ | Refusals/redelivery/no-events | `Source/Screenplay/Compiler/Conformance/reaction-refusals-redelivery.play`, `no-events.play` in that directory |
49
+
50
+ Source: `v4.125.0:.cratis/ai/rules/project/samples.md`. Its preview list retains
51
+ sources/specification routes, but the released binder/runner admits them as v8;
52
+ its old blanket PLAY0268 wording is not the current route verdict. Other rows
53
+ remain unadmitted. Compile and test each relevant fixture with the chosen tool.
54
+
21
55
  ## Lexical and structural rules
22
56
  - Spaces only, 2 per level (tabs: PLAY0006 W). Offside rule.
23
57
  - Comments: `//` only. `#` is not a comment (PLAY0058 E in a projection) despite doc examples.
24
- - Order is free (forward references fine) except `domain` first in the file and `description`
25
- first in a body.
58
+ - Body directives can appear in any order; singleton `description` still appears
59
+ at most once. Canonical printing may place it first, but the parser does not
60
+ require that position. Source preambles precede declarations.
26
61
  - Strings: `"..."`, escapes `\" \\ \n \r \t`; other backslashes kept (regex `"^INV-\d{6}$"` works).
27
62
  - Structured values: single-line JSON, quoted keys (`[{"sku": "A-1", "quantity": 2}]`).
28
63
  - One condition grammar (policy `require`, `produces when`, `require`, reaction `where`): `and`
@@ -40,6 +75,16 @@ compiler (4.68.0; `cratis` 3.28.2 or later bundles 4.66.0, which lacks ESM v7);
40
75
  or keyed query argument) or `matches <commandProperty>`; executable; renderable only for
41
76
  text-backed targets (Uuid-backed: STAGE-ESM-015).
42
77
 
78
+ ## Exact numeric source mode
79
+
80
+ Start each file/import barrel with `numbers exact` to retain bounded decimal
81
+ literals without Double rounding. All assembled files must agree on mode;
82
+ PLAY0508–PLAY0513 diagnose malformed directives, range errors and disagreement.
83
+ Exact mode is authoring-only (`PLAY0268` on binding), not ESM v7 generated values.
84
+ Typed JSON needs consistent `sourceOptions.numericMode: "exact"` on every root
85
+ and `ExactNumber` literal envelopes with canonical fixed-point string values,
86
+ never JSON numbers. Details: model-authoring `references/language-reference.md`.
87
+
43
88
  ## Clause order inside a command (canonical)
44
89
  description, properties, `reads`, `authorize`, `validate`, `produces`/`handler`, `concurrency`.
45
90
 
@@ -3,8 +3,9 @@
3
3
  ## Contents
4
4
 
5
5
  - Warnings that hide defects (always validate with `--warnings-as-errors`)
6
- - Not caught at V1 (fail binding: V2/V3, PLAY0273)
7
- - Silent at every level
6
+ - Source reference and identifier checks
7
+ - Structural completeness and timeline checks
8
+ - Editor versus C# verdicts
8
9
  - Consistency errors (V1: the model contradicts itself)
9
10
  - Binding (V2 and V3) - see `executable-subset.md` for the full table
10
11
  - Frequent errors
@@ -33,13 +34,56 @@ then STAGE (V5 admission). Tool differences: `versions.md`.
33
34
  | PLAY0455 | quoted import glob matches no file | fix the glob |
34
35
  | PLAY0196/0197/0198 | unknown query/screen; ambiguous bare name | declare or qualify `Slice.Name` |
35
36
 
36
- ## Not caught at V1 (fail binding: V2/V3, PLAY0273)
37
- - Projection mapping to a property the read model does not declare.
38
- - Undeclared event in `remove with` or in a capture `append`.
39
- (Screenplay v4.66.0 `SemanticModelBinder` `BindMapping`, `LevelEvent`, `BindCaptureAppends`.)
37
+ ## Source reference and identifier checks
40
38
 
41
- ## Silent at every level
42
- - A declared read-model property that nothing maps (it stays empty): walk field lineage by hand.
39
+ At Screenplay 4.125.0 these are V1 source checks, not binding-only gaps:
40
+
41
+ | Code | Severity | Meaning |
42
+ | --- | --- | --- |
43
+ | PLAY0514 | W | Projection mapping, children or nested target absent from the declared read-model/element shape; unknown/imported shapes are not guessed |
44
+ | PLAY0166 | W | Unknown event, including `remove with`, `remove via join on` and capture `append` |
45
+ | 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 |
46
+
47
+ Legacy compliance spellings (`@pii`/`@sensitive`) do not evade PLAY0515.
48
+
49
+ ## Structural completeness and timeline checks
50
+
51
+ Opt in with `--check <names>` or MCP diagnostics `checks`, then treat warnings
52
+ as errors if gating. Ordinary compile success does not imply these ran:
53
+
54
+ | Family | Codes | Checks |
55
+ | --- | --- | --- |
56
+ | data-bindings | PLAY0530/0531 | Conflicting visible bindings; binding/query read-model or cardinality mismatch |
57
+ | input-surfaces | PLAY0532/0533 | Missing command input form/issuing screen; missing reachable issuer |
58
+ | field-origins | PLAY0534 | Missing read-model builder or top-level field origin (AutoMap, identity and variants considered) |
59
+ | query-keys | PLAY0535 | Query argument not representable by known identity/fields |
60
+ | event-consumers | PLAY0536 | Latest local event generation lacks an operational consumer; a terminal fact can legitimately be reported |
61
+ | navigation | PLAY0537 | Unreachable screens; unreachable cycles do not establish an entry point |
62
+
63
+ Whole-source errors skip completeness checks. Unknown/opaque coverage is not
64
+ invented: report skipped status/coverage and walk field lineage manually.
65
+
66
+ PLAY0516/0517 are **information**, so never fail `--warnaserror`. They review
67
+ presentation order, not execution: a backward event/read-model dependency or a
68
+ mutually dependent sibling group. A cycle group replaces internal individual
69
+ backward findings. Ordering roots are the sole source document, an importing
70
+ `application.play`, or a unique importing root; without one, folder timeline
71
+ checking is skipped. Safe PLAY0516 repairs move siblings/imports or pin files
72
+ before a retained glob; cycles and own-sub-feature findings have no repair.
73
+
74
+ ## Editor versus C# verdicts
75
+
76
+ Monaco/VS Code use the TypeScript syntax/authoring compiler. They share projection
77
+ and protected-identifier checks (PLAY0514/0515), typed-example syntax (0518/0519),
78
+ guarded actions (0341–0348), and reaction-refusal syntax/checks (0538–0545).
79
+ A shared catalog code is not proof that a check is implemented in both compilers.
80
+
81
+ C# CLI/MCP owns whole-application scoped diagnostics, opt-in completeness
82
+ (PLAY0530–0537), semantic binding and PLAY0546 (a negated claim targets optional,
83
+ unavailable-subject or non-text data). The VS Code repair bridge is not a general
84
+ C# validator. A clean editor is not V1 for the complete application, V3 binding
85
+ or V4 execution. Run the CLI or MCP for those verdicts. Authority:
86
+ `v4.125.0:Documentation/screenplay/editor-diagnostics.md`, `diagnostics.md`.
43
87
 
44
88
  ## Consistency errors (V1: the model contradicts itself)
45
89
  | Code | Meaning |
@@ -99,7 +143,11 @@ Fix order: E at V1 -> W at V1 -> silent-gap check -> V2 codes (if the mode needs
99
143
  Report each as `code file:line one-line meaning`; never paste more than about 30 lines.
100
144
 
101
145
  ## Render admission (V5): `STAGE-*`, `CLI-RENDER-*`, `STAGE-CRATIS-*`
102
- Full table with causes: `renderable-subset.md`. Codes you meet most:
146
+ Full table with causes: `renderable-subset.md`. The Stage 4.24.x rows below
147
+ retain historical source/probe evidence. Current CLI 3.41.0 admits up to ESM v7
148
+ for Stage planning; above that is CLI-RENDER-004. Its v7 corpus is refused by
149
+ STAGE-ESM-028 (generated values) and -029 (responses), not the old v7 version gate.
150
+ Codes in the historical snapshot:
103
151
  | Code | Meaning |
104
152
  |---|---|
105
153
  | 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 |
@@ -1,5 +1,10 @@
1
1
  # Documentation contradictions and which side to trust
2
2
 
3
+ Current pins are Screenplay 4.125.0 / CLI 3.41.0 (`versions.md`). This is a
4
+ **historical** contradiction inventory, not a claim that all listed defects still
5
+ exist. Current grammar documents exact numbers and free description placement;
6
+ sources/routes bind as ESM v8; PLAY0515 is a source error; CLI v7 reaches Stage.
7
+
3
8
  `D/` is Screenplay `Documentation/screenplay/` at **v4.66.0**; line numbers were re-read at
4
9
  that tag. Rule: the compiler you ran decides what the tool accepts today; the documentation
5
10
  and the domain decide what the model should mean. When they disagree, follow the compiler
@@ -32,7 +37,7 @@ read from source or documentation.
32
37
  | 19 | `$strings` constraint messages | `D/constraints.md:31` vs `D/internationalization.md:55` | the compiler keeps the key; realization localizes |
33
38
  | 20 | composite key braces | optional in the EBNF; both forms in docs | both fine |
34
39
  | 21 | counters list | `D/projections/index.md:54` lists only increment and decrement | `count` exists too [probed] |
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" |
40
+ | 22 | ESM version allocation | older text and decisions 0023 and 0024 give exact numbers, operations, streams and reads fixed numbers (v7 to v11) | use actual released binder selection: v7 generated values/responses, v8 routing, v10 reaction identity at 4.125.0; operations and exact numbers remain unadmitted. Never infer current admission from older proposed allocations |
36
41
  | 23 | claim conditions | the condition grammar lists `==` | claims need `matches` (PLAY0120) [probed] |
37
42
  | 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
43
  | 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`) |