@cratis/pi 7.51.2 → 7.51.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package/corpus/harnesses/copilot/instructions/authoring-skills.instructions.md +7 -1
- package/package/corpus/rules/authoring-skills.md +7 -1
- package/package/corpus/skills/cratis-application-slice-specifications/SKILL.md +4 -55
- package/package/corpus/skills/cratis-application-slice-specifications/references/command-result-assertions.md +36 -0
- package/package/corpus/skills/cratis-application-slice-specifications/references/reading-play-specifications.md +30 -0
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/SKILL.md +4 -69
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/authentication.md +8 -0
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/authorization.md +9 -0
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/frontend.md +19 -0
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/identity-endpoints.md +40 -0
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/local-development.md +7 -0
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/product-sources.md +11 -0
- package/package/corpus/skills/cratis-arc-command/SKILL.md +8 -99
- package/package/corpus/skills/cratis-arc-command/references/causation-details.md +26 -0
- package/package/corpus/skills/cratis-arc-command/references/client-contract.md +16 -0
- package/package/corpus/skills/cratis-arc-command/references/event-source-id-details.md +13 -0
- package/package/corpus/skills/cratis-arc-command/references/generation-boundaries.md +8 -0
- package/package/corpus/skills/cratis-arc-command/references/product-sources.md +16 -0
- package/package/corpus/skills/cratis-arc-command/references/provide-example.md +19 -0
- package/package/corpus/skills/cratis-arc-command/references/proxy-generation.md +8 -0
- package/package/corpus/skills/cratis-arc-command/references/return-shape-examples.md +24 -0
- package/package/corpus/skills/cratis-arc-command-kotlin/SKILL.md +3 -61
- package/package/corpus/skills/cratis-arc-command-kotlin/references/artifacts.md +16 -0
- package/package/corpus/skills/cratis-arc-command-kotlin/references/authorization-override-example.md +17 -0
- package/package/corpus/skills/cratis-arc-command-kotlin/references/project-setup.md +40 -0
- package/package/corpus/skills/cratis-arc-command-typescript/SKILL.md +4 -105
- package/package/corpus/skills/cratis-arc-command-typescript/references/parameter-binding.md +26 -0
- package/package/corpus/skills/cratis-arc-command-typescript/references/project-setup.md +89 -0
- package/package/corpus/skills/cratis-arc-query-typescript/SKILL.md +3 -74
- package/package/corpus/skills/cratis-arc-query-typescript/references/product-sources.md +11 -0
- package/package/corpus/skills/cratis-arc-query-typescript/references/scenario-example.md +23 -0
- package/package/corpus/skills/cratis-arc-query-typescript/references/storage-examples.md +52 -0
- package/package/corpus/skills/cratis-arc-react-page/SKILL.md +3 -63
- package/package/corpus/skills/cratis-arc-react-page/references/data-page.md +28 -0
- package/package/corpus/skills/cratis-arc-react-page/references/dialogs.md +47 -0
- package/package/corpus/skills/cratis-chronicle-client-dotnet/SKILL.md +3 -80
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/connection-options.md +61 -0
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/lifecycle.md +30 -0
- package/package/corpus/skills/cratis-chronicle-client-elixir/SKILL.md +8 -101
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/client-options.md +43 -0
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/idioms-and-inspection.md +35 -0
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/product-sources.md +10 -0
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/reactor-example.md +33 -0
- package/package/corpus/skills/cratis-chronicle-client-kotlin/SKILL.md +7 -88
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/annotations-and-handlers.md +32 -0
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/append-concurrency.md +9 -0
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/connection-string.md +27 -0
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/event-type-annotations.md +9 -0
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/product-sources.md +13 -0
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/read-models-and-projections.md +29 -0
- package/package/corpus/skills/cratis-chronicle-client-typescript/SKILL.md +3 -103
- package/package/corpus/skills/cratis-chronicle-client-typescript/references/connection-options.md +52 -0
- package/package/corpus/skills/cratis-chronicle-client-typescript/references/lifecycle.md +31 -0
- package/package/corpus/skills/cratis-chronicle-client-typescript/references/project-setup.md +36 -0
- package/package/corpus/skills/cratis-chronicle-projection/SKILL.md +1 -21
- package/package/corpus/skills/cratis-chronicle-projection/references/definition-changes.md +27 -0
- package/package/corpus/skills/cratis-chronicle-reactor/SKILL.md +5 -110
- package/package/corpus/skills/cratis-chronicle-reactor/references/cross-service-events.md +13 -0
- package/package/corpus/skills/cratis-chronicle-reactor/references/filtering.md +34 -0
- package/package/corpus/skills/cratis-chronicle-reactor/references/read-model-injection.md +29 -0
- package/package/corpus/skills/cratis-chronicle-reactor/references/return-event-metadata.md +51 -0
- package/package/corpus/skills/cratis-chronicle-reducer/SKILL.md +7 -92
- package/package/corpus/skills/cratis-chronicle-reducer/references/filtering.md +36 -0
- package/package/corpus/skills/cratis-chronicle-reducer/references/instance-reducer-example.md +20 -0
- package/package/corpus/skills/cratis-chronicle-reducer/references/product-sources.md +8 -0
- package/package/corpus/skills/cratis-chronicle-reducer/references/replay-hooks-and-definition-changes.md +35 -0
- package/package/corpus/skills/cratis-chronicle-reducer/references/specification-example.md +15 -0
- package/package/corpus/skills/cratis-components-styling/SKILL.md +1 -15
- package/package/corpus/skills/cratis-components-styling/references/renderer-adapters.md +21 -0
- package/package/corpus/skills/cratis-governed-release-methodology/SKILL.md +1 -24
- package/package/corpus/skills/cratis-governed-release-methodology/references/lifecycle-phases.md +30 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +2 -15
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/neighbouring-skills.md +12 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/product-sources.md +11 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +3 -93
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/capture-map-and-example.md +37 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/trigger-declaration.md +48 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/trigger-reads-example.md +16 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +5 -97
- package/package/corpus/skills/cratis-screenplay-command-surface/references/compliance.md +9 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/constraints-produces-concurrency.md +89 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/routes-and-external-operations.md +21 -0
- package/package/corpus/skills/cratis-screenplay-discovery/SKILL.md +5 -38
- package/package/corpus/skills/cratis-screenplay-discovery/references/interview-questions.md +14 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/neighbouring-skills.md +14 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/plotting-and-handoff.md +9 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/product-sources.md +16 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +6 -74
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/facilitation-stance.md +12 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/file-layout.md +19 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/modeling-reasoning.md +13 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/neighbouring-skills.md +16 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +33 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/provenance.md +6 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +2 -17
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/interview-findings.md +18 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/neighbouring-skills.md +12 -0
- package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +5 -89
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +6 -0
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/layout.md +30 -0
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/repairs.md +42 -0
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/state-and-recovery.md +30 -0
- package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +10 -42
- package/package/corpus/skills/cratis-screenplay-model-review/references/baseline-comparison.md +7 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/business-questions.md +11 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/interview-batch.md +14 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/model-inventory-report.md +8 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/neighbouring-skills.md +12 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/report-template.md +21 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/SKILL.md +15 -68
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/completeness-self-check.md +12 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/handoff-template.md +15 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/identity-and-edits.md +9 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/independent-review.md +10 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/neighbouring-skills.md +10 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/per-turn-protocol.md +5 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/product-sources.md +9 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/safety.md +12 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/stop-or-assume.md +25 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/verdicts-and-modes.md +8 -0
- package/package/corpus/skills/cratis-screenplay-projections/SKILL.md +3 -67
- package/package/corpus/skills/cratis-screenplay-projections/references/joins.md +41 -0
- package/package/corpus/skills/cratis-screenplay-projections/references/variants.md +41 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +3 -31
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/delivery-protocol.md +9 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/neighbouring-skills.md +11 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/product-sources.md +23 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +11 -75
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/interview-batch.md +16 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/neighbouring-skills.md +10 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/public-event-coverage.md +12 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/quality-checklist.md +17 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/review-questions.md +9 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-catalogue.md +28 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/version-skew.md +14 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +18 -94
- package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md +25 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/field-lineage.md +9 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/identity-edits.md +14 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/model-reasoning.md +9 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/neighbouring-skills.md +10 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/product-sources.md +9 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/public-boundaries-and-keys.md +16 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/read-model-design.md +36 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +17 -0
- package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +5 -63
- package/package/corpus/skills/cratis-screenplay-specifications/references/examples-and-routes.md +6 -0
- package/package/corpus/skills/cratis-screenplay-specifications/references/outcome-comparison.md +33 -0
- package/package/corpus/skills/cratis-screenplay-specifications/references/vocabulary.md +40 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +11 -77
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +21 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution.md +18 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/interview-batch.md +20 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/neighbouring-skills.md +12 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/product-sources.md +12 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/review-questions.md +13 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-id-rules.md +15 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +1 -8
- package/package/corpus/skills/cratis-screenplay-toolchain/references/neighbouring-skills.md +12 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +6 -99
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/file-references.md +38 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/layout-arrangement.md +31 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/localized-strings.md +15 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/screen-composition-contract.md +6 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/ui-profile-and-theme.md +34 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +1 -10
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/neighbouring-skills.md +14 -0
- package/package.json +1 -1
package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/verdicts-and-modes.md
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
- Render revision drift
|
|
10
10
|
- Tool-version gaps
|
|
11
11
|
- Modes
|
|
12
|
+
- Reporting the verdicts
|
|
12
13
|
|
|
13
14
|
Exact commands, exit codes, admitted subsets and every version-specific fact live in
|
|
14
15
|
`cratis-screenplay-toolchain` (`SKILL.md` and its subset references). This file
|
|
@@ -215,3 +216,10 @@ skill):
|
|
|
215
216
|
`run-specifications`, obligations/smells and opt-in completeness are released
|
|
216
217
|
at the toolchain pin; they do not prove full field lineage or target behavior.
|
|
217
218
|
Check `cratis-screenplay-toolchain` before changing a verdict.
|
|
219
|
+
|
|
220
|
+
## Reporting the verdicts
|
|
221
|
+
|
|
222
|
+
Report all five at checkpoints and handoffs (between edit batches only those you ran), each a
|
|
223
|
+
result or "not run: <reason>" naming tool and version. Never infer one from another or "fix" a
|
|
224
|
+
correct model to silence a diagnostic (record a tool-version gap). Commands, report template,
|
|
225
|
+
source identity: `references/verdicts-and-modes.md`. Read `references/verdicts-and-modes.md` before recording verdicts or establishing the source identity for acceptance.
|
|
@@ -173,41 +173,11 @@ It takes a dotted path (`clear Owner.Note`) and escapes reserved names
|
|
|
173
173
|
|
|
174
174
|
## Arithmetic
|
|
175
175
|
|
|
176
|
-
|
|
177
|
-
| --- | --- |
|
|
178
|
-
| `count <prop>` | +1, expressing *counting occurrences* |
|
|
179
|
-
| `increment <prop>` | +1, expressing *modifying state* |
|
|
180
|
-
| `decrement <prop>` | −1 |
|
|
181
|
-
| `add <prop> by <expr>` | += expression |
|
|
182
|
-
| `subtract <prop> by <expr>` | −= expression |
|
|
183
|
-
|
|
184
|
-
`count` and `increment` behave identically; the difference is intent. The target
|
|
185
|
-
must be numeric.
|
|
176
|
+
`count`/`increment` add one, `decrement` subtracts one, `add`/`subtract <prop> by <expr>` change by an expression; the target must be numeric. Read [references/joins.md](references/joins.md) for the full table.
|
|
186
177
|
|
|
187
178
|
## Joins
|
|
188
179
|
|
|
189
|
-
|
|
190
|
-
`customerName`:
|
|
191
|
-
|
|
192
|
-
```screenplay excerpt
|
|
193
|
-
join customer on customerId
|
|
194
|
-
with CustomerCreated
|
|
195
|
-
customerName = name
|
|
196
|
-
with CustomerUpdated
|
|
197
|
-
customerName = name
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
`join <label> on <property>` (error `PLAY0063` otherwise), then one or more
|
|
201
|
-
`with <EventType>` blocks (error `PLAY0064` otherwise). **A join never creates an
|
|
202
|
-
instance**: a joined event updates every existing instance whose `on` property
|
|
203
|
-
equals the joined event's event source id. Chronicle discards the label, but
|
|
204
|
-
inside `children` and `nested` the compiler's completeness check (`PLAY0284`)
|
|
205
|
-
counts the label as the field the join fills, so name it after that field there.
|
|
206
|
-
Joins work at a projection's own level and inside `children`. Inside `nested`,
|
|
207
|
-
Chronicle's engine does not wire a join, a `children` block or a
|
|
208
|
-
`remove via join`; they bind, but the reference execution plan refuses them.
|
|
209
|
-
A join cannot declare its own key or trigger removal — that is
|
|
210
|
-
`remove via join on`.
|
|
180
|
+
`join <label> on <property>` followed by `with <EventType>` blocks; **A join never creates an instance** (`PLAY0063`, `PLAY0064`). Read [references/joins.md](references/joins.md) when writing a join, including inside `children` or `nested`.
|
|
211
181
|
|
|
212
182
|
## Children and nested
|
|
213
183
|
|
|
@@ -255,41 +225,7 @@ coexist.
|
|
|
255
225
|
|
|
256
226
|
## Variants — one identity, mutually exclusive read models
|
|
257
227
|
|
|
258
|
-
|
|
259
|
-
declared elsewhere. Every event about an issue is appended with the issue's
|
|
260
|
-
identifier as its event source.
|
|
261
|
-
|
|
262
|
-
```screenplay excerpt
|
|
263
|
-
projection WorkItem
|
|
264
|
-
from TitleChanged
|
|
265
|
-
title = title
|
|
266
|
-
variant BacklogItem
|
|
267
|
-
enters on IssueCreated
|
|
268
|
-
variant DevelopmentItem
|
|
269
|
-
enters on IssueStarted
|
|
270
|
-
variant PullRequestItem
|
|
271
|
-
enters on PullRequestCreated
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
Each variant is its own read model; only its `enters on` events create it.
|
|
275
|
-
Everything else, including a projection-level shared handler, is update-only: it
|
|
276
|
-
becomes a join on the variant's identifier, matched against the handler's key
|
|
277
|
-
(here the event source).
|
|
278
|
-
|
|
279
|
-
⚠️ **Mutual exclusion works through the event source identity.** Entering a
|
|
280
|
-
variant removes the entity from its siblings, and that removal is always keyed by
|
|
281
|
-
the entering event's source identity, whatever key the `enters on` line declares.
|
|
282
|
-
Keep the event source equal to the entity's identifier, as above. An
|
|
283
|
-
`enters on IssueStarted key issueId` whose `issueId` differs from the event
|
|
284
|
-
source creates the development item under `issueId` but removes the backlog item
|
|
285
|
-
keyed by the event source instead, so the issue stays in both variants.
|
|
286
|
-
|
|
287
|
-
Diagnostics: no `enters on` (`PLAY0382`), a shared mapping a variant's read
|
|
288
|
-
model lacks (`PLAY0383`), duplicate variant names (`PLAY0384`), an entering
|
|
289
|
-
event claimed twice (`PLAY0385`). The executable model binds variants the way Chronicle's client SDK
|
|
290
|
-
reclassifies them; Chronicle's hosted declaration language does not lower them
|
|
291
|
-
yet. Use variants for genuinely different shapes, not for
|
|
292
|
-
a single `status` field.
|
|
228
|
+
Each `variant` is its own read model created only by its `enters on` events, and mutual exclusion works through the event source identity: keep the event source equal to the entity identifier or the issue stays in both variants. Read [references/variants.md](references/variants.md) when modeling an entity with exclusive lifecycle shapes or fixing `PLAY0382`–`PLAY0385`.
|
|
293
229
|
|
|
294
230
|
## When PDL is not enough — the reducer
|
|
295
231
|
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Joins and arithmetic
|
|
2
|
+
|
|
3
|
+
This reference holds the join excerpt and rules and the arithmetic mapping lines.
|
|
4
|
+
|
|
5
|
+
## Joins
|
|
6
|
+
|
|
7
|
+
Excerpt, inside a `projection` whose read model has `customerId` and
|
|
8
|
+
`customerName`:
|
|
9
|
+
|
|
10
|
+
```screenplay excerpt
|
|
11
|
+
join customer on customerId
|
|
12
|
+
with CustomerCreated
|
|
13
|
+
customerName = name
|
|
14
|
+
with CustomerUpdated
|
|
15
|
+
customerName = name
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
`join <label> on <property>` (error `PLAY0063` otherwise), then one or more
|
|
19
|
+
`with <EventType>` blocks (error `PLAY0064` otherwise). **A join never creates an
|
|
20
|
+
instance**: a joined event updates every existing instance whose `on` property
|
|
21
|
+
equals the joined event's event source id. Chronicle discards the label, but
|
|
22
|
+
inside `children` and `nested` the compiler's completeness check (`PLAY0284`)
|
|
23
|
+
counts the label as the field the join fills, so name it after that field there.
|
|
24
|
+
Joins work at a projection's own level and inside `children`. Inside `nested`,
|
|
25
|
+
Chronicle's engine does not wire a join, a `children` block or a
|
|
26
|
+
`remove via join`; they bind, but the reference execution plan refuses them.
|
|
27
|
+
A join cannot declare its own key or trigger removal — that is
|
|
28
|
+
`remove via join on`.
|
|
29
|
+
|
|
30
|
+
## Arithmetic
|
|
31
|
+
|
|
32
|
+
| Line | Effect |
|
|
33
|
+
| --- | --- |
|
|
34
|
+
| `count <prop>` | +1, expressing *counting occurrences* |
|
|
35
|
+
| `increment <prop>` | +1, expressing *modifying state* |
|
|
36
|
+
| `decrement <prop>` | −1 |
|
|
37
|
+
| `add <prop> by <expr>` | += expression |
|
|
38
|
+
| `subtract <prop> by <expr>` | −= expression |
|
|
39
|
+
|
|
40
|
+
`count` and `increment` behave identically; the difference is intent. The target
|
|
41
|
+
must be numeric.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Variants
|
|
2
|
+
|
|
3
|
+
This reference holds the variant excerpt, the mutual-exclusion rule through the event source identity and variant diagnostics.
|
|
4
|
+
|
|
5
|
+
## Variants — one identity, mutually exclusive read models
|
|
6
|
+
|
|
7
|
+
Excerpt: the events and the three read models (each with a keyed query) are
|
|
8
|
+
declared elsewhere. Every event about an issue is appended with the issue's
|
|
9
|
+
identifier as its event source.
|
|
10
|
+
|
|
11
|
+
```screenplay excerpt
|
|
12
|
+
projection WorkItem
|
|
13
|
+
from TitleChanged
|
|
14
|
+
title = title
|
|
15
|
+
variant BacklogItem
|
|
16
|
+
enters on IssueCreated
|
|
17
|
+
variant DevelopmentItem
|
|
18
|
+
enters on IssueStarted
|
|
19
|
+
variant PullRequestItem
|
|
20
|
+
enters on PullRequestCreated
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Each variant is its own read model; only its `enters on` events create it.
|
|
24
|
+
Everything else, including a projection-level shared handler, is update-only: it
|
|
25
|
+
becomes a join on the variant's identifier, matched against the handler's key
|
|
26
|
+
(here the event source).
|
|
27
|
+
|
|
28
|
+
⚠️ **Mutual exclusion works through the event source identity.** Entering a
|
|
29
|
+
variant removes the entity from its siblings, and that removal is always keyed by
|
|
30
|
+
the entering event's source identity, whatever key the `enters on` line declares.
|
|
31
|
+
Keep the event source equal to the entity's identifier, as above. An
|
|
32
|
+
`enters on IssueStarted key issueId` whose `issueId` differs from the event
|
|
33
|
+
source creates the development item under `issueId` but removes the backlog item
|
|
34
|
+
keyed by the event source instead, so the issue stays in both variants.
|
|
35
|
+
|
|
36
|
+
Diagnostics: no `enters on` (`PLAY0382`), a shared mapping a variant's read
|
|
37
|
+
model lacks (`PLAY0383`), duplicate variant names (`PLAY0384`), an entering
|
|
38
|
+
event claimed twice (`PLAY0385`). The executable model binds variants the way Chronicle's client SDK
|
|
39
|
+
reclassifies them; Chronicle's hosted declaration language does not lower them
|
|
40
|
+
yet. Use variants for genuinely different shapes, not for
|
|
41
|
+
a single `status` field.
|
|
@@ -22,25 +22,7 @@ rule is in `cratis-screenplay-modeling-lifecycle` ("Decide the level first"); it
|
|
|
22
22
|
|
|
23
23
|
## Verified product sources
|
|
24
24
|
|
|
25
|
-
Tool versions are covered in `cratis-screenplay-toolchain` `SKILL.md`; read it before
|
|
26
|
-
selecting the compiler and renderer for delivery: the CLI bundles its own Screenplay and Stage;
|
|
27
|
-
its compiler version differs from the standalone pin. Render options (`--scope`,
|
|
28
|
-
`--check`, `--package-set`) and exit codes: cli `Documentation/reference/screenplay.md`
|
|
29
|
-
and `cratis render --help`; admission: Stage `SemanticVersionFeatures.cs`,
|
|
30
|
-
`SemanticVersionFeatureAdmission.cs`, `SemanticCratisAdmission.Automation.cs`. Stage's scaffold pins Arc and
|
|
31
|
-
Chronicle releases, which are not necessarily the latest (`cratis-stage-rendering-and-sandbox`
|
|
32
|
-
`references/rendered-application.md`). Source reading is not a new render run.
|
|
33
|
-
|
|
34
|
-
The worked example (`references/worked-example.md`) was probed with the public CLI (observed). The
|
|
35
|
-
canonical `ScreenComposition` corpus was rendered and published successfully, and an MCP-edited copy
|
|
36
|
-
was rendered, run and checked in the browser. The AI
|
|
37
|
-
repository's `screenplay-mcp-transcript.ts` harness proves the real stdio proposal/apply path against the
|
|
38
|
-
packaged CLI. Guarded Close actions and double-click interactions are refused by an older Stage
|
|
39
|
-
(`STAGE-SCENE-ACTION-001`, `STAGE-SCENE-INTERACTION-001`); a current Stage renders and runs them, and the codes
|
|
40
|
-
remain for a guard Stage cannot evaluate, which is never emulated. UI-profile
|
|
41
|
-
rejection (`CLI-RENDER-007` to `-010`) and render-then-recover are CLI behavior. The
|
|
42
|
-
renderer facts are owned by `cratis-stage-rendering-and-sandbox`; this skill links them and never
|
|
43
|
-
restates the admission table.
|
|
25
|
+
Tool versions are covered in `cratis-screenplay-toolchain` `SKILL.md`; read it before selecting the compiler and renderer for delivery: the CLI bundles its own Screenplay and Stage. Read [references/product-sources.md](references/product-sources.md) when checking a render claim against the CLI, Stage or probe sources; the renderer facts are owned by `cratis-stage-rendering-and-sandbox`.
|
|
44
26
|
|
|
45
27
|
## When to use / when not
|
|
46
28
|
|
|
@@ -53,11 +35,7 @@ restates the admission table.
|
|
|
53
35
|
## Interview phase
|
|
54
36
|
**Skip if** the request names the model root, the application name, the destination and the
|
|
55
37
|
decision on non-renderable scope. Otherwise ask only what is missing:
|
|
56
|
-
|
|
57
|
-
2. **Application name** for `--name` (it is part of the application identity: keep it identical on every re-render).
|
|
58
|
-
3. **Destination.** Default `.ai-work/screenplay/<model-slug>/render-probe/<App>`; any other destination needs the user's intent.
|
|
59
|
-
4. **If admission fails:** stay in design mode, change the model for business reasons, or gap-fill by hand? (the three cases below).
|
|
60
|
-
5. **Seams:** outside systems, styles or packages the rendered app needs (`Customizations/`).
|
|
38
|
+
Ask only what is missing: the model and accepted version, the application name for `--name` (identical on every re-render), the destination, the decision if admission fails (the three cases below), and the seams (`Customizations/`). Read [references/delivery-protocol.md](references/delivery-protocol.md) ("Interview batch for render delivery") for the defaults.
|
|
61
39
|
|
|
62
40
|
Unattended: assume visibly (probe destination, default name from the model root folder), never
|
|
63
41
|
assume an answer to 4, and record it as `blocked` for the user.
|
|
@@ -205,13 +183,7 @@ Before reporting done:
|
|
|
205
183
|
|
|
206
184
|
## Route near misses
|
|
207
185
|
|
|
208
|
-
-
|
|
209
|
-
- Which specification forms Stage accepts: `cratis-screenplay-scenario-coverage`, `cratis-screenplay-specifications`.
|
|
210
|
-
- Verdict commands, subsets, versions: `cratis-screenplay-toolchain`.
|
|
211
|
-
- Renderer facts, publication recovery, sandbox: `cratis-stage-rendering-and-sandbox`.
|
|
212
|
-
- Refused automation or translation scope (the refused behavior is gap-fill): `cratis-screenplay-automations-and-translations`.
|
|
213
|
-
- Hand-written code against its contract: `cratis-application-slice-conformance`.
|
|
214
|
-
- Code review of delivered code: `cratis-code-review`.
|
|
186
|
+
Read [references/neighbouring-skills.md](references/neighbouring-skills.md) when the work is model changes, specification forms, tooling, renderer facts, refused scope, conformance or code review rather than render delivery.
|
|
215
187
|
|
|
216
188
|
## References (load on demand)
|
|
217
189
|
|
package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/delivery-protocol.md
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
- 4. Customizations (bounded)
|
|
9
9
|
- 5. Done check (before reporting)
|
|
10
10
|
- 6. Stop and ask
|
|
11
|
+
- Interview batch for render delivery
|
|
11
12
|
|
|
12
13
|
The render phase proves and publishes; it does not write business behaviour. Run one phase
|
|
13
14
|
per tool call and read each result from its exit status, never from a grep of the log.
|
|
@@ -112,3 +113,11 @@ has no field, event or specification behind it; two specifications contradict; a
|
|
|
112
113
|
needs state nothing produces; a declared seam's contract conflicts with the model; or a
|
|
113
114
|
description states behaviour that a specification, mapping or constraint contradicts. Name the
|
|
114
115
|
slice, the element and what is missing. Everything else: proceed from what the model says.
|
|
116
|
+
|
|
117
|
+
## Interview batch for render delivery
|
|
118
|
+
|
|
119
|
+
1. **Which model, which accepted version?** (root, source identity from the lifecycle report).
|
|
120
|
+
2. **Application name** for `--name` (it is part of the application identity: keep it identical on every re-render).
|
|
121
|
+
3. **Destination.** Default `.ai-work/screenplay/<model-slug>/render-probe/<App>`; any other destination needs the user's intent.
|
|
122
|
+
4. **If admission fails:** stay in design mode, change the model for business reasons, or gap-fill by hand? (the three cases below).
|
|
123
|
+
5. **Seams:** outside systems, styles or packages the rendered app needs (`Customizations/`).
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Neighbouring skills
|
|
2
|
+
|
|
3
|
+
Which skill owns each task next to render and gap-fill.
|
|
4
|
+
|
|
5
|
+
- Changing the model, mode or slices: `cratis-screenplay-slice-design`, `cratis-screenplay-modeling-lifecycle`.
|
|
6
|
+
- Which specification forms Stage accepts: `cratis-screenplay-scenario-coverage`, `cratis-screenplay-specifications`.
|
|
7
|
+
- Verdict commands, subsets, versions: `cratis-screenplay-toolchain`.
|
|
8
|
+
- Renderer facts, publication recovery, sandbox: `cratis-stage-rendering-and-sandbox`.
|
|
9
|
+
- Refused automation or translation scope (the refused behavior is gap-fill): `cratis-screenplay-automations-and-translations`.
|
|
10
|
+
- Hand-written code against its contract: `cratis-application-slice-conformance`.
|
|
11
|
+
- Code review of delivered code: `cratis-code-review`.
|
package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/product-sources.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Product sources
|
|
2
|
+
|
|
3
|
+
Sources behind the render and gap-fill claims.
|
|
4
|
+
|
|
5
|
+
Tool versions are covered in `cratis-screenplay-toolchain` `SKILL.md`; read it before
|
|
6
|
+
selecting the compiler and renderer for delivery: the CLI bundles its own Screenplay and Stage;
|
|
7
|
+
its compiler version differs from the standalone pin. Render options (`--scope`,
|
|
8
|
+
`--check`, `--package-set`) and exit codes: cli `Documentation/reference/screenplay.md`
|
|
9
|
+
and `cratis render --help`; admission: Stage `SemanticVersionFeatures.cs`,
|
|
10
|
+
`SemanticVersionFeatureAdmission.cs`, `SemanticCratisAdmission.Automation.cs`. Stage's scaffold pins Arc and
|
|
11
|
+
Chronicle releases, which are not necessarily the latest (`cratis-stage-rendering-and-sandbox`
|
|
12
|
+
`references/rendered-application.md`). Source reading is not a new render run.
|
|
13
|
+
|
|
14
|
+
The worked example (`references/worked-example.md`) was probed with the public CLI (observed). The
|
|
15
|
+
canonical `ScreenComposition` corpus was rendered and published successfully, and an MCP-edited copy
|
|
16
|
+
was rendered, run and checked in the browser. The AI
|
|
17
|
+
repository's `screenplay-mcp-transcript.ts` harness proves the real stdio proposal/apply path against the
|
|
18
|
+
packaged CLI. Guarded Close actions and double-click interactions are refused by an older Stage
|
|
19
|
+
(`STAGE-SCENE-ACTION-001`, `STAGE-SCENE-INTERACTION-001`); a current Stage renders and runs them, and the codes
|
|
20
|
+
remain for a guard Stage cannot evaluate, which is never emulated. UI-profile
|
|
21
|
+
rejection (`CLI-RENDER-007` to `-010`) and render-then-recover are CLI behavior. The
|
|
22
|
+
renderer facts are owned by `cratis-stage-rendering-and-sandbox`; this skill links them and never
|
|
23
|
+
restates the admission table.
|
|
@@ -37,18 +37,9 @@ lifecycle families emulate them.
|
|
|
37
37
|
retries, races), the critical rules with an allowed and a refused example each, how the specs
|
|
38
38
|
will be used (reference only, executable, rendered and tested) and who validates them.
|
|
39
39
|
Critical questions, one at a time, with follow-ups:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
request, the nearest refused one, and why they differ (`references/scenario-catalogue.md`
|
|
44
|
-
"Eliciting cases").
|
|
45
|
-
3. **Use.** Design record, executable (V2/V3), reference run (V4) or rendered tests (V5)? It
|
|
46
|
-
decides the admitted forms (`references/spec-forms-by-mode.md`).
|
|
47
|
-
4. **Validation.** Who confirms the business outcomes: domain expert, developer, tester? For a
|
|
48
|
-
group session use `references/scenario-workshop.md`.
|
|
49
|
-
**Unattended:** assume visibly. Write each assumption as a `question` cell with the default you
|
|
50
|
-
used; never invent a rule. Record who actually answered; an agent asking itself four kinds of
|
|
51
|
-
question is not four approvals.
|
|
40
|
+
Ask only what is missing: depth, known rules and edge cases (one allowed and the nearest refused request per rule), intended use (decides admitted forms), and who validates. Read [references/interview-batch.md](references/interview-batch.md) for the four questions and follow-ups.
|
|
41
|
+
|
|
42
|
+
**Unattended:** assume visibly, never invent a rule, and record who actually answered; an agent asking itself four kinds of question is not four approvals.
|
|
52
43
|
|
|
53
44
|
## Procedure
|
|
54
45
|
1. **Mode first** (`cratis-screenplay-modeling-lifecycle`): it decides the admitted spec forms.
|
|
@@ -98,27 +89,9 @@ question is not four approvals.
|
|
|
98
89
|
`gap` cells and open questions.
|
|
99
90
|
|
|
100
91
|
## Scenario types (decide each per command; detail in `references/scenario-catalogue.md`)
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
| Rule rejection | Which input is refused, with what message? | one spec per rule; `then error "<exact message>"` (prefer `$strings.<key>`); always pinned (a bare `then error` is valid language but not accepted here) |
|
|
105
|
-
| Denial | Who must not do this? | `given caller` without the policy -> `then denied`; one per gated command and query, only where the whole Boolean gate is false; ownership claims need other-owner denial |
|
|
106
|
-
| State violation | Which prior facts make this wrong? | givens + constraint (`unique event` exclusivity) -> `then error`; else `recorded` |
|
|
107
|
-
| Duplicate / retry | Done again to something in that state, or sent twice (lost acknowledgement)? | `when <Command>`, same identifier, earlier fact as `given` -> constraint message, or the accepted repeat |
|
|
108
|
-
| Competing claim | Two people claim the same thing at once? | `when <Command>`, other source's fact as `given` (different `for`) -> constraint "another event source..." |
|
|
109
|
-
| Alternative path | Which branches exist, including "nothing happens"? | true and false witnesses per `produces when`; unconditional productions always fire |
|
|
110
|
-
| Ordering | Facts late or out of order? | view family with reordered givens; translation specs; else `recorded` |
|
|
111
|
-
| External failure | The other system refuses, times out or answers twice? | outcome as a recorded fact (capture/translation), never a fake rejection |
|
|
112
|
-
| Compensation | How is this undone, what does undoing free? | reversal command + spec showing the released claim or removed row |
|
|
113
|
-
| Evolution | Do old facts still mean the same after a contract change? | spec on the new generation; compatibility reasoning in `documentation` |
|
|
114
|
-
| View | What does each screen show after each fact? | `given` events (`for`) -> `then query`; `when append` -> update/removal |
|
|
115
|
-
|
|
116
|
-
For recovery intent, `when redelivered <Event> to <Reaction>` must select one
|
|
117
|
-
definitely matching effective given and no undecided candidate. Name `stream`
|
|
118
|
-
(with a complete id) or `no stream` when givens differ only by route; omitting it
|
|
119
|
-
is a wildcard, not an unrouted selector. Redelivery remains authoring-only
|
|
120
|
-
(PLAY0268), never evidence of an executed retry. Details:
|
|
121
|
-
`cratis-screenplay-specifications` `references/examples-and-routes.md`.
|
|
92
|
+
Decide each of these per command: happy path; rule rejection (one spec per rule, exact pinned `then error`); denial (`given caller` without the policy, `then denied`, one per gated command and query); state violation; duplicate or retry; competing claim; alternative path; ordering; external failure; compensation; evolution; and the view pass. Read [references/scenario-catalogue.md](references/scenario-catalogue.md) ("Scenario types at a glance") for each type's question and usual shape.
|
|
93
|
+
|
|
94
|
+
For recovery intent, `when redelivered <Event> to <Reaction>` must select one definitely matching effective given and no undecided candidate; redelivery remains authoring-only (PLAY0268), never evidence of an executed retry. Read `references/scenario-catalogue.md` ("Redelivery selectors") for naming `stream` or `no stream`.
|
|
122
95
|
|
|
123
96
|
**Once, idempotent, exactly once are different claims.** A `unique event` constraint proves the
|
|
124
97
|
*fact* occurs once per event source; it does not make *command handling* idempotent (a retry is
|
|
@@ -161,49 +134,17 @@ target requirements.
|
|
|
161
134
|
- No contradiction between a family and single-transition specs of the same view.
|
|
162
135
|
|
|
163
136
|
### Quality checklist (adapted from the TrogonStack scenario checklist; `references/provenance.md`)
|
|
164
|
-
-
|
|
165
|
-
exists; every gated command and query has its own denial.
|
|
166
|
-
- Givens state the facts and their sources; outcomes list the exact events or the exact message.
|
|
167
|
-
- Every read model has population, update and (where it removes) removal specs.
|
|
168
|
-
- Alternative paths, compensation and external failure are specified or carry a reason.
|
|
169
|
-
- Each matrix cell holds a value; each `n/a` is a domain reason.
|
|
170
|
-
- No command has only two specs (success and one rejection) unless every other type was reviewed
|
|
171
|
-
and found inapplicable for a domain reason.
|
|
172
|
-
- Read models are a separate, equally mandatory pass: a model with dozens of command specs and no
|
|
173
|
-
read-model spec is not scenario-complete. Population, then update or removal where an event
|
|
174
|
-
supersedes a row.
|
|
175
|
-
- The why behind each business rule is written down (slice `documentation`), not only the what.
|
|
176
|
-
- Good and bad forms of givens, outcomes and rejections: `references/scenario-examples.md`.
|
|
137
|
+
Read [references/quality-checklist.md](references/quality-checklist.md) before reporting a scope spec-complete. No command has only two specs (success and one rejection) unless every other type was reviewed and found inapplicable; a model with dozens of command specs and no read-model spec is not scenario-complete.
|
|
177
138
|
|
|
178
139
|
### Review questions
|
|
179
|
-
-
|
|
180
|
-
- What does a client that lost the acknowledgement do with the retry's answer?
|
|
181
|
-
- Can facts from other event sources arrive before ours? Does the view tolerate it?
|
|
182
|
-
- After a correction or backdated fact, does the view still say something true?
|
|
183
|
-
- Cross-context views: are the real source contracts resolved, or is missing evidence a gap?
|
|
140
|
+
Read [references/review-questions.md](references/review-questions.md) for the race, retry, arrival-order, correction and cross-context questions.
|
|
184
141
|
|
|
185
142
|
## Public-event coverage (ESM v9)
|
|
186
143
|
|
|
187
|
-
Outbound publication needs `when append <private>` and `then <PublicEvent
|
|
188
|
-
complete state, incomplete state, unchanged repeat, changed instance, separate
|
|
189
|
-
source ids and the exported field boundary. Reference publication is executable;
|
|
190
|
-
source-event captures and reached opaque event-target reducers are typed
|
|
191
|
-
Unsupported. Read automations-and-translations `references/public-events-and-direction.md`.
|
|
192
|
-
For routed producers/observers, cover override versus inherited route, skipped
|
|
193
|
-
production route failure, matching/wrong source/stream and unrouted facts;
|
|
194
|
-
see toolchain `references/production-routes-and-filters.md`.
|
|
144
|
+
Outbound publication needs `when append <private>` and `then <PublicEvent>`. Read [references/public-event-coverage.md](references/public-event-coverage.md) when specifying public events or routed producers and observers.
|
|
195
145
|
|
|
196
146
|
## Version skew: reaction cascades and false PLAY0285
|
|
197
|
-
Under ESM v6 a command spec's `then` lists the events reactions cascade from it.
|
|
198
|
-
bundled in an older `cratis` reports a **false PLAY0285** for such
|
|
199
|
-
a spec; the standalone `screenplay` and a `cratis` whose compiler admits v6 accept it.
|
|
200
|
-
Neither checks that a cascade event is *missing*.
|
|
201
|
-
- A compiler that admits v6 (standalone, or a current `cratis`): write the v6-correct spec
|
|
202
|
-
(own productions plus cascade); validate with `screenplay <folder> --warnaserror --no-color`
|
|
203
|
-
or `cratis screenplay validate <folder> --warnings-as-errors`.
|
|
204
|
-
- Only an older `cratis` bundle and no standalone tool: keep the command spec to its own productions, specify the reaction in its
|
|
205
|
-
Automation slice (`when append <Trigger>` -> `then <Produced>`), record the pending cascade
|
|
206
|
-
expectation in `STATE.md` as known-incomplete. Never delete the reaction.
|
|
147
|
+
Under ESM v6 a command spec's `then` lists the events reactions cascade from it; an older `cratis` bundle reports a **false PLAY0285** for it. Never delete the reaction. Read [references/version-skew.md](references/version-skew.md) when a spec with cascade events reports PLAY0285 or the bundled compiler is older than the standalone tool.
|
|
207
148
|
|
|
208
149
|
## Gate
|
|
209
150
|
A scope is spec-complete only when: the matrix has no `open`, `question` or `gap` cell (or the
|
|
@@ -229,12 +170,7 @@ scope is reported as explicitly incomplete); V1 passes with the tool named in
|
|
|
229
170
|
- Reference example `references/berth-reservations.md`: compiles with warnings as errors.
|
|
230
171
|
|
|
231
172
|
## Route near misses
|
|
232
|
-
-
|
|
233
|
-
`cratis-screenplay-command-surface`. Projections asserted on: `cratis-screenplay-projections`.
|
|
234
|
-
- Reaction, clock and capture scenarios: `cratis-screenplay-automations-and-translations`.
|
|
235
|
-
Invariant placement: `cratis-screenplay-streams-and-consistency`.
|
|
236
|
-
- Reviewing coverage critically: `cratis-screenplay-model-review`. C# specs:
|
|
237
|
-
`cratis-specifications-csharp`.
|
|
173
|
+
Read [references/neighbouring-skills.md](references/neighbouring-skills.md) when the work is grammar, rules, projections, reactions, invariant placement, review or C# specs.
|
|
238
174
|
|
|
239
175
|
## References (load on demand)
|
|
240
176
|
- `references/scenario-catalogue.md` - each type: ask, applies when, n/a when, shape, traps; example data. Read when deciding applicability, eliciting cases or choosing example data.
|
package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/interview-batch.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Interview batch for scenario coverage
|
|
2
|
+
|
|
3
|
+
The scenario-coverage interview questions.
|
|
4
|
+
|
|
5
|
+
1. **Depth.** Reference examples only, every command variation, or production-grade including
|
|
6
|
+
edge cases? Production work needs the full matrix. Follow-up: which commands matter most?
|
|
7
|
+
2. **Known rules and edge cases.** Which mistakes would be costly? For each rule: one allowed
|
|
8
|
+
request, the nearest refused one, and why they differ (`references/scenario-catalogue.md`
|
|
9
|
+
"Eliciting cases").
|
|
10
|
+
3. **Use.** Design record, executable (V2/V3), reference run (V4) or rendered tests (V5)? It
|
|
11
|
+
decides the admitted forms (`references/spec-forms-by-mode.md`).
|
|
12
|
+
4. **Validation.** Who confirms the business outcomes: domain expert, developer, tester? For a
|
|
13
|
+
group session use `references/scenario-workshop.md`.
|
|
14
|
+
**Unattended:** assume visibly. Write each assumption as a `question` cell with the default you
|
|
15
|
+
used; never invent a rule. Record who actually answered; an agent asking itself four kinds of
|
|
16
|
+
question is not four approvals.
|
package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/neighbouring-skills.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Neighbouring skills
|
|
2
|
+
|
|
3
|
+
Which skill owns each task next to scenario coverage.
|
|
4
|
+
|
|
5
|
+
- Grammar, vocabulary, comparison: `cratis-screenplay-specifications`. Rules being pinned:
|
|
6
|
+
`cratis-screenplay-command-surface`. Projections asserted on: `cratis-screenplay-projections`.
|
|
7
|
+
- Reaction, clock and capture scenarios: `cratis-screenplay-automations-and-translations`.
|
|
8
|
+
Invariant placement: `cratis-screenplay-streams-and-consistency`.
|
|
9
|
+
- Reviewing coverage critically: `cratis-screenplay-model-review`. C# specs:
|
|
10
|
+
`cratis-specifications-csharp`.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Public-event coverage (ESM v9)
|
|
2
|
+
|
|
3
|
+
Coverage for public events and routed producers.
|
|
4
|
+
|
|
5
|
+
Outbound publication needs `when append <private>` and `then <PublicEvent>`:
|
|
6
|
+
complete state, incomplete state, unchanged repeat, changed instance, separate
|
|
7
|
+
source ids and the exported field boundary. Reference publication is executable;
|
|
8
|
+
source-event captures and reached opaque event-target reducers are typed
|
|
9
|
+
Unsupported. Read automations-and-translations `references/public-events-and-direction.md`.
|
|
10
|
+
For routed producers/observers, cover override versus inherited route, skipped
|
|
11
|
+
production route failure, matching/wrong source/stream and unrouted facts;
|
|
12
|
+
see toolchain `references/production-routes-and-filters.md`.
|
package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/quality-checklist.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Quality checklist
|
|
2
|
+
|
|
3
|
+
The scenario quality checklist.
|
|
4
|
+
|
|
5
|
+
- Every command has a success spec, a spec per rule, and state-violation specs where a lifecycle
|
|
6
|
+
exists; every gated command and query has its own denial.
|
|
7
|
+
- Givens state the facts and their sources; outcomes list the exact events or the exact message.
|
|
8
|
+
- Every read model has population, update and (where it removes) removal specs.
|
|
9
|
+
- Alternative paths, compensation and external failure are specified or carry a reason.
|
|
10
|
+
- Each matrix cell holds a value; each `n/a` is a domain reason.
|
|
11
|
+
- No command has only two specs (success and one rejection) unless every other type was reviewed
|
|
12
|
+
and found inapplicable for a domain reason.
|
|
13
|
+
- Read models are a separate, equally mandatory pass: a model with dozens of command specs and no
|
|
14
|
+
read-model spec is not scenario-complete. Population, then update or removal where an event
|
|
15
|
+
supersedes a row.
|
|
16
|
+
- The why behind each business rule is written down (slice `documentation`), not only the what.
|
|
17
|
+
- Good and bad forms of givens, outcomes and rejections: `references/scenario-examples.md`.
|
package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/review-questions.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Review questions
|
|
2
|
+
|
|
3
|
+
Questions to ask when reviewing scenario coverage.
|
|
4
|
+
|
|
5
|
+
- Where is this invariant enforced, and what does the loser of a race see (enforced or declared)?
|
|
6
|
+
- What does a client that lost the acknowledgement do with the retry's answer?
|
|
7
|
+
- Can facts from other event sources arrive before ours? Does the view tolerate it?
|
|
8
|
+
- After a correction or backdated fact, does the view still say something true?
|
|
9
|
+
- Cross-context views: are the real source contracts resolved, or is missing evidence a gap?
|
package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-catalogue.md
CHANGED
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
- 11. Evolution compatibility
|
|
17
17
|
- 12. Views
|
|
18
18
|
- Example data
|
|
19
|
+
- Redelivery selectors
|
|
20
|
+
- Scenario types at a glance
|
|
19
21
|
|
|
20
22
|
For each type: the question to put to the domain, when it applies, when "n/a" is a legitimate
|
|
21
23
|
answer, the Screenplay shape, and traps. Excerpts point to the complete compiled example
|
|
@@ -270,3 +272,29 @@ rules, gates, mappings or contracts to make an example pass.
|
|
|
270
272
|
or mapping it is traced to) and where values could not be traced; and unresolved
|
|
271
273
|
inconsistencies between specs. Check the resulting source, not just that a write succeeded; a
|
|
272
274
|
clean compile does not show the expected outcomes are right.
|
|
275
|
+
|
|
276
|
+
## Redelivery selectors
|
|
277
|
+
|
|
278
|
+
For recovery intent, `when redelivered <Event> to <Reaction>` must select one
|
|
279
|
+
definitely matching effective given and no undecided candidate. Name `stream`
|
|
280
|
+
(with a complete id) or `no stream` when givens differ only by route; omitting it
|
|
281
|
+
is a wildcard, not an unrouted selector. Redelivery remains authoring-only
|
|
282
|
+
(PLAY0268), never evidence of an executed retry. Details:
|
|
283
|
+
`cratis-screenplay-specifications` `references/examples-and-routes.md`.
|
|
284
|
+
|
|
285
|
+
## Scenario types at a glance
|
|
286
|
+
|
|
287
|
+
| Type | Question | Usual Screenplay shape |
|
|
288
|
+
|---|---|---|
|
|
289
|
+
| Happy path | What facts does a valid request establish? | `when Cmd` -> every firing production, payload exact |
|
|
290
|
+
| Rule rejection | Which input is refused, with what message? | one spec per rule; `then error "<exact message>"` (prefer `$strings.<key>`); always pinned (a bare `then error` is valid language but not accepted here) |
|
|
291
|
+
| Denial | Who must not do this? | `given caller` without the policy -> `then denied`; one per gated command and query, only where the whole Boolean gate is false; ownership claims need other-owner denial |
|
|
292
|
+
| State violation | Which prior facts make this wrong? | givens + constraint (`unique event` exclusivity) -> `then error`; else `recorded` |
|
|
293
|
+
| Duplicate / retry | Done again to something in that state, or sent twice (lost acknowledgement)? | `when <Command>`, same identifier, earlier fact as `given` -> constraint message, or the accepted repeat |
|
|
294
|
+
| Competing claim | Two people claim the same thing at once? | `when <Command>`, other source's fact as `given` (different `for`) -> constraint "another event source..." |
|
|
295
|
+
| Alternative path | Which branches exist, including "nothing happens"? | true and false witnesses per `produces when`; unconditional productions always fire |
|
|
296
|
+
| Ordering | Facts late or out of order? | view family with reordered givens; translation specs; else `recorded` |
|
|
297
|
+
| External failure | The other system refuses, times out or answers twice? | outcome as a recorded fact (capture/translation), never a fake rejection |
|
|
298
|
+
| Compensation | How is this undone, what does undoing free? | reversal command + spec showing the released claim or removed row |
|
|
299
|
+
| Evolution | Do old facts still mean the same after a contract change? | spec on the new generation; compatibility reasoning in `documentation` |
|
|
300
|
+
| View | What does each screen show after each fact? | `given` events (`for`) -> `then query`; `when append` -> update/removal |
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Version skew: reaction cascades and false PLAY0285
|
|
2
|
+
|
|
3
|
+
How to specify reaction cascades across compiler versions.
|
|
4
|
+
|
|
5
|
+
Under ESM v6 a command spec's `then` lists the events reactions cascade from it. A compiler
|
|
6
|
+
bundled in an older `cratis` reports a **false PLAY0285** for such
|
|
7
|
+
a spec; the standalone `screenplay` and a `cratis` whose compiler admits v6 accept it.
|
|
8
|
+
Neither checks that a cascade event is *missing*.
|
|
9
|
+
- A compiler that admits v6 (standalone, or a current `cratis`): write the v6-correct spec
|
|
10
|
+
(own productions plus cascade); validate with `screenplay <folder> --warnaserror --no-color`
|
|
11
|
+
or `cratis screenplay validate <folder> --warnings-as-errors`.
|
|
12
|
+
- Only an older `cratis` bundle and no standalone tool: keep the command spec to its own productions, specify the reaction in its
|
|
13
|
+
Automation slice (`when append <Trigger>` -> `then <Produced>`), record the pending cascade
|
|
14
|
+
expectation in `STATE.md` as known-incomplete. Never delete the reaction.
|