@cratis/pi 7.38.3 → 7.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package/corpus/agents/screenplay-modeler.md +1 -1
- package/package/corpus/agents/screenplay-reviewer.md +1 -1
- package/package/corpus/product-sync.json +11 -11
- package/package/corpus/skills/cratis-chronicle-reactor/SKILL.md +2 -2
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +4 -2
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/audit-format.md +1 -1
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/automation-patterns.md +1 -1
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/public-events-and-direction.md +3 -6
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/realization-and-gap-fill.md +12 -7
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/todo-list-example.md +5 -6
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translate-example.md +2 -5
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +12 -15
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/complete-examples.md +6 -15
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/specifying-triggers-and-clock.md +1 -1
- package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +14 -15
- package/package/corpus/skills/cratis-screenplay-command-surface/references/compliance.md +14 -4
- package/package/corpus/skills/cratis-screenplay-command-surface/references/enum-numbers.md +11 -13
- package/package/corpus/skills/cratis-screenplay-command-surface/references/generated-values-and-responses.md +10 -6
- package/package/corpus/skills/cratis-screenplay-command-surface/references/inline-events.md +23 -1
- package/package/corpus/skills/cratis-screenplay-command-surface/verification.json +2 -2
- package/package/corpus/skills/cratis-screenplay-discovery/references/provenance.md +1 -1
- package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +13 -13
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/invoicing-example.md +3 -7
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/nine-steps.md +9 -12
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +4 -4
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generate-notes.md +1 -1
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/intent-example.md +3 -8
- package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +9 -4
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +9 -7
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +26 -6
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +40 -0
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/property-links.md +3 -1
- package/package/corpus/skills/cratis-screenplay-model-review/references/anti-patterns.md +1 -1
- package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +1 -1
- package/package/corpus/skills/cratis-screenplay-model-review/references/report-template.md +1 -1
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/SKILL.md +2 -2
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/phases.md +1 -1
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/verdicts-and-modes.md +3 -2
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/vocabulary-map.md +5 -3
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/worked-example.md +2 -6
- package/package/corpus/skills/cratis-screenplay-projections/SKILL.md +2 -0
- package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +26 -18
- package/package/corpus/skills/cratis-screenplay-read-surface/references/equality-filters.md +208 -0
- package/package/corpus/skills/cratis-screenplay-read-surface/references/screen-patterns.md +2 -5
- package/package/corpus/skills/cratis-screenplay-read-surface/verification.json +4 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +20 -16
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/delivery-protocol.md +1 -1
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +4 -3
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +8 -8
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/worked-example.md +2 -5
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/verification.json +2 -2
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +4 -1
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/berth-reservations.md +8 -19
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-design.md +8 -20
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-example.md +9 -23
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-examples.md +9 -3
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +6 -5
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/view-and-story-specs.md +2 -1
- package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +7 -4
- package/package/corpus/skills/cratis-screenplay-slice-design/references/field-lineage.md +1 -1
- package/package/corpus/skills/cratis-screenplay-slice-design/references/model-reasoning.md +2 -5
- package/package/corpus/skills/cratis-screenplay-slice-design/references/read-model-design.md +5 -10
- package/package/corpus/skills/cratis-screenplay-slice-design/references/worked-example.md +8 -19
- package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +17 -25
- package/package/corpus/skills/cratis-screenplay-specifications/references/actions-beyond-commands.md +2 -1
- package/package/corpus/skills/cratis-screenplay-specifications/references/generated-fixtures.md +3 -3
- package/package/corpus/skills/cratis-screenplay-specifications/references/persona-callers-and-cases.md +2 -5
- package/package/corpus/skills/cratis-screenplay-specifications/references/reactions-and-cascades.md +5 -4
- package/package/corpus/skills/cratis-screenplay-specifications/references/source-notes.md +10 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +3 -3
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/boundaries.md +2 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution.md +2 -2
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +10 -24
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/verification.json +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +23 -17
- package/package/corpus/skills/cratis-screenplay-toolchain/references/automation-translate-example.md +4 -10
- package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet-example.md +11 -23
- package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet.md +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +3 -3
- package/package/corpus/skills/cratis-screenplay-toolchain/references/doc-contradictions.md +4 -3
- package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-example.md +3 -7
- package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +40 -24
- package/package/corpus/skills/cratis-screenplay-toolchain/references/pdl-example.md +27 -69
- package/package/corpus/skills/cratis-screenplay-toolchain/references/preferred-syntax.md +73 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/production-routes-and-filters.md +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/provenance.md +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +34 -31
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract-exceptions.json +21 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +7 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/sources-and-streams.md +4 -3
- package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +4 -4
- package/package/corpus/skills/cratis-screenplay-toolchain/references/verdicts.md +17 -5
- package/package/corpus/skills/cratis-screenplay-toolchain/references/versions.md +50 -34
- package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +7 -2
- package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +13 -18
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/screen-composition-contract.md +4 -3
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/worked-flow.md +3 -2
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +32 -32
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +58 -26
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/rendered-application.md +17 -20
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/sandbox-and-specrunner.md +18 -14
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/scene-runtime.md +4 -3
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +2 -2
- package/package.json +1 -1
|
@@ -107,13 +107,12 @@ is the fallback, and neither names the other's verdict. Versions and commands:
|
|
|
107
107
|
- [ ] Every event is past tense, single-purpose, and carries no event-source id.
|
|
108
108
|
- [ ] Personal data is classified on the `concept`, with a reason.
|
|
109
109
|
- [ ] Specifications name the rejections, not only the happy path.
|
|
110
|
-
- [ ]
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
(`STAGE-ESM-037`) although Arc 22.72.0 and later can run it (the Arc the Stage scaffold pins needs a proven override): hand-write it as one reactor, never split the modeled reaction.
|
|
110
|
+
- [ ] Bind with the runtime's compiler; pins: toolchain `references/versions.md`.
|
|
111
|
+
CLI 3.56.0 / Stage 4.83.0 admit through v13, including supported event Automation,
|
|
112
|
+
UUID generation/responses, enum numbers and compliance. Translate/captures,
|
|
113
|
+
refused reactions and v14 filters remain gaps (Stage `references/admission.md`).
|
|
114
|
+
Mixed effects remain `STAGE-ESM-037`: retries can duplicate events. Keep the reaction
|
|
115
|
+
whole and prove retry-safe gap-fill; never split or drop effects.
|
|
117
116
|
|
|
118
117
|
## Parsed is not runnable
|
|
119
118
|
|
|
@@ -130,12 +129,12 @@ What binds depends on **which tool** you ask, so name the tool and its version:
|
|
|
130
129
|
|
|
131
130
|
- `Automation` and `Translate` slices, reactions, captures and triggers bind (ESM v6) on the
|
|
132
131
|
standalone tool and the CLI bundle. (Historical: the cratis 3.27.1 bundle, Screenplay 4.60.1,
|
|
133
|
-
reported *Slice '<name>' of type '<type>' is not admitted by ESM v1.*) Stage 4.
|
|
132
|
+
reported *Slice '<name>' of type '<type>' is not admitted by ESM v1.*) Stage 4.83.0 renders supported event-triggered Automation, not Translate/captures or non-event triggers.
|
|
134
133
|
- `reads` and `concurrency` on a command do not bind (`PLAY0271`), so no decision is
|
|
135
134
|
protected against stale state. A reaction trigger's `reads` that only `invokes` is
|
|
136
135
|
report-only intent (`PLAY0270`); one that `produces` directly fails binding (`PLAY0268`).
|
|
137
136
|
- `persona` declarations are report-only and never block; bare `pii` and `secret`
|
|
138
|
-
concepts bind as ESM v13 on standalone 4.142.0 (since 4.141.0),
|
|
137
|
+
concepts bind as ESM v13 on standalone 4.142.0 (since 4.141.0), and the pinned CLI; Stage renders admitted v13 protection.
|
|
139
138
|
Enum/identity compliance and protected events with explicit subject marks remain
|
|
140
139
|
refused (PLAY0268); see command-surface `references/compliance.md`. Keep protection.
|
|
141
140
|
- Generated values/responses bind and reference-execute as v7; sources, streams
|
|
@@ -143,10 +142,11 @@ What binds depends on **which tool** you ask, so name the tool and its version:
|
|
|
143
142
|
qualifying Double literals lower exactly as v11 and non-positional enum numbers
|
|
144
143
|
as v12. Use `screenplay test` or MCP `run-specifications` for V4.
|
|
145
144
|
Operations/systems, the `numbers exact` **source mode** (PLAY0268) and
|
|
146
|
-
refusal/redelivery remain unadmitted. Stage
|
|
147
|
-
responses
|
|
148
|
-
|
|
149
|
-
|
|
145
|
+
refusal/redelivery remain unadmitted. CLI 3.56.0 / Stage 4.83.0 render UUID-concept generated values,
|
|
146
|
+
scalar/named responses, enum numbers, compliance and supported event reactions.
|
|
147
|
+
The pair reaches construct checks through v13, not blanket rendering; v14 filters
|
|
148
|
+
bind but remain refused. Current boundaries and source evidence:
|
|
149
|
+
`cratis-screenplay-toolchain/references/renderable-subset.md`.
|
|
150
150
|
Source/binding admission and target realization are separate gates.
|
|
151
151
|
|
|
152
152
|
The ESM versions, the full disposition table and the Step 7 clock example's binding
|
package/package/corpus/skills/cratis-screenplay-event-modeling/references/invoicing-example.md
CHANGED
|
@@ -26,13 +26,9 @@ module Invoicing
|
|
|
26
26
|
authorize CanManageInvoice
|
|
27
27
|
validate
|
|
28
28
|
invoiceNumber not empty message "Invoice number is required"
|
|
29
|
-
produces InvoiceRegistered
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
registeredAt = $context.occurred
|
|
33
|
-
event InvoiceRegistered
|
|
34
|
-
invoiceNumber InvoiceNumber
|
|
35
|
-
registeredAt DateTime
|
|
29
|
+
produces event InvoiceRegistered
|
|
30
|
+
invoiceNumber InvoiceNumber = invoiceNumber
|
|
31
|
+
registeredAt DateTime = $context.occurred
|
|
36
32
|
event InvoiceSent
|
|
37
33
|
|
|
38
34
|
slice StateView InvoiceList
|
|
@@ -111,7 +111,8 @@ property (at most one; leave it out only when the runtime should allocate a new
|
|
|
111
111
|
identity), `authorize`, and `produces`. Excerpt: the complete document is
|
|
112
112
|
[invoicing-example.md](invoicing-example.md). Give the event a description of the
|
|
113
113
|
fact, and fenced Markdown `documentation` when its meaning needs elaboration.
|
|
114
|
-
|
|
114
|
+
Prefer `produces event` with typed mappings for an event owned by one command;
|
|
115
|
+
shared events stay standalone with explicit command destinations.
|
|
115
116
|
|
|
116
117
|
```screenplay excerpt parent=references/invoicing-example.md#1
|
|
117
118
|
// Parent: references/invoicing-example.md (complete document), slice RegisterInvoice
|
|
@@ -122,10 +123,9 @@ slice StateChange RegisterInvoice
|
|
|
122
123
|
authorize CanManageInvoice
|
|
123
124
|
validate
|
|
124
125
|
invoiceNumber not empty message "Invoice number is required"
|
|
125
|
-
produces InvoiceRegistered
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
registeredAt = $context.occurred
|
|
126
|
+
produces event InvoiceRegistered
|
|
127
|
+
invoiceNumber InvoiceNumber = invoiceNumber
|
|
128
|
+
registeredAt DateTime = $context.occurred
|
|
129
129
|
```
|
|
130
130
|
|
|
131
131
|
The "under what circumstances would this NOT happen" answers become `validate`
|
|
@@ -199,10 +199,10 @@ system state?"* If no, it is co-production — one `StateChange` slice with seve
|
|
|
199
199
|
|
|
200
200
|
**Output:** the `reaction`, in an `Automation` slice. It binds on the standalone
|
|
201
201
|
`screenplay` and the `cratis` bundle (ESM v6; the 3.27.1 bundle rejected the slice at binding) and
|
|
202
|
-
Stage 4.
|
|
202
|
+
Stage 4.83.0 renders supported event-triggered Automation; refused scope stays gap-fill (versions:
|
|
203
203
|
`cratis-screenplay-toolchain`). A reaction that `produces` and `invokes` stays one reaction: Stage
|
|
204
204
|
refuses it (`STAGE-ESM-037`) but Arc 22.72.0 and later run it as one reactor (events first, then
|
|
205
|
-
commands; no cross-effect transaction; the
|
|
205
|
+
commands; no cross-effect transaction; the scaffold includes the handler, but retries can duplicate events), so gap-fill it whole, never split it. When the automation decides from a view, declare it under
|
|
206
206
|
the trigger with `reads` (see `cratis-screenplay-captures-and-reactions`).
|
|
207
207
|
|
|
208
208
|
The example below is a complete document: a Monday-morning clock occurrence invokes a command
|
|
@@ -251,11 +251,8 @@ module Invoicing
|
|
|
251
251
|
description "Records that the weekly collections digest was issued"
|
|
252
252
|
command IssueCollectionsDigest
|
|
253
253
|
period DigestPeriod identifier
|
|
254
|
-
produces CollectionsDigestIssued
|
|
255
|
-
|
|
256
|
-
issuedAt = $context.occurred
|
|
257
|
-
event CollectionsDigestIssued
|
|
258
|
-
issuedAt DateTime
|
|
254
|
+
produces event CollectionsDigestIssued
|
|
255
|
+
issuedAt DateTime = $context.occurred
|
|
259
256
|
specification IssuingTheDigest
|
|
260
257
|
given clock "2026-10-05T07:30:00Z"
|
|
261
258
|
when IssueCollectionsDigest
|
package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md
CHANGED
|
@@ -29,14 +29,14 @@ Pins and consumer boundaries: toolchain `references/versions.md`.
|
|
|
29
29
|
| Construct | Standalone disposition (v4.125.0/v4.139.0 evidence; compliance updated at v4.141.0) |
|
|
30
30
|
| --- | --- |
|
|
31
31
|
| `persona`, domain/authentication metadata | Report-only; unknown named policies remain source defects |
|
|
32
|
-
| Compliance concepts | Bare `pii`/`personal` and `secret`, qualifiers and scope bind as v13 (4.142.0 checked); enum/identity compliance and events combining personal or explicitly subject-scoped secret values with an explicit `subject` mark refuse PLAY0268 at binding only. CLI 3.
|
|
32
|
+
| Compliance concepts | Bare `pii`/`personal` and `secret`, qualifiers and scope bind as v13 (4.142.0 checked); enum/identity compliance and events combining personal or explicitly subject-scoped secret values with an explicit `subject` mark refuse PLAY0268 at binding only. CLI 3.56.0's 4.145.1 bundle binds markers; Stage 4.83.0 renders v13 protection, not protected identities/enums or subject lineage. Never remove protection |
|
|
33
33
|
| Identity details / processing purposes / event subject | Report-only metadata (4.127.0); executable detail reads refuse PLAY0268, not source declaration errors |
|
|
34
34
|
| Composite stream ids | v8 routing; complete named parts/canonical comparisons, PLAY0515 refuses protected keys/sources; not a legacy text split |
|
|
35
35
|
| Command reads/concurrency | Legacy unprotected decisions, PLAY0271 |
|
|
36
36
|
| Invokes-only trigger reads | Report-only, not protected state; direct production with reads refuses |
|
|
37
|
-
| Generated values/responses | v7 binding/reference execution; Stage 4.
|
|
38
|
-
| Sources/streams and command/specification routes | v8 binding/reference execution; the pinned CLI (toolchain `references/versions.md`) reaches Stage checks through
|
|
39
|
-
| Declared reaction invocation actor | v10 binding/reference execution; older CLI parser PLAY0137; Stage planner refuses v10 |
|
|
37
|
+
| Generated values/responses | v7 binding/reference execution; Stage 4.83.0 renders required scalar UUID concepts, scalar/named responses and fixtures; unsupported types/combinations remain -028/-038 |
|
|
38
|
+
| Sources/streams and command/specification routes | v8 binding/reference execution; the pinned CLI (toolchain `references/versions.md`) reaches Stage checks through v13 |
|
|
39
|
+
| Declared reaction invocation actor | v10 binding/reference execution; older CLI parser PLAY0137; Stage planner refuses reaction identity (STAGE-ESM-034), not v10 as a version |
|
|
40
40
|
| Operations/systems, `numbers exact` source mode, refusal/redelivery | Source accepted; whole binding refuses PLAY0268 |
|
|
41
41
|
| UI | Authoring/deferred metadata; runtime support is a separate consumer contract |
|
|
42
42
|
|
package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generate-notes.md
CHANGED
|
@@ -75,7 +75,7 @@ cratis screenplay generate <solution|project|folder> \
|
|
|
75
75
|
## Coverage (what a provider reads)
|
|
76
76
|
| Provider | Reads | Does not read |
|
|
77
77
|
|---|---|---|
|
|
78
|
-
| Arc | commands, events, concepts, read models, projections, reducers, reactors, constraints, declarative FluentValidation rules, authorization policies, `produces` from constants and input paths, Chronicle integration specs as given/when/then, `.tsx` beside a slice as `screen` + `data via query` | handler bodies, rules written in code, computed messages (`SP0016`), screen bodies, captures, personas, seeds,
|
|
78
|
+
| Arc | commands, events, concepts, read models, projections, reducers, reactors, constraints, declarative FluentValidation rules, authorization policies, `produces` from constants and input paths, Chronicle integration specs as given/when/then, `.tsx` beside a slice as `screen` + `data via query` | handler bodies, rules written in code, computed messages (`SP0016`), screen bodies, captures, personas, seeds, `secret`. A rule held to `When`/`Unless` is written down as if unconditional and `SP0016` names the condition: read the diagnostic, do not trust the declaration |
|
|
79
79
|
| Marten / Critter Stack (preview; an independent optional adapter built on the neutral Screenplay.Generation SDK, not affiliated with JasperFx: review every `GEN`/`MARTEN`/`WOLVERINE` diagnostic by hand) | aggregates, snapshots, HTTP and message handlers, document operations, queries, outgoing and delayed messages, saga facts | saga lifecycle, policies, middleware bodies, runtime tenancy, upcasting; unbounded extension code is reported by presence only |
|
|
80
80
|
| any non-.NET stack | nothing | use Prologue and targeted reads |
|
|
81
81
|
|
package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/intent-example.md
CHANGED
|
@@ -44,11 +44,8 @@ module Cloakroom
|
|
|
44
44
|
command TakeInCoat
|
|
45
45
|
coatId CoatId identifier
|
|
46
46
|
ticketNumber TicketNumber
|
|
47
|
-
produces CoatTakenIn
|
|
48
|
-
|
|
49
|
-
ticketNumber = ticketNumber
|
|
50
|
-
event CoatTakenIn
|
|
51
|
-
ticketNumber TicketNumber
|
|
47
|
+
produces event CoatTakenIn
|
|
48
|
+
ticketNumber TicketNumber = ticketNumber
|
|
52
49
|
constraint UniqueTicketNumber
|
|
53
50
|
unique ticketNumber on CoatTakenIn
|
|
54
51
|
released by CoatHandedBack
|
|
@@ -100,9 +97,7 @@ module Cloakroom
|
|
|
100
97
|
validate
|
|
101
98
|
require CoatStatus.onHook == true
|
|
102
99
|
message "That coat is not on a hook"
|
|
103
|
-
produces CoatHandedBack
|
|
104
|
-
for coatId
|
|
105
|
-
event CoatHandedBack
|
|
100
|
+
produces event CoatHandedBack
|
|
106
101
|
specification HandingBackACoat
|
|
107
102
|
given caller
|
|
108
103
|
authenticated
|
|
@@ -6,6 +6,8 @@ license: MIT
|
|
|
6
6
|
|
|
7
7
|
# Author a Screenplay model through its AST
|
|
8
8
|
|
|
9
|
+
Read [preferred syntax](../cratis-screenplay-toolchain/references/preferred-syntax.md) when writing or reviewing `.play`.
|
|
10
|
+
|
|
9
11
|
Prefer the Screenplay MCP tools to text/regex edits: the compiler owns declaration,
|
|
10
12
|
reference, hierarchy and source evidence for the declarative document set.
|
|
11
13
|
|
|
@@ -95,7 +97,7 @@ can keep that entry point; use the project's supported installation channel.
|
|
|
95
97
|
bindings are not an empty, successful dependency graph.
|
|
96
98
|
4. Use `find-fixtures` for value occurrences (including example/override origins
|
|
97
99
|
and event routes) and `find-assertion-gaps` for authored assertion gaps. Neither
|
|
98
|
-
executes specifications. `diagnostics` accepts `scope` and opt-in `checks`;
|
|
100
|
+
executes specifications; use `run-specifications` for that. `diagnostics` accepts `scope` and opt-in `checks`;
|
|
99
101
|
skipped completeness checks are not passes. Details: `references/mcp-tools.md`.
|
|
100
102
|
5. Echo `sourceRevision` on subsequent pages. Restart the query after drift;
|
|
101
103
|
never combine pages from different snapshots.
|
|
@@ -149,12 +151,15 @@ and applies; others send an edit request ([MCP loop](references/mcp-loop.md)).
|
|
|
149
151
|
identity-state change through `workspace-state`. Review `orphanedNotes` on
|
|
150
152
|
source proposals; reanchor or resolve affected questions before applying
|
|
151
153
|
([notes and orphan impact](references/model-notes.md#source-proposals-can-orphan-notes)).
|
|
152
|
-
7. `
|
|
154
|
+
7. Run `run-specifications` with `proposalId` before applying on **Screenplay
|
|
155
|
+
4.145.0 and later**. Record V4 separately: PLAY0285 (impossible `then`) unbinds the whole
|
|
156
|
+
model. Paging and read-only candidate semantics: [MCP tool guide](references/mcp-tools.md#run-reference-specifications).
|
|
157
|
+
8. `apply` only the reviewed server-produced proposal within the user's requested
|
|
153
158
|
change. The proposal ID and before revisions are required; stale state rejects.
|
|
154
159
|
When the user asked for the change to be applied ("apply it when you're done",
|
|
155
160
|
"apply each change"), apply once the proposal checks out instead of asking again;
|
|
156
161
|
otherwise show the proposal and ask once.
|
|
157
|
-
|
|
162
|
+
9. When the host draws views, `visualize-model` shows the board. It follows the files
|
|
158
163
|
on disk while open, so after an apply do not re-request it; just say what changed.
|
|
159
164
|
|
|
160
165
|
Node handles are revision-bound occurrences, not durable IDs. A logical module
|
|
@@ -284,7 +289,7 @@ paths or diagnosing `PLAY0430`-`PLAY0434`; `read-workspace`/`read-proposal`
|
|
|
284
289
|
boundaries v9, identity/overrides/filters v10, qualifying non-route Double
|
|
285
290
|
literals v11, enum numbers v12, compliance v13 (since 4.141.0;
|
|
286
291
|
limits: command-surface `references/compliance.md`).
|
|
287
|
-
CLI 3.
|
|
292
|
+
CLI 3.56.0 bundles Screenplay 4.145.1 / Stage 4.83.0 and renders v12 enum numbers. Never drop or stub source contracts to bind.
|
|
288
293
|
- Distinguish authoring acceptance from `executableReady`; unsupported backend
|
|
289
294
|
capabilities are not a reason to drop source constructs or invent stubs.
|
|
290
295
|
- If execution is intended, validate with the owning downstream runtime as well.
|
package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md
CHANGED
|
@@ -249,7 +249,8 @@ v4.31.0 table, re-read against v4.66.0 and v4.68.0 documentation and probed thro
|
|
|
249
249
|
the standalone 4.66.0 tool for the rows marked "probed"; Cratis CLI 3.28.2 and 3.28.3 bundle
|
|
250
250
|
Screenplay 4.66.0 (before 3.28.2, Screenplay 4.60.1, differ where stated).
|
|
251
251
|
|
|
252
|
-
Read-model identity
|
|
252
|
+
Read-model identity below is corrected to 4.135.0; equality query filters are
|
|
253
|
+
updated to standalone 4.145.0 (admitted in 4.143.0, ESM v14):
|
|
253
254
|
explicit trailing `key` wins; otherwise single-instance queries in the owning slice
|
|
254
255
|
must agree on `by`. Only with no single-instance identifier and an admitted list
|
|
255
256
|
query does conventional `*Id` inference run. Queryless views need explicit `key`.
|
|
@@ -259,14 +260,15 @@ See read-surface `references/named-keys.md` for the collection-key exclusion alg
|
|
|
259
260
|
| --- | --- |
|
|
260
261
|
| Binds and runs in the reference runner | `StateChange`/`StateView` slices; `produces` including `when` conditions over command properties and literal tags; the portable validation rules, `matches email`, quoted `matches` patterns and `require` over command properties; declarative policies and `authorize` on modules, features, commands and keyed queries; `unique` constraints; projections as Chronicle lowers them, including variants, except the projection constructs in the next row; specifications, including `given caller`, `then denied` and `when append` |
|
|
261
262
|
| Binds, but the reference execution plan refuses it | A projection-level `remove via join`; `all` beside removals, `children` or `nested`; a `join`, `children` or `remove via join` inside `nested`; any event-context value other than the event source identity in a projection mapping or key, such as `$eventContext.occurred`, `$eventContext.sequenceNumber` or `$eventContext.causedBy.subject` (`$eventSourceId` and `$eventContext.eventSourceId` run) |
|
|
262
|
-
| Binds as ESM v6 on Screenplay 4.66.0, standalone and Cratis CLI 3.28.2 (probed); `PLAY0268` on Cratis CLI before 3.28.2 | `Automation` and `Translate` slices, reactions that produce or invoke, captures, top-level `trigger`, clock, trigger and capture specifications. The current standalone `screenplay test`/MCP reference route evaluates admitted v6 actions; the historical Stage 4.24.2 probe rendered none
|
|
263
|
+
| Binds as ESM v6 on Screenplay 4.66.0, standalone and Cratis CLI 3.28.2 (probed); `PLAY0268` on Cratis CLI before 3.28.2 | `Automation` and `Translate` slices, reactions that produce or invoke, captures, top-level `trigger`, clock, trigger and capture specifications. The current standalone `screenplay test`/MCP reference route evaluates admitted v6 actions; the historical Stage 4.24.2 probe rendered none; Stage 4.83.0 renders supported event-triggered Automation, with remaining refusals in the Stage skill's `references/admission.md` |
|
|
263
264
|
| Reaction with trigger `reads` | Direct-producing (or code-bodied) reaction with `reads`: `PLAY0268` ("ESM v6 cannot protect that decision dependency", decision 0006), non-executable. Invokes-only reaction with `reads`: information only; the invoked command must declare and protect its own decision reads. Keep the `reads`; never remove them to obtain binding |
|
|
264
265
|
| Binds as opaque code (v3); reference runner reports unsupported | Bodied reducers, bodied named rules, fenced `validate` blocks, code or file policies. A pure reducer body is the only attachment Stage 4.24.0 admits |
|
|
265
266
|
| Information only, never blocks (probed) | `persona` (report-only: `PLAY0270`, the policies it lists must exist), `authentication`, `domain`, `seed`, descriptions and `file` provenance. A persona does not block binding and does not change behavior, so state persona scope in a description or a policy the model uses |
|
|
266
|
-
| Binds as ESM v7 on standalone Screenplay 4.68.0 (source and release notes; `PLAY0268` on the 4.66.0 in Cratis CLI 3.28.x, probed) | `generated` properties and `returns` responses, generated fixtures and `then returns`: bound and executed by the reference runner; a policy, rule or requirement that references a generated value is `PLAY0273`, and a generated property on a concept with validation rules is `PLAY0268`. Stage 4.
|
|
267
|
+
| Binds as ESM v7 on standalone Screenplay 4.68.0 (source and release notes; `PLAY0268` on the 4.66.0 in Cratis CLI 3.28.x, probed) | `generated` properties and `returns` responses, generated fixtures and `then returns`: bound and executed by the reference runner; a policy, rule or requirement that references a generated value is `PLAY0273`, and a generated property on a concept with validation rules is `PLAY0268`. Stage 4.83.0 renders required scalar UUID concepts, scalar/named responses and fixtures; unsupported types/result combinations remain `-028`/`-038` |
|
|
267
268
|
| Authorable, not executable (PLAY0268) | Systems/operations, the `numbers exact` source mode (PLAY0268; exact lowering of qualifying Double literals is the admitted v11) and refusal/redelivery remain unadmitted |
|
|
269
|
+
| Collection equality filters (ESM v14, since 4.143.0) | Caller-supplied `filter name Type [optional]`, no `from`, matching a same-named scalar primitive/concept/enum read-model property with the same nominal type. AND with `by`; optional omission does not narrow, supplied null is refused. PLAY0468 covers unknown/repeated/missing required spec arguments; result rows compare by read-model/key regardless of order. Read read-surface `references/equality-filters.md` for the compiled example and renderer ceilings |
|
|
268
270
|
| Current routing and actor admission | Sources/streams and command/specification routes bind and reference-execute as v8; reaction `runs as system role` supplies the invocation actor as v10 on 4.125.0. Whole-workspace binding determines executable availability; CLI/Stage realization remains separate |
|
|
269
|
-
| Blocks binding (`PLAY0268`) | enum/identity compliance and events combining personal or explicitly subject-scoped secret values with explicit subject marks (4.141.0);
|
|
271
|
+
| Blocks binding (`PLAY0268`) | enum/identity compliance and events combining personal or explicitly subject-scoped secret values with explicit subject marks (4.141.0); historical CLI 3.53.1 refuses all `pii`/`secret` concepts; CLI 3.56.0 binds v13 and Stage 4.83.0 renders protection (historical probe: "compliance attributes require portable data-subject semantics"); command `handler` (never binds; a command cannot declare both `produces` and `handler`, `PLAY0035`), bare `rule <Name>`, `require` or conditions over read-model paths, dates and `today` in comparisons, `$context.tenant`/claims/roles/causation in `produces`, `$env` conditions, `file` constraints, unquoted `import` of an external contract, a read model with neither explicit `key` nor unambiguous query-based identity as described above (composite keys remain unadmitted), queries with context `from` sources (typed query context is unadmitted), single-result filters (collections only), `scoped to` (opaque scope), `performer` (opaque implementation) or composite `by` blocks (#599); optional keyed and collection queries, including caller-supplied equality filters and observable delivery, bind, `$causedBy` and templates in projections |
|
|
270
272
|
| Blocks binding (`PLAY0271`, legacy meaning) | Command `reads` and `concurrency` |
|
|
271
273
|
| Deferred (`PLAY0269`, information) | Screens, layouts, templates, forms, contributions, UI profiles, themes, behaviors and `on`/`uses` |
|
|
272
274
|
| Metadata only (`PLAY0270`, information) | `domain`, `seed`, `persona`, trigger and other descriptions, and `file` provenance on declarations |
|
|
@@ -275,9 +277,9 @@ The table is a snapshot, not a contract (rows without "probed" are carried from
|
|
|
275
277
|
v4.31.0 and v4.66.0 documentation): ask the binder (MCP `executable-diagnostics`
|
|
276
278
|
view) rather than extrapolating from it. Neither `screenplay` nor
|
|
277
279
|
`cratis screenplay validate` binds, so a clean validation says nothing about this table. Retain valid source that the
|
|
278
|
-
backend cannot represent rather than downgrading it to a stub.
|
|
279
|
-
|
|
280
|
-
|
|
280
|
+
backend cannot represent rather than downgrading it to a stub. MCP `run-specifications` executes the admitted reference subset, not embedded
|
|
281
|
+
code or realization files. Stage owns application generation, rendering and
|
|
282
|
+
runtime admission.
|
|
281
283
|
|
|
282
284
|
## Not in the language yet
|
|
283
285
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
- Provenance
|
|
18
18
|
|
|
19
19
|
The working loop for the session that owns the model connection: connect, orient,
|
|
20
|
-
choose an edit route, propose, review, apply, verify. Tool-by-tool arguments and
|
|
20
|
+
choose an edit route, propose, review, run specifications, apply, verify. Tool-by-tool arguments and
|
|
21
21
|
refusals are in the [MCP tool guide](mcp-tools.md); verdict names (V1 to V5) are
|
|
22
22
|
defined by `cratis-screenplay-modeling-lifecycle`. Facts here were read at
|
|
23
23
|
Screenplay v4.66.0 (`Source/DotNET/Screenplay.Mcp/`, `Documentation/screenplay/mcp/`)
|
|
@@ -139,14 +139,30 @@ the server sends `roots/list` and serves `tools/list` after the reply).
|
|
|
139
139
|
diagnostics, report V3 as not binding-ready, and never drop or stub the
|
|
140
140
|
construct. The server's own guidance is to apply such a proposal only when
|
|
141
141
|
the user accepts a model that does not run yet.
|
|
142
|
-
7.
|
|
142
|
+
7. On **Screenplay 4.145.0 and later**, run `run-specifications` with the
|
|
143
|
+
retained `proposalId` before `apply`. This read-only V4 route runs the candidate,
|
|
144
|
+
including retained identities and planned renames, without applying, refreshing
|
|
145
|
+
from disk or discarding it. `read-proposal view: "semantic-diff"` is static
|
|
146
|
+
comparison, not execution. Record counts and outcomes; an unbound candidate
|
|
147
|
+
returns executable diagnostics and executes nothing. An impossible `then`
|
|
148
|
+
(PLAY0285) unbinds the whole model, not just that specification.
|
|
149
|
+
For continuation pages, reuse `proposalId` and `expectedSourceRevision` from
|
|
150
|
+
the first response (required for `offset > 0`). Applied, discarded or reopened
|
|
151
|
+
proposals give `UnknownProposal`. A changed disk base can still run the retained
|
|
152
|
+
candidate; it does not make a stale `apply` safe. Without `proposalId`, the
|
|
153
|
+
tool runs the current workspace, not the candidate.
|
|
154
|
+
8. Get approval unless the user already approved this effect and target (ask again
|
|
143
155
|
only when target or consequence expands). A request or brief that names a rename,
|
|
144
156
|
move or removal is that approval, also unattended: do not ask again per apply. Then `apply` with the **before**
|
|
145
157
|
revisions. Every old handle and proposal is gone afterwards: re-read at the new
|
|
146
158
|
revision.
|
|
147
|
-
|
|
148
|
-
V3),
|
|
149
|
-
|
|
159
|
+
9. Verify: compile the whole folder (V1), read `executable-diagnostics` (V2,
|
|
160
|
+
V3), and run `screenplay test <root> --format json` or workspace
|
|
161
|
+
`run-specifications` (V4), naming the tool, version and source revision. A
|
|
162
|
+
candidate V4 applies only to that candidate; never relabel it as disk evidence.
|
|
163
|
+
CLI exits: 0 passed, 1 failed, 2 invalid arguments/input/selection or IO,
|
|
164
|
+
3 unsupported/unbound. `test` rejects `--no-color`. Hand off to the verdict
|
|
165
|
+
vocabulary; do not restate a state you did not run.
|
|
150
166
|
|
|
151
167
|
## One edit strategy
|
|
152
168
|
|
|
@@ -259,7 +275,7 @@ or create a fallback folder to bypass the conflict.
|
|
|
259
275
|
| `StaleRevision`, `DiskDrift`, `IdentityStateDrift` | Reopen and re-propose |
|
|
260
276
|
| `ProposalRejected` | Read `conflicts`; change the request |
|
|
261
277
|
| `FormattingConsentRequired` | Pass `formatting` |
|
|
262
|
-
| `UnknownProposal` | The connection was reopened or the proposal applied: re-propose |
|
|
278
|
+
| `UnknownProposal` | The connection was reopened or the proposal applied/discarded: re-propose |
|
|
263
279
|
| `LimitExceeded` | Discard unused proposals (16 cap) |
|
|
264
280
|
| `PendingOperation`, `RecoveryRequired` | `workspace-state`, then ask before `recover-workspace` |
|
|
265
281
|
| `RootChangeRefused` | Keep the fixed root, or start a new connection |
|
|
@@ -284,6 +300,10 @@ rejects the plan.
|
|
|
284
300
|
|
|
285
301
|
## Provenance
|
|
286
302
|
|
|
303
|
+
Proposal execution: Screenplay v4.145.0
|
|
304
|
+
`Source/DotNET/Screenplay.Mcp/McpWorkspaces.Specifications.cs:12-79` and
|
|
305
|
+
`Source/DotNET/Tool/ModelTest.cs:14-108`; `Documentation/screenplay/mcp/authoring-tools.md:500-535`.
|
|
306
|
+
|
|
287
307
|
The structure of this loop (ownership, edit-request shape, failure handling) is
|
|
288
308
|
adapted from the project's earlier event-modeling toolkit draft and re-verified
|
|
289
309
|
against the Screenplay sources named above. See [provenance](provenance.md).
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
## Contents
|
|
7
7
|
|
|
8
8
|
- Tool groups
|
|
9
|
+
- Run reference specifications
|
|
9
10
|
- Whole-source authoring
|
|
10
11
|
- Diagnostic repairs and refactorings
|
|
11
12
|
- Syntax-only constructs through the MCP
|
|
@@ -53,6 +54,7 @@ the [MCP loop](mcp-loop.md).
|
|
|
53
54
|
| Visual (MCP-Apps hosts only) | `visualize-model` | Draw the board for the model or a `proposalId`; its `sketch` argument previews a what-if of whole documents. Reads only |
|
|
54
55
|
| Planning | `propose-source`, `propose-ast`, `propose-rename`, `propose-move`, `propose-repair`, `propose-property`, `propose-number-enum-members`, `propose-extract-inline-event`, `propose`, `recommend-layout`, `expand-layout` | Produce validated, reviewable candidates without writing them |
|
|
55
56
|
| Review | `read-proposal`, `discard-proposal` | Inspect exact changes, dropped comments and proposed attachments, or abandon a connection-local proposal |
|
|
57
|
+
| Reference execution | `run-specifications` | Run the workspace or, from 4.145.0, a retained proposal candidate read-only; not attached code or target tests |
|
|
56
58
|
| Effects | `apply`, `recover-workspace` | Apply an accepted plan or explicitly recover an interrupted write |
|
|
57
59
|
|
|
58
60
|
`propose-move` moves a slice to another feature, or a feature to another module or feature, keeping identities: copy the `target` and `newParent` `{kind, parts}` addresses from the identity inventory and pass `expectedRevision` and `expectedCatalogRevision`. It repairs qualified references and `depends on`, and refuses identity loss, capture, collisions, descendant destinations, inherited authorization or screen-interaction changes and glob imports; review `moveReport` (`identityMigrations`, `referenceRepairs`, `fragmentsMoved`). It does not rename events, change pins or move files, and declaration moves between slices are deferred. Use it for legacy re-slicing instead of retyping declarations.
|
|
@@ -71,6 +73,44 @@ Exact arguments, AutoMap and fixture rules: [property evidence and planning](pro
|
|
|
71
73
|
source-only authoring proposal may be accepted while `executableReady` is false.
|
|
72
74
|
That is not permission to claim the application runs.
|
|
73
75
|
|
|
76
|
+
## Run reference specifications
|
|
77
|
+
|
|
78
|
+
`run-specifications` runs the deterministic in-memory reference evaluator, not
|
|
79
|
+
Arc/Chronicle, external services or opaque code. It writes no files. Parameters:
|
|
80
|
+
`specification` (exact dotted address or semantic id), `scope` (module/feature/slice
|
|
81
|
+
prefix), `offset` (default 0), `limit` (1–200, default 50), and
|
|
82
|
+
`expectedSourceRevision` (required for `offset > 0`). Both selectors mean
|
|
83
|
+
intersection; no match refuses `UnknownSpecificationSelection`, never an empty pass.
|
|
84
|
+
A table address selects all its cases. Drift refuses `StaleSourceRevision`.
|
|
85
|
+
|
|
86
|
+
**Screenplay 4.145.0 and later** also accepts `proposalId`: propose → review
|
|
87
|
+
`read-proposal` (including `view: "semantic-diff"`) → run the retained candidate →
|
|
88
|
+
`apply`. Static expectation comparison is not execution. The candidate retains
|
|
89
|
+
identities and planned renames; running does not apply, refresh from disk or discard
|
|
90
|
+
it. A changed base does not prevent candidate execution but still blocks stale
|
|
91
|
+
apply. Applied/discarded proposals and workspace reopen give `UnknownProposal`.
|
|
92
|
+
Continue with the same `proposalId` and returned `sourceRevision` as
|
|
93
|
+
`expectedSourceRevision`. Without `proposalId`, the tool runs the open workspace
|
|
94
|
+
or reads the root with its persisted identities.
|
|
95
|
+
|
|
96
|
+
The response includes `sourceRevision`, `outcome`, discovered/selected/executed/
|
|
97
|
+
passed/failed/unsupported counts, `executableDiagnostics`, `planIssues`, and `page`
|
|
98
|
+
(plus `proposalId` for candidate runs). Counts cover the entire selection, not one
|
|
99
|
+
page; unsupported cases are not executed. Outcomes are `passed`, `failed`,
|
|
100
|
+
`unsupported`, or overall `unbound`; only `passed` has `isError: false`. An unbound
|
|
101
|
+
model has `page: null`; an impossible `then` (PLAY0285) prevents every spec running.
|
|
102
|
+
Opaque capabilities report unsupported with a capability and reason, not a pass.
|
|
103
|
+
Zero discovered specifications is not coverage evidence.
|
|
104
|
+
|
|
105
|
+
Outside MCP, use `screenplay test <root> [--filter <exact-address>] [--format text|json]`:
|
|
106
|
+
exit 0 passed, 1 failed, 2 invalid arguments/input/selection or IO, 3 unsupported
|
|
107
|
+
or unbound. `--no-color` is rejected (exit 2); there is no proposal or paging option.
|
|
108
|
+
A folder is one application; a file selects only itself and its imports.
|
|
109
|
+
|
|
110
|
+
Sources: Screenplay v4.145.0 `Source/DotNET/Screenplay.Mcp/McpWorkspaces.Specifications.cs:12-79`,
|
|
111
|
+
`McpSpecificationExecution.cs:20-49,106-111`, `Source/DotNET/Tool/ModelTest.cs:14-108`,
|
|
112
|
+
`Documentation/screenplay/mcp/authoring-tools.md:500-535` and `tool.md:120-142`.
|
|
113
|
+
|
|
74
114
|
## Whole-source authoring
|
|
75
115
|
|
|
76
116
|
`propose-source` takes `expectedRevision`, `expectedCatalogRevision`, explicit
|
package/package/corpus/skills/cratis-screenplay-model-authoring/references/property-links.md
CHANGED
|
@@ -191,7 +191,9 @@ For a required addition with existing fixtures/assertions, supply `fixtureValue`
|
|
|
191
191
|
as **literal source text**, for example `"\"normal\""` for a String value. The
|
|
192
192
|
planner adds it to existing specification steps, examples and query results;
|
|
193
193
|
`optional: true` adds no fixture values. A literal is not proof of behavior:
|
|
194
|
-
inspect the assertions and
|
|
194
|
+
inspect the assertions and, on Screenplay **4.145.0 and later**, run
|
|
195
|
+
`run-specifications` with `proposalId` on the retained candidate before `apply`.
|
|
196
|
+
See [reference execution](mcp-tools.md#run-reference-specifications).
|
|
195
197
|
|
|
196
198
|
| Refusal | Response |
|
|
197
199
|
| --- | --- |
|
|
@@ -62,7 +62,7 @@ the problem, the checks it violates, the fix, all pinned to one declaration.
|
|
|
62
62
|
| Missing `for` | an event production (`produces <Event>` or `produces event`) without `for`. Not operation productions: they are authorable design intent, belong to commands, and take no event `for`, tags or routing | runtimes disagree on the destination | C (executable) / D | `for <identifier>` |
|
|
63
63
|
| Unbuilt read-model field | field no projection maps and AutoMap cannot fill | always empty; not reported by the compiler | D | map it or remove it |
|
|
64
64
|
| Undeclared removal/append event | `remove with` or capture `append` names an undeclared event | V1 warns (PLAY0166, a failure under warnings as errors); binding fails PLAY0273 | C (executable) / D | declare or fix the name; run V3 |
|
|
65
|
-
| Gated command invoked by a reaction without a declared actor | reaction `invokes` a command under a caller policy and has no `runs as system role "<Role>"` that satisfies the gate | the invocation carries no caller: rejected at run time | D (major) | declare `runs as system role "<Role>"` with the least-privilege role the gate admits (ESM v10, Screenplay 4.125.0; Stage 4.
|
|
65
|
+
| Gated command invoked by a reaction without a declared actor | reaction `invokes` a command under a caller policy and has no `runs as system role "<Role>"` that satisfies the gate | the invocation carries no caller: rejected at run time | D (major) | declare `runs as system role "<Role>"` with the least-privilege role the gate admits (ESM v10, Screenplay 4.125.0; Stage 4.83.0 renders supported event reactions but still refuses `runsAs` with STAGE-ESM-034, so this trusted-actor scope is gap-fill) or record another trusted-path decision - never just delete the gate. A matching `runs as system role` is the admitted trusted path, not a defect |
|
|
66
66
|
| `reads` + `produces` reaction | reaction both reads a view and produces | fails binding | C (executable) | invoke a command, or produce without reads |
|
|
67
67
|
| `reads` treated as protection | rule "checked" because the command or reaction `reads` a view | `reads` enforces nothing | D (major) | keep or introduce `reads <View>` + `require ... message` as stated intent, mark it NOT enforced in the slice `description`, name the target (`[ProtectedDecision]` + `DecisionRead<T>`, Chronicle DCB, or a constraint where it fits); checklist E3 |
|
|
68
68
|
| Caller-supplied state rule | `require currentStatus == "open"` where the caller sends `currentStatus` | the caller decides its own permission | D (major) | read the stored state with `reads`; keep or introduce `reads <View>` + `require ... message` as stated intent, mark it NOT enforced in the slice `description`, name the target (`[ProtectedDecision]` + `DecisionRead<T>`, Chronicle DCB, or a constraint where it fits); checklist E3 |
|
|
@@ -180,7 +180,7 @@ Nebulit (`provenance.md`).
|
|
|
180
180
|
| Id | Check | Evidence | Tier |
|
|
181
181
|
|---|---|---|---|
|
|
182
182
|
| H1 | Query shape follows the business view (list where people scan; lookup where they open one) | queries, screens | D |
|
|
183
|
-
| H2 | Executable scope: a keyed `=> RM optional` query with `by` named like a read-model property, or
|
|
183
|
+
| H2 | Executable scope: a keyed `=> RM optional` query with `by` named like a read-model property, or a collection (`=> RM[]`, observable too) with caller-supplied `by` and/or equality filters (ESM v14 since 4.143.0). `from`, single-result filters, opaque `scoped to`/`performer` and composite `by` remain PLAY0268. The projection routes by the same identity (a `from` key or an event property, or `$eventSourceId`; `$eventSourceId` is not mandated). Filtered models: CLI 3.56.0 / Stage 4.83.0 admit through v13, not v14. Renderable scope only: Stage-specific identity limits (Stage 4.83.0 renders a keyed optional snapshot lookup and observable collection queries; any other query is `STAGE-ESM-010`) | queries, projections | C (executable); C (render admission, renderable only) |
|
|
184
184
|
| H3 | One builder per read model; projection `key` only on `from` | projections | C |
|
|
185
185
|
| H4 | Screens show one actor's point of view; a form submits one command | screens, forms | D |
|
|
186
186
|
|
|
@@ -35,7 +35,7 @@ Independence: independent (fresh context, different model family from every auth
|
|
|
35
35
|
V1 authorable: <pass (tool, version, N files) | fail: PLAYnnnn at file:line>
|
|
36
36
|
V2 executable diagnostics: <clean | n diagnostics: codes | not run: reason>
|
|
37
37
|
V3 binding-ready: <ready | blocked: codes | not run: reason>
|
|
38
|
-
V4 reference specs run: <route, expected vs discovered, passed/failed/unsupported
|
|
38
|
+
V4 reference specs run: <route, expected vs discovered, passed/failed/unsupported; overall unbound | not run: no route>
|
|
39
39
|
V5 rendered, target-verified: admission <...>; publication <...>; build <...>; tests <...> (each "not run: reason" when absent)
|
|
40
40
|
Gaps: <capability gaps and tool-version gaps, e.g. a false PLAY0285 on cascades from a cratis before 3.28.2 bundle>
|
|
41
41
|
|
|
@@ -43,7 +43,7 @@ an unproven pass.
|
|
|
43
43
|
| An accepted model covers the scope | **Model** | Change the `.play`, verify V1-V3, review, then render or gap-fill |
|
|
44
44
|
| Opted in, but this scope has no model yet | **Model** | New behavior starts in discovery, then slice design |
|
|
45
45
|
| A computed rule inside a modeled slice | **Model + code attachment** | `csharp`/`file` block; it binds only as the construct allows (`cratis-screenplay-model-authoring`) |
|
|
46
|
-
| Scope Stage cannot render yet
|
|
46
|
+
| Scope Stage cannot render yet (Stage 4.83.0 renders supported event-triggered Automation; Translate/captures and refused reactions remain gap-fill. Mixed effects stay one reaction, `STAGE-ESM-037`; a hand-written realization must prove retry safety) | **Gap-fill code** | Hand-written; the `.play` slice and specs are the contract. `cratis-screenplay-render-and-gap-fill` separates an authorized existing generated base from fully hand-written delivery |
|
|
47
47
|
| Outside call, transport or credentials | **Adapter code** | `Customizations/` or the host, applying `cratis-engineering-effect-boundaries` |
|
|
48
48
|
| Infrastructure, clients, framework-profile repositories, brownfield not opted in | **Code** | Arc, Chronicle, spec and React skills; trivial changes keep the proportional-delegation policy |
|
|
49
49
|
|
|
@@ -221,7 +221,7 @@ the packet opens with `Outcome:`; STATE.md is current.
|
|
|
221
221
|
## Verified product sources
|
|
222
222
|
Model notes: Screenplay `v4.144.0:Documentation/screenplay/model-notes.md:12-77`,
|
|
223
223
|
`decisions/0045-model-notes-sidecar.md:40-79`; exact tool sources in model-authoring
|
|
224
|
-
`references/model-notes.md`. Full pin table: `cratis-screenplay-toolchain/references/versions.md`. Read `cratis-screenplay-toolchain/references/versions.md` when selecting or reverifying tool versions. Current pins (Stage 4.
|
|
224
|
+
`references/model-notes.md`. Full pin table: `cratis-screenplay-toolchain/references/versions.md`. Read `cratis-screenplay-toolchain/references/versions.md` when selecting or reverifying tool versions. Current pins (Stage 4.83.0, cratis CLI 3.56.0 and the rest) are in that file. Older source reads used here: Screenplay
|
|
225
225
|
`v4.66.0` (`c89198b`): `Source/DotNET/Tool/Program.cs` (`--warnaserror`, folder mode),
|
|
226
226
|
`Source/DotNET/Screenplay/Semantics/SemanticModelBinder.cs:209-216` (personas are report-only),
|
|
227
227
|
`Documentation/screenplay/{constraints,specifications}.md`, `mcp/reference.md` (`modelRevision`);
|
|
@@ -127,7 +127,7 @@ phase, a decision important enough that a later reader could misread the model (
|
|
|
127
127
|
- **Input**: the accepted identity.
|
|
128
128
|
- **Carry-forward**: the admission result; render output and named gaps in `Customizations/`;
|
|
129
129
|
non-renderable scope handed to a code agent with the model as contract, plus a fallback record
|
|
130
|
-
naming the blocking codes.
|
|
130
|
+
naming the blocking codes. Stage 4.83.0 renders supported event-triggered Automation; Translate/captures and refused reactions remain gap-fill (mixed effects keep one modeled reaction; `STAGE-ESM-037` is a redelivery-safety refusal, not a reason to split it). Three cases stay distinct: admission failure (nothing rendered); an
|
|
131
131
|
existing generated base plus separately authorized gap-fill; fully hand-written delivery.
|
|
132
132
|
- **Gate**: V5 sub-results, or a fallback entry per non-renderable scope. A customization never
|
|
133
133
|
makes a rejected model renderable; no whole-application V5 from a subset.
|
package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/verdicts-and-modes.md
CHANGED
|
@@ -21,13 +21,14 @@ defines what each result means and how to report it. Do not copy version facts h
|
|
|
21
21
|
| V1 authorable | folder-mode validate with warnings as errors. The standalone compiler includes imports in folder and file mode; `cratis` CLI 3.28.2 file validation ignored imports (cli#244, probed); since 3.28.4 (PR #258) it compiles the file with its imports, but folder mode stays the recommended cross-tool check | semantics, binding, specs |
|
|
22
22
|
| V2 executable diagnostics | the executable model reports no diagnostics for the scope | that any spec runs or passes |
|
|
23
23
|
| V3 binding-ready | the model binds to the executable semantic model | that any spec runs or passes |
|
|
24
|
-
| V4 reference specs run | the reference execution route only: engine, and per `.play` specification passed / failed / unsupported
|
|
24
|
+
| V4 reference specs run | the reference execution route only: engine, and per `.play` specification passed / failed / unsupported (overall model may be unbound) | rendering, generated code, build or target tests |
|
|
25
25
|
| V5 delivery and target-verified | admission, publication, Debug build, Debug tests of generated specifications, each reported separately | customization conformance, faithful UI |
|
|
26
26
|
|
|
27
27
|
Results are independent: V3 can be ready while V1 has warnings; V5 build can pass with V4 not
|
|
28
28
|
run. Never infer one from another. Spec outcomes for V4 come only from a reference execution
|
|
29
29
|
route. Written or bound specifications are never "specs pass", and rendered Debug tests are
|
|
30
|
-
V5 evidence, not V4.
|
|
30
|
+
V5 evidence, not V4. A read-only `run-specifications` proposal run (Screenplay
|
|
31
|
+
4.145.0+) is V4 evidence for that retained candidate only, not the disk model.
|
|
31
32
|
|
|
32
33
|
V4 rules:
|
|
33
34
|
- Report per `.play` specification (expected = specifications in the accepted scope; discovered =
|
package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/vocabulary-map.md
CHANGED
|
@@ -42,9 +42,11 @@ Screenplay meaning, and when you meet the older usage, translate it and say so.
|
|
|
42
42
|
- Screenplay **`reaction`**: the construct that models it (`when` trigger, optional `where`,
|
|
43
43
|
`invokes` a command or `produces` events).
|
|
44
44
|
- Chronicle **reactor**: C# observer, usually for side effects; it does not by itself define
|
|
45
|
-
business decisions.
|
|
46
|
-
Translate
|
|
47
|
-
|
|
45
|
+
business decisions. Stage 4.83.0 renders supported event-triggered Automation as Chronicle reactors.
|
|
46
|
+
Translate/captures and refused reactions remain gap-fill. Mixed events and commands
|
|
47
|
+
in one handler remain `STAGE-ESM-037`: Arc supports the return shape, but redelivery
|
|
48
|
+
after a failed command duplicates events. Keep the reaction whole and prove retry safety.
|
|
49
|
+
Source boundary: Stage skill `references/admission.md`.
|
|
48
50
|
|
|
49
51
|
## Scenario vs specification
|
|
50
52
|
"Scenario" is the Event Modeling example and the scenario *types* `cratis-screenplay-scenario-coverage` uses for
|
package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/worked-example.md
CHANGED
|
@@ -34,12 +34,8 @@ module Berths
|
|
|
34
34
|
command AllocateBerth
|
|
35
35
|
berthId BerthId identifier
|
|
36
36
|
boat BoatName
|
|
37
|
-
produces BerthAllocated
|
|
38
|
-
|
|
39
|
-
boat = boat
|
|
40
|
-
|
|
41
|
-
event BerthAllocated
|
|
42
|
-
boat BoatName
|
|
37
|
+
produces event BerthAllocated
|
|
38
|
+
boat BoatName = boat
|
|
43
39
|
|
|
44
40
|
constraint OneBerthPerBoat
|
|
45
41
|
unique boat on BerthAllocated
|
|
@@ -6,6 +6,8 @@ license: MIT
|
|
|
6
6
|
|
|
7
7
|
# Projections — the Screenplay PDL
|
|
8
8
|
|
|
9
|
+
Read [preferred syntax](../cratis-screenplay-toolchain/references/preferred-syntax.md) when writing or reviewing `.play`.
|
|
10
|
+
|
|
9
11
|
A `projection` folds events into a read model. Its body is the **Projection
|
|
10
12
|
Declaration Language**, an embedded sub-grammar with its own parser — not free
|
|
11
13
|
text. This is half of every event model, and the half most easily got wrong.
|