@cratis/pi 7.62.0 → 7.63.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/product-sync.json +9 -9
- package/package/corpus/skills/cratis-application-slice-conformance/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-command/references/generated-values.md +27 -12
- package/package/corpus/skills/cratis-arc-command/references/shop-generation.md +17 -6
- package/package/corpus/skills/cratis-fundamentals-concept/SKILL.md +10 -2
- package/package/corpus/skills/cratis-fundamentals-concept/references/shop-generation.md +49 -6
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +43 -41
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/cases-to-specify.md +11 -2
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/integration-interview.md +24 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/public-events-and-direction.md +76 -10
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/realization-and-gap-fill.md +5 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/todo-list-example.md +1 -1
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translate-example.md +39 -23
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translation-patterns.md +35 -12
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +51 -81
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/atomic-batches-and-source-mappings.md +83 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/capture-map-and-example.md +14 -4
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/reaction-forms.md +59 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/record-capture-specifications.md +60 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/specifying-triggers-and-clock.md +5 -1
- package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +26 -28
- package/package/corpus/skills/cratis-screenplay-command-surface/references/described-handlers.md +82 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/generated-values-and-responses.md +82 -28
- package/package/corpus/skills/cratis-screenplay-command-surface/references/protected-reads.md +113 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/shop-generation.md +45 -12
- package/package/corpus/skills/cratis-screenplay-command-surface/references/text-and-match-rules.md +119 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/validate-rules.md +14 -4
- package/package/corpus/skills/cratis-screenplay-command-surface/verification.json +10 -3
- package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +12 -12
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +5 -3
- package/package/corpus/skills/cratis-screenplay-event-modeling/verification.json +5 -1
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +2 -2
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/evidence-table-template.md +1 -1
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generated-recovery.md +51 -14
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/intent-example.md +5 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/loss-report-template.md +2 -1
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/rule-modeling.md +6 -3
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/signal-to-intent.md +1 -1
- package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +22 -28
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/choosing-generation.md +20 -7
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +12 -6
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +9 -1
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +58 -10
- package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +4 -2
- package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +2 -5
- package/package/corpus/skills/cratis-screenplay-model-review/references/anti-patterns.md +2 -2
- package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +2 -2
- package/package/corpus/skills/cratis-screenplay-model-review/references/quick-self-check.md +2 -1
- package/package/corpus/skills/cratis-screenplay-model-review/references/review-questions.md +3 -2
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/principles.md +1 -1
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/vocabulary-map.md +1 -1
- package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +2 -3
- package/package/corpus/skills/cratis-screenplay-read-surface/references/named-keys.md +3 -1
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +8 -3
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +8 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +6 -4
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +36 -29
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/berth-reservations.md +6 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-design.md +15 -4
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-example.md +25 -20
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/public-event-coverage.md +14 -3
- 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 +7 -3
- package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +3 -1
- package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md +4 -4
- package/package/corpus/skills/cratis-screenplay-slice-design/references/rule-layers.md +4 -2
- package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +4 -3
- package/package/corpus/skills/cratis-screenplay-slice-design/references/worked-example.md +8 -8
- package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +49 -47
- package/package/corpus/skills/cratis-screenplay-specifications/references/actions-beyond-commands.md +11 -1
- package/package/corpus/skills/cratis-screenplay-specifications/references/generated-fixtures.md +48 -17
- package/package/corpus/skills/cratis-screenplay-specifications/references/vocabulary.md +14 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +25 -21
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/boundaries.md +2 -2
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +9 -3
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/multi-service-models.md +4 -3
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +7 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +30 -22
- package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet-example.md +3 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet.md +47 -2
- package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostic-arguments.md +60 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +65 -5
- package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +50 -22
- package/package/corpus/skills/cratis-screenplay-toolchain/references/generation-checks.md +93 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/generation-strategies-example.md +117 -35
- package/package/corpus/skills/cratis-screenplay-toolchain/references/language-admission.md +46 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/preferred-syntax.md +3 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +25 -10
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +1800 -50
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +5 -3
- package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +6 -1
- package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +8 -53
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/file-references.md +2 -2
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/interaction-example.md +54 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/verification.json +6 -3
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +30 -29
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +36 -9
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/choosing-generation.md +28 -8
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/publication-and-recovery.md +31 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/sandbox-and-specrunner.md +8 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +4 -1
- package/package.json +1 -1
|
@@ -7,11 +7,10 @@ license: MIT
|
|
|
7
7
|
# Screenplay scenario coverage
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
`cratis-screenplay-specifications`; this skill owns coverage and method.
|
|
10
|
+
Decide **which** situations need specifications in a coverage matrix, then use
|
|
11
|
+
consistent example data and mode-admitted forms. Record inexpressible cases; never
|
|
12
|
+
fake them. This skill owns coverage; `cratis-screenplay-specifications` owns grammar
|
|
13
|
+
and outcome comparison.
|
|
15
14
|
|
|
16
15
|
## When / when not
|
|
17
16
|
- Use: the scenario phase of `cratis-screenplay-modeling-lifecycle`; adding or changing a
|
|
@@ -33,11 +32,9 @@ Use it to seed, never replace, the matrix. Multi-step storylines remain unavaila
|
|
|
33
32
|
lifecycle families emulate them.
|
|
34
33
|
|
|
35
34
|
## Interview phase
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
Critical questions, one at a time, with follow-ups:
|
|
40
|
-
Ask only what is missing: depth, known rules and edge cases (one allowed and the nearest refused request per rule), intended use (decides admitted forms), and who validates. Read [references/interview-batch.md](references/interview-batch.md) for the four questions and follow-ups.
|
|
35
|
+
Ask only what is missing: coverage depth, allowed/refused rule examples, intended
|
|
36
|
+
execution mode and who validates. Read [interview prompts](references/interview-batch.md)
|
|
37
|
+
when these inputs are unsettled; skip answered questions.
|
|
41
38
|
|
|
42
39
|
**Unattended:** assume visibly, never invent a rule, and record who actually answered; an agent asking itself four kinds of question is not four approvals.
|
|
43
40
|
|
|
@@ -64,23 +61,22 @@ Ask only what is missing: depth, known rules and edge cases (one allowed and the
|
|
|
64
61
|
existing intentional fixtures (`references/scenario-catalogue.md` "Example data"). Shared
|
|
65
62
|
fixtures may live as typed `example`s in another document beside the declarations they type
|
|
66
63
|
(`cratis-screenplay-specifications` `references/examples-and-routes.md`).
|
|
67
|
-
7. **Draft commands
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
cases
|
|
72
|
-
authenticated policy witness for success/denial; use explicit callers for
|
|
73
|
-
anonymous/ownership or unsynthesizable personas. Syntax and complete model:
|
|
74
|
-
`cratis-screenplay-specifications` `references/persona-callers-and-cases.md`.
|
|
64
|
+
7. **Draft commands** for each applicable scenario type below. Vary only the value
|
|
65
|
+
under test in a rejection. Read specifications'
|
|
66
|
+
[persona callers and cases](../cratis-screenplay-specifications/references/persona-callers-and-cases.md)
|
|
67
|
+
when sharing a validation matrix or choosing synthesized versus explicit callers;
|
|
68
|
+
cases are not fixture examples and do not group unrelated behaviors.
|
|
75
69
|
8. **Separate view pass**: population, each update, accumulation, removal (with a surviving
|
|
76
70
|
row), absence, ordering. Mark lifecycle branches. Views combining sources must
|
|
77
71
|
tolerate any arrival order. Pin a child before its parent (Requires Screenplay 4.149.1 or later):
|
|
78
72
|
given child, then parent, then read model; "parent never arrives" leaves the
|
|
79
73
|
child absent. Evidence/example: `references/view-and-story-specs.md`.
|
|
80
|
-
9. **State-dependent rules**: `reads
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
74
|
+
9. **State-dependent rules**: use `reads` plus `require` over authoritative state;
|
|
75
|
+
eligible views opt into `command reads protected` (v25). Cover present/absent reads,
|
|
76
|
+
refusal and denial; matching decide/commit changes are conflicts, not refusals.
|
|
77
|
+
Read [protected reads](../cratis-screenplay-command-surface/references/protected-reads.md)
|
|
78
|
+
for admission and Stage refusal; legacy/refused shapes remain marked unenforced
|
|
79
|
+
with a named target mechanism. Forbidden:
|
|
84
80
|
caller-supplied copies of state in `require`, boolean attestation inputs (`confirmsX ==
|
|
85
81
|
true`) and rules hidden in `handler`/hint prose. Never drop an unresolved given or assertion
|
|
86
82
|
to make a spec compile: record the blocked case and continue.
|
|
@@ -101,11 +97,10 @@ when specifying malformed keys/filters versus valid absence (ESM v18).
|
|
|
101
97
|
Requires Screenplay 4.157.0 (`screenplay --version`) for v17, 4.161.0 for query
|
|
102
98
|
validation/error assertions; older tools do not execute these contracts.
|
|
103
99
|
|
|
104
|
-
**Once, idempotent, exactly once are different claims.**
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
target requirements.
|
|
100
|
+
**Once, idempotent, exactly once are different claims.** `unique event` proves a once-only fact,
|
|
101
|
+
not successful retry handling or an exactly-once external effect. Name the claim
|
|
102
|
+
proved and keep other guarantees as target requirements; recovery cases are in
|
|
103
|
+
`references/scenario-catalogue.md`.
|
|
109
104
|
|
|
110
105
|
## Rules
|
|
111
106
|
### Compiler contracts
|
|
@@ -116,7 +111,8 @@ target requirements.
|
|
|
116
111
|
or query spec needs `given caller` or `given caller as <Persona>` (module and feature gates count); an authorized scenario
|
|
117
112
|
gets no inferred fixture (PLAY0389). Unauthorized is never `then error`.
|
|
118
113
|
- Duplicate and competing specs use `when <Command>`; `when append` is for projection and
|
|
119
|
-
automation triggers,
|
|
114
|
+
automation triggers, consumed public events driving captures, and for a
|
|
115
|
+
constraint the command's own validation would reject first.
|
|
120
116
|
- `null` only for optional read-model properties; constraint messages are copied verbatim.
|
|
121
117
|
- Executable-only binding checks (PLAY0350/0352/0388/0389/0273) do not show in V1: run V3.
|
|
122
118
|
|
|
@@ -126,6 +122,8 @@ target requirements.
|
|
|
126
122
|
(denial), `<View>LifecycleN<State>` for families.
|
|
127
123
|
- `for` on every given, appended and expected event (plain `produces <Name>` too; inline `produces event` omits it), and on the `when` command where the
|
|
128
124
|
destination matters. A competing-claim given needs a *different* `for`.
|
|
125
|
+
Foreign event fixtures feeding a capture may omit `for`; supplied `for` is
|
|
126
|
+
opaque source text, not the capture's content key.
|
|
129
127
|
- Format rules belong on a `concept`: give each concept rule representative acceptance,
|
|
130
128
|
rejection and boundary specs once (through one command that carries it), not on every use;
|
|
131
129
|
never `n/a` automatically. Include a whitespace-only rejection for text `not empty`:
|
|
@@ -149,7 +147,16 @@ Read [references/review-questions.md](references/review-questions.md) for the ra
|
|
|
149
147
|
|
|
150
148
|
## Public-event coverage (ESM v9)
|
|
151
149
|
|
|
152
|
-
Outbound publication needs `when append <private>` and `then <PublicEvent>`.
|
|
150
|
+
Outbound publication needs `when append <private>` and `then <PublicEvent>`.
|
|
151
|
+
Captures over public events use `given <FromEvent>` / `when append <FromEvent>`,
|
|
152
|
+
not capture records (PLAY0701). Read [references/public-event-coverage.md](references/public-event-coverage.md)
|
|
153
|
+
when specifying public events or routed producers and observers.
|
|
154
|
+
|
|
155
|
+
Record captures distinguish first sight from updates: first root/child/nested
|
|
156
|
+
records are added only, so field guards need `given capture` for the same key.
|
|
157
|
+
Use a separate `when added` append when initial observations should produce a fact.
|
|
158
|
+
Read captures-and-reactions `references/record-capture-specifications.md` for the
|
|
159
|
+
prerequisite and runnable cases. Include first, changed and unchanged rows in the matrix.
|
|
153
160
|
|
|
154
161
|
## Version skew: reaction cascades and false PLAY0285
|
|
155
162
|
Under ESM v6 a command spec's `then` lists the events reactions cascade from it; an older `cratis` bundle reports a **false PLAY0285** for it. Never delete the reaction. Read [references/version-skew.md](references/version-skew.md) when a spec with cascade events reports PLAY0285 or the bundled compiler is older than the standalone tool.
|
package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/berth-reservations.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Berth reservations: worked example
|
|
2
2
|
|
|
3
|
+
This is a legacy control without `command reads protected`; the unprotected-read
|
|
4
|
+
markers below describe that control, not all command reads. Eligible views can opt
|
|
5
|
+
into v25; the date-rule blocker still remains. Read
|
|
6
|
+
[protected reads](../../cratis-screenplay-command-surface/references/protected-reads.md)
|
|
7
|
+
for admission and Stage's protected-read refusal (STAGE-ESM-044).
|
|
8
|
+
|
|
3
9
|
Complete, compiled design-mode model (marina guest berths) showing a coverage matrix turned into specifications: happy path, one rejection per rule, authorization denial, duplicate and retry, competing claim, state violation, alternative branches, compensation and a view lifecycle family. The matrix for it is in `coverage-matrix.md`; the catalogue (`scenario-catalogue.md`) names its specifications.
|
|
4
10
|
|
|
5
11
|
```screenplay test=unbound
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
# Invoicing and dues: design-mode document for the stored-state rules
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**Legacy control without `command reads protected`, not binding-ready by design.**
|
|
4
|
+
Read [protected reads](../../cratis-screenplay-command-surface/references/protected-reads.md)
|
|
5
|
+
for the opt-in alternative. Do not insert the preamble blindly: every read must meet
|
|
6
|
+
finite event-source-keyed admission with removals. A v25 reference pass still does not
|
|
7
|
+
render protected reads: Stage admits v25 but refuses them with STAGE-ESM-044. The comments and unenforced markers below describe
|
|
8
|
+
this legacy control, not a general limit on command reads.
|
|
9
|
+
|
|
10
|
+
**Design mode.** This document states the stored-state rules of the
|
|
4
11
|
invoicing example as the skill requires (`reads <View>` + `require ... message`, marked NOT
|
|
5
12
|
enforced in the slice `description`, target named). It compiles (V1, warnings as errors) but
|
|
6
13
|
does not bind, and the only blockers are `reads` (PLAY0271) and `require` over
|
|
@@ -17,7 +24,7 @@ The excerpt's Stage API-availability comment describes the historical Stage 4.24
|
|
|
17
24
|
scaffold. Stage 4.73.1's scaffold pins an Arc/Chronicle set (see the Stage skill's `references/rendered-application.md`): protected-read APIs are
|
|
18
25
|
available to gap-fill (the "not in a Stage-rendered application" comment in the source is
|
|
19
26
|
superseded), not emitted protection or `.play` rule admission. The
|
|
20
|
-
|
|
27
|
+
capture uses separate first-sight/update appends, with its local-event follow-up in Automation.
|
|
21
28
|
|
|
22
29
|
```screenplay expect PLAY0516 test=unbound
|
|
23
30
|
// Scenario coverage design-mode example: stored-state rules of invoicing club dues (complete document).
|
|
@@ -89,6 +96,10 @@ module Invoicing
|
|
|
89
96
|
outcome = outcome translate
|
|
90
97
|
"C" => captured
|
|
91
98
|
"D" => declined
|
|
99
|
+
append PaymentGatewayResultReceived
|
|
100
|
+
when added
|
|
101
|
+
outcome = $.outcome
|
|
102
|
+
reason = $.reason
|
|
92
103
|
append PaymentGatewayResultReceived
|
|
93
104
|
when outcome
|
|
94
105
|
outcome = $.outcome
|
|
@@ -96,15 +107,15 @@ module Invoicing
|
|
|
96
107
|
event PaymentGatewayResultReceived
|
|
97
108
|
outcome GatewayOutcome
|
|
98
109
|
reason String
|
|
99
|
-
event PaymentReceived
|
|
100
110
|
|
|
101
|
-
slice Automation
|
|
111
|
+
slice Automation RecordPaymentOutcome
|
|
102
112
|
description "Gives PaymentReceived its producer: the translator reacts to the provider's external fact"
|
|
103
113
|
reaction ReceivedTranslator
|
|
104
114
|
when PaymentGatewayResultReceived
|
|
105
115
|
outcome
|
|
106
116
|
produces PaymentReceived
|
|
107
117
|
where outcome == "captured"
|
|
118
|
+
event PaymentReceived
|
|
108
119
|
|
|
109
120
|
slice StateChange SettleOrVoidInvoice
|
|
110
121
|
description "An invoice ends either settled or voided, never both (SettleOrVoid, enforced at append). NOT enforced in the model today: that the invoice exists and is still open (settling) and that only an open, unpaid invoice may be voided. Stated as `reads OpenInvoice` + `require` (PLAY0271/PLAY0268 at binding; Screenplay#129). Target: Arc [ProtectedDecision] with DecisionRead, or a Chronicle DCB. Requirements to test in the target: settling an unknown invoice is rejected; voiding a paid invoice is rejected; voiding an open invoice succeeds."
|
|
@@ -13,8 +13,10 @@ destination-type information; a reaction can also consume events from a capture
|
|
|
13
13
|
|
|
14
14
|
**Scope.** This document is the runnable demonstration only. It deliberately holds no rule that
|
|
15
15
|
depends on stored state (the invoice must exist, only an open invoice may be voided, a reversal
|
|
16
|
-
needs a received payment, `reads` + `require`):
|
|
17
|
-
|
|
16
|
+
needs a received payment, `reads` + `require`): the legacy design control lacks
|
|
17
|
+
`command reads protected` and retains PLAY0271/PLAY0268. Eligible reads can opt into
|
|
18
|
+
v25; see command-surface protected-read admission and Stage refusal. The rules stay
|
|
19
|
+
in the design-mode document `invoicing-dues-design.md`,
|
|
18
20
|
never in prose here. It shows the category shapes; for a coverage example see `berth-reservations.md`.
|
|
19
21
|
|
|
20
22
|
```screenplay
|
|
@@ -208,27 +210,13 @@ module Invoicing
|
|
|
208
210
|
when added
|
|
209
211
|
outcome = $.outcome
|
|
210
212
|
reason = $.reason
|
|
213
|
+
append PaymentGatewayResultReceived
|
|
214
|
+
when outcome
|
|
215
|
+
outcome = $.outcome
|
|
216
|
+
reason = $.reason
|
|
211
217
|
event PaymentGatewayResultReceived
|
|
212
218
|
outcome GatewayOutcome
|
|
213
219
|
reason String
|
|
214
|
-
event PaymentReceived
|
|
215
|
-
event PaymentDeclined
|
|
216
|
-
reason String
|
|
217
|
-
|
|
218
|
-
slice Automation TranslatePaymentGatewayResults
|
|
219
|
-
description "Our facts from the provider's: the translators react to the external fact the Translate slice records"
|
|
220
|
-
reaction ReceivedTranslator
|
|
221
|
-
when PaymentGatewayResultReceived
|
|
222
|
-
outcome
|
|
223
|
-
produces PaymentReceived
|
|
224
|
-
where outcome == "captured"
|
|
225
|
-
reaction DeclinedTranslator
|
|
226
|
-
when PaymentGatewayResultReceived
|
|
227
|
-
outcome
|
|
228
|
-
reason
|
|
229
|
-
produces PaymentDeclined
|
|
230
|
-
reason = reason
|
|
231
|
-
where outcome == "declined"
|
|
232
220
|
|
|
233
221
|
specification TranslatingADeclinedCardResult
|
|
234
222
|
when capture PaymentGatewayResults
|
|
@@ -243,6 +231,23 @@ module Invoicing
|
|
|
243
231
|
for "9c1f0a52-6a4e-4b1c-9f55-0d2c7b8e1a01"
|
|
244
232
|
reason = "Card declined"
|
|
245
233
|
|
|
234
|
+
slice Automation RecordPaymentOutcome
|
|
235
|
+
reaction ReceivedTranslator
|
|
236
|
+
when PaymentGatewayResultReceived
|
|
237
|
+
outcome
|
|
238
|
+
produces PaymentReceived
|
|
239
|
+
where outcome == "captured"
|
|
240
|
+
reaction DeclinedTranslator
|
|
241
|
+
when PaymentGatewayResultReceived
|
|
242
|
+
outcome
|
|
243
|
+
reason
|
|
244
|
+
produces PaymentDeclined
|
|
245
|
+
reason = reason
|
|
246
|
+
where outcome == "declined"
|
|
247
|
+
event PaymentReceived
|
|
248
|
+
event PaymentDeclined
|
|
249
|
+
reason String
|
|
250
|
+
|
|
246
251
|
slice StateView OpenInvoices
|
|
247
252
|
description "Todo list: membership means 'still to collect'; there is no status flag."
|
|
248
253
|
readmodel OpenInvoice
|
|
@@ -4,9 +4,20 @@ Coverage for public events and routed producers.
|
|
|
4
4
|
|
|
5
5
|
Outbound publication needs `when append <private>` and `then <PublicEvent>`:
|
|
6
6
|
complete state, incomplete state, unchanged repeat, changed instance, separate
|
|
7
|
-
source ids and the exported field boundary. Reference publication
|
|
8
|
-
source-event captures
|
|
9
|
-
Unsupported. Read automations-and-translations `references/public-events-and-direction.md
|
|
7
|
+
source ids and the exported field boundary. Reference publication and admitted
|
|
8
|
+
source-event captures execute; reached opaque event-target reducers remain typed
|
|
9
|
+
Unsupported. Read automations-and-translations `references/public-events-and-direction.md`
|
|
10
|
+
for the prerequisite and complete typed capture specifications.
|
|
11
|
+
|
|
12
|
+
For `source events`, use `given <FromEvent>` / `when append <FromEvent>`, not
|
|
13
|
+
`given capture` / `when capture` (PLAY0701). Cover first added, unchanged overlays,
|
|
14
|
+
updates after ordered givens, properties retained across different event types,
|
|
15
|
+
and independent keys. The key must be required on every source event, not a
|
|
16
|
+
context key (PLAY0700); optional foreign fixture `for` is not that key.
|
|
17
|
+
Assertions list all follow-up facts, never the input append itself. Mixed capture
|
|
18
|
+
and reaction expectations may need `then events in any order`; this is not proof
|
|
19
|
+
of observer order or redelivery deduplication. Children/nested over events and
|
|
20
|
+
context members other than `occurred` are not admitted execution.
|
|
10
21
|
For routed producers/observers, cover override versus inherited route, skipped
|
|
11
22
|
production route failure, matching/wrong source/stream and unrouted facts;
|
|
12
23
|
see toolchain `references/production-routes-and-filters.md`.
|
package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-examples.md
CHANGED
|
@@ -15,8 +15,10 @@ easily. Every excerpt below is copied verbatim from the complete document in
|
|
|
15
15
|
`invoicing-dues-example.md`, which compiles with warnings as errors and whose 23 specifications
|
|
16
16
|
pass in the reference evaluator; it also holds the declarations the excerpts depend on. The two
|
|
17
17
|
compensation excerpts in section 4 come from `invoicing-dues-design.md` instead: that document
|
|
18
|
-
holds
|
|
19
|
-
PLAY0268)
|
|
18
|
+
holds stored-state rules as a legacy control without `command reads protected`, so
|
|
19
|
+
it compiles but does not bind (PLAY0271/PLAY0268) and its design specs do not run.
|
|
20
|
+
Eligible reads can instead opt into v25; inspect admission and keep Stage refusal
|
|
21
|
+
separate (command-surface [protected reads](../../cratis-screenplay-command-surface/references/protected-reads.md)). A second
|
|
20
22
|
complete example, with competing claims and denial fixtures, is `berth-reservations.md`. The category structure and the good/bad contrast follow the worked
|
|
21
23
|
examples in `eventmodeling-elaborating-scenarios` by TrogonStack and by Martin Dilger and Nebulit GmbH (`provenance.md`), translated to
|
|
22
24
|
Screenplay specifications.
|
|
@@ -104,7 +106,11 @@ in `invoicing-dues-design.md`; it is never prose and never a spec that pretends
|
|
|
104
106
|
## 3. External failure: the capture, then the retry
|
|
105
107
|
Two separate obligations. First, the **capture specification**: concrete external input in, our
|
|
106
108
|
facts out. The provider's refusal is a fact (never a `then error`), kept in the provider's
|
|
107
|
-
vocabulary
|
|
109
|
+
vocabulary; a separate Automation records the local outcome. The capture uses
|
|
110
|
+
`when added` for first sight and a separate `when outcome` for updates. An update
|
|
111
|
+
spec needs `given capture` with the same key's earlier record; the first record's
|
|
112
|
+
fields are not modifications (root, child or nested). See captures-and-reactions
|
|
113
|
+
`references/record-capture-specifications.md` for runnable first/update/repeat cases.
|
|
108
114
|
```screenplay excerpt parent=references/invoicing-dues-example.md#1
|
|
109
115
|
specification TranslatingADeclinedCardResult
|
|
110
116
|
when capture PaymentGatewayResults
|
package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md
CHANGED
|
@@ -21,7 +21,8 @@ Typed example/override forms: `cratis-screenplay-specifications`
|
|
|
21
21
|
| Context `from`, single-result filters, `scoped to`, `performer` or composite `by` | yes | PLAY0268: query context, collection-only filtering, opaque scope/implementation or multipart lookup are unadmitted | no |
|
|
22
22
|
| `then no readmodel <RM> for "<key>"` | yes | yes | no |
|
|
23
23
|
| `when query` -> `then result` / `then no result` | yes | yes | same as `then query`: only the query-only cases below |
|
|
24
|
-
| `given clock` / `when clock`, `when trigger`, `given`/`when capture` | yes | yes (standalone and any cratis whose compiler admits v6; an older bundle does not, see toolchain `references/executable-subset.md`) | no |
|
|
24
|
+
| `given clock` / `when clock`, `when trigger`, record-source `given`/`when capture` | yes | yes (standalone and any cratis whose compiler admits v6; an older bundle does not, see toolchain `references/executable-subset.md`) | no |
|
|
25
|
+
| Event-source capture fixtures | `given <FromEvent>` / `when append <FromEvent>`, not capture records (PLAY0701) | admitted root capture behavior executes; see `public-event-coverage.md` for prerequisites and limits | separate target admission |
|
|
25
26
|
| Command spec listing reaction cascade events | yes (v6 semantics) | false PLAY0285 on an older cratis bundle only; see SKILL.md "Version skew" | no: STAGE-ESM-011; generated CommandScenario does not settle reactions |
|
|
26
27
|
| `generated <name> = <value>` under `when`, `then returns` (ESM v7) | yes | yes on a compiler that admits v7 (PLAY0268 on an older bundle) | yes on Stage for supported UUID/String strategies and v15 freshness and scalar/named responses; unsupported types/combinations remain -028/-038 |
|
|
27
28
|
| v15 generation strategy fixtures and used-source rejection | yes | strict encoding/size/case/version/variant; Contract for invalid pins, Concurrency for reused source | supported strategies/freshness render; invalid pins refuse -011, unpinned unordered/projected assertions -038; source: command-surface `references/generated-values-and-responses.md` |
|
|
@@ -35,7 +36,10 @@ Typed example/override forms: `cratis-screenplay-specifications`
|
|
|
35
36
|
| Composite (JSON) values in specs | yes | yes | no |
|
|
36
37
|
| Rules over dates or `today`, nested paths | spec them in design | rule does not bind: `recorded` | `recorded` |
|
|
37
38
|
| Bodied rules, code policies | spec them | spec reported **unsupported**, never passed | no |
|
|
38
|
-
|
|
|
39
|
+
| Pending described command handlers (v23) | specify intent | binds; denial/validation execute, body-reaching specs Unsupported ImplementationBody; all-Unsupported is not green | STAGE-IMPL-002 even Stub mode |
|
|
40
|
+
| Attached command handlers, `file` constraints, query `performer`s | spec them in design | blocked: PLAY0268 at binding, no spec runs (V3 blocked) | no |
|
|
41
|
+
| Atomic reaction mode (v22) | declare for new models | failed batch adds no facts or view changes; earlier batches/commands remain; `then error` alone is insufficient | v22 STAGE-ESM-016; mode in admitted v23–v25 STAGE-ESM-043 |
|
|
42
|
+
| Protected command reads (v25) | declare opt-in for eligible reads | absence Validation; matching intervening facts Conflict; race vectors are not a new spec construct | protected reads STAGE-ESM-044; v25 pair admitted |
|
|
39
43
|
|
|
40
44
|
Requires Screenplay 4.105.0 or later (`screenplay --version`) for list-query specifications, and 4.143.0 or later for collection equality filters (ESM v14).
|
|
41
45
|
|
|
@@ -49,7 +53,7 @@ older cratis bundle is available). Mark each such spec in the coverage matrix as
|
|
|
49
53
|
`gap: <reason>` for the narrower modes so the verification and render phases know what will not execute.
|
|
50
54
|
|
|
51
55
|
## Executable mode
|
|
52
|
-
- Every gated spec has `given caller`;
|
|
56
|
+
- Every gated spec has `given caller`; local given/expected events have `for`, and so does every plain `produces <Name>` (inline `produces event` omits it and defaults to the identifier). Foreign event fixtures driving captures may omit `for`; a supplied value is opaque source text, not the capture key.
|
|
53
57
|
- Each read model has one key shared by its keyed `=> RM optional` queries; the identifier equals
|
|
54
58
|
the projection's effective key (`cratis-screenplay-slice-design` `references/read-model-design.md`
|
|
55
59
|
decision table). View specs assert through a keyed query.
|
|
@@ -157,7 +157,9 @@ When `.screenplay/identities.json` exists, adding, removing or renaming an addre
|
|
|
157
157
|
Slice design is done when these hold; otherwise report what is open.
|
|
158
158
|
|
|
159
159
|
- [ ] Every command: origin reachable and authorized; every input traced; rules placed by
|
|
160
|
-
layer; stored-state rules
|
|
160
|
+
layer; stored-state rules use admitted protected reads, or name the refused shape
|
|
161
|
+
and target gap; no form-verb name. Read [protected reads](../cratis-screenplay-command-surface/references/protected-reads.md)
|
|
162
|
+
for opt-in and Stage refusal; reference protection is not target realization.
|
|
161
163
|
- [ ] Every command has a refusal inventory (success, each refusal with layer and message,
|
|
162
164
|
denied persona); every gated command and query has a `then denied` row.
|
|
163
165
|
- [ ] Every event is past tense, a specific change, and consumed or justified.
|
package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md
CHANGED
|
@@ -171,13 +171,13 @@ Rules for filling it:
|
|
|
171
171
|
| AssignLocker | caller is not an attendant | `authorize IsAttendant` | denied: Customer | RefusingACustomerAssigningALocker |
|
|
172
172
|
| AssignLocker | locker already has a request | constraint `OneRequestPerLocker` | "The locker is already assigned" | AppendingASecondAssignmentOfALocker (`when append`: the command's own `require` would reject first) |
|
|
173
173
|
| AssignLocker | request already has a locker | constraint `OneLockerPerRequest` | "The request already has a locker" | gap |
|
|
174
|
-
| AssignLocker | locker is not free |
|
|
175
|
-
| AssignLocker | request is not waiting |
|
|
174
|
+
| AssignLocker | locker is not free | Legacy example lacks protected-read opt-in; inspect v25 admission and Stage gap | "The locker is not free"; target: `[ProtectedDecision]` (Arc 22.39.0+; available to Stage 4.73.1 gap-fill, not emitted protection) or DCB on the locker stream | RejectingASecondAssignmentOfALocker (pins the message; blocked until the target exists) |
|
|
175
|
+
| AssignLocker | request is not waiting | Legacy example lacks protected-read opt-in; inspect v25 admission and Stage gap | "The request is not waiting for a locker" | gap (same) |
|
|
176
176
|
| LockerById, ListLockers | caller is anonymous | module `authorize IsAuthenticated` | denied: no caller | RefusingAnAnonymousLockerLookup, RefusingAnAnonymousLockerList |
|
|
177
177
|
| RequestById | caller is anonymous | module `authorize IsAuthenticated` | denied: no caller | RefusingAnAnonymousRequestLookup |
|
|
178
178
|
|
|
179
|
-
The gaps are the hand-off: most are cheap rejection specs, and two
|
|
180
|
-
|
|
179
|
+
The gaps are the hand-off: most are cheap rejection specs, and two need protected-read admission plus separately verified target realization;
|
|
180
|
+
the legacy example has not opted into v25. A model whose inventory shows no gaps at design time has probably
|
|
181
181
|
not been asked the refusal questions.
|
|
182
182
|
|
|
183
183
|
## Common mistakes
|
|
@@ -11,14 +11,16 @@ 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
|
|
14
|
+
| stored state (record exists, balance, current status) | `reads <View>` + `require` with an indented message | opt eligible reads into `command reads protected` (v25); absence Validation, matching intervening facts Conflict. Legacy/refused shapes stay stated intent with a named target mechanism |
|
|
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
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
|
+
target enforcement separate from reference semantics until target tests verify it.
|
|
22
|
+
Read [protected command reads](../../cratis-screenplay-command-surface/references/protected-reads.md)
|
|
23
|
+
for admission and Stage's protected-read refusal (STAGE-ESM-044); never remove protection to obtain rendering. Forbidden: caller-supplied copies of state in `require`, boolean attestation
|
|
22
24
|
inputs (`confirmsX == true`), rules in `handler` / implementation-hint prose.
|
|
23
25
|
|
|
24
26
|
## Authorization is executable
|
|
@@ -97,14 +97,15 @@ module Moorings
|
|
|
97
97
|
Record, per slice, the events it consumes and which slice produces each. This is for
|
|
98
98
|
orientation, not a build order: view specifications use synthetic `given` events, so slices
|
|
99
99
|
are built and checked independently. A command or reaction may consult another slice's view
|
|
100
|
-
(`reads`;
|
|
100
|
+
(`reads`; eligible command reads can opt into v25 protection, trigger reads cannot;
|
|
101
|
+
see `rule-layers.md` for target gaps). A slice never calls another slice's
|
|
101
102
|
command except through `invokes`. Dependencies run in one direction; a cycle through events
|
|
102
103
|
means the story is a feedback loop that belongs in an `Automation` slice.
|
|
103
104
|
|
|
104
105
|
The contract between slices is events: slice B depends on slice A because B's command, rule
|
|
105
106
|
or view needs an event A produces. Two other edges are supported and recorded explicitly, never
|
|
106
|
-
implied: `reads <View>` from another slice (
|
|
107
|
-
|
|
107
|
+
implied: `reads <View>` from another slice (declare protected-command opt-in and
|
|
108
|
+
admission, or mark the legacy/refused shape and target gap, `rule-layers.md`) and `invokes <Command>` from a reaction. No shared state or
|
|
108
109
|
other direct call. Name each
|
|
109
110
|
slice after its element (the command, the view, the automation, the translation (capture or translator reaction)), not a broader feature name
|
|
110
111
|
that spans several. Per slice, record:
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# Worked example: parcel lockers (design mode)
|
|
2
2
|
|
|
3
|
-
One complete
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
and
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
One complete legacy design-mode control for `cratis-screenplay-slice-design`, without
|
|
4
|
+
`command reads protected`. Its reads and read paths retain PLAY0271/PLAY0268, so no
|
|
5
|
+
specification runs here. List queries and clock fixtures bind on an admitting compiler;
|
|
6
|
+
they are not the remaining blocker. Personas and screens are informational.
|
|
7
|
+
Eligible command reads can opt into v25; inspect every projection/key/removal before
|
|
8
|
+
migration and retain Stage's separate refusal (STAGE-ESM-044; the v25 pair itself is admitted). Read
|
|
9
|
+
[protected reads](../../cratis-screenplay-command-surface/references/protected-reads.md).
|
|
10
|
+
The unenforced descriptions below refer to this legacy control, not all command reads.
|
|
11
11
|
The specifications still seed every read-model source (`LockerInstalled`, `LockerRequested`,
|
|
12
12
|
complete givens) so they are the right form once binding is possible.
|
|
13
13
|
Lineage matrix: `field-lineage.md`. State-transition table and rule coverage: `slicing.md`.
|
|
@@ -40,41 +40,46 @@ Screenplay's reference runner executes specifications against an immutable
|
|
|
40
40
|
in-memory world: no Arc, no Chronicle, no database, no network. Every downstream
|
|
41
41
|
target has one normalized behavior to match.
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
- A
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
43
|
+
Binding is not plan admission. Read model-authoring's
|
|
44
|
+
[language reference](../cratis-screenplay-model-authoring/references/language-reference.md)
|
|
45
|
+
when distinguishing executable declarations, refused projection shapes and opaque
|
|
46
|
+
code. Reached opaque code is **unsupported**, never passed; portable denial may
|
|
47
|
+
still execute before it. Unsupported declarative constructs block the whole plan,
|
|
48
|
+
not just the specifications that touch them.
|
|
49
|
+
|
|
50
|
+
Read [reactions and cascades](references/reactions-and-cascades.md) when testing
|
|
51
|
+
ESM v6 actions; older compilers fail reaction/capture binding with PLAY0268.
|
|
52
|
+
Read [child ordering](references/child-ordering.md) for deferral;
|
|
53
|
+
an ambiguous parent still fails closed.
|
|
54
|
+
Requires Screenplay 4.149.1 or later (`screenplay --version`) for child deferral; older runners do not defer.
|
|
55
|
+
|
|
56
|
+
A rejected command/append leaves the world unchanged; an accepted one commits
|
|
57
|
+
before comparing views. V6 has no scenario-wide transaction: later cascade
|
|
58
|
+
failure does not roll back earlier accepted facts. Atomic mode boundaries are below.
|
|
59
|
+
|
|
60
|
+
Unsupported is not passed. Name a target. Run CLI/MCP reference execution
|
|
61
|
+
or target tests; name engine, version and expected/discovered selection.
|
|
62
|
+
|
|
63
|
+
## Batches, described bodies, protected reads and text rules
|
|
64
|
+
|
|
65
|
+
- With `reaction batches atomic`, assert no facts from a failed direct-production or
|
|
66
|
+
selected refusal-branch batch and unchanged views through evaluator world assertions,
|
|
67
|
+
not only `then error`. `then no events` is acceptance and cannot accompany an error. Earlier
|
|
68
|
+
accepted batches/invoked commands remain; legacy absence retains per-fact appends.
|
|
69
|
+
Read [atomic boundaries](../cratis-screenplay-captures-and-reactions/references/atomic-batches-and-source-mappings.md).
|
|
70
|
+
- A described handler binds v23, but reaching its body returns Unsupported
|
|
71
|
+
ImplementationBody, naming command/RequirementId and emitting no events. Denial and
|
|
72
|
+
validation cases still run; an all-Unsupported run is never green. Read
|
|
73
|
+
[described handlers](../cratis-screenplay-command-surface/references/described-handlers.md).
|
|
74
|
+
- Protected command reads opt into v25. Test present/absent state and rule refusal;
|
|
75
|
+
matching decide/commit changes are Conflict / DecisionStateChanged, not validation
|
|
76
|
+
refusal. Race vectors are not new specification syntax. Read
|
|
77
|
+
[protected reads](../cratis-screenplay-command-surface/references/protected-reads.md).
|
|
78
|
+
- Literal text rules use ordinal UTF-16 comparison (v24); matches uses a portable
|
|
79
|
+
linear matcher, not platform regex. Old invalid/refused patterns plan as
|
|
80
|
+
UnsupportedValidation, not a successful check. Read
|
|
81
|
+
[text and match rules](../cratis-screenplay-command-surface/references/text-and-match-rules.md)
|
|
82
|
+
for boundary values and PLAY0699/0787. Reference success is not Stage admission.
|
|
78
83
|
|
|
79
84
|
## Descriptions, persona callers and case tables
|
|
80
85
|
|
|
@@ -102,8 +107,7 @@ Rules the binder enforces:
|
|
|
102
107
|
- **`then result` and `then no result` need `when query`**, and `when query`
|
|
103
108
|
needs one of them, `then denied` or a sole validation `then error` (`PLAY0465`). Each argument is a `by` or
|
|
104
109
|
`filter` parameter of the query (`PLAY0468`).
|
|
105
|
-
- **A clock instant is ISO 8601 with an offset or `Z
|
|
106
|
-
`"2026-10-05T08:00:00Z"` (`PLAY0461`); `given clock` appears at most once.
|
|
110
|
+
- **A clock instant is ISO 8601 with an offset or `Z`** (PLAY0461); one `given clock` maximum.
|
|
107
111
|
- **`then` contains either events or an error — never both.** A rejection
|
|
108
112
|
specification has exactly one rejection and no success outcome.
|
|
109
113
|
- **`then denied` stands alone**: not with events, errors or state assertions
|
|
@@ -114,10 +118,8 @@ Rules the binder enforces:
|
|
|
114
118
|
- **`null` only in optional read-model values.** A `null` in a command or event
|
|
115
119
|
value is `PLAY0350`: an optional fact is a separate event.
|
|
116
120
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
`screenplay --warnaserror` does not show them. Check executable diagnostics
|
|
120
|
-
(the MCP authoring tools) as well.
|
|
121
|
+
V1 does not report binding-only outcome errors; read `references/vocabulary.md`
|
|
122
|
+
for parse-versus-bind diagnostics and check executable diagnostics too.
|
|
121
123
|
|
|
122
124
|
## How outcomes are compared
|
|
123
125
|
|
|
@@ -154,12 +156,12 @@ Read [references/reactions-and-cascades.md](references/reactions-and-cascades.md
|
|
|
154
156
|
|
|
155
157
|
## Published-event specifications (released ESM v9)
|
|
156
158
|
|
|
157
|
-
Use `when append <PrivateEvent>` then `then <PublicEvent
|
|
158
|
-
|
|
159
|
-
[publication
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
unadmitted
|
|
159
|
+
Use `when append <PrivateEvent>` then `then <PublicEvent>`, not `then readmodel`;
|
|
160
|
+
follow-up events are exhaustive and ordered. Read
|
|
161
|
+
[publication and fold cases](../cratis-screenplay-automations-and-translations/references/public-events-and-direction.md)
|
|
162
|
+
when specifying outbound facts or event-source captures: it owns the minimum
|
|
163
|
+
compiler, PLAY0700/0701, key folding and Unsupported boundaries. Composite view
|
|
164
|
+
fixtures remain unadmitted; see read-surface `references/named-keys.md`.
|
|
163
165
|
|
|
164
166
|
## Reusable fixtures, routes and recovery intent
|
|
165
167
|
|
package/package/corpus/skills/cratis-screenplay-specifications/references/actions-beyond-commands.md
CHANGED
|
@@ -7,7 +7,17 @@ A slice is not always set off by a command. Name what does:
|
|
|
7
7
|
| A view no event builds - its query has a `performer` | `given readmodel` …, `when query <Query>`, `then result` / `then no result` |
|
|
8
8
|
| An automation driven by the clock | `given clock "<instant>"`, `when clock "<later instant>"` |
|
|
9
9
|
| An automation driven by an application trigger | `when trigger <Trigger>` with the values it carries |
|
|
10
|
-
| A translation driven by a capture | `given capture <Capture>` (the record as it was), `when capture <Capture>` (as it is now) |
|
|
10
|
+
| A translation driven by a record capture | `given capture <Capture>` (the record as it was), `when capture <Capture>` (as it is now) |
|
|
11
|
+
| A capture with `source events` | `given <FromEvent>`, `when append <FromEvent>`; capture-record fixtures are PLAY0701 |
|
|
12
|
+
|
|
13
|
+
A first record is `added` only, including child and nested records; field-change,
|
|
14
|
+
`and`/`or` and transition guards need earlier state for the same key. For first sight
|
|
15
|
+
add a separate `when added` append; for an update seed `given capture`. Requires
|
|
16
|
+
Screenplay 4.175.0 or later (`screenplay --version`); older record evaluators treat
|
|
17
|
+
first-record fields as changed. Complete cases: captures-and-reactions
|
|
18
|
+
[record capture specifications](../../cratis-screenplay-captures-and-reactions/references/record-capture-specifications.md).
|
|
19
|
+
Event captures use the typed event fixtures and overlay rules in
|
|
20
|
+
[public event captures](../../cratis-screenplay-automations-and-translations/references/public-events-and-direction.md).
|
|
11
21
|
|
|
12
22
|
Use `given clock`, never `given time`, to state the scenario occurrence time and
|
|
13
23
|
assert a value mapped from `$context.occurred`. In a command's `produces`, that
|