@cratis/pi 7.61.0 → 7.63.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package/corpus/agents/spec-writer.md +2 -2
- package/package/corpus/harnesses/copilot/instructions/application-profile.instructions.md +2 -2
- package/package/corpus/harnesses/copilot/instructions/glossary.instructions.md +2 -2
- package/package/corpus/harnesses/copilot/instructions/specs.scenarios.csharp.instructions.md +7 -4
- package/package/corpus/harnesses/copilot/instructions/vertical-slices.instructions.md +22 -13
- package/package/corpus/product-sync.json +11 -10
- package/package/corpus/prompts/add-business-rule.prompt.md +1 -1
- package/package/corpus/rules/application-profile.md +2 -2
- package/package/corpus/rules/glossary.md +2 -2
- package/package/corpus/rules/specs.scenarios.csharp.md +7 -4
- package/package/corpus/rules/vertical-slices.md +22 -13
- package/package/corpus/skills/cratis-application-slice-conformance/SKILL.md +1 -1
- package/package/corpus/skills/cratis-application-slice-specifications/SKILL.md +4 -3
- package/package/corpus/skills/cratis-application-slice-specifications/references/query-and-decision-scenarios.md +12 -3
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/SKILL.md +12 -7
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/authorization.md +11 -11
- package/package/corpus/skills/cratis-arc-command/SKILL.md +3 -2
- package/package/corpus/skills/cratis-arc-command/references/decisions-and-routing.md +95 -51
- package/package/corpus/skills/cratis-arc-command/references/fresh-identifiers.md +5 -2
- package/package/corpus/skills/cratis-arc-command/references/generated-values.md +27 -12
- package/package/corpus/skills/cratis-arc-command/references/read-model-injection.md +9 -5
- package/package/corpus/skills/cratis-arc-command/references/shop-generation.md +17 -6
- package/package/corpus/skills/cratis-arc-command-validation/SKILL.md +99 -52
- package/package/corpus/skills/cratis-chronicle-decision-reads/SKILL.md +37 -15
- package/package/corpus/skills/cratis-chronicle-decision-reads/references/admission-and-ownership.md +3 -2
- package/package/corpus/skills/cratis-chronicle-decision-reads/references/choosing-how-a-rule-holds.md +277 -138
- package/package/corpus/skills/cratis-chronicle-event-constraints/SKILL.md +4 -4
- package/package/corpus/skills/cratis-chronicle-event-modeling/SKILL.md +6 -4
- package/package/corpus/skills/cratis-chronicle-read-model/SKILL.md +2 -1
- package/package/corpus/skills/cratis-chronicle-reducer/SKILL.md +6 -3
- package/package/corpus/skills/cratis-code-review/SKILL.md +6 -3
- package/package/corpus/skills/cratis-fundamentals-concept/SKILL.md +10 -2
- package/package/corpus/skills/cratis-fundamentals-concept/references/shop-generation.md +49 -6
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +43 -41
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/cases-to-specify.md +11 -2
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/integration-interview.md +24 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/public-events-and-direction.md +76 -10
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/realization-and-gap-fill.md +5 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/todo-list-example.md +1 -1
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translate-example.md +39 -23
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translation-patterns.md +35 -12
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +51 -81
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/atomic-batches-and-source-mappings.md +83 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/capture-map-and-example.md +14 -4
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/reaction-forms.md +59 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/record-capture-specifications.md +60 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/specifying-triggers-and-clock.md +5 -1
- package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +26 -28
- package/package/corpus/skills/cratis-screenplay-command-surface/references/described-handlers.md +82 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/generated-values-and-responses.md +82 -28
- package/package/corpus/skills/cratis-screenplay-command-surface/references/protected-reads.md +113 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/shop-generation.md +45 -12
- package/package/corpus/skills/cratis-screenplay-command-surface/references/text-and-match-rules.md +119 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/validate-rules.md +14 -4
- package/package/corpus/skills/cratis-screenplay-command-surface/verification.json +10 -3
- package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +12 -12
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +5 -3
- package/package/corpus/skills/cratis-screenplay-event-modeling/verification.json +5 -1
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +2 -2
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/evidence-table-template.md +1 -1
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generated-recovery.md +51 -14
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/intent-example.md +5 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/loss-report-template.md +2 -1
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/rule-modeling.md +6 -3
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/signal-to-intent.md +1 -1
- package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +22 -28
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/choosing-generation.md +20 -7
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +12 -6
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +9 -1
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +58 -10
- package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +4 -2
- package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +2 -5
- package/package/corpus/skills/cratis-screenplay-model-review/references/anti-patterns.md +2 -2
- package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +2 -2
- package/package/corpus/skills/cratis-screenplay-model-review/references/quick-self-check.md +2 -1
- package/package/corpus/skills/cratis-screenplay-model-review/references/review-questions.md +3 -2
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/principles.md +1 -1
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/vocabulary-map.md +1 -1
- package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +2 -3
- package/package/corpus/skills/cratis-screenplay-read-surface/references/named-keys.md +3 -1
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +8 -3
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +8 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +6 -4
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +36 -29
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/berth-reservations.md +6 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-design.md +15 -4
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-example.md +25 -20
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/public-event-coverage.md +14 -3
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-examples.md +9 -3
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +7 -3
- package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +3 -1
- package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md +4 -4
- package/package/corpus/skills/cratis-screenplay-slice-design/references/rule-layers.md +4 -2
- package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +4 -3
- package/package/corpus/skills/cratis-screenplay-slice-design/references/worked-example.md +8 -8
- package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +49 -47
- package/package/corpus/skills/cratis-screenplay-specifications/references/actions-beyond-commands.md +11 -1
- package/package/corpus/skills/cratis-screenplay-specifications/references/generated-fixtures.md +48 -17
- package/package/corpus/skills/cratis-screenplay-specifications/references/vocabulary.md +14 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +25 -21
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/boundaries.md +2 -2
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +14 -6
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/multi-service-models.md +4 -3
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +7 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +30 -22
- package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet-example.md +3 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet.md +47 -2
- package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostic-arguments.md +60 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +65 -5
- package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +50 -22
- package/package/corpus/skills/cratis-screenplay-toolchain/references/generation-checks.md +93 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/generation-strategies-example.md +117 -35
- package/package/corpus/skills/cratis-screenplay-toolchain/references/language-admission.md +46 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/preferred-syntax.md +3 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +25 -10
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +1800 -50
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +5 -3
- package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +6 -1
- package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +8 -53
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/file-references.md +2 -2
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/interaction-example.md +54 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/verification.json +6 -3
- package/package/corpus/skills/cratis-specifications-csharp/SKILL.md +3 -2
- package/package/corpus/skills/cratis-specifications-csharp/references/application-scenarios.md +1 -1
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +30 -29
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +36 -9
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/choosing-generation.md +28 -8
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/publication-and-recovery.md +31 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/sandbox-and-specrunner.md +8 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +4 -1
- package/package.json +1 -1
|
@@ -166,8 +166,12 @@ exists only for authored `generate`; an implicit UUID default has no block.
|
|
|
166
166
|
| --- | --- |
|
|
167
167
|
| `strategy` | Authored strategy name |
|
|
168
168
|
| `modifiers` | Only set `prefix`, `case`, `size`, `alphabet`, `count`, `encoding`; omitted defaults are not filled in |
|
|
169
|
-
| `
|
|
170
|
-
| `
|
|
169
|
+
| `arguments` | Authored `pattern`, `checksum`, `rule` strings and `range: {text, minimum, maximum}` with exact Int64 endpoints; malformed range retains text only. Replaces `previewArguments`. |
|
|
170
|
+
| `supportCount` | Exact JSON integer for assessed pattern/random distinct support; preserve large numbers without floating-point rounding. Dates use minimum conditioned support over the compiler's 100-year UTC horizon. |
|
|
171
|
+
| `entropyBits` | Built-in random bits; pattern/random use log2(supportCount). Null for opaque rule implementations or invalid/unsupported inputs. |
|
|
172
|
+
| `derivedPattern` | Anchored strategy-derived regex, or null; pattern expressions are deterministic and bounded, but date/checksum digit runs describe shape, not arithmetic containment. |
|
|
173
|
+
| `derivedPatternUnknownReason` | Reason when derivedPattern is null; never invent a regex from it. |
|
|
174
|
+
| `rules` | Authored-order entries: rule kind, line/column, status proven/refuted/unproven; witness for refuted, reason for unproven. diagnosticCode only for reported PLAY0688/0689; repair PLAY0688 only for a reported refuted declarative rule. |
|
|
171
175
|
| `entropyUnknownReason` | Present only when entropy is unknown |
|
|
172
176
|
| `valuesAtOnePercentCollision` | JSON number estimating the 1% birthday collision count, or null; scientific notation can exceed client floating-point range |
|
|
173
177
|
| `executable` | `status`, `diagnosticCodes`, and `reason` only for `notAssessed` |
|
|
@@ -178,7 +182,10 @@ and no such error exists; otherwise `notAssessed`, with a reason that whole-mode
|
|
|
178
182
|
binding failed. `diagnosticCodes` contains only errors at these declaration locations.
|
|
179
183
|
An empty list is not admission; low-entropy property diagnostics require workspace
|
|
180
184
|
inspection. Invalid alphabets/non-positive sizes or counts yield null estimates
|
|
181
|
-
with `entropyUnknownReason`, preserving compiler diagnostics.
|
|
185
|
+
with `entropyUnknownReason`, preserving compiler diagnostics. Pattern support
|
|
186
|
+
budget exhaustion (PLAY0691) or empty support on a scanned date (PLAY0692) also
|
|
187
|
+
leaves estimates null with the compiler's reason; an opaque `rule` has unknown,
|
|
188
|
+
not zero, entropy. Time, prefixes,
|
|
182
189
|
case and encoding add no randomness; the compiler, details and repairs share
|
|
183
190
|
`GenerationEntropy`, not an agent's parallel estimate.
|
|
184
191
|
|
|
@@ -191,8 +198,9 @@ source document under the same revision/review contract. Canonical printing
|
|
|
191
198
|
retains `generate`. Review `read-proposal` changes and `view: "executable-diagnostics"`,
|
|
192
199
|
run candidate specifications where executable, then explicitly `apply`.
|
|
193
200
|
Authoring acceptance does not imply executable readiness: `sequence` reports
|
|
194
|
-
PLAY0682;
|
|
195
|
-
|
|
201
|
+
PLAY0682; generated secrets still report PLAY0268, rule proofs PLAY0688/0689,
|
|
202
|
+
and finite-support failures PLAY0691/0692. Pattern/random/rule and checksum
|
|
203
|
+
validation bind as ESM v21. Do not retype a refused proposal to bypass diagnostics.
|
|
196
204
|
|
|
197
205
|
`screenplay_repair_capabilities` advertises PLAY0683/PLAY0684. Discover concrete
|
|
198
206
|
verified actions with `read-workspace view: "repairs"` at the diagnostic revision:
|
|
@@ -211,10 +219,40 @@ concept; uniqueness changes append-time behavior. Review every changed document
|
|
|
211
219
|
before applying; discovery/proposal write nothing. The saved-file VS Code repair
|
|
212
220
|
picker does not expose these entropy actions.
|
|
213
221
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
222
|
+
Read `generation.rules[]` instead of parsing diagnostic prose: `refuted` names
|
|
223
|
+
the violating `witness`; `unproven` explains its `reason`; `proven` needs no diagnostic.
|
|
224
|
+
A refuted result without `diagnosticCode` means the compiler did not check that
|
|
225
|
+
rule (for example, a UUID concept unused by generated command properties), so
|
|
226
|
+
there is no reported repair. Proof status is not executable admission, and
|
|
227
|
+
passing samples do not prove containment.
|
|
228
|
+
|
|
229
|
+
To add a rule the strategy satisfies, put `derivedPattern` into a typed `matches`
|
|
230
|
+
proposal preserving other concept members. If null, read
|
|
231
|
+
`derivedPatternUnknownReason` and keep the intended invariant; do not fabricate
|
|
232
|
+
an expression. PLAY0688 repair replaces a refuted generated-concept rule with
|
|
233
|
+
the strategy-derived matches pattern. Discover its subject through
|
|
234
|
+
`read-workspace view: "repairs"`, then `propose-repair` with both revisions and
|
|
235
|
+
canonical formatting. Review input/stored-value effects, not just generation.
|
|
236
|
+
For a checksum pattern the same proposal explicitly adds the declared checksum
|
|
237
|
+
validation if absent. Ambiguous/unbounded derived regexes have no repair.
|
|
238
|
+
PLAY0689 is an Unproven warning, not proof; MCP never generates values.
|
|
239
|
+
For an opaque generation rule, inspect `read-workspace view:
|
|
240
|
+
"implementation-requirements"` for its ValueGeneration requirement; the reference
|
|
241
|
+
runner consumes a pinned String and never executes its attached body.
|
|
242
|
+
Requires Screenplay 4.181.1 (`screenplay --version`) for the language-neutral
|
|
243
|
+
version-1 ValueGeneration context contract (Now instant, Tenant portable ID,
|
|
244
|
+
String result); older Cratis C# bindings cannot compile all context-aware bodies.
|
|
245
|
+
The provider selects the binding, not the fence tag: Cratis C# uses Fundamentals'
|
|
246
|
+
`Cratis.Concepts.GenerationContext`; BCL-only C# hosts can use Screenplay's record.
|
|
247
|
+
Portable bodies use Now, tenant interpolation/string assignment and BCL types.
|
|
248
|
+
Passing context to `GenerateValue.*`, constructing/naming the context type or
|
|
249
|
+
reading `Tenant.Value` is target-bound, not a shared language contract. See
|
|
250
|
+
[context reference](https://github.com/Cratis/Screenplay/blob/main/Documentation/screenplay/context.md).
|
|
251
|
+
|
|
252
|
+
Requires Screenplay 4.173.0 or later (`screenplay --version`) for `arguments`,
|
|
253
|
+
exact support, derived patterns and `rules[]`; older servers can expose
|
|
254
|
+
`previewArguments` and omit proofs. Discover schemas and diagnostics instead of
|
|
255
|
+
assuming these fields. Reference: [generation details](https://github.com/Cratis/Screenplay/blob/main/Documentation/screenplay/mcp/reference.md#generated-values-and-responses).
|
|
218
256
|
|
|
219
257
|
Requires Screenplay 4.164.0 or later (`screenplay --version`) for generated-rule proofs and PLAY0688 repair; older servers lack this action. The CLI-bundled MCP can lack
|
|
220
258
|
this generation summary and the entropy repairs. Existing typed concept proposals predate the
|
|
@@ -453,6 +491,11 @@ inspect authored links, not code execution or a transitive runtime graph.
|
|
|
453
491
|
|
|
454
492
|
## Dependencies and intent inventories
|
|
455
493
|
|
|
494
|
+
Diagnostic subjects use code plus typed `arguments`, not parsed messages. This applies
|
|
495
|
+
to `diagnostics`, executable diagnostics and proposal introducedExecutableErrors.
|
|
496
|
+
Read [diagnostic arguments](../../cratis-screenplay-toolchain/references/diagnostic-arguments.md)
|
|
497
|
+
for optional subjects, declaration paths and PLAY0524 step indices.
|
|
498
|
+
|
|
456
499
|
`dependency-graph` edges point consumer → producer. Views: `edges`, `cycles`,
|
|
457
500
|
`order`, `unresolved`, `declarations`; `from`/`to` select slice/feature/module
|
|
458
501
|
aggregation (`to` also accepts context). `scope`, `direction`, `kinds` and
|
|
@@ -479,7 +522,12 @@ Workspace views `named-rule-intents`/`named-rule-intent-details` cover CommandNa
|
|
|
479
522
|
only, including pending hints without a requirement ID. Details select either
|
|
480
523
|
`subject` or attached `requirementId`, not both. `handler-intents` and
|
|
481
524
|
`handler-intent-details` cover CommandHandler only; handler details select
|
|
482
|
-
`requirementId`.
|
|
525
|
+
`requirementId`. A handler entry's `executableReady` means successful v23 binding
|
|
526
|
+
with a matching Pending requirement, not a supplied body; `admission` is described,
|
|
527
|
+
refused or authoring-only. `implementation-requirements` exposes ordered hints and
|
|
528
|
+
provisional/ambiguous flags. Edit HandlerSyntax/ImplementationSyntax/ImplementationHintSyntax
|
|
529
|
+
through `propose-ast` with Authoring validation, preview then apply; unwrapping
|
|
530
|
+
pending metadata is refused. All page ordered hints, not implementation correctness. Continue
|
|
483
531
|
with `expectedRevision` and `expectedCatalogRevision`; provisional owner IDs are
|
|
484
532
|
not authoritative. Edit hints through reviewed `propose-ast`.
|
|
485
533
|
|
|
@@ -137,7 +137,8 @@
|
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
139
|
"kind": "skill-contains",
|
|
140
|
-
"value": "cratis screenplay mcp <model-folder>"
|
|
140
|
+
"value": "cratis screenplay mcp <model-folder>",
|
|
141
|
+
"file": "references/mcp-loop.md"
|
|
141
142
|
},
|
|
142
143
|
{
|
|
143
144
|
"kind": "skill-contains",
|
|
@@ -174,7 +175,8 @@
|
|
|
174
175
|
},
|
|
175
176
|
{
|
|
176
177
|
"kind": "skill-contains",
|
|
177
|
-
"value": "registered Git worktree"
|
|
178
|
+
"value": "registered Git worktree",
|
|
179
|
+
"file": "references/mcp-loop.md"
|
|
178
180
|
},
|
|
179
181
|
{
|
|
180
182
|
"kind": "skill-contains",
|
|
@@ -127,11 +127,8 @@ rejected state and its evidence.
|
|
|
127
127
|
Optional, on request, all read-only and yielding edit requests: a subject's information journey (`references/model-inventory-report.md`), a resilience pass (`references/stressor-analysis.md`) and a slice-by-slice walkthrough (`references/walkthrough.md`).
|
|
128
128
|
|
|
129
129
|
## Quick self-check (modeler, P4; about ten minutes)
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
origin, NOT-enforced rules marked, coverage matrix filled, personas with their denials, rationale in
|
|
133
|
-
`documentation`, open questions as anchored notes, every Automation with pending work). Any "no" is
|
|
134
|
-
fixed or explained before P5. The list: [quick self-check](references/quick-self-check.md).
|
|
130
|
+
Read [quick self-check](references/quick-self-check.md) before P5 for the eleven
|
|
131
|
+
modeler checks. Fix or explain every "no"; this is not the independent review.
|
|
135
132
|
|
|
136
133
|
## Business-question pass (explain brief)
|
|
137
134
|
Be a sharp business analyst seeing the domain fresh: walk each persona's journey and ask only what a domain person must decide, in plain language with no engineering words (could a non-technical product owner read it and immediately understand what is being asked?), anchored to a place in the model, at most 12 questions (zero is valid). Method, element prompts and the model-word translation table: `references/business-questions.md`. A behavior walk in the Stage sandbox (`cratis-stage-rendering-and-sandbox`) is a separate, optional check; its findings arrive here as review findings.
|
|
@@ -64,8 +64,8 @@ the problem, the checks it violates, the fix, all pinned to one declaration.
|
|
|
64
64
|
| Undeclared removal/append event | `remove with` or capture `append` names an undeclared event | V1 warns (PLAY0166, a failure under warnings as errors); binding fails PLAY0273 | C (executable) / D | declare or fix the name; run V3 |
|
|
65
65
|
| Gated command invoked by a reaction without a declared actor | reaction `invokes` a command under a caller policy and has no `runs as system role "<Role>"` that satisfies the gate | the invocation carries no caller: rejected at run time | D (major) | declare `runs as system role "<Role>"` with the least-privilege role the gate admits (ESM v10, Screenplay 4.125.0; Stage 4.89.1 renders role/authenticated trusted actors, but claim-reading/opaque gates still refuse STAGE-ESM-034 and need gap-fill) or record another trusted-path decision - never just delete the gate. A matching `runs as system role` is the admitted trusted path, not a defect |
|
|
66
66
|
| `reads` + `produces` reaction | reaction both reads a view and produces | fails binding | C (executable) | invoke a command, or produce without reads |
|
|
67
|
-
|
|
|
68
|
-
| Caller-supplied state rule | `require currentStatus == "open"` where the caller sends `currentStatus` | the caller decides its own permission | D (major) | read
|
|
67
|
+
| Unadmitted read claimed protected | rule "checked" by legacy command or trigger reads | no protected contract or target realization | D (major) | opt eligible command reads into `command reads protected` (v25); inspect shape, absence and conflict cases. Stage refuses protected reads (STAGE-ESM-044); distinguish reference protection from target evidence; checklist E3 |
|
|
68
|
+
| Caller-supplied state rule | `require currentStatus == "open"` where the caller sends `currentStatus` | the caller decides its own permission | D (major) | read authoritative stored state through admitted protected reads and `require`; mark legacy/refused shapes and target realization as gaps; checklist E3 |
|
|
69
69
|
| `severity warning` as soft rule | rule meant to warn but still rejects | blocks valid requests | C semantics | remove or make it a real rule |
|
|
70
70
|
| Relay events | `*Synced`, `*Forwarded` events that only move data | noise, not facts | D | translate once into a business fact |
|
|
71
71
|
| External event driving a worker directly | captured external record invokes commands with no local fact | no audit of what was learned | D | append a local fact in `Translate`; automate from it |
|
|
@@ -123,7 +123,7 @@ the format in `worked-example.md`.
|
|
|
123
123
|
|---|---|---|---|
|
|
124
124
|
| E1 | Value formats on `concept`s; input rules on the command; uniqueness as `constraint`; access as `authorize` | declarations | D |
|
|
125
125
|
| E2 | Every refusal has a message a person understands; constraint messages copied verbatim in specs | `message`, specs | D |
|
|
126
|
-
| E3 | A state-dependent rule
|
|
126
|
+
| E3 | A state-dependent rule uses `reads` + `require` over authoritative state: eligible reads opt into `command reads protected` (v25), with required absence and decide/commit conflict cases. Legacy/refused reads are marked unenforced with a named target. Stage refuses protected reads (STAGE-ESM-044); reference protection is not target realization. Not: caller-supplied copies of state, attestation booleans (`confirmsX == true`), rules in `handler` / `implementation hint` prose, or `reads` treated as protection | slice `description`, `require`, `handler` | D (faking or hiding = major) |
|
|
127
127
|
| E4 | `severity warning` is not used as "soft" validation (it still rejects) | validate lines | C semantics |
|
|
128
128
|
| E5 | Preconditions are explicit; nothing relies on "obviously you can't" | descriptions, specs | Q |
|
|
129
129
|
| E6 | Each invariant has an atomic enforcement point (name the storage provider where constraint admission matters); the race loser's outcome is specified | constraints, specs | D |
|
|
@@ -147,7 +147,7 @@ PLAY0516 moves preserve executable bytes/identities. Source: Screenplay
|
|
|
147
147
|
| F2 | No impossible sequence (a fact that requires one that can never precede it) | constraints, specs | D |
|
|
148
148
|
| F3 | Cancellation, failure and correction paths exist where the business has them | slices | Q |
|
|
149
149
|
| F4 | Automations: trigger, todo/work item if work can be pending, a closing fact, retry and once-only story | reactions, views | D (`cratis-screenplay-automations-and-translations`) |
|
|
150
|
-
| F5 | External facts enter through `Translate`; in-app follow-ups through `Automation` | slice kinds | C semantics |
|
|
150
|
+
| F5 | External facts enter through `Translate`; in-app follow-ups through separate `Automation` slices. Keep a capture in Translate, move reactions to its local appends out (PLAY0694 for directionless/unrouted co-location, including child/nested appends; PLAY0616 for explicit inbound). PLAY0694 is a warning that fails `--warnaserror`, with no automatic split | slice kinds, capture appends and reaction triggers | C semantics |
|
|
151
151
|
| F6 | No cycle where fact A's reaction needs fact B and B's needs A, or two features each wait on the other | reactions, MCP `dependencies` | D (redesign the boundary) |
|
|
152
152
|
| F7 | Each slice's consumed events and their producing slices are known; a slice calls another's command only through `invokes` | reactions, `reads` | Q |
|
|
153
153
|
| F8 | Every Automation has a pending-work view (a todo list: membership is the pending work), or a written reason a direct effect needs none (immediate, internal, cannot fail). A "simple relay" is not exempt from the question | reactions, `reads`, views | D |
|
|
@@ -8,7 +8,8 @@ About ten minutes, before the independent review.
|
|
|
8
8
|
4. Every read-model field has an origin; every event has a consumer or terminal reason.
|
|
9
9
|
5. Every command has a reachable, authorized origin (screen or form action, or a reaction to an event, clock or application trigger; a capture appends facts and a command after it is reached through a reaction).
|
|
10
10
|
6. No gated command is invoked by a reaction without a recorded trusted-path decision.
|
|
11
|
-
7. State-dependent rules
|
|
11
|
+
7. State-dependent rules use admitted protected command reads plus `require`, or
|
|
12
|
+
record the legacy/refused shape and target gap; no
|
|
12
13
|
caller-supplied state, attestation boolean (`confirmsX == true`) or handler/hint prose.
|
|
13
14
|
8. Coverage matrix filled; every `n/a` has a domain reason.
|
|
14
15
|
9. Persona text says what each role cannot do, each line backed by a gate and a `then denied`
|
|
@@ -37,8 +37,9 @@ needs; a "no" is a finding only when it has a business consequence.
|
|
|
37
37
|
|
|
38
38
|
## For each slice and the model as a whole
|
|
39
39
|
1. Does each slice depend on other slices only through event contracts, `invokes` and explicitly
|
|
40
|
-
recorded cross-slice `reads` of another slice's view (F7)?
|
|
41
|
-
|
|
40
|
+
recorded cross-slice `reads` of another slice's view (F7)? Check protected-command
|
|
41
|
+
opt-in/admission and absence/conflict cases separately from target realization;
|
|
42
|
+
legacy and trigger reads remain unprotected. The view interface is a dependency:
|
|
42
43
|
check that it is recorded, not implied.
|
|
43
44
|
2. Could two people work on two slices at the same time without reading each other's
|
|
44
45
|
declarations, given only the events' fields (A8)?
|
|
@@ -11,7 +11,7 @@ instruction for the work, not background reading. Skills that restate one cite i
|
|
|
11
11
|
6. **Keep semantic identity independent of names, paths, layout and generated symbols.** Commit the identity catalog with the model.
|
|
12
12
|
7. **Keep unsupported intent visible.** Return a precise gap and its owning issue; never weaken the model so rendering passes.
|
|
13
13
|
8. **Write specifications with intent, including rejection and denial.** Never report an unexecuted or unsupported scenario as passed.
|
|
14
|
-
9. **Treat state reads as a correctness boundary.**
|
|
14
|
+
9. **Treat state reads as a correctness boundary.** Eligible command reads opt into `command reads protected` (v25); legacy/trigger reads remain unprotected. Stage refuses protected reads (STAGE-ESM-044), not the v25 pair: reference absence/conflict guarantees and verified target realization are different claims.
|
|
15
15
|
10. **Separate event-source identity from event payload and choose destinations explicitly.**
|
|
16
16
|
11. **Persisted event shape changes are evolution, never cleanup.** Keep historical generations.
|
|
17
17
|
12. **Model external work as business intent.** Provider interfaces and transport mechanics stay out of the language.
|
package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/vocabulary-map.md
CHANGED
|
@@ -21,7 +21,7 @@ speaks in them; never model board mechanics (lanes, node ids, positions).
|
|
|
21
21
|
| Storyline (ordered beats) | a **family** of specifications sharing example data, each one transition (no storyline syntax) | several spec classes | specifications |
|
|
22
22
|
| Field validation | concept `validate` (every use) / command `validate`, `require` | `ConceptValidator<T>` / `CommandValidator<T>` | command validation |
|
|
23
23
|
| Role permission ("Cannot") | `policy` + `authorize` + `then denied` spec; ownership via `claim ... matches subject` | `[Authorize(Policy)]`, generated policies | authorization |
|
|
24
|
-
| Precondition on stream state | `reads` + `require`
|
|
24
|
+
| Precondition on stream state | `command reads protected` + eligible `reads`/`require` (v25 reference protection); legacy/refused reads remain stated intent. Stage refuses protected reads (STAGE-ESM-044); target Arc `[ProtectedDecision]` + `DecisionRead<T>` or Chronicle DCB needs separate verification | decision over a guarded read | command validation |
|
|
25
25
|
| Generated id (`derived:uuid4()`) | `generated` (authorable, not executable) | id supplied before `Handle()` | commands |
|
|
26
26
|
| External system / outbound call | `Translate` slice (inbound); `system`/`operation` (authorable, not executable) or Automation (outbound) | `ICommandOperation` / reactor | operations, reactors |
|
|
27
27
|
| HTML mockup | `screen` Level 1 + board (`visualize-model`) | default Scene composition | ui composition |
|
|
@@ -263,9 +263,8 @@ choosing a whole action list rather than one labeled command, use block-form
|
|
|
263
263
|
**Inside out:** the slice, then the enclosing feature, then the module, then the
|
|
264
264
|
document. The innermost match wins.
|
|
265
265
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
21 times. Two sibling slices can each declare `All`, and each screen gets its own.
|
|
266
|
+
Sibling slices may each declare `All`; each screen resolves its own query.
|
|
267
|
+
Read `references/named-keys.md` when query scope affects identity inference.
|
|
269
268
|
|
|
270
269
|
Reach across slices by qualifying with **any trailing part** of the scope.
|
|
271
270
|
Excerpt: `Queue` and `Deviations` are sibling slices that each declare `All`.
|
|
@@ -100,7 +100,9 @@ Composite read-model keys, query `by` blocks and fixtures
|
|
|
100
100
|
over those views remain authoring-only: binding reports PLAY0268 citing
|
|
101
101
|
Screenplay#599 (still open). They do not reference-execute or render. This is not
|
|
102
102
|
ESM v10 admission; v10 covers reaction identity, production routes and observer
|
|
103
|
-
filters.
|
|
103
|
+
filters. Eligible command reads separately opt into v25 with `command reads protected`;
|
|
104
|
+
legacy reads remain PLAY0271, and composite keys are still refused (PLAY0781 ByParts).
|
|
105
|
+
See command-surface [protected reads](../../cratis-screenplay-command-surface/references/protected-reads.md).
|
|
104
106
|
A single explicit key does bind; Stage admission still depends on the complete
|
|
105
107
|
model and projection/query shape, not just the key modifier.
|
|
106
108
|
|
|
@@ -32,6 +32,12 @@ Tool versions are covered in `cratis-screenplay-toolchain` `SKILL.md`; read it b
|
|
|
32
32
|
(the user); Stage internals and the sandbox (`cratis-stage-rendering-and-sandbox`); judging
|
|
33
33
|
hand-written code against its slice (`cratis-application-slice-conformance`).
|
|
34
34
|
|
|
35
|
+
## Language modes that block target delivery
|
|
36
|
+
|
|
37
|
+
Read [language admission](../cratis-screenplay-toolchain/references/language-admission.md)
|
|
38
|
+
for v22–v25: Stage refuses atomic batches, described bodies (even Stub mode) and
|
|
39
|
+
protected reads. Preserve contracts; reference success is not target realization.
|
|
40
|
+
|
|
35
41
|
## Interview phase
|
|
36
42
|
**Skip if** the request names the model root, the application name, the destination and the
|
|
37
43
|
decision on non-renderable scope. Otherwise ask only what is missing:
|
|
@@ -143,9 +149,8 @@ Adapters and non-renderable scope follow the contract rules of `cratis-applicati
|
|
|
143
149
|
the Arc/Chronicle set in `cratis-stage-rendering-and-sandbox` `references/rendered-application.md`; API availability alone is not verified enforcement.
|
|
144
150
|
- Adapters that call outside systems follow `cratis-engineering-effect-boundaries`; slice
|
|
145
151
|
specifications follow `cratis-application-slice-specifications`.
|
|
146
|
-
-
|
|
147
|
-
|
|
148
|
-
Executable parts (specifications, mappings, constraints) win over prose, and a contradicting description is a model defect to report.
|
|
152
|
+
- Read conformance's `references/contract-and-precedence.md` for realization-note
|
|
153
|
+
authority. Executable contract wins over prose; report contradictions.
|
|
149
154
|
|
|
150
155
|
## Rules
|
|
151
156
|
|
package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md
CHANGED
|
@@ -105,6 +105,14 @@ stable array or list. The Stage scaffold pins an older Arc, so raise the version
|
|
|
105
105
|
`Customizations/Dependencies.props` only after a restore and build proves it. Never split the
|
|
106
106
|
reaction or drop an effect to dodge rendering.
|
|
107
107
|
|
|
108
|
+
Preserve declared `reaction batches atomic` boundaries: each trigger occurrence's
|
|
109
|
+
direct productions and each selected refusal branch are separate batches, with
|
|
110
|
+
invoked commands independent. Stage refuses v22 (STAGE-ESM-016) and atomic mode
|
|
111
|
+
in admitted v23–v25 (STAGE-ESM-043); the declaration is not external-effect deduplication.
|
|
112
|
+
For described handlers, hand off only payload computation under the v23 result
|
|
113
|
+
contract; Stage STAGE-IMPL-002 means no stubs, even Stub mode. Protected v25 reads
|
|
114
|
+
refuse STAGE-ESM-044 despite version admission and need target admission/enrollment tests; ordinary injection never supplies protection.
|
|
115
|
+
|
|
108
116
|
## Re-delivery
|
|
109
117
|
The work list is the full in-scope contract delta since the fallback record's last verified source
|
|
110
118
|
identity (specifications, rules, mappings, realization notes), then the whole contract is
|
package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md
CHANGED
|
@@ -14,8 +14,10 @@ probe reports and choosing what to do. Do not copy the code table here.
|
|
|
14
14
|
2. Execution planning builds the plan and can emit `PLAN-*` diagnostics before Stage runs.
|
|
15
15
|
3. Stage plans the target and admits or rejects each member: `STAGE-ESM-0xx`; profile and path
|
|
16
16
|
problems `STAGE-CRATIS-0xx`. An evolved event is reported with Stage's own `STAGE-ESM-026`
|
|
17
|
-
(still refused); the CLI adds nothing.
|
|
18
|
-
|
|
17
|
+
(still refused); the CLI adds nothing. Read the owning Stage admission table and
|
|
18
|
+
toolchain `references/renderable-subset.md` for exact pairs and version minimums;
|
|
19
|
+
CLI admission remains bounded by its bundled renderer. Each unsupported construct
|
|
20
|
+
has its own code; version admission is not construct support.
|
|
19
21
|
4. Any error in the selected scope publishes nothing: the run ends with exit 5 and the diagnostics.
|
|
20
22
|
Without `--scope` the scope is the whole application. With `--scope`, `PLAN-*` problems in
|
|
21
23
|
unselected slices are warnings and `STAGE-ESM-*` refusals in unselected slices do not block;
|
|
@@ -28,8 +30,8 @@ ESM). Only the probe answers renderability. `PLAY0270` entries are information,
|
|
|
28
30
|
|
|
29
31
|
| Class | Meaning | Typical examples (each verified in `admission.md`) | Action |
|
|
30
32
|
| --- | --- | --- | --- |
|
|
31
|
-
| **Model fix (in mode)** | the model is in, or the user chose, renderable mode and breaks its own subset in a way that has a renderable equivalent with the same meaning | a `produces` whose `for` is not the command identifier;
|
|
32
|
-
| **Capability gap** | the intended meaning needs a construct Stage does not render yet |
|
|
33
|
+
| **Model fix (in mode)** | the model is in, or the user chose, renderable mode and breaks its own subset in a way that has a renderable equivalent with the same meaning | a `produces` whose `for` is not the command identifier; two projections for one read model (`-007`); a policy Stage cannot express portably (`-015`; role-only and opaque pure policies render) | edit request to the modeler session with address, change and rationale |
|
|
34
|
+
| **Capability gap** | the intended meaning needs a construct Stage does not render yet | DateTime equality filters and required parameters after optional filters (`-010`); context/single-result filters, opaque `scoped to`/`performer` and composite `by` remain PLAY0268; Translate, clocks, captures, non-event triggers and opaque reaction bodies (`-024`); claim-reading/opaque `runs as` gates (`-034`), legacy `from` (`-035`), mixed effects in one handler (`-037`, retries can duplicate events; keep it whole), unsupported reaction mappings (`-039`); unsupported generated types/result combinations (`-028`/`-038`); `then no readmodel` (`-027`); evolved events (`STAGE-ESM-026`); unsupported expression/enum production conditions (`-006`; supported conditional productions render); legacy reads (`PLAY0271`), protected reads (STAGE-ESM-044 despite v25 admission); code validation (`-005`); protected identities/enums (`-040`) or unadmitted explicit subject lineage (`PLAY0268`); attached command handlers (PLAY0268), described handlers (v23, STAGE-IMPL-002 even Stub mode), atomic mode (STAGE-ESM-016 for v22, STAGE-ESM-043 in admitted v23–v25) | keep the model; fallback record entry; options a to c in `SKILL.md`; link the Stage issue |
|
|
33
35
|
| **Tool skew** | the bundled compiler disagrees with documented semantics | the false `PLAY0285` on reaction cascades from an older bundle; codes the standalone compiler does not raise | record in the session state and the fallback record; never "fix" a correct model |
|
|
34
36
|
| **Environment** | not the model | restore failures, missing SDK, a destination that is not writable | fix the environment or report blocked |
|
|
35
37
|
|
|
@@ -7,11 +7,10 @@ license: MIT
|
|
|
7
7
|
# Screenplay scenario coverage
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
`cratis-screenplay-specifications`; this skill owns coverage and method.
|
|
10
|
+
Decide **which** situations need specifications in a coverage matrix, then use
|
|
11
|
+
consistent example data and mode-admitted forms. Record inexpressible cases; never
|
|
12
|
+
fake them. This skill owns coverage; `cratis-screenplay-specifications` owns grammar
|
|
13
|
+
and outcome comparison.
|
|
15
14
|
|
|
16
15
|
## When / when not
|
|
17
16
|
- Use: the scenario phase of `cratis-screenplay-modeling-lifecycle`; adding or changing a
|
|
@@ -33,11 +32,9 @@ Use it to seed, never replace, the matrix. Multi-step storylines remain unavaila
|
|
|
33
32
|
lifecycle families emulate them.
|
|
34
33
|
|
|
35
34
|
## Interview phase
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
Critical questions, one at a time, with follow-ups:
|
|
40
|
-
Ask only what is missing: depth, known rules and edge cases (one allowed and the nearest refused request per rule), intended use (decides admitted forms), and who validates. Read [references/interview-batch.md](references/interview-batch.md) for the four questions and follow-ups.
|
|
35
|
+
Ask only what is missing: coverage depth, allowed/refused rule examples, intended
|
|
36
|
+
execution mode and who validates. Read [interview prompts](references/interview-batch.md)
|
|
37
|
+
when these inputs are unsettled; skip answered questions.
|
|
41
38
|
|
|
42
39
|
**Unattended:** assume visibly, never invent a rule, and record who actually answered; an agent asking itself four kinds of question is not four approvals.
|
|
43
40
|
|
|
@@ -64,23 +61,22 @@ Ask only what is missing: depth, known rules and edge cases (one allowed and the
|
|
|
64
61
|
existing intentional fixtures (`references/scenario-catalogue.md` "Example data"). Shared
|
|
65
62
|
fixtures may live as typed `example`s in another document beside the declarations they type
|
|
66
63
|
(`cratis-screenplay-specifications` `references/examples-and-routes.md`).
|
|
67
|
-
7. **Draft commands
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
cases
|
|
72
|
-
authenticated policy witness for success/denial; use explicit callers for
|
|
73
|
-
anonymous/ownership or unsynthesizable personas. Syntax and complete model:
|
|
74
|
-
`cratis-screenplay-specifications` `references/persona-callers-and-cases.md`.
|
|
64
|
+
7. **Draft commands** for each applicable scenario type below. Vary only the value
|
|
65
|
+
under test in a rejection. Read specifications'
|
|
66
|
+
[persona callers and cases](../cratis-screenplay-specifications/references/persona-callers-and-cases.md)
|
|
67
|
+
when sharing a validation matrix or choosing synthesized versus explicit callers;
|
|
68
|
+
cases are not fixture examples and do not group unrelated behaviors.
|
|
75
69
|
8. **Separate view pass**: population, each update, accumulation, removal (with a surviving
|
|
76
70
|
row), absence, ordering. Mark lifecycle branches. Views combining sources must
|
|
77
71
|
tolerate any arrival order. Pin a child before its parent (Requires Screenplay 4.149.1 or later):
|
|
78
72
|
given child, then parent, then read model; "parent never arrives" leaves the
|
|
79
73
|
child absent. Evidence/example: `references/view-and-story-specs.md`.
|
|
80
|
-
9. **State-dependent rules**: `reads
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
74
|
+
9. **State-dependent rules**: use `reads` plus `require` over authoritative state;
|
|
75
|
+
eligible views opt into `command reads protected` (v25). Cover present/absent reads,
|
|
76
|
+
refusal and denial; matching decide/commit changes are conflicts, not refusals.
|
|
77
|
+
Read [protected reads](../cratis-screenplay-command-surface/references/protected-reads.md)
|
|
78
|
+
for admission and Stage refusal; legacy/refused shapes remain marked unenforced
|
|
79
|
+
with a named target mechanism. Forbidden:
|
|
84
80
|
caller-supplied copies of state in `require`, boolean attestation inputs (`confirmsX ==
|
|
85
81
|
true`) and rules hidden in `handler`/hint prose. Never drop an unresolved given or assertion
|
|
86
82
|
to make a spec compile: record the blocked case and continue.
|
|
@@ -101,11 +97,10 @@ when specifying malformed keys/filters versus valid absence (ESM v18).
|
|
|
101
97
|
Requires Screenplay 4.157.0 (`screenplay --version`) for v17, 4.161.0 for query
|
|
102
98
|
validation/error assertions; older tools do not execute these contracts.
|
|
103
99
|
|
|
104
|
-
**Once, idempotent, exactly once are different claims.**
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
target requirements.
|
|
100
|
+
**Once, idempotent, exactly once are different claims.** `unique event` proves a once-only fact,
|
|
101
|
+
not successful retry handling or an exactly-once external effect. Name the claim
|
|
102
|
+
proved and keep other guarantees as target requirements; recovery cases are in
|
|
103
|
+
`references/scenario-catalogue.md`.
|
|
109
104
|
|
|
110
105
|
## Rules
|
|
111
106
|
### Compiler contracts
|
|
@@ -116,7 +111,8 @@ target requirements.
|
|
|
116
111
|
or query spec needs `given caller` or `given caller as <Persona>` (module and feature gates count); an authorized scenario
|
|
117
112
|
gets no inferred fixture (PLAY0389). Unauthorized is never `then error`.
|
|
118
113
|
- Duplicate and competing specs use `when <Command>`; `when append` is for projection and
|
|
119
|
-
automation triggers,
|
|
114
|
+
automation triggers, consumed public events driving captures, and for a
|
|
115
|
+
constraint the command's own validation would reject first.
|
|
120
116
|
- `null` only for optional read-model properties; constraint messages are copied verbatim.
|
|
121
117
|
- Executable-only binding checks (PLAY0350/0352/0388/0389/0273) do not show in V1: run V3.
|
|
122
118
|
|
|
@@ -126,6 +122,8 @@ target requirements.
|
|
|
126
122
|
(denial), `<View>LifecycleN<State>` for families.
|
|
127
123
|
- `for` on every given, appended and expected event (plain `produces <Name>` too; inline `produces event` omits it), and on the `when` command where the
|
|
128
124
|
destination matters. A competing-claim given needs a *different* `for`.
|
|
125
|
+
Foreign event fixtures feeding a capture may omit `for`; supplied `for` is
|
|
126
|
+
opaque source text, not the capture's content key.
|
|
129
127
|
- Format rules belong on a `concept`: give each concept rule representative acceptance,
|
|
130
128
|
rejection and boundary specs once (through one command that carries it), not on every use;
|
|
131
129
|
never `n/a` automatically. Include a whitespace-only rejection for text `not empty`:
|
|
@@ -149,7 +147,16 @@ Read [references/review-questions.md](references/review-questions.md) for the ra
|
|
|
149
147
|
|
|
150
148
|
## Public-event coverage (ESM v9)
|
|
151
149
|
|
|
152
|
-
Outbound publication needs `when append <private>` and `then <PublicEvent>`.
|
|
150
|
+
Outbound publication needs `when append <private>` and `then <PublicEvent>`.
|
|
151
|
+
Captures over public events use `given <FromEvent>` / `when append <FromEvent>`,
|
|
152
|
+
not capture records (PLAY0701). Read [references/public-event-coverage.md](references/public-event-coverage.md)
|
|
153
|
+
when specifying public events or routed producers and observers.
|
|
154
|
+
|
|
155
|
+
Record captures distinguish first sight from updates: first root/child/nested
|
|
156
|
+
records are added only, so field guards need `given capture` for the same key.
|
|
157
|
+
Use a separate `when added` append when initial observations should produce a fact.
|
|
158
|
+
Read captures-and-reactions `references/record-capture-specifications.md` for the
|
|
159
|
+
prerequisite and runnable cases. Include first, changed and unchanged rows in the matrix.
|
|
153
160
|
|
|
154
161
|
## Version skew: reaction cascades and false PLAY0285
|
|
155
162
|
Under ESM v6 a command spec's `then` lists the events reactions cascade from it; an older `cratis` bundle reports a **false PLAY0285** for it. Never delete the reaction. Read [references/version-skew.md](references/version-skew.md) when a spec with cascade events reports PLAY0285 or the bundled compiler is older than the standalone tool.
|
package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/berth-reservations.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Berth reservations: worked example
|
|
2
2
|
|
|
3
|
+
This is a legacy control without `command reads protected`; the unprotected-read
|
|
4
|
+
markers below describe that control, not all command reads. Eligible views can opt
|
|
5
|
+
into v25; the date-rule blocker still remains. Read
|
|
6
|
+
[protected reads](../../cratis-screenplay-command-surface/references/protected-reads.md)
|
|
7
|
+
for admission and Stage's protected-read refusal (STAGE-ESM-044).
|
|
8
|
+
|
|
3
9
|
Complete, compiled design-mode model (marina guest berths) showing a coverage matrix turned into specifications: happy path, one rejection per rule, authorization denial, duplicate and retry, competing claim, state violation, alternative branches, compensation and a view lifecycle family. The matrix for it is in `coverage-matrix.md`; the catalogue (`scenario-catalogue.md`) names its specifications.
|
|
4
10
|
|
|
5
11
|
```screenplay test=unbound
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
# Invoicing and dues: design-mode document for the stored-state rules
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**Legacy control without `command reads protected`, not binding-ready by design.**
|
|
4
|
+
Read [protected reads](../../cratis-screenplay-command-surface/references/protected-reads.md)
|
|
5
|
+
for the opt-in alternative. Do not insert the preamble blindly: every read must meet
|
|
6
|
+
finite event-source-keyed admission with removals. A v25 reference pass still does not
|
|
7
|
+
render protected reads: Stage admits v25 but refuses them with STAGE-ESM-044. The comments and unenforced markers below describe
|
|
8
|
+
this legacy control, not a general limit on command reads.
|
|
9
|
+
|
|
10
|
+
**Design mode.** This document states the stored-state rules of the
|
|
4
11
|
invoicing example as the skill requires (`reads <View>` + `require ... message`, marked NOT
|
|
5
12
|
enforced in the slice `description`, target named). It compiles (V1, warnings as errors) but
|
|
6
13
|
does not bind, and the only blockers are `reads` (PLAY0271) and `require` over
|
|
@@ -17,7 +24,7 @@ The excerpt's Stage API-availability comment describes the historical Stage 4.24
|
|
|
17
24
|
scaffold. Stage 4.73.1's scaffold pins an Arc/Chronicle set (see the Stage skill's `references/rendered-application.md`): protected-read APIs are
|
|
18
25
|
available to gap-fill (the "not in a Stage-rendered application" comment in the source is
|
|
19
26
|
superseded), not emitted protection or `.play` rule admission. The
|
|
20
|
-
|
|
27
|
+
capture uses separate first-sight/update appends, with its local-event follow-up in Automation.
|
|
21
28
|
|
|
22
29
|
```screenplay expect PLAY0516 test=unbound
|
|
23
30
|
// Scenario coverage design-mode example: stored-state rules of invoicing club dues (complete document).
|
|
@@ -89,6 +96,10 @@ module Invoicing
|
|
|
89
96
|
outcome = outcome translate
|
|
90
97
|
"C" => captured
|
|
91
98
|
"D" => declined
|
|
99
|
+
append PaymentGatewayResultReceived
|
|
100
|
+
when added
|
|
101
|
+
outcome = $.outcome
|
|
102
|
+
reason = $.reason
|
|
92
103
|
append PaymentGatewayResultReceived
|
|
93
104
|
when outcome
|
|
94
105
|
outcome = $.outcome
|
|
@@ -96,15 +107,15 @@ module Invoicing
|
|
|
96
107
|
event PaymentGatewayResultReceived
|
|
97
108
|
outcome GatewayOutcome
|
|
98
109
|
reason String
|
|
99
|
-
event PaymentReceived
|
|
100
110
|
|
|
101
|
-
slice Automation
|
|
111
|
+
slice Automation RecordPaymentOutcome
|
|
102
112
|
description "Gives PaymentReceived its producer: the translator reacts to the provider's external fact"
|
|
103
113
|
reaction ReceivedTranslator
|
|
104
114
|
when PaymentGatewayResultReceived
|
|
105
115
|
outcome
|
|
106
116
|
produces PaymentReceived
|
|
107
117
|
where outcome == "captured"
|
|
118
|
+
event PaymentReceived
|
|
108
119
|
|
|
109
120
|
slice StateChange SettleOrVoidInvoice
|
|
110
121
|
description "An invoice ends either settled or voided, never both (SettleOrVoid, enforced at append). NOT enforced in the model today: that the invoice exists and is still open (settling) and that only an open, unpaid invoice may be voided. Stated as `reads OpenInvoice` + `require` (PLAY0271/PLAY0268 at binding; Screenplay#129). Target: Arc [ProtectedDecision] with DecisionRead, or a Chronicle DCB. Requirements to test in the target: settling an unknown invoice is rejected; voiding a paid invoice is rejected; voiding an open invoice succeeds."
|
|
@@ -13,8 +13,10 @@ destination-type information; a reaction can also consume events from a capture
|
|
|
13
13
|
|
|
14
14
|
**Scope.** This document is the runnable demonstration only. It deliberately holds no rule that
|
|
15
15
|
depends on stored state (the invoice must exist, only an open invoice may be voided, a reversal
|
|
16
|
-
needs a received payment, `reads` + `require`):
|
|
17
|
-
|
|
16
|
+
needs a received payment, `reads` + `require`): the legacy design control lacks
|
|
17
|
+
`command reads protected` and retains PLAY0271/PLAY0268. Eligible reads can opt into
|
|
18
|
+
v25; see command-surface protected-read admission and Stage refusal. The rules stay
|
|
19
|
+
in the design-mode document `invoicing-dues-design.md`,
|
|
18
20
|
never in prose here. It shows the category shapes; for a coverage example see `berth-reservations.md`.
|
|
19
21
|
|
|
20
22
|
```screenplay
|
|
@@ -208,27 +210,13 @@ module Invoicing
|
|
|
208
210
|
when added
|
|
209
211
|
outcome = $.outcome
|
|
210
212
|
reason = $.reason
|
|
213
|
+
append PaymentGatewayResultReceived
|
|
214
|
+
when outcome
|
|
215
|
+
outcome = $.outcome
|
|
216
|
+
reason = $.reason
|
|
211
217
|
event PaymentGatewayResultReceived
|
|
212
218
|
outcome GatewayOutcome
|
|
213
219
|
reason String
|
|
214
|
-
event PaymentReceived
|
|
215
|
-
event PaymentDeclined
|
|
216
|
-
reason String
|
|
217
|
-
|
|
218
|
-
slice Automation TranslatePaymentGatewayResults
|
|
219
|
-
description "Our facts from the provider's: the translators react to the external fact the Translate slice records"
|
|
220
|
-
reaction ReceivedTranslator
|
|
221
|
-
when PaymentGatewayResultReceived
|
|
222
|
-
outcome
|
|
223
|
-
produces PaymentReceived
|
|
224
|
-
where outcome == "captured"
|
|
225
|
-
reaction DeclinedTranslator
|
|
226
|
-
when PaymentGatewayResultReceived
|
|
227
|
-
outcome
|
|
228
|
-
reason
|
|
229
|
-
produces PaymentDeclined
|
|
230
|
-
reason = reason
|
|
231
|
-
where outcome == "declined"
|
|
232
220
|
|
|
233
221
|
specification TranslatingADeclinedCardResult
|
|
234
222
|
when capture PaymentGatewayResults
|
|
@@ -243,6 +231,23 @@ module Invoicing
|
|
|
243
231
|
for "9c1f0a52-6a4e-4b1c-9f55-0d2c7b8e1a01"
|
|
244
232
|
reason = "Card declined"
|
|
245
233
|
|
|
234
|
+
slice Automation RecordPaymentOutcome
|
|
235
|
+
reaction ReceivedTranslator
|
|
236
|
+
when PaymentGatewayResultReceived
|
|
237
|
+
outcome
|
|
238
|
+
produces PaymentReceived
|
|
239
|
+
where outcome == "captured"
|
|
240
|
+
reaction DeclinedTranslator
|
|
241
|
+
when PaymentGatewayResultReceived
|
|
242
|
+
outcome
|
|
243
|
+
reason
|
|
244
|
+
produces PaymentDeclined
|
|
245
|
+
reason = reason
|
|
246
|
+
where outcome == "declined"
|
|
247
|
+
event PaymentReceived
|
|
248
|
+
event PaymentDeclined
|
|
249
|
+
reason String
|
|
250
|
+
|
|
246
251
|
slice StateView OpenInvoices
|
|
247
252
|
description "Todo list: membership means 'still to collect'; there is no status flag."
|
|
248
253
|
readmodel OpenInvoice
|