@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
package/package/corpus/skills/cratis-screenplay-specifications/references/generated-fixtures.md
CHANGED
|
@@ -1,31 +1,42 @@
|
|
|
1
|
-
|
|
1
|
+
# Generated fixtures and return expectations
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- Choosing a strategy
|
|
6
|
+
- When not to
|
|
7
|
+
- Fixtures and outcomes
|
|
8
|
+
|
|
9
|
+
## Choosing a strategy
|
|
4
10
|
|
|
5
11
|
Use the [shop example](../../cratis-screenplay-command-surface/references/shop-generation.md):
|
|
6
12
|
pin CustomerId (`cus_` + ULID), OrderId (TypeID) and InviteCode (NanoID) as
|
|
7
13
|
whole values. ApiKey stays secret with no executable generation; do not write a
|
|
8
14
|
passing issuance spec that invents its .NET Bytes(32) factory in Screenplay.
|
|
9
|
-
|
|
15
|
+
Pin InvoiceNumber's whole date/checksum reference and TicketNumber's integral
|
|
16
|
+
pickup-ticket value too; do not use numeric text for Int fixtures.
|
|
10
17
|
|
|
11
18
|
Choose the concept's strategy for the job, then pin a whole value matching it:
|
|
12
19
|
`for` for its generated identifier, named `generated` fixtures for other values.
|
|
13
20
|
Use the shared [strategy reference](../../cratis-screenplay-command-surface/references/generated-values-and-responses.md)
|
|
14
|
-
for UUID, time-ordered, typed/opaque text
|
|
15
|
-
|
|
21
|
+
for UUID, time-ordered, typed/opaque text, byte budgets, finite patterns and Int
|
|
22
|
+
range choices and exact shapes.
|
|
23
|
+
`given clock` supplies `$context.occurred` and pattern UTC date segments, not a generated time-ordered ID;
|
|
16
24
|
a seed is not a portable fixture.
|
|
17
25
|
|
|
18
|
-
|
|
26
|
+
## When not to
|
|
19
27
|
|
|
20
28
|
Pins do not prove randomness, authorization, idempotency, storage freshness or
|
|
21
29
|
secret safety. Client-minted IDs stay inputs; gapless invoice numbering needs an
|
|
22
|
-
allocator, not a random fixture.
|
|
23
|
-
|
|
30
|
+
allocator, not a random fixture or pattern. Check digits catch typos, not forgery;
|
|
31
|
+
short payload codes need uniqueness enforcement separate from source freshness.
|
|
32
|
+
Pattern/random/rule and checksum validation bind as v21. Stage renders
|
|
33
|
+
pattern/random/checksum under the version gates below; `generate rule` remains
|
|
34
|
+
STAGE-ESM-028. Generated secrets remain refused. Source: Screenplay
|
|
24
35
|
`Documentation/screenplay/generated-values/choosing.md`.
|
|
25
36
|
|
|
26
|
-
|
|
37
|
+
## Fixtures and outcomes
|
|
27
38
|
|
|
28
|
-
A compiler that admits ESM v7 binds and runs these; Stage renders supported UUID/String generation strategies,
|
|
39
|
+
A compiler that admits ESM v7 binds and runs these; Stage renders supported UUID/String and Int random generation strategies,
|
|
29
40
|
scalar/named responses, fixtures and `then returns`. Unsupported types/result combinations
|
|
30
41
|
remain `STAGE-ESM-028`/`-038`; preserve refused specifications as gap-fill contracts. The model and rules are in `cratis-screenplay-command-surface`; the
|
|
31
42
|
complete threaded model is the linked shop example. The excerpt below belongs
|
|
@@ -62,17 +73,37 @@ specification RegistersWithPinnedValues
|
|
|
62
73
|
own destinations. For commands without a generated identifier `when ... for` keeps the destination assertion.
|
|
63
74
|
UUID fixtures require canonical lowercase hyphenated form. From v15, pins must also match
|
|
64
75
|
exact strategy size, case, UUID version/variant and zero trailing encoding bits; invalid pins are
|
|
65
|
-
Contract rejections.
|
|
76
|
+
Contract rejections. A generated concept with rules selects v20 and checks pins
|
|
77
|
+
against both shape and rules, including implicit UUID. Rule failures are
|
|
78
|
+
`Rejected(Contract)` with `Generated fixture '<property>' fails concept '<Concept>' rules`,
|
|
79
|
+
never client validation failures or redraws. Earlier rule-free implicit-UUID
|
|
80
|
+
models check canonical UUID type, not its version.
|
|
66
81
|
- A serialized concept generation strategy selects v15 and Guarded whole-source freshness for all
|
|
67
82
|
generated destinations, including implicit UUIDs. Reusing a generated source with existing facts
|
|
68
|
-
rejects the entire command with Concurrency, without append, response or silent retry.
|
|
69
|
-
|
|
83
|
+
rejects the entire command with Concurrency, without append, response or silent retry.
|
|
84
|
+
Models without a serialized strategy retain legacy reuse even when rules select v20. See the complete [strategy example](../../cratis-screenplay-toolchain/references/generation-strategies-example.md)
|
|
70
85
|
and command-surface `references/generated-values-and-responses.md` for tagged sources.
|
|
71
|
-
- `given clock` supplies `$context.occurred
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
86
|
+
- `given clock` supplies `$context.occurred` and requires all pattern date segments
|
|
87
|
+
to match the same UTC instant, including offset rollover and leap days. Without
|
|
88
|
+
a clock the reference runner checks digit widths, never today's wall clock.
|
|
89
|
+
Checksum pins check arithmetic only with an authored `validate checksum` rule;
|
|
90
|
+
a generation modifier alone checks suffix shape. It does not synthesize UUIDv7,
|
|
91
|
+
ULID or TypeID: pin the whole identifier, never a seed. Stage time-ordered
|
|
92
|
+
factories use receipt time; admitted command clock specs render. Sources: Screenplay
|
|
75
93
|
`Documentation/screenplay/generated-values/choosing.md`; Stage
|
|
76
94
|
`Documentation/reference/generated-values-rendering.md`.
|
|
95
|
+
- Attached generation bodies are not run: pin the resulting String;
|
|
96
|
+
an opaque validator still yields Unsupported. Stage allows unpinned rendered
|
|
97
|
+
generation only when every concept rule is Proven and the expectations support
|
|
98
|
+
relational captures. Unproven/Refuted rules need pins (-038); invalid pins fail
|
|
99
|
+
STAGE-ESM-011. Opaque/unsupported rules refuse -005 before pin evaluation.
|
|
100
|
+
Screenplay's reference runner and Stage's independent executor always need pins.
|
|
77
101
|
- A reaction-invoked command that reaches generation is `Unsupported(IdentityAllocation)` (no fixture channel); a
|
|
78
102
|
response-only command runs and its response is discarded.
|
|
103
|
+
|
|
104
|
+
Requires Screenplay 4.164.0 (`screenplay --version`) for v20 rule-bearing generated pins, 4.172.0 for v21 finite/rule strategies; older compilers refuse PLAY0268.
|
|
105
|
+
Requires Stage 4.95.0 for command clock specs and 4.109.0 for v20 rule-bearing pins; older renderers refuse those shapes.
|
|
106
|
+
Requires Stage 4.115.0 for v21 admission/all-Proven unpinned rendering, 4.117.0
|
|
107
|
+
for warning/info generated-concept rules, 4.118.0 for checksum validation and
|
|
108
|
+
4.119.0 for pattern/random. Older renderers require rule-bearing pins or refuse
|
|
109
|
+
the respective rules/strategies with -038/-042/-028. `generate rule` remains -028.
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
<!-- Copyright (c) Cratis. All rights reserved. -->
|
|
2
|
+
<!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
|
|
3
|
+
|
|
1
4
|
# The specification vocabulary
|
|
2
5
|
|
|
3
6
|
This reference holds the given/when/then construct table and the enumeration and DateTime literal rules.
|
|
@@ -17,7 +20,7 @@ This reference holds the given/when/then construct table and the enumeration and
|
|
|
17
20
|
| `given clock "<instant>"` | the ISO 8601 instant the scenario happens at |
|
|
18
21
|
| `when clock "<instant>"` | the clock reaches an instant; scheduled reactions that are due run |
|
|
19
22
|
| `when trigger <Trigger>` | an application trigger fires with the values beneath it |
|
|
20
|
-
| `given capture` / `when capture <Capture>` |
|
|
23
|
+
| `given capture` / `when capture <Capture>` | earlier/current records for non-event sources; for `source events` use typed `given <Event>` / `when append <Event>` (PLAY0701) |
|
|
21
24
|
| `generated <name> = <value>` | beneath `when <Command>`: the fixture for a generated property other than the identifier (ESM v7); `for` beneath the `when` supplies the generated identifier |
|
|
22
25
|
| `then returns [<value>]` | the command's response (ESM v7): `then returns "<uuid>"` for a scalar, `then returns` with named `field = value` lines for a subset of a record |
|
|
23
26
|
| `then <EventType>` | an expected new event |
|
|
@@ -32,6 +35,16 @@ This reference holds the given/when/then construct table and the enumeration and
|
|
|
32
35
|
| `for <value>` | the event source of a `given`/`then` event, or of the `when` command or appended event |
|
|
33
36
|
| `<property> = <value>` | a literal, `null`, or a one-line JSON-shaped object or list: `lines = [{"sku":"A-1","quantity":2}]` |
|
|
34
37
|
|
|
38
|
+
## Parse and binding diagnostics
|
|
39
|
+
|
|
40
|
+
PLAY0358 is a syntax error; PLAY0388 also occurs at parse time for extra text
|
|
41
|
+
after `then denied`. PLAY0350, PLAY0352, PLAY0388 for mixed outcomes, PLAY0389 and
|
|
42
|
+
the one-rejection rule PLAY0273 occur only at binding. Source validation alone
|
|
43
|
+
will not report them: check executable diagnostics as well. Clock instants need
|
|
44
|
+
an ISO 8601 offset or `Z`, for example `"2026-10-05T08:00:00Z"` (PLAY0461).
|
|
45
|
+
|
|
46
|
+
## Literal spellings
|
|
47
|
+
|
|
35
48
|
An enumeration value binds whether it is written bare
|
|
36
49
|
(`status = sent`), qualified (`status = InvoiceStatus.sent`) or quoted, and a
|
|
37
50
|
`DateTime` value binds as a plain ISO 8601 instant (`"2026-10-05T08:00:00Z"`).
|
|
@@ -26,17 +26,15 @@ Read [references/product-sources.md](references/product-sources.md) when checkin
|
|
|
26
26
|
- Not for: projection and query syntax, reactions and captures, writing the specifications
|
|
27
27
|
themselves (`cratis-screenplay-scenario-coverage`), Chronicle C# mechanics
|
|
28
28
|
(`cratis-chronicle-event-modeling`). See Route near misses.
|
|
29
|
-
-
|
|
30
|
-
|
|
29
|
+
- Apply model-first per `cratis-screenplay-modeling-lifecycle`; never weaken
|
|
30
|
+
authorization, `pii` or rules to compile.
|
|
31
31
|
|
|
32
32
|
## Interview phase
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
Ask only what is missing: (1) instance - what real-world thing the stream is about; (2) competition - what must never happen when two people act at once; (3) retry - what a repeated request should see; (4) ownership; (5) growth; (6) change - whether the event was ever stored in a running system. Read [references/interview-batch.md](references/interview-batch.md) for each question's follow-up; ownership options are in `references/boundaries.md`.
|
|
33
|
+
Read [interview prompts](references/interview-batch.md) when identity, competition,
|
|
34
|
+
retry, ownership, growth or stored-event history is unsettled. Ask only missing
|
|
35
|
+
questions, one at a time; ownership options are in `references/boundaries.md`.
|
|
36
|
+
Unattended work takes the conservative option and marks it `ASSUMED` in model
|
|
37
|
+
`documentation` and `.ai-work/screenplay/<model-slug>/STATE.md`.
|
|
40
38
|
|
|
41
39
|
## Procedure
|
|
42
40
|
1. **Establish identity and membership.** For every `concept XId` used as an `identifier`, write
|
|
@@ -87,14 +85,10 @@ Ask only what is missing: (1) instance - what real-world thing the stream is abo
|
|
|
87
85
|
(PLAY0270), not runtime propagation or generated C# `[Subject]`. Without a
|
|
88
86
|
supplied subject, the runtime defaults to the event source; see command-surface
|
|
89
87
|
`references/compliance.md` for allowed types and the policy/encryption distinction.
|
|
90
|
-
5. **Plan evolution
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
Pin persisted/public enum member numbers before reordering or removing members (`references/evolution.md`, "Enum member numbers").
|
|
95
|
-
|
|
96
|
-
Renames and other identity-affecting edits are made by the identity owner (the
|
|
97
|
-
identity procedure in `cratis-screenplay-modeling-lifecycle`).
|
|
88
|
+
5. **Plan evolution**: read `references/evolution.md` before editing stored contracts
|
|
89
|
+
for change classification, compatibility scenarios and enum-number safety.
|
|
90
|
+
After release-baseline admission, revisions need `newGeneration`. Identity-affecting edits belong to the
|
|
91
|
+
identity owner (`cratis-screenplay-modeling-lifecycle`).
|
|
98
92
|
6. **Test ownership and interfaces** with `references/boundaries.md`: ownership interview,
|
|
99
93
|
interface and processor inventory, one real interaction walked across each boundary, coupling
|
|
100
94
|
check. Keep team, module, stream and deployment boundaries distinct; inbound facts via
|
|
@@ -108,15 +102,19 @@ Ask only what is missing: (1) instance - what real-world thing the stream is abo
|
|
|
108
102
|
- `identifier` on an event property is PLAY0019; the source id is never payload by declaration.
|
|
109
103
|
Copying it as a payload value is PLAY0469 (information, warning for inline events).
|
|
110
104
|
- In the executable model a production's `for` must resolve to the command's scalar identifier:
|
|
111
|
-
one command writes one stream declaratively
|
|
105
|
+
one command writes one stream declaratively; described handlers bind v23 but
|
|
106
|
+
their payload-only contract does not grant arbitrary destinations.
|
|
112
107
|
- Constraint names are application-wide identities (PLAY0392); properties must be declared
|
|
113
108
|
directly on the event (PLAY0391); never mix event and property rules under one name (PLAY0135);
|
|
114
109
|
`ignore casing` is not allowed on `unique event` (PLAY0393).
|
|
115
110
|
- Generations are declared in full, numbered 1..N without gaps, in the same slice (PLAY0446-0448); `id` pins are shared by all generations and unique application-wide (PLAY0472); `storedName` needs ESM v16. See `references/evolution.md` ("Generations, pins and storedName diagnostics").
|
|
116
111
|
|
|
117
|
-
- `reads`
|
|
118
|
-
|
|
119
|
-
|
|
112
|
+
- Application-root `command reads protected` admits eligible reads and single-level
|
|
113
|
+
requirement/mapping paths (v25). Absence rejects, matching decide/commit changes
|
|
114
|
+
conflict. Legacy reads remain PLAY0271/PLAY0268; `concurrency` remains unbound and
|
|
115
|
+
combining it with protected reads is PLAY0783. Read
|
|
116
|
+
[protected reads](../cratis-screenplay-command-surface/references/protected-reads.md)
|
|
117
|
+
for admission and Stage's STAGE-ESM-044 protected-read refusal (the v25 pair itself is admitted). `description` text never reaches rendered code: a rule that lives only in prose is
|
|
120
118
|
unenforced there.
|
|
121
119
|
- `pii` and `secret` bind as ESM v13;
|
|
122
120
|
enum/identity compliance and protected events with explicit subject marks still
|
|
@@ -144,6 +142,12 @@ Requires Chronicle 19.59.6 or later (19.59.3 for the InMemory provider) for the
|
|
|
144
142
|
- Give each invariant an authoritative atomic decision point and inspect every path that could
|
|
145
143
|
violate it. A constraint violation rejects that command's whole append set; a reaction cascade
|
|
146
144
|
is not one transaction. Declared semantics are not a passed concurrency test.
|
|
145
|
+
- New models declare `reaction batches atomic`: direct productions per trigger
|
|
146
|
+
occurrence and each selected refusal branch are separate batches; invoked commands
|
|
147
|
+
stay independent. Legacy absence retains per-fact appends. Stage refuses v22
|
|
148
|
+
with STAGE-ESM-016 and atomic mode in admitted v23–v25 with STAGE-ESM-043. Read
|
|
149
|
+
[atomic boundaries](../cratis-screenplay-captures-and-reactions/references/atomic-batches-and-source-mappings.md)
|
|
150
|
+
when defining failure rollback; batching is not redelivery deduplication.
|
|
147
151
|
- Match duplicate protection to scope. A property constraint lets a source re-claim its own
|
|
148
152
|
value; use `unique event` for a fact that is genuinely once-only in its lifecycle, without
|
|
149
153
|
blocking legitimate repeated operations just to make retries safe.
|
package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/boundaries.md
CHANGED
|
@@ -80,8 +80,8 @@ For each affected boundary, identify:
|
|
|
80
80
|
|
|
81
81
|
Use declaration addresses, not copies of payloads. Per slice, also record the events it consumes
|
|
82
82
|
and which slice produces them, for orientation, not as a build order. A command or reaction may
|
|
83
|
-
consult another slice's view (`reads`;
|
|
84
|
-
section 3); a slice calls another slice's command only through `invokes`.
|
|
83
|
+
consult another slice's view (`reads`; eligible commands opt into v25 protection,
|
|
84
|
+
trigger reads cannot; see `consistency-and-concurrency.md` section 3 for target gaps); a slice calls another slice's command only through `invokes`.
|
|
85
85
|
|
|
86
86
|
### Responsibility matrix and ownership timeline
|
|
87
87
|
One compact matrix per feature shows who owns what; the timeline shows where a fact crosses.
|
|
@@ -57,8 +57,8 @@ observed legacy check from verified atomic protection.
|
|
|
57
57
|
| several command properties / constants | `require` | runs after property rules, before production |
|
|
58
58
|
| a value across all sources | `unique <prop> on <Event>` | value owned by one source; same source may re-claim |
|
|
59
59
|
| a fact at most once per source; mutually exclusive facts | `unique event` (+ `released by`) | covers simple lifecycle transitions |
|
|
60
|
-
| state-dependent rule
|
|
61
|
-
| a view (read model) |
|
|
60
|
+
| state-dependent rule (balance, capacity, "only if approved") | eligible `reads` + `require` under `command reads protected` (v25) | required absence rejects; matching intervening facts conflict. Payload-key fan-in, joins, reducers and other refused shapes remain target gaps |
|
|
61
|
+
| a view (read model) | unguarded materialized reads are not protection | legacy command and trigger reads remain unprotected; Stage refuses protected reads (STAGE-ESM-044), so reference protection is not target realization |
|
|
62
62
|
|
|
63
63
|
## 3. Record each state-dependent rule that the model cannot enforce
|
|
64
64
|
Never accept the caller's copy of the state: `currentStatus Status` on the command with
|
|
@@ -67,7 +67,13 @@ input (`confirmsX == true`) standing in for the rule. Never move the rule into `
|
|
|
67
67
|
`implementation hint` prose; a description renders only as an XML doc comment (Stage#178), so prose alone leaves
|
|
68
68
|
the rule unenforced in rendered scope.
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
First inspect [protected reads](../../cratis-screenplay-command-surface/references/protected-reads.md):
|
|
71
|
+
opt eligible command reads into v25, retain absence/conflict specifications and verify
|
|
72
|
+
target consistency separately. Stage admits v25 but refuses protected reads (STAGE-ESM-044). A payload-keyed
|
|
73
|
+
fan-in such as the course-capacity example remains refused; the preamble is not a
|
|
74
|
+
blanket admission of arbitrary projections.
|
|
75
|
+
|
|
76
|
+
For legacy models without opt-in or refused shapes, write stated intent and mark it unenforced.
|
|
71
77
|
- `reads <View> as x by …` plus `require <expr over x> message "…"` on the command (the
|
|
72
78
|
`StateChange` slice in `streams-example.md`). Binding reports PLAY0271 / PLAY0268; that is
|
|
73
79
|
expected in design mode, so keep the lines. Do not remove them to pass a tool.
|
|
@@ -115,9 +115,10 @@ module Billing
|
|
|
115
115
|
another reason each service has its own folder.
|
|
116
116
|
- A capture keys on the incoming content, so the contract carries the identity
|
|
117
117
|
the consumer keys on.
|
|
118
|
-
-
|
|
119
|
-
consumer's capture over events
|
|
120
|
-
the
|
|
118
|
+
- Both sides run in the reference evaluator: the producer's publication
|
|
119
|
+
specification, and the consumer's capture over events, which a specification
|
|
120
|
+
drives by presenting the consumed public event (`when append <Event>`;
|
|
121
|
+
Requires Screenplay 4.171.0).
|
|
121
122
|
- Syntax, publication semantics and the full rules: read
|
|
122
123
|
`cratis-screenplay-automations-and-translations`
|
|
123
124
|
`references/public-events-and-direction.md`.
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Example: streams, constraints and a recorded rule
|
|
2
2
|
|
|
3
|
+
Legacy control: no `command reads protected` preamble is declared. The course-capacity
|
|
4
|
+
payload-key fan-in remains refused even with opt-in; eligible active-enrolment reads
|
|
5
|
+
can protect under v25, but reads plus concurrency cannot combine (PLAY0783). Read
|
|
6
|
+
[protected reads](../../cratis-screenplay-command-surface/references/protected-reads.md)
|
|
7
|
+
for admission and Stage's protected-read refusal (STAGE-ESM-044). The legacy diagnostics below describe this
|
|
8
|
+
control, not a blanket refusal of command reads.
|
|
9
|
+
|
|
3
10
|
A complete design-mode model for course enrolment. It shows one business identity per stream,
|
|
4
11
|
cross-stream references as payload, three kinds of uniqueness constraint, a state-dependent
|
|
5
12
|
rule recorded as **NOT enforced in the model today**, a declared `concurrency` scope, and an
|
|
@@ -8,12 +8,9 @@ license: MIT
|
|
|
8
8
|
|
|
9
9
|
Read [preferred syntax](references/preferred-syntax.md) when writing or reviewing `.play`.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
`cratis-screenplay-modeling-lifecycle`; construct syntax lives in the construct skills
|
|
15
|
-
(`cratis-screenplay-command-surface`, `-projections`, `-read-surface`,
|
|
16
|
-
`-captures-and-reactions`, `-specifications`, `-ui-composition`).
|
|
11
|
+
This skill owns tool selection, verdict meaning and admission. Modeling method
|
|
12
|
+
lives in `cratis-screenplay-modeling-lifecycle`; construct syntax lives in command,
|
|
13
|
+
projection, read-surface, capture/reaction, specification and UI skills.
|
|
17
14
|
|
|
18
15
|
## Locate the model
|
|
19
16
|
|
|
@@ -28,7 +25,11 @@ bundled in the CLI are different releases, and the bundled one can be older; a c
|
|
|
28
25
|
standalone tool binds may be refused or unrendered through the CLI. Capabilities that need a
|
|
29
26
|
minimum release carry a one-line `Requires ...` note in the reference that teaches them.
|
|
30
27
|
|
|
31
|
-
|
|
28
|
+
Search [screenplay-contract.json](references/screenplay-contract.json), not its
|
|
29
|
+
whole contents, for exact diagnostic `code`, tool `name` or `cliCommands` options.
|
|
30
|
+
Its version is [screenplay-contract.version](references/screenplay-contract.version).
|
|
31
|
+
Read [contract exceptions](references/screenplay-contract-exceptions.json) when a
|
|
32
|
+
superseded statement needs context; exceptions do not change the contract.
|
|
32
33
|
|
|
33
34
|
## Ground rules
|
|
34
35
|
|
|
@@ -101,8 +102,11 @@ changes with the root folder name.
|
|
|
101
102
|
lists and lists narrowed by one `by` key (observable too) bind; caller-supplied equality
|
|
102
103
|
filters on collections bind as ESM v14. Context `from`, single-result
|
|
103
104
|
filters, opaque `scoped to`/`performer` and composite `by` remain PLAY0268. Read
|
|
104
|
-
read-surface [equality filters](../cratis-screenplay-read-surface/references/equality-filters.md).
|
|
105
|
-
|
|
105
|
+
read-surface [equality filters](../cratis-screenplay-read-surface/references/equality-filters.md).
|
|
106
|
+
Pending handlers beside unconditional productions bind as described commands (v23),
|
|
107
|
+
but reached bodies are Unsupported; attached handlers remain PLAY0268.
|
|
108
|
+
Eligible protected reads opt into v25; legacy reads and `concurrency` retain PLAY0271.
|
|
109
|
+
Concept compliance binds as v13 (precise refusals: command-surface `references/compliance.md`);
|
|
106
110
|
generated values and `returns` responses bind (ESM v7, `references/generated-responses-example.md`). Read [references/executable-example.md](references/executable-example.md) when you need a small StateChange and StateView model that binds executable, [references/pdl-example.md](references/pdl-example.md) when writing projection forms that bind and run, and [references/automation-translate-example.md](references/automation-translate-example.md) when writing Automation and Translate slices (ESM v6).
|
|
107
111
|
- **Renderable** (V5): `references/renderable-subset.md` has the admission table. The CLI admits through
|
|
108
112
|
its newest known ESM version to construct checks; supported UUID/String
|
|
@@ -119,18 +123,22 @@ changes with the root folder name.
|
|
|
119
123
|
Composite view keys remain authoring-only (PLAY0268), while one explicit
|
|
120
124
|
`key` binds. Read `references/production-routes-and-filters.md` and read-surface
|
|
121
125
|
`references/named-keys.md`.
|
|
122
|
-
- **Enum numbers (v12):**
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
126
|
+
- **Enum numbers (v12):** read command-surface `references/enum-numbers.md` for
|
|
127
|
+
pins, stored numbers and Stage output; `references/diagnostics.md` owns PLAY0667–0671.
|
|
128
|
+
- **Concept strategies (v15):** read
|
|
129
|
+
[generation strategies](references/generation-strategies-example.md) for Guarded
|
|
130
|
+
freshness and strict fixtures, and command-surface
|
|
131
|
+
`references/generated-values-and-responses.md` for strategy/refusal depth.
|
|
132
|
+
- **v17–v21:** recovery/no-events (v17), query Validation errors (v18), refusal
|
|
133
|
+
branches (v19), generated-concept proofs (v20), pattern/random/rule/checksum (v21).
|
|
134
|
+
Read `references/executable-subset.md` for version prerequisites and
|
|
135
|
+
`references/diagnostics.md` for proof/support failures. Binding is not rendering.
|
|
136
|
+
Tool/renderer authors: read [references/generation-checks.md](references/generation-checks.md)
|
|
137
|
+
when discovering strategy options, checking one concept or value, or consuming rule proofs.
|
|
138
|
+
- **v22–v25:** read [language admission](references/language-admission.md) for atomic
|
|
139
|
+
batches, described handlers, text rules, protected reads and Stage refusals.
|
|
140
|
+
Read [diagnostic arguments](references/diagnostic-arguments.md) for MCP/JSON subjects:
|
|
141
|
+
code and typed arguments, never message parsing.
|
|
134
142
|
- **Caller/compliance metadata:** `$identity` aliases caller built-ins;
|
|
135
143
|
additional identity details are metadata and executable reads still refuse.
|
|
136
144
|
Bare `pii`/`secret` replace legacy spellings; `pii personal` repeats one marker
|
|
@@ -186,7 +194,7 @@ Read [references/diagnostics.md](references/diagnostics.md) when a PLAY, STAGE o
|
|
|
186
194
|
11. Declare an event once, in its producing slice.
|
|
187
195
|
12. Quoted `import "glob"` is your own files; unquoted `import Ctx.Event` is a foreign
|
|
188
196
|
contract and does not bind.
|
|
189
|
-
13.
|
|
197
|
+
13. Pending described handlers bind but do not execute their bodies; attached handlers and `numbers exact` do not bind. Descriptions render as XML doc comments, not behavior.
|
|
190
198
|
|
|
191
199
|
## Gate
|
|
192
200
|
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
One complete document with every construct family. Design mode, not executable. Prose rules: [cheat-sheet.md](cheat-sheet.md); what binds: [executable-subset.md](executable-subset.md).
|
|
4
4
|
|
|
5
|
-
Binding blockers
|
|
5
|
+
Binding blockers in this legacy control without protected-read opt-in: unquoted
|
|
6
|
+
import, legacy `reads` (PLAY0271), condition-only `starts with` (PLAY0268).
|
|
7
|
+
Property/concept text rules bind v24; eligible protected reads bind v25. Caller-supplied collection equality filters bind as ESM v14; context and single-result filters remain blocked. Executable shapes are in the sibling examples. `RecordingAPayment` lists the `InvoiceClosed` cascade; an older bundled compiler rejected it with a false PLAY0285 ("outcome cannot be produced by 'RecordPayment'").
|
|
6
8
|
|
|
7
9
|
Concept compliance itself binds as ESM v13; reasons remain report-only PLAY0270. Stage renders v13 concept
|
|
8
10
|
protection. Binder-only PLAY0268 refusals and subject-lineage limits: command-surface `references/compliance.md`.
|
|
@@ -10,11 +10,23 @@
|
|
|
10
10
|
- `$context.` paths (command `produces`)
|
|
11
11
|
- `$eventContext.` (projections)
|
|
12
12
|
- PDL quick reference (most forms are compiled in `pdl-example.md` or `cheat-sheet-example.md`; `remove via join` and `$eventContext.occurred` are not)
|
|
13
|
+
- Generated values and proofs
|
|
13
14
|
- Specification forms
|
|
14
15
|
|
|
15
16
|
Released boundary forms: `public event X`, `event X from "store"`, Translate
|
|
16
17
|
`direction inbound|outbound`, event-target `projection/reducer P => PublicEvent`,
|
|
17
|
-
and capture `source events` with `from ForeignEvent` select v9.
|
|
18
|
+
and capture `source events` with `from ForeignEvent` select v9.
|
|
19
|
+
For event captures, present `given <FromEvent>` / `when append <FromEvent>`, not
|
|
20
|
+
capture records (PLAY0701). The key must be required on every `from` event, never
|
|
21
|
+
a context key (PLAY0700). PLAY0701 repairs only an unambiguous single-`from` capture;
|
|
22
|
+
PLAY0700 has no automatic repair.
|
|
23
|
+
Requires Screenplay 4.171.0 or later (`screenplay --version`); older runners do not
|
|
24
|
+
deliver these events to captures.
|
|
25
|
+
A directionless Translate reacting without a `from` route to its own capture's
|
|
26
|
+
append warns PLAY0694 (fails `--warnaserror`): move the reaction to Automation,
|
|
27
|
+
keeping the capture in Translate. No automatic split.
|
|
28
|
+
Requires Screenplay 4.176.0 or later; older compilers leave that shape unchecked.
|
|
29
|
+
Read
|
|
18
30
|
[public contracts](../../cratis-screenplay-automations-and-translations/references/public-events-and-direction.md).
|
|
19
31
|
View properties use trailing `key`; multipart `by` query/read blocks remain
|
|
20
32
|
PLAY0268, not v10. Read [named keys](../../cratis-screenplay-read-surface/references/named-keys.md).
|
|
@@ -71,9 +83,14 @@ remain unadmitted. Compile and test each relevant fixture with the chosen tool.
|
|
|
71
83
|
require that position. Source preambles precede declarations.
|
|
72
84
|
- Strings: `"..."`, escapes `\" \\ \n \r \t`; other backslashes kept (regex `"^INV-\d{6}$"` works).
|
|
73
85
|
- Structured values: single-line JSON, quoted keys (`[{"sku": "A-1", "quantity": 2}]`).
|
|
86
|
+
- Literal property/concept text rules use `contains`, `not contains`, `starts with`,
|
|
87
|
+
`ends with` with quoted operands (v24, ordinal UTF-16). Portable `matches` refuses
|
|
88
|
+
nonportable constructs with PLAY0699; exact Studio patterns warn PLAY0787.
|
|
89
|
+
Read command-surface [text and match rules](../../cratis-screenplay-command-surface/references/text-and-match-rules.md).
|
|
74
90
|
- One condition grammar (policy `require`, `produces when`, `require`, reaction `where`): `and`
|
|
75
91
|
binds tighter than `or`; operators `== != > >= < <= contains`, `starts with`; claims use
|
|
76
|
-
`claim "x" matches "v"` (not `==`: PLAY0120).
|
|
92
|
+
`claim "x" matches "v"` (not `==`: PLAY0120). Text operators here are condition-only
|
|
93
|
+
authoring syntax (PLAY0268 at binding), not the admitted property text rules.
|
|
77
94
|
- Keyword escape `@name` for properties named `tag`, `authorize`, `produces`, `reads`, `file`,
|
|
78
95
|
`validate` (enum value), `sequence`, `occurred`, `causedBy`, `namespace`, `correlation`,
|
|
79
96
|
`causation`, and projection `key`/`parent`/`with`.
|
|
@@ -153,6 +170,34 @@ collections (path below them: PLAY0297 E). Unknown member: PLAY0295/0296 W.
|
|
|
153
170
|
- One `every`/`all` block per level for the executable model (else PLAY0268).
|
|
154
171
|
- Templates (`` `${a}` ``) and `$causedBy` parse but do not bind (PLAY0268).
|
|
155
172
|
|
|
173
|
+
## Generated values and proofs
|
|
174
|
+
|
|
175
|
+
Choose readable invoice/order references with `generate pattern "INV-{yyyy}{MM}-#{7}" checksum luhn`
|
|
176
|
+
on a String concept and author `validate checksum luhn` separately. `#`, `?`, `*`
|
|
177
|
+
mean digit, uppercase letter, letter-or-digit; ASCII classes and repeats up to
|
|
178
|
+
64 are finite. UTC segments are `{yyyy}`, `{yy}`, `{MM}`, `{dd}`. Int
|
|
179
|
+
`generate random 100000..999999` is inclusive; `generate rule Name` attaches one
|
|
180
|
+
file/tagged fence with Now/Tenant context and unknown entropy. These are ESM v21.
|
|
181
|
+
Requires Screenplay 4.172.0 (`screenplay --version`) for these constructs; older compilers report PLAY0268.
|
|
182
|
+
Sequence and generated secrets remain refused.
|
|
183
|
+
|
|
184
|
+
Generated-concept rules select v20 (older compilers refuse them with PLAY0268): Proven silent, Refuted PLAY0688 plus witness, Unproven PLAY0689
|
|
185
|
+
plus reason. Finite support exhaustion is PLAY0691, empty support on a scanned
|
|
186
|
+
date PLAY0692, not a proof warning. MCP rules[]/derivedPattern support typed
|
|
187
|
+
matches/PLAY0688 repair proposals.
|
|
188
|
+
Requires Screenplay 4.173.0 for those MCP fields; older servers omit them.
|
|
189
|
+
See [generation example](generation-strategies-example.md).
|
|
190
|
+
|
|
191
|
+
Pin whole identifiers with `for`, other values with named `generated`; pins obey
|
|
192
|
+
shape and rules. `given clock` fixes all UTC pattern date segments, not randomness;
|
|
193
|
+
without it only digit widths are checked. Patterns are not gapless sequences or
|
|
194
|
+
secrets; check digits catch typos, not forgery. Short payload codes need uniqueness,
|
|
195
|
+
generated source destinations need freshness. Read
|
|
196
|
+
[Stage admission](../../cratis-stage-rendering-and-sandbox/references/admission.md)
|
|
197
|
+
for v21 admission, all-Proven unpinned specs and the separate prerequisites for
|
|
198
|
+
warning/info rules, checksum validation and pattern/random rendering.
|
|
199
|
+
`generate rule` remains STAGE-ESM-028. Reference binding is not rendering.
|
|
200
|
+
|
|
156
201
|
## Specification forms
|
|
157
202
|
Full list with semantics: `Documentation/screenplay/specifications.md`. Compiled in the
|
|
158
203
|
examples: `given caller` (+`authenticated`, `role`), `given clock`, `given <Event> for`,
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<!-- Copyright (c) Cratis. All rights reserved. -->
|
|
2
|
+
<!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
|
|
3
|
+
|
|
4
|
+
# Read diagnostic subjects from arguments
|
|
5
|
+
|
|
6
|
+
Requires Screenplay 4.194.0 or later (`screenplay --version`) for typed diagnostic arguments; older diagnostics may omit the field.
|
|
7
|
+
|
|
8
|
+
Use code plus declared `arguments` to identify subjects, never parse message text.
|
|
9
|
+
Messages are display prose and may be reworded. Published names, kinds, meanings
|
|
10
|
+
and optionality are permanent; tolerate unknown names and keyword values.
|
|
11
|
+
Missing `arguments` remains readable; no subjects is `{}`; optional subjects are
|
|
12
|
+
omitted when unavailable. This changes neither text output nor ESM version.
|
|
13
|
+
|
|
14
|
+
The `screenplay` MCP server's `diagnostics`, `read-workspace` executable diagnostics,
|
|
15
|
+
proposal `diagnostics` and `introducedExecutableErrors[].arguments`, plus the CLI's
|
|
16
|
+
JSON output, expose the same structure. Resolve the harness-native tool name from
|
|
17
|
+
the listing; this is not a new diagnostic tool. C# exposes Diagnostic.Arguments.
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"specification": { "kind": "specification", "path": ["Billing", "Invoices", "SendReminder", "Overdue"] },
|
|
22
|
+
"step": { "kind": "keyword", "value": "when" },
|
|
23
|
+
"stepIndex": { "kind": "index", "value": 0 },
|
|
24
|
+
"property": { "kind": "text", "value": "amount" }
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Each argument is keyed by name. `text` is verbatim authored text, `keyword` a stable
|
|
29
|
+
never-localized language spelling, `index` a zero-based number. A declaration uses
|
|
30
|
+
its declaration kind as `kind` (for example `specification`) and `path`, not a
|
|
31
|
+
`value`: module if present, features outermost first, slice if present, declaration
|
|
32
|
+
name; never repeat a slice's own name. Specification names are authored names;
|
|
33
|
+
a separate `case` names an expansion. Argument order is immaterial.
|
|
34
|
+
|
|
35
|
+
## Codes with declared subjects
|
|
36
|
+
|
|
37
|
+
`?` denotes optional. Except where marked, arguments are text.
|
|
38
|
+
|
|
39
|
+
| Code | Arguments |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| PLAY0044, PLAY0075, PLAY0101, PLAY0518 | `text` |
|
|
42
|
+
| PLAY0351 | `readmodel`, `property` |
|
|
43
|
+
| PLAY0468 | `query?`, `argument` |
|
|
44
|
+
| PLAY0514, PLAY0519 | `property` |
|
|
45
|
+
| PLAY0520 | `example`, `type?`, `kind?` (keyword: event, command, readmodel, concept, type, example) |
|
|
46
|
+
| PLAY0521 | `example` |
|
|
47
|
+
| PLAY0522 | `example`, `kind`, `expectedKind` (both keyword: event, command, readmodel) |
|
|
48
|
+
| PLAY0523 | `example`, `type`, `property?` |
|
|
49
|
+
| PLAY0524 | `specification` (declaration), `step` (keyword), `stepIndex` (index), `property`, `type`, `example?`, `case?`, `parameter?` |
|
|
50
|
+
| PLAY0525, PLAY0526 | `example` |
|
|
51
|
+
| PLAY0583 | `case?`, `parameter?`, `type?`, `text?` |
|
|
52
|
+
|
|
53
|
+
For PLAY0524, `step` is given, given readmodel, when, when append or then.
|
|
54
|
+
`stepIndex` counts every authored given/when/then clause once across all forms,
|
|
55
|
+
not nested lines, synthesized callers or defaults. Example/case expansion retains
|
|
56
|
+
that position. Read the missing property and its type directly, navigate the
|
|
57
|
+
specification path and optional case, then repair the effective fixture; do not
|
|
58
|
+
infer these from a translated message. Codes outside this table may have no
|
|
59
|
+
subjects, including PLAY0198. Check the published contract for the code rather
|
|
60
|
+
than assuming every diagnostic names a declaration.
|