@cratis/pi 7.23.0 → 7.24.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/skills/cratis-application-slice-conformance/SKILL.md +1 -1
- package/package/corpus/skills/cratis-application-slice-conformance/references/contract-and-precedence.md +5 -5
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/automation-patterns.md +3 -3
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/cases-to-specify.md +1 -1
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/effects-and-idempotency.md +1 -1
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/integration-contracts.md +1 -1
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/realization-and-gap-fill.md +5 -3
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translation-patterns.md +1 -1
- package/package/corpus/skills/cratis-screenplay-discovery/SKILL.md +6 -5
- package/package/corpus/skills/cratis-screenplay-discovery/references/event-naming.md +1 -1
- package/package/corpus/skills/cratis-screenplay-discovery/references/facilitation.md +5 -4
- package/package/corpus/skills/cratis-screenplay-discovery/references/human-workshop.md +1 -1
- package/package/corpus/skills/cratis-screenplay-discovery/references/interview-questions.md +1 -1
- package/package/corpus/skills/cratis-screenplay-discovery/references/personas-and-causes.md +7 -4
- package/package/corpus/skills/cratis-screenplay-discovery/references/plotting-and-handoff.md +8 -7
- package/package/corpus/skills/cratis-screenplay-discovery/references/storming-loop.md +2 -2
- package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +10 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/nine-steps.md +1 -2
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +1 -1
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/loss-report-template.md +1 -1
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/rule-modeling.md +4 -4
- 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 +5 -4
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +14 -6
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +71 -8
- package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +15 -6
- package/package/corpus/skills/cratis-screenplay-model-review/references/anti-patterns.md +1 -1
- package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +10 -9
- package/package/corpus/skills/cratis-screenplay-model-review/references/report-template.md +5 -1
- package/package/corpus/skills/cratis-screenplay-model-review/verification.json +1 -1
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/SKILL.md +2 -2
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/opt-in.md +7 -5
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/phases.md +4 -4
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/provenance.md +1 -1
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/reasoning-notes.md +24 -19
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/stop-or-assume.md +1 -1
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/verdicts-and-modes.md +4 -2
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/vocabulary-map.md +1 -1
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/worked-example.md +15 -9
- package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +4 -1
- package/package/corpus/skills/cratis-screenplay-read-surface/references/guarded-actions.md +4 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +4 -3
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/drift-and-ledger.md +1 -1
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +3 -3
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +25 -9
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/coverage-matrix.md +1 -1
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-design.md +5 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-catalogue.md +7 -4
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-examples.md +1 -1
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-workshop.md +1 -1
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/verification.json +1 -1
- package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +12 -7
- package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md +4 -3
- package/package/corpus/skills/cratis-screenplay-slice-design/references/field-lineage.md +2 -2
- package/package/corpus/skills/cratis-screenplay-slice-design/references/model-reasoning.md +87 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/provenance.md +1 -1
- package/package/corpus/skills/cratis-screenplay-slice-design/references/read-model-design.md +2 -2
- package/package/corpus/skills/cratis-screenplay-slice-design/references/rule-layers.md +8 -8
- package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +3 -3
- package/package/corpus/skills/cratis-screenplay-slice-design/references/worked-example.md +9 -3
- package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +22 -5
- package/package/corpus/skills/cratis-screenplay-specifications/references/examples-and-routes.md +59 -1
- package/package/corpus/skills/cratis-screenplay-specifications/references/persona-callers-and-cases.md +117 -0
- package/package/corpus/skills/cratis-screenplay-specifications/verification.json +1 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +14 -13
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/boundaries.md +3 -3
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/chronicle-boundaries.md +3 -2
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +14 -11
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution.md +2 -2
- package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +49 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +6 -3
- package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +4 -4
- package/package/corpus/skills/cratis-screenplay-toolchain/references/versions.md +10 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +4 -2
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/guarded-interactions.md +71 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +5 -2
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/rendered-application.md +17 -6
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +1 -1
- package/package.json +1 -1
|
@@ -28,7 +28,7 @@ Version pins live once in `cratis-screenplay-toolchain` `references/versions.md`
|
|
|
28
28
|
| cratis CLI | `3.41.0` (`v3.41.0`) | `cratis render` options, exit codes, publication receipt, UI-profile rejection (`CLI-RENDER-007` to `CLI-RENDER-010`); tag pins Stage 4.51.3, Screenplay 4.114.0 and `Cratis.Arc.Screenplay` 22.54.0, with `cratis/stage:4.51.3` as the runtime image. UI-profile rejection and render-then-recover shipped in 3.41.0 (Cratis/cli#301). The screens release vector was verified on 3.40.7 (`af9f18e`) with `cratis/stage:4.51.1`. Reading baselines: 3.40.3, 3.39.0 and 3.28.3 (`8b43fef`) |
|
|
29
29
|
| Stage | `4.51.3` (CLI 3.41.0 default) | admission (`STAGE-ESM-*`, and `PLAY0268` render refusals surfaced by the CLI), ownership manifest, `Customizations/` seams, Debug-only specifications, fail-closed guarded actions (`STAGE-SCENE-ACTION-001`) and interactions (`STAGE-SCENE-INTERACTION-001`). Older baselines: 4.49.5, 4.43.0 and `v4.24.2` (`32dcac4`) |
|
|
30
30
|
| Screenplay | bundled `4.114.0`; standalone `4.127.0` | standalone compiler for V1 to V3; binding codes `PLAY0268` and the code-attachment rules, read at `v4.66.0`; claims made through `cratis` are 4.114.0 claims |
|
|
31
|
-
| Rendered apps | Arc `22.
|
|
31
|
+
| Rendered apps | Arc `22.50.5`, Chronicle `19.32.0`, Scene packages | Stage 4.51.3 scaffold; `[ProtectedDecision]` / `DecisionRead<T>` available to gap-fill, not emitted enforcement. Embedded reverse extraction disabled; verify generated packages before claiming exact Scene runtime parity |
|
|
32
32
|
|
|
33
33
|
Facts were read at those tags and `cratis render` was run at 3.28.2 and 3.28.3 for the worked example
|
|
34
34
|
(`references/worked-example.md`); with public CLI 3.40.7 it was run over the canonical
|
|
@@ -135,10 +135,11 @@ Adapters and non-renderable scope follow the contract rules of `cratis-applicati
|
|
|
135
135
|
(`cratis-application-slice-conformance` `references/build-prompts.md`).
|
|
136
136
|
- One ledger scope per `slice-implementer` brief; the brief carries addresses and paths, not contents.
|
|
137
137
|
- Model-enforced rules realized in code (state-dependent rules) need a protected read or
|
|
138
|
-
concurrency scope; never claim them from prose.
|
|
138
|
+
concurrency scope; never claim them from prose. Stage 4.51.3 rendered apps have
|
|
139
|
+
Arc 22.50.5/Chronicle 19.32.0; API availability alone is not verified enforcement.
|
|
139
140
|
- Adapters that call outside systems follow `cratis-engineering-effect-boundaries`; slice
|
|
140
141
|
specifications follow `cratis-application-slice-specifications`.
|
|
141
|
-
- Realization notes are the explicit realization requirements stated in a slice `description`
|
|
142
|
+
- Realization notes are the explicit realization requirements stated in a slice `description` or `documentation`
|
|
142
143
|
(definition: `cratis-application-slice-conformance`, `references/contract-and-precedence.md`).
|
|
143
144
|
Executable parts (specifications, mappings, constraints) win over prose, and a contradicting description is a model defect to report.
|
|
144
145
|
|
package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/drift-and-ledger.md
CHANGED
|
@@ -57,7 +57,7 @@ non-renderable scope:
|
|
|
57
57
|
| fallback location | project and folder of the hand-written code |
|
|
58
58
|
| spec mapping | `.play` specification to test name, one line each; missing tests listed |
|
|
59
59
|
| field inventory | `n/n` command, event and read-model properties mapped; extras: none, or listed with reason |
|
|
60
|
-
| realization requirements applied | explicit realization notes from slice
|
|
60
|
+
| realization requirements applied | explicit realization notes from slice `description` or `documentation` applied, one line each; other description prose used as a hint is listed separately |
|
|
61
61
|
| spec delta | at re-delivery: specifications added, changed or removed since `last verified`, each with test status |
|
|
62
62
|
| divergences | where the code deliberately differs from the model, with reason and approver |
|
|
63
63
|
| revisit trigger | issue and condition (for example "Stage#58 ships list queries") |
|
package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md
CHANGED
|
@@ -27,7 +27,7 @@ paths and addresses, not pasted contents:
|
|
|
27
27
|
with the same name; never weaken, skip or delete one to pass. Do not edit managed files.
|
|
28
28
|
Return a field inventory (command, event and read-model properties mapped to code locations)
|
|
29
29
|
and list anything you added that the model does not state (expected: none). Explicit
|
|
30
|
-
realization requirements in the slice description bind adapters and fallback code, cannot
|
|
30
|
+
realization requirements in the slice `description` or `documentation` bind adapters and fallback code, cannot
|
|
31
31
|
contradict executable parts and are never supplemented with inferred rules; descriptive prose
|
|
32
32
|
that is not an explicit requirement is a hint. The repository's pattern wins over a
|
|
33
33
|
generic template; report the mismatch. Stop on a contradiction and return an edit request.*
|
|
@@ -61,8 +61,8 @@ ambiguous addresses; contracts are never inferred from names.
|
|
|
61
61
|
A rule that exists only in a description, or a state-dependent rule the model marks as not
|
|
62
62
|
enforced, is unenforced in generated scope. List it in the ledger as a target requirement. In
|
|
63
63
|
hand-written code it needs an atomic enforcement point: a protected read or a concurrency scope
|
|
64
|
-
(
|
|
65
|
-
|
|
64
|
+
(Stage 4.51.3 rendered apps have Arc 22.50.5/Chronicle 19.32.0: protected-read APIs
|
|
65
|
+
are available to gap-fill, with projection/key admission and active enrollment), or a Chronicle constraint. A stale view or
|
|
66
66
|
a caller-supplied status is not enforcement.
|
|
67
67
|
|
|
68
68
|
## Automation and Translate scope
|
|
@@ -27,9 +27,11 @@ language cannot express today are recorded, not faked. Grammar and outcome compa
|
|
|
27
27
|
Screenplay v4.66.0 (`c89198b`) and v4.68.0 (`79801bf`, ESM v7 fixtures and `then returns`):
|
|
28
28
|
`Documentation/screenplay/specifications.md` and the standalone compiler; `cratis` 3.28.2 and
|
|
29
29
|
3.28.3 bundle Screenplay 4.66.0 (before 3.28.2 it bundled 4.60.1). The full pin table and the probes are in
|
|
30
|
-
`cratis-screenplay-toolchain` `references/versions.md`.
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
`cratis-screenplay-toolchain` `references/versions.md`. At Screenplay v4.127.0,
|
|
31
|
+
MCP `find-specification-obligations` derives SPEC001–SPEC008 from declarations;
|
|
32
|
+
met means matching authored presence, not full coverage or passing execution.
|
|
33
|
+
Use it to seed, never replace, the matrix. Multi-step storylines remain unavailable;
|
|
34
|
+
lifecycle families emulate them.
|
|
33
35
|
|
|
34
36
|
## Interview phase
|
|
35
37
|
**Skip if** the brief already states the coverage depth (rules, denials, state violations,
|
|
@@ -56,7 +58,9 @@ question is not four approvals.
|
|
|
56
58
|
(Cannot lines, "only if", refusals, competition candidates, endings) as coverage seeds.
|
|
57
59
|
3. **Inventory before drafting**: read commands, effective gates (own, feature, module), rules,
|
|
58
60
|
constraints, productions, reactions, captures, read models and queries in scope; derive the
|
|
59
|
-
obligations from those declarations, not from specs already present.
|
|
61
|
+
obligations from those declarations, not from specs already present. Use scoped
|
|
62
|
+
`find-specification-obligations` and inspect unmet/message-specific obligations;
|
|
63
|
+
ambiguous references and opaque code are not inferred coverage.
|
|
60
64
|
4. **Coverage matrix before any spec** (`references/coverage-matrix.md`). Rows: every command,
|
|
61
65
|
reaction, capture, read model and gated query. Columns: the scenario types below. Each cell
|
|
62
66
|
is `spec <Name>`, `n/a: <domain reason>`, `recorded: <why not expressible>`,
|
|
@@ -70,7 +74,12 @@ question is not four approvals.
|
|
|
70
74
|
existing intentional fixtures (`references/scenario-catalogue.md` "Example data").
|
|
71
75
|
7. **Draft commands**: happy path, each rule, denial, duplicates and retries, competing claims,
|
|
72
76
|
state violations, alternative branches, compensation, external failure, evolution. In each
|
|
73
|
-
rejection vary only the value under test.
|
|
77
|
+
rejection vary only the value under test. Use typed `parameter`/named `case`
|
|
78
|
+
tables for a shared validation matrix, not for unrelated behaviors; rows are
|
|
79
|
+
cases, not typed fixture `example`s. `given caller as <Persona>` supplies one
|
|
80
|
+
authenticated policy witness for success/denial; use explicit callers for
|
|
81
|
+
anonymous/ownership or unsynthesizable personas. Syntax and complete model:
|
|
82
|
+
`cratis-screenplay-specifications` `references/persona-callers-and-cases.md`.
|
|
74
83
|
8. **Separate view pass**: population, each update, accumulation, removal (with a surviving
|
|
75
84
|
row), absence, ordering. Mark lifecycle branches as branches.
|
|
76
85
|
9. **State-dependent rules**: `reads <View>` + `require <expr> message "..."` as stated intent,
|
|
@@ -97,9 +106,16 @@ question is not four approvals.
|
|
|
97
106
|
| Ordering | Facts late or out of order? | view family with reordered givens; translation specs; else `recorded` |
|
|
98
107
|
| External failure | The other system refuses, times out or answers twice? | outcome as a recorded fact (capture/translation), never a fake rejection |
|
|
99
108
|
| Compensation | How is this undone, what does undoing free? | reversal command + spec showing the released claim or removed row |
|
|
100
|
-
| Evolution | Do old facts still mean the same after a contract change? | spec on the new generation; compatibility
|
|
109
|
+
| Evolution | Do old facts still mean the same after a contract change? | spec on the new generation; compatibility reasoning in `documentation` |
|
|
101
110
|
| View | What does each screen show after each fact? | `given` events (`for`) -> `then query`; `when append` -> update/removal |
|
|
102
111
|
|
|
112
|
+
For recovery intent, `when redelivered <Event> to <Reaction>` must select one
|
|
113
|
+
definitely matching effective given and no undecided candidate. Name `stream`
|
|
114
|
+
(with a complete id) or `no stream` when givens differ only by route; omitting it
|
|
115
|
+
is a wildcard, not an unrouted selector. Redelivery remains authoring-only
|
|
116
|
+
(PLAY0268), never evidence of an executed retry. Details:
|
|
117
|
+
`cratis-screenplay-specifications` `references/examples-and-routes.md`.
|
|
118
|
+
|
|
103
119
|
**Once, idempotent, exactly once are different claims.** A `unique event` constraint proves the
|
|
104
120
|
*fact* occurs once per event source; it does not make *command handling* idempotent (a retry is
|
|
105
121
|
rejected, not answered with success), and nothing in the model proves an *external effect* (an
|
|
@@ -112,7 +128,7 @@ target requirements.
|
|
|
112
128
|
- `then` events are exact in count and order (`then events in any order` relaxes order only).
|
|
113
129
|
- Command denial: `then denied` with no success or error outcome. Read-only query denial:
|
|
114
130
|
`then query <Query>` with `arguments` and no `result`, then `then denied`. Every gated command
|
|
115
|
-
or query spec needs `given caller` (module and feature gates count); an authorized scenario
|
|
131
|
+
or query spec needs `given caller` or `given caller as <Persona>` (module and feature gates count); an authorized scenario
|
|
116
132
|
gets no inferred fixture (PLAY0389). Unauthorized is never `then error`.
|
|
117
133
|
- Duplicate and competing specs use `when <Command>`; `when append` is for projection and
|
|
118
134
|
automation triggers, and for a constraint the command's own validation would reject first.
|
|
@@ -130,7 +146,7 @@ target requirements.
|
|
|
130
146
|
never `n/a` automatically. This matches `cratis-screenplay-specifications`, which also
|
|
131
147
|
requires one rejection spec per concept rule. Business rules get one rejection spec each.
|
|
132
148
|
- Persona Cannot lines are intent: each needs an executable gate plus a `then denied` spec whose
|
|
133
|
-
caller
|
|
149
|
+
caller is a synthesized persona witness or an explicit gate fixture, else record a gap.
|
|
134
150
|
- Descriptions are not rendered: a rule only in prose is unenforced in rendered scope; turn it
|
|
135
151
|
into a rule layer, a spec or a recorded target requirement.
|
|
136
152
|
- Prove projections with events (`given`/`when append`), not `given readmodel`; seed read models
|
|
@@ -149,7 +165,7 @@ target requirements.
|
|
|
149
165
|
- Read models are a separate, equally mandatory pass: a model with dozens of command specs and no
|
|
150
166
|
read-model spec is not scenario-complete. Population, then update or removal where an event
|
|
151
167
|
supersedes a row.
|
|
152
|
-
- The why behind each business rule is written down (slice `
|
|
168
|
+
- The why behind each business rule is written down (slice `documentation`), not only the what.
|
|
153
169
|
- Good and bad forms of givens, outcomes and rejections: `references/scenario-examples.md`.
|
|
154
170
|
|
|
155
171
|
### Review questions
|
package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/coverage-matrix.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- Worked example (`berth-reservations.md`, design mode)
|
|
10
10
|
|
|
11
11
|
Write it **before** drafting specs, keep it in `.ai-work/screenplay/<model-slug>/coverage.md` (or the
|
|
12
|
-
`STATE.md` beside it), and update it with the specs. Reviewers check it against the model.
|
|
12
|
+
`STATE.md` beside it), and update it with the specs. Reviewers check it against the model. Screenplay 4.127.0 MCP `find-specification-obligations` seeds the inventory (SPEC001–SPEC008), for command success, requirements, command/concept validation, effective authorization gates, value constraints, read models, projection removals and reaction outcomes. A met row proves matching authored presence, not full coverage or passing execution: the matrix still records domain judgments and scenario types the heuristic cannot infer.
|
|
13
13
|
|
|
14
14
|
## Cell values
|
|
15
15
|
- `spec <Name>` - written; the name exists in the model.
|
|
@@ -13,6 +13,11 @@ Keep those lines: they state real intent and are never
|
|
|
13
13
|
replaced by prose. The runnable counterpart, which holds no stored-state rule, is
|
|
14
14
|
`invoicing-dues-example.md`; `scenario-examples.md` copies `ReversingAReceivedPayment` from here.
|
|
15
15
|
|
|
16
|
+
The excerpt's Stage API-availability comment describes the historical Stage 4.24.x
|
|
17
|
+
scaffold. Stage 4.51.3 pins Arc 22.50.5/Chronicle 19.32.0: protected-read APIs are
|
|
18
|
+
available to gap-fill, not emitted protection or `.play` rule admission. The
|
|
19
|
+
original compiled source is retained unchanged.
|
|
20
|
+
|
|
16
21
|
```screenplay
|
|
17
22
|
// Scenario coverage design-mode example: stored-state rules of invoicing club dues (complete document).
|
|
18
23
|
// Design mode: `reads` is PLAY0271 and `require` over a view is PLAY0268 at binding (the only
|
package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-catalogue.md
CHANGED
|
@@ -80,9 +80,12 @@ name them as unfinished.
|
|
|
80
80
|
(commands: no other outcome; read-only queries: `then query <Query>` with `arguments`, no
|
|
81
81
|
`result`, then `then denied`; or `when query` + `then denied`). See `RefusingASkipper`.
|
|
82
82
|
An empty `given caller` block is the anonymous caller.
|
|
83
|
-
-
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
- Use `given caller as <Persona>` for one authenticated witness synthesized from
|
|
84
|
+
that persona's policies (4.127.0). Inspect the leftmost buildable `or` choice;
|
|
85
|
+
it does not represent every possible caller. Use explicit roles/claims for
|
|
86
|
+
anonymous or ownership fixtures, missing conjuncts, or refused synthesis.
|
|
87
|
+
One denial per persona that can reach the screen but may not act. Derive
|
|
88
|
+
fixtures from the effective Boolean gate: AND - isolate each
|
|
86
89
|
missing conjunct; OR - a caller meeting any permitted alternative must succeed (a success
|
|
87
90
|
spec, not `then denied`); denial only when the whole gate is false.
|
|
88
91
|
- Ownership policies (`claim ... matches subject|<property>`): the denial gives the right role
|
|
@@ -184,7 +187,7 @@ name them as unfinished.
|
|
|
184
187
|
## 11. Evolution compatibility
|
|
185
188
|
- Ask (when an event's contract changes): "Do facts already stored still mean the same?"
|
|
186
189
|
- Compatible change (added property with a defined default): declare the new generation;
|
|
187
|
-
specify behaviour on the new generation; write the default for old facts in `
|
|
190
|
+
specify behaviour on the new generation; write the default and its reason for old facts in `documentation`
|
|
188
191
|
(Screenplay does not express upcasters). Change of meaning: a new event, with its own specs.
|
|
189
192
|
- Renaming a stored event keeps an `id "<OldName>"` pin. A rename the brief requests is done in
|
|
190
193
|
this pass by the identity owner (`cratis-screenplay-modeling-lifecycle`); never leave it silently unapplied.
|
package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-examples.md
CHANGED
|
@@ -29,7 +29,7 @@ Screenplay specifications.
|
|
|
29
29
|
| Then (success) | every production with payload and `for` | "an event is produced" |
|
|
30
30
|
| Then (refusal) | `then error "Invoice already settled"`, the rule's own message | `then error` with no message, or `then error ""` |
|
|
31
31
|
| Then (denial) | `then denied` | `then error` for a caller who is not allowed |
|
|
32
|
-
| Reason |
|
|
32
|
+
| Reason | slice `documentation` says why the rule exists | the rule appears only in a spec title |
|
|
33
33
|
|
|
34
34
|
## 1. Command: success, rule rejection and denial
|
|
35
35
|
One spec for the success, one per rule (varying only the value the rule checks), one denial.
|
package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-workshop.md
CHANGED
|
@@ -75,7 +75,7 @@ survive; ask what a caller who may not look sees.
|
|
|
75
75
|
- Do not perfect a scenario in the room. Capture it with its open question and move on.
|
|
76
76
|
- Every "what if...?" from anyone becomes a named candidate at once.
|
|
77
77
|
- Record why a rule behaves as it does when the room explains it; the modeler puts it in the
|
|
78
|
-
slice `
|
|
78
|
+
slice `documentation`.
|
|
79
79
|
|
|
80
80
|
## Multi-role check (before leaving the room)
|
|
81
81
|
- Domain expert: is this the right business behaviour and message?
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
{ "kind": "skill-contains", "value": "Coverage matrix before any spec" },
|
|
7
7
|
{ "kind": "skill-contains", "value": "Once, idempotent, exactly once are different claims" },
|
|
8
8
|
{ "kind": "skill-contains", "value": "Unauthorized is never `then error`" },
|
|
9
|
-
{ "kind": "skill-contains", "value": "
|
|
9
|
+
{ "kind": "skill-contains", "value": "find-specification-obligations" },
|
|
10
10
|
{ "kind": "skill-contains", "value": "v4.68.0" },
|
|
11
11
|
{ "kind": "skill-contains", "value": "false PLAY0285" },
|
|
12
12
|
{ "kind": "skill-contains", "value": "One behaviour per spec" },
|
|
@@ -31,7 +31,7 @@ Lifecycle, modes and hand-offs: `cratis-screenplay-modeling-lifecycle`.
|
|
|
31
31
|
Skip if the request already names the command origins (screens, reactions, outside systems),
|
|
32
32
|
the decision behind each shown field, and how fresh each view must be. Otherwise ask, in one
|
|
33
33
|
batch, only what is missing. Unattended: assume visibly, record each assumption in the phase
|
|
34
|
-
report and
|
|
34
|
+
report and slice `documentation`, and continue.
|
|
35
35
|
|
|
36
36
|
1. **Origin of each action.** Is it (A) user-initiated only, (B) automated, (C) a mix, or
|
|
37
37
|
started by a clock or outside system (schedule, webhook, feed)? Impact: separates screen
|
|
@@ -80,8 +80,8 @@ report and the slice `description`, and continue.
|
|
|
80
80
|
standing in for a rule. Place each rule in its layer (`references/rule-layers.md`). A rule
|
|
81
81
|
over stored state is written as `reads <View>` + `require ... message "..."` and marked
|
|
82
82
|
**NOT enforced in the model today** in the slice `description`, with its target named (Arc
|
|
83
|
-
`[ProtectedDecision]` + `DecisionRead<T>` on Arc 22.39.0
|
|
84
|
-
|
|
83
|
+
`[ProtectedDecision]` + `DecisionRead<T>` on Arc 22.39.0+ (available to gap-fill
|
|
84
|
+
code with Stage 4.51.3's Arc 22.50.5/Chronicle 19.32.0); Chronicle DCB; or a constraint). Never copy state
|
|
85
85
|
into the command as input or hide a rule in `handler` / hint prose; descriptions are not
|
|
86
86
|
rendered (Stage#178). Fill the **refusal inventory**: success, each distinct refusal with
|
|
87
87
|
layer and message, and the denied persona.
|
|
@@ -129,7 +129,7 @@ report and the slice `description`, and continue.
|
|
|
129
129
|
actor sees each state change's result. Beyond Level 1: `cratis-screenplay-ui-composition`.
|
|
130
130
|
8. **Lineage pass.** Build the matrix in `references/field-lineage.md` from the `.play` files
|
|
131
131
|
(read them), not from memory or an earlier summary. For each read model, write one line per
|
|
132
|
-
contributing event in its StateView slice `
|
|
132
|
+
contributing event in its StateView slice `documentation`: which fields it sets and why. An
|
|
133
133
|
event with no reason does not belong in the view. A field without an origin is a gap: add
|
|
134
134
|
the missing input or event field, or record an open question. Never invent a source.
|
|
135
135
|
9. **Slice and continue** (`references/slicing.md`): state-transition table per entity; one
|
|
@@ -163,9 +163,14 @@ report and the slice `description`, and continue.
|
|
|
163
163
|
|
|
164
164
|
- One command per `StateChange` slice (renderable: required, plus no `produces when`).
|
|
165
165
|
- One business decision usually produces one event; a decision establishing several facts the
|
|
166
|
-
business recognises separately may produce several (say why in
|
|
166
|
+
business recognises separately may produce several (say why in `documentation`).
|
|
167
167
|
- Copy an identity into an event payload only when a consumer needs it as a value.
|
|
168
|
-
- Keep
|
|
168
|
+
- Keep the one-line summary in `description`, including short status markers such as
|
|
169
|
+
**NOT enforced in the model today** (with its target) or **ASSUMED**; record durable
|
|
170
|
+
reasoning, assumptions, causes and rejected alternatives in fenced Markdown
|
|
171
|
+
`documentation` on the module, feature, slice, command, event, read model or reaction, not `//` comments or disconnected notes. These are report-only, not
|
|
172
|
+
enforcement. Read [model reasoning](references/model-reasoning.md) for owners,
|
|
173
|
+
syntax, folder merge and PLAY0558/0559.
|
|
169
174
|
- Rule coverage: for each value carrying a rule, list every path that sets it
|
|
170
175
|
(`references/slicing.md`). A constraint on a claim covers every event setting that claim;
|
|
171
176
|
value invariants live in the concept so they travel; command-level conditions are reviewed
|
|
@@ -199,7 +204,7 @@ Slice design is done when these hold; otherwise report what is open.
|
|
|
199
204
|
denied persona); every gated command and query has a `then denied` row.
|
|
200
205
|
- [ ] Every event is past tense, a specific change, and consumed or justified.
|
|
201
206
|
- [ ] Every read model has a consumer and, when the scope is executable, one unambiguous key (keyed queries all using the same `by` property).
|
|
202
|
-
- [ ] Every StateView `
|
|
207
|
+
- [ ] Every StateView's `documentation` gives a reason per contributing event; every read-model
|
|
203
208
|
field and screen field is traced; every `from` event sets a field.
|
|
204
209
|
- [ ] No `screen` without `data` or `action`; every acting screen has `data` or a stated
|
|
205
210
|
exemption.
|
package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md
CHANGED
|
@@ -16,7 +16,7 @@ and each persona that must be denied becomes a `given caller` fixture. Build it
|
|
|
16
16
|
## Command card
|
|
17
17
|
|
|
18
18
|
Fill one card per command before (or while) writing the slice. Keep it in the phase report;
|
|
19
|
-
durable rationale goes in
|
|
19
|
+
durable rationale goes in fenced Markdown slice `documentation`.
|
|
20
20
|
|
|
21
21
|
```text
|
|
22
22
|
Command: <ImperativeBusinessName> (one decision)
|
|
@@ -76,7 +76,8 @@ Rules for filling it:
|
|
|
76
76
|
as a gap. Persona description text is intent only.
|
|
77
77
|
- A refusal that depends on stored state is a row marked **NOT enforced in the model today**
|
|
78
78
|
with its target (Arc `[ProtectedDecision]` + `DecisionRead<T>` where Arc 22.39.0 or later is
|
|
79
|
-
available,
|
|
79
|
+
available, including Stage 4.51.3's rendered package set for gap-fill, not emitted
|
|
80
|
+
protection; Chronicle DCB, or a
|
|
80
81
|
constraint). It still gets a spec row, because the intended behaviour is the contract.
|
|
81
82
|
- A decided refusal never goes to open questions: it goes here, then to scenarios.
|
|
82
83
|
- A refusal message is a fact of the design; keep the wording identical in the rule, the
|
|
@@ -101,7 +102,7 @@ Rules for filling it:
|
|
|
101
102
|
| AssignLocker | caller is not an attendant | `authorize IsAttendant` | denied: Customer | RefusingACustomerAssigningALocker |
|
|
102
103
|
| AssignLocker | locker already has a request | constraint `OneRequestPerLocker` | "The locker is already assigned" | AppendingASecondAssignmentOfALocker (`when append`: the command's own `require` would reject first) |
|
|
103
104
|
| AssignLocker | request already has a locker | constraint `OneLockerPerRequest` | "The request already has a locker" | gap |
|
|
104
|
-
| AssignLocker | locker is not free | `reads` + `require`, NOT enforced today | "The locker is not free"; target: `[ProtectedDecision]` (Arc 22.39.0+;
|
|
105
|
+
| AssignLocker | locker is not free | `reads` + `require`, NOT enforced today | "The locker is not free"; target: `[ProtectedDecision]` (Arc 22.39.0+; available to Stage 4.51.3 gap-fill, not emitted protection) or DCB on the locker stream | RejectingASecondAssignmentOfALocker (pins the message; blocked until the target exists) |
|
|
105
106
|
| AssignLocker | request is not waiting | `reads` + `require`, NOT enforced today | "The request is not waiting for a locker" | gap (same) |
|
|
106
107
|
| LockerById, ListLockers | caller is anonymous | module `authorize IsAuthenticated` | denied: no caller | RefusingAnAnonymousLockerLookup, RefusingAnAnonymousLockerList |
|
|
107
108
|
| RequestById | caller is anonymous | module `authorize IsAuthenticated` | denied: no caller | RefusingAnAnonymousRequestLookup |
|
|
@@ -33,7 +33,7 @@ Those are the portable sources. The event-source id is the `for` value, not a pr
|
|
|
33
33
|
an event field (same-named fields map automatically - AutoMap is on; its matching differs between flat and scoped projections, see `read-model-design.md` "Building it");
|
|
34
34
|
`$eventSourceId` (the instance identity); a literal (status words); a counter or arithmetic;
|
|
35
35
|
a join on another event stream; children for collections. A reducer is opaque: write its
|
|
36
|
-
lineage in
|
|
36
|
+
lineage in slice `documentation`. A read model built by a query `performer` (no events)
|
|
37
37
|
has lineage outside the model; say where.
|
|
38
38
|
|
|
39
39
|
**Screen field** - from the query result named in `data ... via query`. A screen showing a
|
|
@@ -74,7 +74,7 @@ Filled for `worked-example.md`:
|
|
|
74
74
|
|
|
75
75
|
## The reason line per contributing event
|
|
76
76
|
|
|
77
|
-
The matrix is the audit; the durable record is
|
|
77
|
+
The matrix is the audit; the durable record is StateView slice `documentation`: one line per
|
|
78
78
|
contributing event saying which fields it sets and why. Write it as a tagged text block in a
|
|
79
79
|
real model (a bare fence warns with `PLAY0397`). `worked-example.md` uses one-string
|
|
80
80
|
descriptions only so that it stays a single compiling fence.
|
|
@@ -0,0 +1,87 @@
|
|
|
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
|
+
# Keep reasoning on the model
|
|
5
|
+
|
|
6
|
+
Use `description` for a short summary and `documentation` for assumptions,
|
|
7
|
+
boundaries, trade-offs and rejected alternatives. Put reasoning on the declaration
|
|
8
|
+
it explains, not in comments or disconnected session notes. Modules, features,
|
|
9
|
+
slices, commands, events, read models and reactions accept one nonempty block,
|
|
10
|
+
directly in their body (not beneath a reaction trigger). Queries, personas and other
|
|
11
|
+
declarations do not accept `documentation`: keep their intent in `description` (a
|
|
12
|
+
query's ordering, "oldest first", for example). A short status marker such as **NOT
|
|
13
|
+
enforced in the model today** or **ASSUMED** stays in `description`, where a reader
|
|
14
|
+
sees it first; the reasoning behind it goes in `documentation`:
|
|
15
|
+
|
|
16
|
+
````screenplay
|
|
17
|
+
module Billing
|
|
18
|
+
documentation
|
|
19
|
+
```markdown
|
|
20
|
+
## Boundary
|
|
21
|
+
Billing records agreed amounts; payment delivery belongs elsewhere.
|
|
22
|
+
```
|
|
23
|
+
feature Amounts
|
|
24
|
+
documentation
|
|
25
|
+
```markdown
|
|
26
|
+
Keep the agreed amount, not a running total.
|
|
27
|
+
```
|
|
28
|
+
slice StateChange RecordAmount
|
|
29
|
+
documentation
|
|
30
|
+
```markdown
|
|
31
|
+
A recorded amount is a decision, not a recalculated view.
|
|
32
|
+
```
|
|
33
|
+
command RecordAmount
|
|
34
|
+
documentation
|
|
35
|
+
```markdown
|
|
36
|
+
The caller supplies the agreed amount.
|
|
37
|
+
```
|
|
38
|
+
recordId String identifier
|
|
39
|
+
amount Int
|
|
40
|
+
produces AmountRecorded
|
|
41
|
+
for recordId
|
|
42
|
+
amount = amount
|
|
43
|
+
event AmountRecorded
|
|
44
|
+
amount Int
|
|
45
|
+
specification RecordingAnAmount
|
|
46
|
+
description "Witnesses that the agreed amount is retained"
|
|
47
|
+
when RecordAmount amount = 10
|
|
48
|
+
recordId = "amount-1"
|
|
49
|
+
then AmountRecorded amount = 10
|
|
50
|
+
slice StateView AmountHistory
|
|
51
|
+
readmodel AmountView
|
|
52
|
+
documentation
|
|
53
|
+
```markdown
|
|
54
|
+
This view is display state, not an atomic decision input.
|
|
55
|
+
```
|
|
56
|
+
id String
|
|
57
|
+
amount Int
|
|
58
|
+
projection AmountHistory => AmountView
|
|
59
|
+
from AmountRecorded
|
|
60
|
+
id = $eventSourceId
|
|
61
|
+
amount = amount
|
|
62
|
+
query AmountById => AmountView optional
|
|
63
|
+
by id String
|
|
64
|
+
slice Automation ObserveAmount
|
|
65
|
+
reaction ObserveAmount
|
|
66
|
+
documentation
|
|
67
|
+
```markdown
|
|
68
|
+
Observation does not certify an exactly-once external effect.
|
|
69
|
+
```
|
|
70
|
+
when AmountRecorded
|
|
71
|
+
````
|
|
72
|
+
|
|
73
|
+
A specification accepts a `description` naming the behavior it witnesses, not
|
|
74
|
+
`documentation`; longer reasoning belongs to its slice. Projections and screens
|
|
75
|
+
do not accept documentation. `documentation String` remains a typed property
|
|
76
|
+
where properties are allowed; bare `documentation` starts metadata.
|
|
77
|
+
|
|
78
|
+
Both metadata fields are report-only (PLAY0270): no executable bytes,
|
|
79
|
+
`modelRevision` or ESM version change, no rule enforcement or rendered code.
|
|
80
|
+
Canonical printing retains documentation on its owner; source identity changes. MCP `declaration-details` summary exposes
|
|
81
|
+
`description` and `documentation` wherever supported. Folder merge keeps the
|
|
82
|
+
first module/feature block: identical copies are accepted, conflicting copies
|
|
83
|
+
warn PLAY0559. Malformed, empty or repeated blocks report PLAY0558; events retain
|
|
84
|
+
PLAY0477. These diagnostics have no automatic repair; choose the owning text.
|
|
85
|
+
|
|
86
|
+
Authority: Screenplay v4.127.0 `slices.md` and `specifications.md`. The complete
|
|
87
|
+
model above validates and its specification passes on standalone 4.127.0.
|
|
@@ -28,7 +28,7 @@ is adapted with the agreement of Martin Dilger and Nebulit GmbH.
|
|
|
28
28
|
| `eventmodeling-identifying-outputs/SKILL.md`: events vs read models test, recalculated-state anti-pattern, processor outputs categorized (new event, view update, notification) | `references/read-model-design.md` "Events or views" | shared with TrogonStack's version, including the processor-output categories (row above); adapted closely; the "independent means event" and "no computed fields" rows dropped because decided calculations are facts in Screenplay |
|
|
29
29
|
| `eventmodeling-identifying-outputs/SKILL.md` Step 5a/5c: enumerate consumers, one component one read model, homogeneous list is one component, wide-fan-in versus cheap fields | `references/read-model-design.md` "Components" | adapted closely; "always split" softened to "split when you can name the consequence" (existing decision); screen copies become one `data` line per component |
|
|
30
30
|
| `eventmodeling-identifying-outputs/SKILL.md` Step 5d: build read models from the screen's field mappings, not from its title or a summary | `references/read-model-design.md` "Components"; `references/field-lineage.md` | adapted closely |
|
|
31
|
-
| `eventmodeling-identifying-outputs/SKILL.md` Step 5h.4, 5i: event-to-field reasoning note, per-node verification result list | `SKILL.md` step 8; `references/read-model-design.md` "Checks before handing off"; `references/field-lineage.md` | adapted closely; the note lives in
|
|
31
|
+
| `eventmodeling-identifying-outputs/SKILL.md` Step 5h.4, 5i: event-to-field reasoning note, per-node verification result list | `SKILL.md` step 8; `references/read-model-design.md` "Checks before handing off"; `references/field-lineage.md` | adapted closely; the reasoning note lives in StateView slice `documentation` |
|
|
32
32
|
| `eventmodeling-identifying-outputs/SKILL.md` lines 378-379: before completion re-read every read model and recheck each field and every reason note (roll-ups, additions) | `references/read-model-design.md` "Checks before handing off" | adapted closely; Cratis named-consequence threshold kept instead of "always split" |
|
|
33
33
|
| `eventmodeling-identifying-outputs/SKILL.md` Interview: calculated fields confirmation wording | `SKILL.md` *Interview phase* question 3 | adapted closely |
|
|
34
34
|
| `eventmodeling-identifying-inputs/SKILL.md`: automation level and outside-trigger questions, user versus processor commands marked, conditional input pattern, processor failure/retry stated | `SKILL.md` *Interview phase* question 1; `references/command-inventory.md` | adapted closely; `[USER]`/`[AUTO]` kept as plain classification |
|
package/package/corpus/skills/cratis-screenplay-slice-design/references/read-model-design.md
CHANGED
|
@@ -127,7 +127,7 @@ it stays.
|
|
|
127
127
|
(worklists, status awaiting an outside answer); one-shot otherwise. Design mode only
|
|
128
128
|
(PLAY0268). If access can be revoked mid-session, record that the target re-checks per emission.
|
|
129
129
|
- Never model paging or page size (no syntax, Screenplay#140). State the order in the query
|
|
130
|
-
`description` ("oldest first"); an unbounded list is a review question.
|
|
130
|
+
`description` ("oldest first"; queries do not accept `documentation`); an unbounded list is a review question.
|
|
131
131
|
- A gated keyed query needs its own denial spec.
|
|
132
132
|
|
|
133
133
|
Never drop a list query from a design model just to make it bind; record the capability gap.
|
|
@@ -260,7 +260,7 @@ module Berths
|
|
|
260
260
|
|
|
261
261
|
## Checks before handing off
|
|
262
262
|
|
|
263
|
-
-
|
|
263
|
+
- StateView slice `documentation` gives, per contributing event, the fields it sets and why
|
|
264
264
|
(see `LockerBoard` in `worked-example.md`); extend it whenever a `from` is added. Shape of
|
|
265
265
|
the note: `BerthBooked sets bookingId, status="booked": the view's creation event; the booking
|
|
266
266
|
does not exist before it.` / `BoatArrived sets status="arrived", arrivedAt: the only
|
|
@@ -14,18 +14,18 @@ rendered code (Stage#178): a rule that exists only in prose is unenforced in ren
|
|
|
14
14
|
| stored state (record exists, balance, current status) | `reads <View>` + `require <expr> message "..."` | stated intent, **NOT enforced in the model today** (PLAY0268/0271 at binding are expected in design mode; Screenplay#129/#209). Name the target: Arc `[ProtectedDecision]` + `DecisionRead<T>` (Arc 22.39.0 or later), Chronicle DCB (`concurrency` scope), or a constraint |
|
|
15
15
|
|
|
16
16
|
An unguarded materialized read is unsafe for a protected decision; a guarded read is the
|
|
17
|
-
supported route. Availability: `[ProtectedDecision]` and `DecisionRead<T>`
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
supported route. Availability: `[ProtectedDecision]` and `DecisionRead<T>` exist in
|
|
18
|
+
Stage 4.51.3's Arc 22.50.5/Chronicle 19.32.0 package set, but Stage does not emit
|
|
19
|
+
protected decisions. Gap-fill must use an admitted projection/key shape and active
|
|
20
|
+
unit-of-work enrollment; do not edit managed dependencies. Keep the `.play` rule
|
|
21
|
+
NOT enforced until its target enforcement is separately verified. Forbidden: caller-supplied copies of state in `require`, boolean attestation
|
|
22
22
|
inputs (`confirmsX == true`), rules in `handler` / implementation-hint prose.
|
|
23
23
|
|
|
24
24
|
## Authorization is executable
|
|
25
25
|
|
|
26
26
|
Persona Does/Reads/Cannot text is intent. Every Cannot line resolves to an `authorize` gate
|
|
27
|
-
(policy or ownership claim) plus a `then denied` spec
|
|
28
|
-
|
|
27
|
+
(policy or ownership claim) plus a `then denied` spec using `given caller as <Persona>` or an explicit
|
|
28
|
+
caller for the effective gate; otherwise record a gap. Every command and query under an
|
|
29
29
|
inherited module/feature `authorize` gets its own `then denied` spec. Ownership gates need a
|
|
30
30
|
second caller with another claim value.
|
|
31
31
|
|
|
@@ -33,7 +33,7 @@ second caller with another claim value.
|
|
|
33
33
|
|
|
34
34
|
Command property values are, by default, recorded in the causation chain of the events they
|
|
35
35
|
produce, so treat them as permanent. Newer Chronicle versions can omit causation properties
|
|
36
|
-
(`CausationPropertyRetention.Omit`, Chronicle v19.32.0); rendered apps pin
|
|
36
|
+
(`CausationPropertyRetention.Omit`, Chronicle v19.32.0); Stage 4.51.3 rendered apps pin 19.32.0.
|
|
37
37
|
Verify the actual auditing and retention configuration before relying on omission, and never
|
|
38
38
|
audit secrets. Classify personal values as bare `pii` and operational secrets as
|
|
39
39
|
`secret` on their concepts, never the identifier concept. Use a surrogate identity
|
|
@@ -23,7 +23,7 @@ step at the end: design each behaviour as its slice, then audit the set.
|
|
|
23
23
|
| `Translate` | captures, translated events | the integration (`CarrierManifests`) | see `cratis-screenplay-automations-and-translations` |
|
|
24
24
|
|
|
25
25
|
Screenplay allows several commands or read models in one slice; prefer splitting unless the
|
|
26
|
-
behaviour is genuinely one (and say why in
|
|
26
|
+
behaviour is genuinely one (and say why in `documentation`).
|
|
27
27
|
|
|
28
28
|
## Slice dependencies
|
|
29
29
|
|
|
@@ -142,8 +142,8 @@ result in every row and no refusal anywhere, whose event restates most of the en
|
|
|
142
142
|
relocated).
|
|
143
143
|
4. Apply rule coverage (below) to each new path.
|
|
144
144
|
5. If the business treats a multi-value data-entry correction as one act, keep one correction
|
|
145
|
-
command named for the correction (never `Update`), with the reason in
|
|
146
|
-
`
|
|
145
|
+
command named for the correction (never `Update`), with the reason in slice
|
|
146
|
+
`documentation`; rule coverage still applies.
|
|
147
147
|
|
|
148
148
|
A repeated-field event is a review signal; it is major only when business meaning is lost, a
|
|
149
149
|
rule is bypassed or consumers become ambiguous. Historical generations repeat prior shape on
|
|
@@ -13,9 +13,15 @@ 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`.
|
|
14
14
|
Per-command refusal inventory: `command-inventory.md`.
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
This historical compiled example keeps per-event reasoning in StateView
|
|
17
|
+
`description` strings. For current 4.127.0 authoring, keep descriptions as summaries
|
|
18
|
+
and record lineage reasoning in fenced Markdown `documentation` (`field-lineage.md`).
|
|
19
|
+
The historical source below stays unchanged; it is not the current placement recipe.
|
|
20
|
+
|
|
21
|
+
The excerpt's Stage availability note is historical (Stage 4.24.x, Arc 22.25.0).
|
|
22
|
+
Stage 4.51.3 pins Arc 22.50.5/Chronicle 19.32.0, so protected-read APIs are available
|
|
23
|
+
to gap-fill; this neither admits these `.play` rules nor proves target protection.
|
|
24
|
+
The original compiled excerpt is retained unchanged.
|
|
19
25
|
|
|
20
26
|
```screenplay
|
|
21
27
|
domain Parcelpoint.Lockers
|
|
@@ -37,7 +37,7 @@ The update follows `commands.md`, `events.md`, `types.md` and
|
|
|
37
37
|
`specifications.md` at that main commit (after v4.52.0). This pass compiles the
|
|
38
38
|
changed examples; it does not rerun the reference runner.
|
|
39
39
|
|
|
40
|
-
Current specification syntax follows Screenplay v4.
|
|
40
|
+
Current specification syntax follows Screenplay v4.127.0 `specifications.md`;
|
|
41
41
|
older probes in the table remain historical. Pins: `cratis-screenplay-toolchain`
|
|
42
42
|
`references/versions.md`. Compile commands check source, not reference execution.
|
|
43
43
|
Use `screenplay test` or MCP `run-specifications` for V4; Stage/target tests are
|
|
@@ -95,13 +95,27 @@ Unsupported is not passed. Report it as "needs a target", not as green. "Specifi
|
|
|
95
95
|
and "bound" are never "passing": run the reference CLI/MCP route or the owning
|
|
96
96
|
target tests, and name the engine, version and expected/discovered selection.
|
|
97
97
|
|
|
98
|
+
## Descriptions, persona callers and case tables
|
|
99
|
+
|
|
100
|
+
Use one `description "<rule or behavior>"` (or a fenced `text` description) to
|
|
101
|
+
name what the specification witnesses. It is report-only (PLAY0270), changing
|
|
102
|
+
neither execution nor ESM bytes. Specifications do not accept `documentation`;
|
|
103
|
+
put longer assumptions and rejected alternatives on the owning slice's fenced
|
|
104
|
+
Markdown `documentation` block.
|
|
105
|
+
|
|
106
|
+
`given caller as <Persona>` expands to one authenticated policy witness before
|
|
107
|
+
binding. Named `parameter`/`case` tables share steps and read values as
|
|
108
|
+
`case.<parameter>`; each case runs independently as `<Specification>_<Case>`.
|
|
109
|
+
Read [persona callers and case tables](references/persona-callers-and-cases.md)
|
|
110
|
+
for synthesis refusals, selection, provenance and a complete passing model.
|
|
111
|
+
|
|
98
112
|
## The vocabulary
|
|
99
113
|
|
|
100
114
|
| Construct | Meaning |
|
|
101
115
|
| --- | --- |
|
|
102
116
|
| `given <EventType>` | prior state, established by replaying events before the action |
|
|
103
117
|
| `given readmodel <ReadModelType>` | prior read-model state, established directly — a **complete** instance including its identifier |
|
|
104
|
-
| `given caller` |
|
|
118
|
+
| `given caller` / `given caller as <Persona>` | explicit caller (`authenticated`, roles, claims; empty means anonymous), or an authenticated synthesized persona witness |
|
|
105
119
|
| `when <CommandType>` | run a command |
|
|
106
120
|
| `when append <EventType>` | append one event: constraints and projections run, the command does not; reactions run only from ESM v6, where `then` lists what followed |
|
|
107
121
|
| `when query <Query>` | perform a query with the argument values beneath it (v4.48.0) |
|
|
@@ -146,7 +160,7 @@ Rules the binder enforces:
|
|
|
146
160
|
- **`then denied` stands alone**: not with events, errors or state assertions
|
|
147
161
|
(`PLAY0388`). For a query, pair it with one `then query` that has `arguments`
|
|
148
162
|
and no `result`.
|
|
149
|
-
- **Authorized commands and queries need `given caller
|
|
163
|
+
- **Authorized commands and queries need `given caller` or `given caller as <Persona>`** (`PLAY0389`). The runner
|
|
150
164
|
never invents a caller.
|
|
151
165
|
- **`null` only in optional read-model values.** A `null` in a command or event
|
|
152
166
|
value is `PLAY0350`: an optional fact is a separate event.
|
|
@@ -168,7 +182,7 @@ the one-rejection rule (`PLAY0273`) are reported only when the model binds, so
|
|
|
168
182
|
- **Rejections:** `then error "<message>"` matches the message whatever the rule's
|
|
169
183
|
validation severity; no form asserts severity. Bare `then error` never matches
|
|
170
184
|
a denial. Quote a localized key: `then error "$strings.invoices.reasonRequired"`.
|
|
171
|
-
|
|
185
|
+
Besides a String `case.<parameter>`, the grammar takes only quoted messages here, never an unquoted `$strings` token
|
|
172
186
|
(unlike a rule's `message` operand). The reference runner compares the symbolic key
|
|
173
187
|
and requires the rejection to carry the string-key marker; it never loads
|
|
174
188
|
translated text; resolving the key is the realization's job.
|
|
@@ -197,7 +211,10 @@ Read [references/reactions-and-cascades.md](references/reactions-and-cascades.md
|
|
|
197
211
|
|
|
198
212
|
Use typed `example` declarations for repeated event/command/read-model values;
|
|
199
213
|
step overrides keep the action/outcome visible and carry authored/example/override
|
|
200
|
-
provenance. Event
|
|
214
|
+
provenance. Event examples can carry routes, replaced as a whole by a step.
|
|
215
|
+
Redelivery locators may state `stream` or `no stream` to select one definitely
|
|
216
|
+
matching given occurrence with no undecided candidates (PLAY0543); redelivery
|
|
217
|
+
remains authoring-only. Event `stream`/`no stream` assertions bind as ESM v8; typed `for` and
|
|
201
218
|
stream ids are not guessed. Read [examples and routes](references/examples-and-routes.md).
|
|
202
219
|
|
|
203
220
|
`given operation ... fails`, `then operation` and `then compensated` describe
|