@cratis/pi 7.51.0 → 7.51.2
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/harnesses/copilot/instructions/application-profile.instructions.md +15 -1
- package/package/corpus/harnesses/copilot/instructions/authoring-skills.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/cratis-folder-is-configuration.instructions.md +3 -1
- package/package/corpus/harnesses/copilot/instructions/exit-codes-and-wrappers.instructions.md +7 -1
- package/package/corpus/harnesses/copilot/instructions/guards-and-fuses.instructions.md +7 -1
- package/package/corpus/harnesses/pi/extensions/shared/rules.ts +9 -1
- package/package/corpus/rules/application-profile.md +15 -1
- package/package/corpus/rules/authoring-skills.md +1 -1
- package/package/corpus/rules/cratis-folder-is-configuration.md +3 -1
- package/package/corpus/rules/exit-codes-and-wrappers.md +7 -1
- package/package/corpus/rules/general.md +8 -6
- package/package/corpus/rules/guards-and-fuses.md +7 -1
- package/package/corpus/skills/cratis-application-slice-conformance/SKILL.md +8 -7
- package/package/corpus/skills/cratis-application-slice-conformance/references/checklists.md +1 -1
- package/package/corpus/skills/cratis-application-slice-conformance/references/provenance.md +2 -2
- package/package/corpus/skills/cratis-application-slice-specifications/SKILL.md +15 -19
- package/package/corpus/skills/cratis-application-slice-specifications/references/provenance.md +1 -1
- package/package/corpus/skills/cratis-application-slice-specifications/references/query-and-decision-scenarios.md +8 -6
- package/package/corpus/skills/cratis-arc-react-page/SKILL.md +10 -14
- package/package/corpus/skills/cratis-arc-react-page/references/dialogs.md +4 -2
- package/package/corpus/skills/cratis-arc-react-page/references/from-screenplay.md +7 -7
- package/package/corpus/skills/cratis-arc-react-page/references/provenance.md +2 -2
- package/package/corpus/skills/cratis-arc-react-page/references/queries-and-commands.md +1 -1
- package/package/corpus/skills/cratis-arc-react-page/verification.json +0 -2
- package/package/corpus/skills/cratis-chronicle-reactor/SKILL.md +15 -19
- package/package/corpus/skills/cratis-chronicle-reactor/references/provenance.md +1 -1
- package/package/corpus/skills/cratis-chronicle-reactor/references/specifications.md +10 -8
- package/package/corpus/skills/cratis-chronicle-read-model-specifications/SKILL.md +7 -7
- package/package/corpus/skills/cratis-chronicle-read-model-specifications/references/provenance.md +3 -3
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +30 -28
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/automation-patterns.md +8 -8
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/cases-to-specify.md +4 -4
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/effects-and-idempotency.md +3 -1
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/provenance.md +1 -14
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/public-events-and-direction.md +6 -4
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/realization-and-gap-fill.md +5 -6
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/todo-list-example.md +11 -12
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translate-example.md +3 -3
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translation-patterns.md +2 -2
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +22 -20
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/complete-examples.md +1 -1
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/invocation-identity.md +9 -10
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/refusals-and-redelivery.md +1 -1
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/specifying-triggers-and-clock.md +3 -4
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/verification.json +0 -4
- package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +16 -15
- package/package/corpus/skills/cratis-screenplay-command-surface/references/compliance.md +17 -17
- package/package/corpus/skills/cratis-screenplay-command-surface/references/context.md +8 -8
- package/package/corpus/skills/cratis-screenplay-command-surface/references/enum-numbers.md +8 -12
- package/package/corpus/skills/cratis-screenplay-command-surface/references/generated-values-and-responses.md +31 -29
- package/package/corpus/skills/cratis-screenplay-command-surface/references/inline-events.md +5 -5
- package/package/corpus/skills/cratis-screenplay-command-surface/references/operations.md +2 -2
- package/package/corpus/skills/cratis-screenplay-command-surface/references/policy-persona-seed.md +3 -3
- package/package/corpus/skills/cratis-screenplay-command-surface/references/shop-generation.md +10 -10
- package/package/corpus/skills/cratis-screenplay-command-surface/references/validate-rules.md +9 -7
- package/package/corpus/skills/cratis-screenplay-command-surface/verification.json +2 -5
- package/package/corpus/skills/cratis-screenplay-discovery/SKILL.md +14 -15
- package/package/corpus/skills/cratis-screenplay-discovery/references/facilitation.md +1 -1
- package/package/corpus/skills/cratis-screenplay-discovery/references/personas-and-causes.md +1 -1
- package/package/corpus/skills/cratis-screenplay-discovery/references/plotting-and-handoff.md +2 -2
- package/package/corpus/skills/cratis-screenplay-discovery/references/provenance.md +3 -3
- package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +13 -17
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/naming-primitives.md +2 -2
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/nine-steps.md +2 -2
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +11 -12
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/provenance.md +2 -2
- package/package/corpus/skills/cratis-screenplay-event-modeling/verification.json +0 -4
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +1 -1
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/evidence-table-template.md +4 -4
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generate-notes.md +34 -21
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generated-recovery.md +18 -12
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/prologue-safety.md +7 -7
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/provenance.md +1 -1
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/rule-modeling.md +4 -4
- package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +24 -29
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/choosing-generation.md +1 -2
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +44 -51
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +31 -36
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +56 -63
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/model-notes.md +11 -10
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/property-links.md +15 -15
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/release-baseline.md +25 -21
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/screen-authoring-workflow.md +16 -31
- package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +5 -4
- package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +1 -1
- package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +3 -3
- package/package/corpus/skills/cratis-screenplay-model-review/references/provenance.md +3 -4
- package/package/corpus/skills/cratis-screenplay-model-review/references/public-keys-and-routes.md +1 -1
- package/package/corpus/skills/cratis-screenplay-model-review/references/report-template.md +7 -5
- package/package/corpus/skills/cratis-screenplay-model-review/references/worked-example.md +2 -2
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/SKILL.md +11 -12
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/code-reading-and-tokens.md +2 -2
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/identity-and-edits.md +1 -1
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/opt-in.md +8 -10
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/provenance.md +6 -6
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/stop-or-assume.md +2 -2
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/verdicts-and-modes.md +1 -1
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/vocabulary-map.md +3 -3
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/worked-example.md +1 -1
- package/package/corpus/skills/cratis-screenplay-projections/SKILL.md +11 -22
- package/package/corpus/skills/cratis-screenplay-projections/references/pdl-grammar.md +1 -1
- package/package/corpus/skills/cratis-screenplay-projections/verification.json +0 -1
- package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +16 -29
- package/package/corpus/skills/cratis-screenplay-read-surface/references/equality-filters.md +14 -18
- package/package/corpus/skills/cratis-screenplay-read-surface/references/guarded-actions.md +5 -7
- package/package/corpus/skills/cratis-screenplay-read-surface/references/named-keys.md +6 -6
- package/package/corpus/skills/cratis-screenplay-read-surface/references/provenance.md +1 -1
- package/package/corpus/skills/cratis-screenplay-read-surface/verification.json +1 -2
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +18 -19
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/delivery-protocol.md +2 -2
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +6 -6
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/provenance.md +4 -4
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +5 -6
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/worked-example.md +2 -3
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/verification.json +1 -1
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +13 -15
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-design.md +1 -1
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-example.md +2 -2
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/provenance.md +4 -6
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-catalogue.md +4 -4
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-examples.md +3 -3
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +11 -9
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/view-and-story-specs.md +5 -5
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/verification.json +0 -1
- package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +11 -13
- package/package/corpus/skills/cratis-screenplay-slice-design/references/read-model-design.md +4 -4
- package/package/corpus/skills/cratis-screenplay-slice-design/references/rule-layers.md +6 -4
- package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +4 -2
- package/package/corpus/skills/cratis-screenplay-slice-design/references/worked-example.md +1 -1
- package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +37 -40
- package/package/corpus/skills/cratis-screenplay-specifications/references/actions-beyond-commands.md +10 -15
- package/package/corpus/skills/cratis-screenplay-specifications/references/child-ordering.md +14 -12
- package/package/corpus/skills/cratis-screenplay-specifications/references/concept-rules.md +1 -1
- package/package/corpus/skills/cratis-screenplay-specifications/references/examples-and-routes.md +9 -10
- package/package/corpus/skills/cratis-screenplay-specifications/references/generated-fixtures.md +5 -6
- package/package/corpus/skills/cratis-screenplay-specifications/references/reactions-and-cascades.md +8 -9
- package/package/corpus/skills/cratis-screenplay-specifications/references/source-notes.md +13 -16
- package/package/corpus/skills/cratis-screenplay-specifications/references/whitespace-rules.md +15 -13
- package/package/corpus/skills/cratis-screenplay-specifications/verification.json +4 -9
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +29 -29
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/chronicle-boundaries.md +18 -15
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +16 -15
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution-example.md +1 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution.md +19 -17
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/provenance.md +3 -3
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-patterns.md +1 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +2 -2
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/verification.json +2 -3
- package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +2 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/pdl-example.md +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract-exceptions.json +0 -28
- package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +21 -26
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/guarded-interactions.md +3 -3
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/provenance.md +1 -1
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/response-continuations.md +10 -10
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/screen-composition-contract.md +23 -30
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/worked-flow.md +4 -5
- package/package/corpus/skills/cratis-screenplay-ui-composition/verification.json +1 -5
- package/package.json +1 -1
- package/src/index.ts +9 -1
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/product-sources.md +0 -15
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/provenance.md +0 -13
package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/view-and-story-specs.md
CHANGED
|
@@ -59,7 +59,7 @@ candidate for a family. Walk one row through three states (`OpenInvoices`: empty
|
|
|
59
59
|
`InvoiceIssued`, empty again after `PaymentReceived`) as three independent specs, each with its
|
|
60
60
|
own full givens. The excerpt is copied from `invoicing-dues-example.md`; the last spec asserts
|
|
61
61
|
both that the stored row is gone and that the keyed query returns nothing. The whole-list query
|
|
62
|
-
(no key) is executable too (Screenplay 4.105.0 or later): `invoicing-dues-example.md` adds
|
|
62
|
+
(no key) is executable too (Requires Screenplay 4.105.0 or later): `invoicing-dues-example.md` adds
|
|
63
63
|
`ListOpenInvoices => OpenInvoice[]` with one spec that expects one `result` row and one that
|
|
64
64
|
expects the empty list after `PaymentReceived`. Only `filter`, `scoped to` and `performer` queries stay design-mode.
|
|
65
65
|
The source document also asserts the other terminal outcomes (`InvoiceVoided`, `InvoiceSettled`) the same way; they are not copied here.
|
|
@@ -123,7 +123,7 @@ List-query results use repeated `result` blocks; count is exact and rows match
|
|
|
123
123
|
by read model and instance key regardless of order. A keyed lookup does
|
|
124
124
|
not prove an entire list is empty: assert the unkeyed list query itself (an unkeyed query takes no
|
|
125
125
|
`arguments`; each `result` row states the read-model identifier, else PLAY0351). A snapshot list does not render
|
|
126
|
-
|
|
126
|
+
; an `observable` list does. Record that rendering limit.
|
|
127
127
|
|
|
128
128
|
## Ordering, lag and rebuild
|
|
129
129
|
- **Out of order across sources**: if a joined or cross-context fact can arrive first, add a
|
|
@@ -137,13 +137,13 @@ not prove an entire list is empty: assert the unkeyed list query itself (an unke
|
|
|
137
137
|
Complete passing example and creation-event routing caveat:
|
|
138
138
|
[child ordering](../../cratis-screenplay-specifications/references/child-ordering.md).
|
|
139
139
|
Sources: Cratis/Screenplay `v4.149.1`,
|
|
140
|
-
`Documentation/screenplay/projections/semantic-model.md
|
|
141
|
-
`Source/DotNET/Screenplay/Semantics/Execution/SemanticScopedProjection.Deferred.cs
|
|
140
|
+
`Documentation/screenplay/projections/semantic-model.md` and
|
|
141
|
+
`Source/DotNET/Screenplay/Semantics/Execution/SemanticScopedProjection.Deferred.cs`.
|
|
142
142
|
- **Projection lag**: a spec asserts the settled state. If a screen decision depends on the view
|
|
143
143
|
being current (a booking screen that must not offer a taken berth), that is not protection:
|
|
144
144
|
the command needs its own constraint, or the rule is `recorded` as target-enforced.
|
|
145
145
|
- **Rebuild**: a view rebuilt from all facts must give the same rows. Mappings from
|
|
146
|
-
`$eventContext.occurred` or other occurrence data cannot be executed
|
|
146
|
+
`$eventContext.occurred` or other occurrence data cannot be executed:
|
|
147
147
|
the plan blocks every event-context path except the event source id
|
|
148
148
|
(`UnsupportedEventContext`). `given clock` does not change that; it supplies `$context.occurred`
|
|
149
149
|
to command productions only. Record such projection cases as capability gaps (keep the
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
{ "kind": "skill-contains", "value": "Once, idempotent, exactly once are different claims" },
|
|
11
11
|
{ "kind": "skill-contains", "value": "Unauthorized is never `then error`" },
|
|
12
12
|
{ "kind": "skill-contains", "value": "find-specification-obligations" },
|
|
13
|
-
{ "kind": "skill-contains", "value": "v4.68.0" },
|
|
14
13
|
{ "kind": "skill-contains", "value": "false PLAY0285" },
|
|
15
14
|
{ "kind": "skill-contains", "value": "One behaviour per spec" },
|
|
16
15
|
{ "kind": "skill-contains", "value": "No command has only two specs" },
|
|
@@ -81,8 +81,8 @@ report and slice `documentation`, and continue.
|
|
|
81
81
|
standing in for a rule. Place each rule in its layer (`references/rule-layers.md`). A rule
|
|
82
82
|
over stored state is written as `reads <View>` + `require ... message "..."` and marked
|
|
83
83
|
**NOT enforced in the model today** in the slice `description`, with its target named (Arc
|
|
84
|
-
`[ProtectedDecision]` + `DecisionRead<T>`
|
|
85
|
-
code with the Arc and Chronicle the Stage
|
|
84
|
+
`[ProtectedDecision]` + `DecisionRead<T>` (Requires Arc 22.39.0 or later; available to gap-fill
|
|
85
|
+
code with the Arc and Chronicle the Stage scaffold pins); Chronicle DCB; or a constraint). Never copy state
|
|
86
86
|
into the command as input or hide a rule in `handler` / hint prose; descriptions reach code
|
|
87
87
|
only as XML comments. Fill the **refusal inventory**: success, each distinct refusal with
|
|
88
88
|
layer and message, and the denied persona.
|
|
@@ -94,7 +94,7 @@ report and slice `documentation`, and continue.
|
|
|
94
94
|
`$context.occurred` or caller identity. No event-source id in the payload (it is the `for`);
|
|
95
95
|
references to other instances are payload. No nullable property by default (a required value
|
|
96
96
|
or a separate event). No PII on the identifier; one data subject per stream. Add a field only
|
|
97
|
-
when something downstream needs it.
|
|
97
|
+
when something downstream needs it. Personal values use bare `pii`,
|
|
98
98
|
operational secrets `secret`; declare processing use/basis/retention in `purpose`,
|
|
99
99
|
not a reason. An event-property `subject` may identify a different person from
|
|
100
100
|
the stream but is report-only, not runtime propagation. See command-surface
|
|
@@ -120,8 +120,8 @@ report and slice `documentation`, and continue.
|
|
|
120
120
|
need explicit `key`; read-surface `references/named-keys.md` gives the exact fallback.
|
|
121
121
|
The identifier equals the projection's effective key (decision table in
|
|
122
122
|
`references/read-model-design.md`; Stage rule in `references/admission.md` of
|
|
123
|
-
`cratis-stage-rendering-and-sandbox`). Collections and observable delivery bind
|
|
124
|
-
|
|
123
|
+
`cratis-stage-rendering-and-sandbox`). Collections and observable delivery bind;
|
|
124
|
+
check renderer admission separately.
|
|
125
125
|
Whose rows is part of the view; a caller-supplied filter is not access control.
|
|
126
126
|
7. **Screens, Level 1.** `data <RM> via query <Q>` plus `action <Command>` per thing the user
|
|
127
127
|
can do there. Build each slice as read model, screen, command, event. A screen acting on an
|
|
@@ -160,7 +160,7 @@ report and slice `documentation`, and continue.
|
|
|
160
160
|
- At most one builder (projection or reducer) per read model (`PLAY0191`).
|
|
161
161
|
- A query's `by` goes on its own body line. Optional keyed and collection queries
|
|
162
162
|
bind, including observable delivery. Caller-supplied equality filters on collections
|
|
163
|
-
bind as ESM v14
|
|
163
|
+
bind as ESM v14; `by` ANDs with supplied filters. `from`, single-result
|
|
164
164
|
filters, scope, performer and composite `by` remain PLAY0268 for their respective
|
|
165
165
|
context/cardinality/opaque/multipart gaps. Read read-surface
|
|
166
166
|
[equality filters](../cratis-screenplay-read-surface/references/equality-filters.md).
|
|
@@ -203,7 +203,7 @@ Mark view identity with trailing `key`. Use a composite key for independent view
|
|
|
203
203
|
coordinates (resource + period), a natural single id for one entity's state.
|
|
204
204
|
Supply every named part in single-instance queries and command/trigger reads;
|
|
205
205
|
see read-surface `references/named-keys.md`. Composite view keys remain
|
|
206
|
-
unadmitted
|
|
206
|
+
unadmitted (PLAY0268), unlike admitted composite stream routes.
|
|
207
207
|
Keep the true identity and report the gap rather than inventing a concatenated id.
|
|
208
208
|
|
|
209
209
|
## Identity-affecting edits on an existing model
|
|
@@ -239,14 +239,12 @@ Slice design is done when these hold; otherwise report what is open.
|
|
|
239
239
|
per rule-carrying value; slice dependencies recorded.
|
|
240
240
|
- [ ] V1 passed, and V3 (executable/renderable scope) with expected codes only, tool and version named.
|
|
241
241
|
|
|
242
|
-
##
|
|
242
|
+
## Product sources
|
|
243
243
|
|
|
244
|
-
|
|
245
|
-
| --- | --- | --- |
|
|
246
|
-
| Screenplay | `v4.66.0` (`c89198b`) | `commands.md`, `constraints.md`, `specifications.md`, `diagnostics.md` (`PLAY0191`, `PLAY0268`, `PLAY0271`, `PLAY0350`, `PLAY0381`, `PLAY0397`), `projections/keys.md` |
|
|
244
|
+
Screenplay `commands.md`, `constraints.md`, `specifications.md`, `diagnostics.md` (`PLAY0191`, `PLAY0268`, `PLAY0271`, `PLAY0350`, `PLAY0381`, `PLAY0397`) and `projections/keys.md`.
|
|
247
245
|
|
|
248
|
-
Examples compile with `screenplay
|
|
249
|
-
--warnings-as-errors
|
|
246
|
+
Examples compile with `screenplay --warnaserror` and `cratis screenplay validate
|
|
247
|
+
--warnings-as-errors`; other tool versions: `cratis-screenplay-toolchain`
|
|
250
248
|
`SKILL.md`. Compiling proves syntax, not that the model is executable or renders.
|
|
251
249
|
|
|
252
250
|
## Verify
|
package/package/corpus/skills/cratis-screenplay-slice-design/references/read-model-design.md
CHANGED
|
@@ -144,21 +144,21 @@ Stage admits only pure reducer bodies for the same reason (`cratis-screenplay-pr
|
|
|
144
144
|
|
|
145
145
|
| The person... | Design-mode query | Executable/renderable scope |
|
|
146
146
|
|---|---|---|
|
|
147
|
-
| opens one thing | `XById => RM optional` + `by xId XId` | binds
|
|
148
|
-
| scans a list | `ListX => RM[]` (optionally `observable`, `filter`) | collection/observable delivery bind; caller-supplied equality filters bind
|
|
147
|
+
| opens one thing | `XById => RM optional` + `by xId XId` | binds with caller-supplied `by`; check target renderer |
|
|
148
|
+
| scans a list | `ListX => RM[]` (optionally `observable`, `filter`) | collection/observable delivery bind; caller-supplied equality filters bind as ESM v14; check target renderer |
|
|
149
149
|
| sees their own rows | list with scope/`from` on the caller | scope and context-derived `by`/`filter` remain PLAY0268 because portable scope/query context is unadmitted; caller-supplied filters are not access control |
|
|
150
150
|
| sees a site-wide figure | singleton read model, `from <Event> key literal "global"` on every `from` (a projection-level `key` routes nothing, PLAY0381; example in Screenplay `projections/keys.md`, "Literal keys") | check the binding (V3, `cratis-screenplay-toolchain`) |
|
|
151
151
|
|
|
152
152
|
- `observable` when people are expected to see others' or automation's changes while looking
|
|
153
153
|
(worklists, status awaiting an outside answer); one-shot otherwise. Observable delivery
|
|
154
|
-
binds
|
|
154
|
+
binds; renderer support is separate. If access can be revoked mid-session,
|
|
155
155
|
record that the target re-checks per emission.
|
|
156
156
|
- Never model paging or page size (no syntax, Screenplay#140). State the order in the query
|
|
157
157
|
`description` ("oldest first"; queries do not accept `documentation`); an unbounded list is a review question.
|
|
158
158
|
- A gated keyed query needs its own denial spec.
|
|
159
159
|
|
|
160
160
|
Never drop a business-required list query to satisfy an old compiler or renderer;
|
|
161
|
-
record any actual capability gap.
|
|
161
|
+
record any actual capability gap. Explicit trailing `key` takes precedence
|
|
162
162
|
for read-model identity. Otherwise single-instance queries in the owning slice must
|
|
163
163
|
agree on one `by` property declared on the read model. Only with no single-instance
|
|
164
164
|
identifier and an admitted collection/list query does conventional `*Id` inference
|
|
@@ -11,11 +11,11 @@ code only as XML doc comments (Stage#178): a rule that exists only in prose is u
|
|
|
11
11
|
| who may ask | `authorize` with a policy (role, claim, authenticated) | enclosing gates combine with AND and run first. Gates every command and query in a feature shares go on the feature or module so a new path inherits them |
|
|
12
12
|
| whose instance | policy `claim "x" matches subject` (the command identifier) or `matches <command property>` | executable; renders for text, Uuid, Date and DateTime subjects; an authorized command needs exactly one identifier (STAGE-ESM-015 otherwise) |
|
|
13
13
|
| uniqueness, once-only facts | `constraint` (`unique ... on`, `unique event`) | append-time; the constraint name is its identity |
|
|
14
|
-
| stored state (record exists, balance, current status) | `reads <View>` + `require <expr> message "..."` | stated intent, **NOT enforced in the model today** (PLAY0268/0271 at binding are expected in design mode
|
|
14
|
+
| stored state (record exists, balance, current status) | `reads <View>` + `require <expr> message "..."` | stated intent, **NOT enforced in the model today** (PLAY0268/0271 at binding are expected in design mode). Name the target: Arc `[ProtectedDecision]` + `DecisionRead<T>` (Requires Arc 22.39.0 or later), Chronicle DCB (`concurrency` scope), or a constraint |
|
|
15
15
|
|
|
16
16
|
An unguarded materialized read is unsafe for a protected decision; a guarded read is the
|
|
17
17
|
supported route. Availability: `[ProtectedDecision]` and `DecisionRead<T>` exist in
|
|
18
|
-
the Arc/Chronicle package set Stage
|
|
18
|
+
the Arc/Chronicle package set Stage scaffolds (see the Stage skill's `references/rendered-application.md`), but Stage does not emit
|
|
19
19
|
protected decisions. Gap-fill must use an admitted projection/key shape and active
|
|
20
20
|
unit-of-work enrollment; do not edit managed dependencies. Keep the `.play` rule
|
|
21
21
|
NOT enforced until its target enforcement is separately verified. Forbidden: caller-supplied copies of state in `require`, boolean attestation
|
|
@@ -32,8 +32,10 @@ second caller with another claim value.
|
|
|
32
32
|
## Secrets and personal data
|
|
33
33
|
|
|
34
34
|
Command property values are, by default, recorded in the causation chain of the events they
|
|
35
|
-
produce, so treat them as permanent.
|
|
36
|
-
(`CausationPropertyRetention.Omit
|
|
35
|
+
produce, so treat them as permanent. Chronicle can omit causation properties
|
|
36
|
+
(`CausationPropertyRetention.Omit`); Stage-rendered apps pin the Chronicle release listed in the Stage skill's `references/rendered-application.md` (not necessarily the latest).
|
|
37
|
+
|
|
38
|
+
Requires Chronicle 19.20.0 or later for `CausationPropertyRetention.Omit`.
|
|
37
39
|
Verify the actual auditing and retention configuration before relying on omission, and never
|
|
38
40
|
audit secrets. Classify personal values as bare `pii` and operational secrets as
|
|
39
41
|
`secret` on their concepts, never the identifier concept. Use a surrogate identity
|
|
@@ -129,13 +129,15 @@ For `worked-example.md`:
|
|
|
129
129
|
|
|
130
130
|
### Declare container dependencies
|
|
131
131
|
|
|
132
|
-
|
|
132
|
+
Modules and features may declare `depends on <Name>`, one
|
|
133
133
|
target per line. Use a bare sibling name or a qualified module/feature address.
|
|
134
134
|
Bare names resolve inside out: siblings, ancestor siblings, then root modules;
|
|
135
135
|
qualified names match an unambiguous trailing address. Ambiguity is `PLAY0198`.
|
|
136
136
|
Self, ancestor, descendant and unresolved targets warn with `PLAY0554`; repeats
|
|
137
137
|
keep the first resolved target and warn with `PLAY0555`.
|
|
138
138
|
|
|
139
|
+
Requires Screenplay 4.76.0 or later (`screenplay --version`) for `depends on` container dependencies (PLAY0554).
|
|
140
|
+
|
|
139
141
|
Declarations accumulate on the same owner in ordinal file-path order, independent
|
|
140
142
|
of board import order. Layout expansion writes them only in the owner's file.
|
|
141
143
|
They are authoring metadata: no execution rule, implementation order, identity
|
|
@@ -165,7 +167,7 @@ module Timesheets
|
|
|
165
167
|
feature Approval
|
|
166
168
|
```
|
|
167
169
|
|
|
168
|
-
Source: Screenplay `
|
|
170
|
+
Source: Screenplay `Documentation/screenplay/slices.md` and `folders.md`.
|
|
169
171
|
|
|
170
172
|
## State-transition table (per entity)
|
|
171
173
|
|
|
@@ -14,7 +14,7 @@ Lineage matrix: `field-lineage.md`. State-transition table and rule coverage: `s
|
|
|
14
14
|
Per-command refusal inventory: `command-inventory.md`.
|
|
15
15
|
|
|
16
16
|
This historical compiled example keeps per-event reasoning in StateView
|
|
17
|
-
`description` strings. For authoring checked
|
|
17
|
+
`description` strings. For authoring checked, keep descriptions as summaries
|
|
18
18
|
and record lineage reasoning in fenced Markdown `documentation` (`field-lineage.md`).
|
|
19
19
|
The historical source below stays unchanged; it is not the current placement recipe.
|
|
20
20
|
|
|
@@ -20,25 +20,19 @@ root. Never put a model under `.cratis/` or hand-copy it between repositories.
|
|
|
20
20
|
`cratis ai install` manages `.cratis/ai/`, never model files. Keep explanatory
|
|
21
21
|
Markdown in project documentation; `.play` is the single flow model.
|
|
22
22
|
|
|
23
|
-
##
|
|
23
|
+
## Product sources
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
Specification syntax was checked against Screenplay v4.127.0 `specifications.md`;
|
|
30
|
-
older probes in the table remain historical. Tool versions: `cratis-screenplay-toolchain`
|
|
31
|
-
`SKILL.md`. Compile commands check source, not reference execution.
|
|
32
|
-
Use `screenplay test` or MCP `run-specifications` for V4; Stage/target tests are
|
|
33
|
-
separate evidence. On Screenplay **4.145.0 and later**, propose → review →
|
|
34
|
-
`run-specifications` with `proposalId` → apply.
|
|
25
|
+
Specification syntax follows Screenplay `Documentation/screenplay/specifications.md`.
|
|
26
|
+
Tool versions: `cratis-screenplay-toolchain` `SKILL.md`. Compile commands check source, not
|
|
27
|
+
reference execution. Use `screenplay test` or MCP `run-specifications` for V4; Stage/target
|
|
28
|
+
tests are separate evidence. Propose → review → `run-specifications` with `proposalId` → apply.
|
|
35
29
|
PLAY0285 (an impossible `then`) unbinds the whole model and blocks every spec.
|
|
36
30
|
Unsupported/unbound is never a pass. Typed examples and
|
|
37
31
|
route assertions are in [examples and routes](references/examples-and-routes.md).
|
|
38
32
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
Requires Screenplay 4.145.0 or later (`screenplay --version`) for `run-specifications` with `proposalId`.
|
|
34
|
+
|
|
35
|
+
Read [source notes](references/source-notes.md) for the retained inline-fact and action-syntax evidence; run the changed examples at the standalone pin.
|
|
42
36
|
|
|
43
37
|
## Reference execution — what actually runs
|
|
44
38
|
|
|
@@ -66,12 +60,13 @@ target has one normalized behavior to match.
|
|
|
66
60
|
rather than running partially: no specification in the model runs, including
|
|
67
61
|
the ones that never touch the refused construct.
|
|
68
62
|
- Reactions: before ESM v6 they never run, not even after `when append`. From ESM
|
|
69
|
-
v6
|
|
70
|
-
cascades" ([references/reactions-and-cascades.md](references/reactions-and-cascades.md)).
|
|
71
|
-
and `when capture`
|
|
72
|
-
|
|
73
|
-
-
|
|
74
|
-
|
|
63
|
+
v6 they run after every action, as in "Reactions and
|
|
64
|
+
cascades" ([references/reactions-and-cascades.md](references/reactions-and-cascades.md)). A compiler that stops before ESM v6 fails `when clock`, `when trigger`
|
|
65
|
+
and `when capture` binding with `PLAY0268`, and so reactions and captures.
|
|
66
|
+
- Children defer until their parent exists; an ambiguous parent still fails closed.
|
|
67
|
+
[Child ordering](references/child-ordering.md): specs and routing caveat.
|
|
68
|
+
|
|
69
|
+
Requires Screenplay 4.149.1 or later (`screenplay --version`) for child deferral.
|
|
75
70
|
- A rejected individual command or append leaves the world unchanged; an accepted
|
|
76
71
|
one commits once, then the read models and queries are compared. There is no
|
|
77
72
|
scenario-wide transaction in v6: when a later effect of a cascade or capture
|
|
@@ -104,19 +99,19 @@ for synthesis refusals, selection, provenance and a complete passing model.
|
|
|
104
99
|
| `given caller` / `given caller as <Persona>` | explicit caller (`authenticated`, roles, claims; empty means anonymous), or an authenticated synthesized persona witness |
|
|
105
100
|
| `when <CommandType>` | run a command |
|
|
106
101
|
| `when append <EventType>` | append one event: constraints and projections run, the command does not; reactions run only from ESM v6, where `then` lists what followed |
|
|
107
|
-
| `when query <Query>` | perform a query with the argument values beneath it
|
|
108
|
-
| `then result [exactly]` | one expected row of the performed query; repeat for several
|
|
109
|
-
| `then no result` | the performed query returns nothing
|
|
110
|
-
| `given clock "<instant>"` | the ISO 8601 instant the scenario happens at
|
|
111
|
-
| `when clock "<instant>"` | the clock reaches an instant; scheduled reactions that are due run
|
|
112
|
-
| `when trigger <Trigger>` | an application trigger fires with the values beneath it
|
|
113
|
-
| `given capture` / `when capture <Capture>` | an earlier and the current record of a capture's source
|
|
102
|
+
| `when query <Query>` | perform a query with the argument values beneath it |
|
|
103
|
+
| `then result [exactly]` | one expected row of the performed query; repeat for several |
|
|
104
|
+
| `then no result` | the performed query returns nothing |
|
|
105
|
+
| `given clock "<instant>"` | the ISO 8601 instant the scenario happens at |
|
|
106
|
+
| `when clock "<instant>"` | the clock reaches an instant; scheduled reactions that are due run |
|
|
107
|
+
| `when trigger <Trigger>` | an application trigger fires with the values beneath it |
|
|
108
|
+
| `given capture` / `when capture <Capture>` | an earlier and the current record of a capture's source |
|
|
114
109
|
| `generated <name> = <value>` | beneath `when <Command>`: the fixture for a generated property other than the identifier (ESM v7); `for` beneath the `when` supplies the generated identifier |
|
|
115
110
|
| `then returns [<value>]` | the command's response (ESM v7): `then returns "<uuid>"` for a scalar, `then returns` with named `field = value` lines for a subset of a record |
|
|
116
111
|
| `then <EventType>` | an expected new event |
|
|
117
112
|
| `then events in any order` | compare the new events without regard to order |
|
|
118
113
|
| `then readmodel <ReadModelType> [exactly]` | read-model state afterwards — must state the identifier |
|
|
119
|
-
| `then no readmodel <ReadModelType> for <key>` | exactly that keyed instance is absent
|
|
114
|
+
| `then no readmodel <ReadModelType> for <key>` | exactly that keyed instance is absent; the key is concrete and typed |
|
|
120
115
|
| `then query <Query> [exactly]` | query results for explicit `arguments` (none for an unkeyed list); one `result` per row, each stating the identifier; none means empty |
|
|
121
116
|
| `file <path>` | optional, once: the repository-relative file realizing the specification |
|
|
122
117
|
| `then error "<message>"` | a validation or constraint rejection, for that reason; a localized rule is pinned by its quoted key, `then error "$strings.<key>"` |
|
|
@@ -125,12 +120,12 @@ for synthesis refusals, selection, provenance and a complete passing model.
|
|
|
125
120
|
| `for <value>` | the event source of a `given`/`then` event, or of the `when` command or appended event |
|
|
126
121
|
| `<property> = <value>` | a literal, `null`, or a one-line JSON-shaped object or list: `lines = [{"sku":"A-1","quantity":2}]` |
|
|
127
122
|
|
|
128
|
-
|
|
123
|
+
An enumeration value binds whether it is written bare
|
|
129
124
|
(`status = sent`), qualified (`status = InvoiceStatus.sent`) or quoted, and a
|
|
130
125
|
`DateTime` value binds as a plain ISO 8601 instant (`"2026-10-05T08:00:00Z"`).
|
|
131
|
-
|
|
132
|
-
(`"2026-10-05T08:00:00.0000000Z"`)
|
|
133
|
-
|
|
126
|
+
An older compiler binds only the quoted member and the full round-trip instant
|
|
127
|
+
(`"2026-10-05T08:00:00.0000000Z"`) although it accepts all forms - quote members when a
|
|
128
|
+
model must bind on older versions.
|
|
134
129
|
|
|
135
130
|
Rules the binder enforces:
|
|
136
131
|
|
|
@@ -186,7 +181,7 @@ Read [shop fixtures and strategy choices](references/generated-fixtures.md).
|
|
|
186
181
|
|
|
187
182
|
## When not to
|
|
188
183
|
|
|
189
|
-
Pins/clock do not realize
|
|
184
|
+
Pins/clock do not realize context or secret generation; preserve the contract.
|
|
190
185
|
|
|
191
186
|
## Generated fixtures and return expectations (ESM v7)
|
|
192
187
|
|
|
@@ -195,13 +190,13 @@ unsupported, never passed. The fixture reference covers strict v15 shapes and fr
|
|
|
195
190
|
|
|
196
191
|
## Actions beyond commands
|
|
197
192
|
|
|
198
|
-
A slice is not always set off by a command: `given clock`, `when clock`, `when trigger`, `given capture`, `when capture` and `when query` (with `then result` / `then no result`) name what does. Use `given clock`, never `given time`. From ESM v6
|
|
193
|
+
A slice is not always set off by a command: `given clock`, `when clock`, `when trigger`, `given capture`, `when capture` and `when query` (with `then result` / `then no result`) name what does. Use `given clock`, never `given time`. From ESM v6 the reference runner executes the clock, trigger and capture actions; before ESM v6 only `when query` executed among them.
|
|
199
194
|
Read [references/actions-beyond-commands.md](references/actions-beyond-commands.md) when the slice is an automation, translation or query view, or you need the action table, grammar and what the reference runner executes for each.
|
|
200
195
|
|
|
201
196
|
## Reactions and cascades (ESM v6)
|
|
202
197
|
|
|
203
|
-
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
|
|
204
|
-
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`
|
|
198
|
+
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 a compiler that stops before ESM v6 is tool skew, not a modeling error: never delete the `then` line to silence it.
|
|
199
|
+
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`" section).
|
|
205
200
|
|
|
206
201
|
## Published-event specifications (released ESM v9)
|
|
207
202
|
|
|
@@ -210,7 +205,7 @@ not `then readmodel`. The follow-up event list is exhaustive and ordered. Read
|
|
|
210
205
|
[publication example and fold cases](../cratis-screenplay-automations-and-translations/references/public-events-and-direction.md).
|
|
211
206
|
Events-source captures and reached opaque event-target reducers return typed
|
|
212
207
|
Unsupported, not a pass. Composite view fixtures need every key part but remain
|
|
213
|
-
unadmitted (PLAY0268
|
|
208
|
+
unadmitted (PLAY0268); see read-surface `references/named-keys.md`.
|
|
214
209
|
|
|
215
210
|
## Reusable fixtures, routes and recovery intent
|
|
216
211
|
|
|
@@ -224,7 +219,7 @@ stream ids are not guessed. Read [examples and routes](references/examples-and-r
|
|
|
224
219
|
|
|
225
220
|
`given operation ... fails`, `then operation` and `then compensated` describe
|
|
226
221
|
future external-work behavior. Reaction refusal branches, `when redelivered`
|
|
227
|
-
and `then no events` (PLAY0268
|
|
222
|
+
and `then no events` (PLAY0268) are also authoring-only: compile them, but report their
|
|
228
223
|
PLAY0268 binding refusal instead of an executed result. Preserve the contract; a read-model or
|
|
229
224
|
query assertion states a zero-fact outcome.
|
|
230
225
|
|
|
@@ -245,8 +240,10 @@ constraint — that is the constraint speaking, not the view.)
|
|
|
245
240
|
Write an error specification for a rule that depends on existing system state or that another business could plausibly set differently. A format, range or presence rule on one value belongs on the concept with its own `validate` block, with **one rejection specification per concept rule**, through one command that uses the concept, not one per use.
|
|
246
241
|
Read [references/concept-rules.md](references/concept-rules.md) when deciding whether a rule needs an error specification or a concept `validate`, or when you need the complete concept-rule example with boundary acceptances and rejections.
|
|
247
242
|
|
|
248
|
-
|
|
249
|
-
|
|
243
|
+
Text `not empty`: [whitespace rejection specs and boundaries](references/whitespace-rules.md).
|
|
244
|
+
Whitespace-acceptance specs fail. This applies to every ESM version.
|
|
245
|
+
|
|
246
|
+
Requires Screenplay 4.151.0 or later (`screenplay --version`) for the Unicode `not empty` correction.
|
|
250
247
|
|
|
251
248
|
## Application-boundary coverage
|
|
252
249
|
|
package/package/corpus/skills/cratis-screenplay-specifications/references/actions-beyond-commands.md
CHANGED
|
@@ -14,22 +14,17 @@ assert a value mapped from `$context.occurred`. In a command's `produces`, that
|
|
|
14
14
|
mapping executes when the scenario has `given clock`. It is not the same as
|
|
15
15
|
`$eventContext.occurred` in a projection, which the execution plan refuses (SKILL.md, "Reference execution — what actually runs").
|
|
16
16
|
|
|
17
|
-
**Which tools bind these actions
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
**Which tools bind these actions.** A compiler that admits ESM v6 binds the clock, trigger
|
|
18
|
+
and capture actions, and the `Automation` and `Translate` slices, reactions and captures they
|
|
19
|
+
drive; the reference runner executes them through `screenplay test` or MCP `run-specifications`,
|
|
20
|
+
with the semantics in [Reactions and cascades](reactions-and-cascades.md). The complete example in
|
|
21
|
+
that reference reports `executableReady` with no executable error in `open-workspace` readiness
|
|
22
|
+
and `read-workspace` view `executable-diagnostics`.
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
the semantics in [Reactions and cascades](reactions-and-cascades.md).
|
|
27
|
-
- **`cratis` before 3.28.2 (Screenplay 4.60.1, ESM v1-v5):**
|
|
28
|
-
**`when query` executed. The clock, trigger and capture actions did not.** They parsed, printed and were
|
|
29
|
-
checked against the application, but binding reported `PLAY0268` naming the
|
|
30
|
-
proposed ESM v6 (decision 0022), and an `Automation` or `Translate` slice reported
|
|
31
|
-
*is not admitted by ESM v1*. Only binding showed this: `cratis screenplay validate`
|
|
32
|
-
does not bind, so it stayed green.
|
|
24
|
+
A compiler that stops before ESM v6 executes `when query` only. The clock, trigger and capture
|
|
25
|
+
actions parse, print and are checked against the application, but binding reports `PLAY0268`
|
|
26
|
+
naming ESM v6, and an `Automation` or `Translate` slice reports *is not admitted by ESM v1*.
|
|
27
|
+
Only binding shows this: `cratis screenplay validate` does not bind, so it stays green.
|
|
33
28
|
|
|
34
29
|
Write the actions either way - they state what sets the slice off. Report each as
|
|
35
30
|
bound and not executed, or as parsed only, naming the tool that said so.
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
<!-- Copyright (c) Cratis. All rights reserved. -->
|
|
2
2
|
<!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
|
|
3
3
|
|
|
4
|
-
# Child-before-parent specifications
|
|
4
|
+
# Child-before-parent specifications
|
|
5
5
|
|
|
6
6
|
## Contents
|
|
7
7
|
|
|
8
|
-
-
|
|
8
|
+
- Product sources
|
|
9
9
|
- Complete model
|
|
10
|
-
- Known routing difference
|
|
10
|
+
- Known routing difference
|
|
11
|
+
|
|
12
|
+
Requires Screenplay 4.149.1 or later (`screenplay --version`) for child-before-parent arrival order in the reference evaluator.
|
|
11
13
|
|
|
12
14
|
Views combining sources must tolerate any arrival order. The reference evaluator
|
|
13
15
|
retains a parentless child and retries it in arrival order using its original event
|
|
@@ -16,16 +18,16 @@ pending grandchild in the same pass. Pending children survive given/when and
|
|
|
16
18
|
accepted command commits. A parent that never arrives leaves the child absent;
|
|
17
19
|
an ambiguous parent still fails closed.
|
|
18
20
|
|
|
19
|
-
##
|
|
21
|
+
## Product sources
|
|
20
22
|
|
|
21
|
-
Cratis/Screenplay
|
|
22
|
-
- `Source/DotNET/Screenplay/Semantics/Execution/SemanticScopedProjection.Deferred.cs
|
|
23
|
-
retains and resolves child occurrences;
|
|
24
|
-
- `Source/DotNET/Screenplay/Semantics/Execution/for_SemanticEvaluator/when_projecting_scoped_projections/with_deferral_across_given_and_when.cs
|
|
23
|
+
Cratis/Screenplay:
|
|
24
|
+
- `Source/DotNET/Screenplay/Semantics/Execution/SemanticScopedProjection.Deferred.cs`
|
|
25
|
+
retains and resolves child occurrences; it applies original mappings.
|
|
26
|
+
- `Source/DotNET/Screenplay/Semantics/Execution/for_SemanticEvaluator/when_projecting_scoped_projections/with_deferral_across_given_and_when.cs`
|
|
25
27
|
is the compiling, passing source for the model below. The extra specifications
|
|
26
28
|
cover both given orders and a child whose parent never arrives.
|
|
27
|
-
- `Documentation/screenplay/projections/semantic-model.md
|
|
28
|
-
`decisions/0007-affected-read-model-instances.md
|
|
29
|
+
- `Documentation/screenplay/projections/semantic-model.md` and
|
|
30
|
+
`decisions/0007-affected-read-model-instances.md` retain the routing boundary.
|
|
29
31
|
|
|
30
32
|
## Complete model
|
|
31
33
|
|
|
@@ -101,10 +103,10 @@ module Orders
|
|
|
101
103
|
With the fenced model saved as `child-ordering.play`, run
|
|
102
104
|
`screenplay test child-ordering.play --format json` on the standalone pin;
|
|
103
105
|
each selected specification must pass. The corpus gate runs this complete fence.
|
|
104
|
-
|
|
106
|
+
A CLI-bundled compiler that predates child deferral does not run it; a newer
|
|
105
107
|
standalone result does not upgrade that bundle or prove rendered tests.
|
|
106
108
|
|
|
107
|
-
## Known routing difference
|
|
109
|
+
## Known routing difference
|
|
108
110
|
|
|
109
111
|
For a flat root/child shared event type, the evaluator uses the root handler's
|
|
110
112
|
resolved key, matching Chronicle's current-event fallback. It does **not**
|
|
@@ -22,7 +22,7 @@ of the same rule.
|
|
|
22
22
|
**Why this differs from earlier guidance.** This skill used to say not to write
|
|
23
23
|
specifications for rules like *"Name cannot be empty"* because the type system
|
|
24
24
|
makes them unrepresentable. In Screenplay a concept `validate` is a runtime rule the
|
|
25
|
-
reference runner executes, not a type-level guarantee
|
|
25
|
+
reference runner executes, not a type-level guarantee. Without a
|
|
26
26
|
rejection specification nothing proves the rule is wired to the command, and a
|
|
27
27
|
rule moved or deleted by an edit goes unnoticed. The cost is one specification per
|
|
28
28
|
rule; the rule stays on the concept, never copied into each command.
|
package/package/corpus/skills/cratis-screenplay-specifications/references/examples-and-routes.md
CHANGED
|
@@ -22,7 +22,7 @@ Examples share the type namespace and use the current event generation. They
|
|
|
22
22
|
cannot inherit from examples or serve as query results/returns/trigger/capture
|
|
23
23
|
fixtures. They are specification data, not operational `seed` events.
|
|
24
24
|
|
|
25
|
-
This complete example
|
|
25
|
+
This complete example compiles and its two reference scenarios pass:
|
|
26
26
|
|
|
27
27
|
```screenplay
|
|
28
28
|
concept ProjectId : Uuid
|
|
@@ -54,8 +54,7 @@ module Projects
|
|
|
54
54
|
|
|
55
55
|
An example's type may be an event, command or read model declared in another
|
|
56
56
|
document of the same compilation, by simple name when unambiguous or by qualified
|
|
57
|
-
name (`Billing.Facts.Recording.Recorded`). Checked against
|
|
58
|
-
(Screenplay#648, released in 4.135.1) and the standalone 4.139.0 compiler:
|
|
57
|
+
name (`Billing.Facts.Recording.Recorded`). Checked against the standalone compiler:
|
|
59
58
|
|
|
60
59
|
```text
|
|
61
60
|
// declarations.play: module Billing > feature Facts > slice StateChange Recording
|
|
@@ -93,7 +92,7 @@ example Fact : Recorded
|
|
|
93
92
|
name. A named `import X.Y.Z` of a declaration the application already has warns
|
|
94
93
|
`PLAY0290` (no effect), and binding still refuses any named import with
|
|
95
94
|
`PLAY0268`, as for inline givens; public `from "<store>"` imports are refused
|
|
96
|
-
the same way
|
|
95
|
+
the same way.
|
|
97
96
|
- The example is resolved in its own declaration scope, so shared example data may
|
|
98
97
|
live beside the declarations it types, in any document.
|
|
99
98
|
|
|
@@ -124,7 +123,7 @@ cannot reconstruct source origins.
|
|
|
124
123
|
|
|
125
124
|
Event occurrences in `given`, `when append` and `then` accept `stream Source.Stream`
|
|
126
125
|
with nested scalar `streamId = <literal>` or a complete composite part block.
|
|
127
|
-
These select ESM v8 and reference-execute
|
|
126
|
+
These select ESM v8 and reference-execute; the complete checked model
|
|
128
127
|
is in toolchain `references/sources-and-streams.md`. Command actions take their
|
|
129
128
|
route from the command declaration, never the fixture.
|
|
130
129
|
|
|
@@ -134,16 +133,16 @@ it. `then ... no stream` expects no route; no route in a then is a wildcard.
|
|
|
134
133
|
steps replace the entire route, independently of `for`; an inherited route
|
|
135
134
|
cannot be changed back to a wildcard. Literal compatibility/route contradiction
|
|
136
135
|
checks use resolved source/stream types, not guessed text (PLAY0547–PLAY0551).
|
|
137
|
-
|
|
136
|
+
Route literals must be nonempty, well-formed NFC text
|
|
138
137
|
(refused, not normalized); Double integer ids are within ±(2^53−1), while Exact
|
|
139
138
|
has no such bound but the `numbers exact` source mode remains unadmitted (PLAY0268; exact lowering of
|
|
140
139
|
qualifying Double literals is the separate, admitted v11). Invalid specification routes report
|
|
141
140
|
PLAY0549. Contradictions compare canonical scalar ids and every composite part,
|
|
142
141
|
so UUID casing is immaterial. Composite mappings supply each named part once,
|
|
143
142
|
using literals only; encoding escapes `%`/`|` and preserves declaration order.
|
|
144
|
-
Source:
|
|
143
|
+
Source: `event-sources.md`, `specifications.md`, `diagnostics.md`.
|
|
145
144
|
|
|
146
|
-
|
|
145
|
+
A renderer that stops at v7 refuses a model above it; the CLI/Stage pair
|
|
147
146
|
(`cratis-screenplay-toolchain/references/renderable-subset.md`) reaches route checks through v10. Routed read-model/query replay can still refuse
|
|
148
147
|
STAGE-ESM-030. Source/reference success never establishes target parity.
|
|
149
148
|
|
|
@@ -167,7 +166,7 @@ needs exactly one definitely matching candidate and **no undecided candidates**
|
|
|
167
166
|
values, `stream` or `no stream`; do not guess an unknown value. A locator's `for`
|
|
168
167
|
is optional but typed against the routed source when present.
|
|
169
168
|
|
|
170
|
-
This complete syntax-only model validates
|
|
169
|
+
This complete syntax-only model validates; `screenplay test` reports
|
|
171
170
|
PLAY0268 for redelivery, not a passing scenario:
|
|
172
171
|
|
|
173
172
|
```screenplay test=unbound
|
|
@@ -216,4 +215,4 @@ remain unadmitted; they are not executed append scenarios. Forms, matching,
|
|
|
216
215
|
acknowledgement and their whole-model refusal boundary are in
|
|
217
216
|
captures-and-reactions `references/refusals-and-redelivery.md`.
|
|
218
217
|
|
|
219
|
-
Authority: Screenplay `
|
|
218
|
+
Authority: Screenplay `Documentation/screenplay/specifications.md`.
|
package/package/corpus/skills/cratis-screenplay-specifications/references/generated-fixtures.md
CHANGED
|
@@ -21,12 +21,11 @@ Pins do not prove randomness, authorization, idempotency, storage freshness or
|
|
|
21
21
|
secret safety. Client-minted IDs stay inputs; gapless invoice numbering needs an
|
|
22
22
|
allocator, not a random fixture. Pattern/random/rule and secret generation remain
|
|
23
23
|
unadmitted. Source: Screenplay
|
|
24
|
-
`
|
|
24
|
+
`Documentation/screenplay/generated-values/choosing.md`.
|
|
25
25
|
|
|
26
26
|
### Fixtures and outcomes
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
cratis 3.28.3 bundle, 4.66.0, did not); CLI 3.57.0 / Stage 4.89.1 render supported UUID/String generation strategies,
|
|
28
|
+
A compiler that admits ESM v7 binds and runs these; Stage renders supported UUID/String generation strategies,
|
|
30
29
|
scalar/named responses, fixtures and `then returns`. Unsupported types/result combinations
|
|
31
30
|
remain `STAGE-ESM-028`/`-038`; preserve refused specifications as gap-fill contracts. The model and rules are in `cratis-screenplay-command-surface`; the
|
|
32
31
|
complete threaded model is the linked shop example. The excerpt below belongs
|
|
@@ -70,10 +69,10 @@ specification RegistersWithPinnedValues
|
|
|
70
69
|
fixtures retain legacy reuse. See the complete [strategy example](../../cratis-screenplay-toolchain/references/generation-strategies-example.md)
|
|
71
70
|
and command-surface `references/generated-values-and-responses.md` for tagged sources.
|
|
72
71
|
- `given clock` supplies `$context.occurred`; it does not synthesize UUIDv7, ULID or
|
|
73
|
-
TypeID from that instant. Pin the whole identifier, never a seed. Stage
|
|
72
|
+
TypeID from that instant. Pin the whole identifier, never a seed. Stage's
|
|
74
73
|
time-ordered factories use wall clock, not command-receipt time, and its clock
|
|
75
74
|
specifications remain unsupported. Sources: Screenplay
|
|
76
|
-
`
|
|
77
|
-
`
|
|
75
|
+
`Documentation/screenplay/generated-values/choosing.md`; Stage
|
|
76
|
+
`Documentation/reference/generated-values-rendering.md`.
|
|
78
77
|
- A reaction-invoked command that reaches generation is `Unsupported(IdentityAllocation)` (no fixture channel); a
|
|
79
78
|
response-only command runs and its response is discarded.
|
package/package/corpus/skills/cratis-screenplay-specifications/references/reactions-and-cascades.md
CHANGED
|
@@ -43,7 +43,7 @@ module Collections
|
|
|
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
45
|
- A reaction invocation without a declared actor has no caller and a gated
|
|
46
|
-
command denies.
|
|
46
|
+
command denies. Reaction `runs as system role "<Role>"` supplies the
|
|
47
47
|
authenticated system actor (ESM v10); `given caller` does not. Each command is
|
|
48
48
|
atomic, not the cascade. Checked actor scenario and CLI/Stage limitations:
|
|
49
49
|
captures-and-reactions `references/invocation-identity.md`.
|
|
@@ -53,21 +53,20 @@ module Collections
|
|
|
53
53
|
- A reached reaction with a code body (`file` or inline) returns unsupported, as
|
|
54
54
|
does a reaction that never settles. The reference stops at 1,000 new facts per
|
|
55
55
|
scenario and 10,000 due occurrences per clock advance.
|
|
56
|
-
- A model that uses these forms selects ESM v6 (`schemaVersion: 6`). Stage
|
|
57
|
-
|
|
56
|
+
- A model that uses these forms selects ESM v6 (`schemaVersion: 6`). Stage
|
|
57
|
+
renders supported event-triggered Automation, but not Translate,
|
|
58
58
|
captures, non-event triggers or opaque bodies (`-024`), claim-reading/opaque `runs as` gates (`-034`), legacy filters (`-035`)
|
|
59
59
|
or mixed effects (`-037`). Single-hop reaction append specs render; deeper appends and
|
|
60
60
|
command specs cascading into reactions remain `-011`. Keep refused scope as gap-fill against this contract: `cratis-screenplay-render-and-gap-fill`.
|
|
61
61
|
|
|
62
|
-
### Version skew: cascades and the false `PLAY0285`
|
|
62
|
+
### Version skew: cascades and the false `PLAY0285`
|
|
63
63
|
|
|
64
64
|
`PLAY0285` (a specification's expected event contradicts every producer of its
|
|
65
|
-
`when` command) runs in the syntax pass, with no binding.
|
|
66
|
-
reactions and `invokes
|
|
67
|
-
|
|
68
|
-
`cratis screenplay validate` 3.28.2 (probed); it failed `cratis screenplay validate` 3.27.1 with
|
|
65
|
+
`when` command) runs in the syntax pass, with no binding. An older compiler does not trace
|
|
66
|
+
reachability through reactions and `invokes`, so the example above passes `screenplay` (and is
|
|
67
|
+
executable-ready over its MCP server) but fails an older `cratis screenplay validate` with
|
|
69
68
|
`PLAY0285` "Specification outcome 'ReminderScheduled' cannot be produced by 'SendInvoice'",
|
|
70
|
-
exit 5
|
|
69
|
+
exit 5. If an older bundle still reports it, it is a tool skew, not a
|
|
71
70
|
modeling error: do not delete the `then` line or move the event to make `cratis`
|
|
72
71
|
green. Validate with the standalone tool or a current `cratis`, record which tool gave which
|
|
73
72
|
verdict, and see `cratis-screenplay-toolchain`.
|