@cratis/pi 7.62.0 → 7.63.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package/corpus/product-sync.json +9 -9
- package/package/corpus/skills/cratis-application-slice-conformance/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-command/references/generated-values.md +27 -12
- package/package/corpus/skills/cratis-arc-command/references/shop-generation.md +17 -6
- package/package/corpus/skills/cratis-fundamentals-concept/SKILL.md +10 -2
- package/package/corpus/skills/cratis-fundamentals-concept/references/shop-generation.md +49 -6
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +43 -41
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/cases-to-specify.md +11 -2
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/integration-interview.md +24 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/public-events-and-direction.md +76 -10
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/realization-and-gap-fill.md +5 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/todo-list-example.md +1 -1
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translate-example.md +39 -23
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translation-patterns.md +35 -12
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +51 -81
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/atomic-batches-and-source-mappings.md +83 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/capture-map-and-example.md +14 -4
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/reaction-forms.md +59 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/record-capture-specifications.md +60 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/specifying-triggers-and-clock.md +5 -1
- package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +26 -28
- package/package/corpus/skills/cratis-screenplay-command-surface/references/described-handlers.md +82 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/generated-values-and-responses.md +82 -28
- package/package/corpus/skills/cratis-screenplay-command-surface/references/protected-reads.md +113 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/shop-generation.md +45 -12
- package/package/corpus/skills/cratis-screenplay-command-surface/references/text-and-match-rules.md +119 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/validate-rules.md +14 -4
- package/package/corpus/skills/cratis-screenplay-command-surface/verification.json +10 -3
- package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +12 -12
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +5 -3
- package/package/corpus/skills/cratis-screenplay-event-modeling/verification.json +5 -1
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +2 -2
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/evidence-table-template.md +1 -1
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generated-recovery.md +51 -14
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/intent-example.md +5 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/loss-report-template.md +2 -1
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/rule-modeling.md +6 -3
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/signal-to-intent.md +1 -1
- package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +22 -28
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/choosing-generation.md +20 -7
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +12 -6
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +9 -1
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +58 -10
- package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +4 -2
- package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +2 -5
- package/package/corpus/skills/cratis-screenplay-model-review/references/anti-patterns.md +2 -2
- package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +2 -2
- package/package/corpus/skills/cratis-screenplay-model-review/references/quick-self-check.md +2 -1
- package/package/corpus/skills/cratis-screenplay-model-review/references/review-questions.md +3 -2
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/principles.md +1 -1
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/vocabulary-map.md +1 -1
- package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +2 -3
- package/package/corpus/skills/cratis-screenplay-read-surface/references/named-keys.md +3 -1
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +8 -3
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +8 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +6 -4
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +36 -29
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/berth-reservations.md +6 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-design.md +15 -4
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-example.md +25 -20
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/public-event-coverage.md +14 -3
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-examples.md +9 -3
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +7 -3
- package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +3 -1
- package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md +4 -4
- package/package/corpus/skills/cratis-screenplay-slice-design/references/rule-layers.md +4 -2
- package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +4 -3
- package/package/corpus/skills/cratis-screenplay-slice-design/references/worked-example.md +8 -8
- package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +49 -47
- package/package/corpus/skills/cratis-screenplay-specifications/references/actions-beyond-commands.md +11 -1
- package/package/corpus/skills/cratis-screenplay-specifications/references/generated-fixtures.md +48 -17
- package/package/corpus/skills/cratis-screenplay-specifications/references/vocabulary.md +14 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +25 -21
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/boundaries.md +2 -2
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +9 -3
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/multi-service-models.md +4 -3
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +7 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +30 -22
- package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet-example.md +3 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet.md +47 -2
- package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostic-arguments.md +60 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +65 -5
- package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +50 -22
- package/package/corpus/skills/cratis-screenplay-toolchain/references/generation-checks.md +93 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/generation-strategies-example.md +117 -35
- package/package/corpus/skills/cratis-screenplay-toolchain/references/language-admission.md +46 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/preferred-syntax.md +3 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +25 -10
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +1800 -50
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +5 -3
- package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +6 -1
- package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +8 -53
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/file-references.md +2 -2
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/interaction-example.md +54 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/verification.json +6 -3
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +30 -29
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +36 -9
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/choosing-generation.md +28 -8
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/publication-and-recovery.md +31 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/sandbox-and-specrunner.md +8 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +4 -1
- package/package.json +1 -1
package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.
|
|
1
|
+
4.198.0
|
|
@@ -20,7 +20,7 @@ Compiler syntax: `cheat-sheet.md`. Negative capability claims depend on the tool
|
|
|
20
20
|
16. PLAY0285/0286/0287 are static spec checks: do not edit expectations blindly. An older bundled compiler can report PLAY0285 falsely on reaction cascades; confirm with the standalone tool before changing a `then`.
|
|
21
21
|
17. `null` in specs only for optional read-model properties (PLAY0350); omit the property or record a gap; whether an optional detail is really a separate fact is a review question, not the fix for this code.
|
|
22
22
|
18. `then` events are exhaustive and ordered (use `then events in any order` for order only). From ESM v6 they include reaction cascades; after `when append` they list only what followed the append.
|
|
23
|
-
19. `reads
|
|
23
|
+
19. Under `command reads protected`, omitted `by` uses the command identifier; absent identifier is PLAY0782. Eligible reads bind v25; legacy reads and `concurrency` retain PLAY0271. Combining reads/concurrency under opt-in is PLAY0783.
|
|
24
24
|
20. Declare each event once, in its producing slice; renaming a persisted event needs `id "OldName"`; renaming a constraint discards its index.
|
|
25
25
|
21. Quoted `import "x/*.play"` = my files; unquoted `import Ctx.Event` = another context's contract (does not bind: PLAY0268).
|
|
26
26
|
22. Construct keywords are closed (`aggregate`, `saga`, `workflow` do not exist): PLAY0029 or PLAY0001/0022/0024.
|
|
@@ -29,6 +29,8 @@ Compiler syntax: `cheat-sheet.md`. Negative capability claims depend on the tool
|
|
|
29
29
|
25. MCP writes: propose, review, approval, apply by the identity owner (the session that owns the MCP connection); other subagents return edit requests; proposals are connection-local, at most 16 (`cratis-screenplay-model-authoring`).
|
|
30
30
|
26. Operations/systems and `numbers exact` source mode remain unadmitted. Qualifying retained non-route Double literals select ESM v11. Sources/streams/routes bind as v8, public/direction forms v9, identity/overrides/filters v10. Stage construct checks run through the CLI's newest admitted version; supported equality filters and strategies render (`renderable-subset.md`).
|
|
31
31
|
27. Translate crosses the public boundary: inbound foreign/data to private local facts; outbound private facts to one local public type. Public metadata needs explicit direction; a quoted origin is an unverified store name, not a path. Commands never publish public events. In-app private follow-up is Automation; see public-events-and-direction in the method skill.
|
|
32
|
+
- PLAY0694: a directionless Translate's unrouted reaction to its own capture's append (including children/nested) warns and fails `--warnaserror`. Keep the capture here, move the reaction/specs to Automation; no automatic split. Explicit inbound already refuses local consumption (PLAY0616). Older compilers do not report it; see the cheat sheet for the minimum version.
|
|
33
|
+
- PLAY0700/0701: event-capture keys must be required content properties of every `from` event, not `$eventSourceId`. Supply typed `given <Event>` / `when append <Event>`, not capture records. PLAY0701 repairs only a single-source-event capture; no PLAY0700 repair. Older runners do not deliver events to captures; see the cheat sheet for the minimum version. See automations-and-translations `references/public-events-and-direction.md`.
|
|
32
34
|
28. Personas drive the board: a persona must list every policy on the path, including module-level `IsAuthenticated`.
|
|
33
35
|
29. A sample's source check is not execution. Run selected admitted specifications through `screenplay test`/MCP; given==when clock still fires no scheduled occurrence.
|
|
34
36
|
30. Claims compare with `matches` (`claim "dept" matches "Finance"`); `==` is PLAY0120. Conditions with `contains`/`starts with` compile but do not bind.
|
|
@@ -40,7 +42,7 @@ Compiler syntax: `cheat-sheet.md`. Negative capability claims depend on the tool
|
|
|
40
42
|
35. `description`/`documentation` are authoring metadata: board, MCP and Prologue show them; `cratis render` emits them only as XML doc comments (invalid XML characters are CLI-RENDER-005), never as behavior. A rule only in prose is unenforced in rendered code; make it a rule layer, a spec or a recorded target requirement.
|
|
41
43
|
36. One unadmitted construct (operations, `numbers exact`, composite view keys) blocks whole-model binding. Routing is admitted (v8), unlike composite view keys. Overrides replace the whole route, filters never match unrouted facts. Do not remove routing or authorization to render a model.
|
|
42
44
|
37. Personas remain outside ESM bytes, but specifications accept `given caller as <Persona>`: one authenticated deterministic policy witness, not every matching caller. Inspect the chosen `or` branch; use explicit callers when synthesis is refused.
|
|
43
|
-
38. A
|
|
45
|
+
38. A stored-state rule uses `reads <View>` and `require` with an indented message. Opt into `command reads protected` for eligible v25 views; absence rejects and matching decide/commit changes conflict. Legacy reads remain unprotected. Stage refuses protected reads (STAGE-ESM-044), not the v25 pair: hand-written Arc `[ProtectedDecision]` + `DecisionRead<T>` or Chronicle consistency enforcement needs separate target verification; use a constraint for uniqueness. Forbidden: caller-supplied copies of state in `require`, boolean attestation inputs (`confirmsX == true`), rules hidden in `handler`/implementation-hint prose. An unguarded materialized read is unsafe for a protected decision.
|
|
44
46
|
Requires Arc 22.39.0 or later for `[ProtectedDecision]`.
|
|
45
47
|
|
|
46
48
|
Identity and compliance traps (`identity.md`, `concepts.md`, `events.md`, `purposes.md`, `diagnostics.md` in the Screenplay documentation):
|
|
@@ -60,7 +62,7 @@ Identity and compliance traps (`identity.md`, `concepts.md`, `events.md`, `purpo
|
|
|
60
62
|
unknown, not safe. Arc needs `[ExecuteCommandsAsSystem]` to supply a principal.
|
|
61
63
|
|
|
62
64
|
Traps 39 to 44 are tool traps.
|
|
63
|
-
39.
|
|
65
|
+
39. Attached handlers remain PLAY0268; pending `handler implementation` beside unconditional productions binds as a described v23 command (PLAY0695). Body-reaching specs are Unsupported ImplementationBody; Stage refuses STAGE-IMPL-002, including Stub mode. `implementation` and `hint` are accepted on a command handler, an operation execute/compensate phase and a command property named rule, and are rejected on concept rules, built-in property rules and whole-command `require`/`validate` bodies; hints do not execute, lock or confirm a body. A handler slice is gap-fill, not a customization of a rendered slice.
|
|
64
66
|
40. `numbers exact` (the source mode) parses but never binds (PLAY0268; "not admitted by any supported executable model (ESM) version yet") and is PLAY0001 on older compilers; it is absent from `grammar.md`. Exact lowering of qualifying Double-mode literals is separate (v11). Never use it in a model or example meant to execute.
|
|
65
67
|
41. MCP roots bug: a dynamic-root server on an old tool answers the roots request with an `id: null` error right after `notifications/initialized`; hosts treat it as fatal, and `open-workspace.path` does not help. Start with a fixed root (`screenplay mcp <folder>`, `cratis screenplay mcp` in a project with `.cratis/ai.json`).
|
|
66
68
|
Requires Screenplay 4.63.2 or later (`screenplay --version`) for a dynamic-root server; the compiler bundled in older cratis releases lacks it.
|
|
@@ -41,7 +41,12 @@
|
|
|
41
41
|
{ "kind": "skill-contains", "value": "cratis screenplay validate" },
|
|
42
42
|
{ "kind": "skill-contains", "value": "validating one file with `cratis screenplay validate file.play`", "file": "references/traps.md" },
|
|
43
43
|
{ "kind": "skill-contains", "value": "`notifications/initialized`" },
|
|
44
|
-
{ "kind": "skill-contains", "value": "
|
|
44
|
+
{ "kind": "skill-contains", "value": "Pending described handlers bind but do not execute their bodies" },
|
|
45
|
+
{ "kind": "skill-contains", "value": "STAGE-ESM-043", "file": "references/language-admission.md" },
|
|
46
|
+
{ "kind": "skill-contains", "value": "v25", "file": "references/language-admission.md" },
|
|
47
|
+
{ "kind": "skill-contains", "value": "PLAY0787", "file": "references/diagnostics.md" },
|
|
48
|
+
{ "kind": "skill-contains", "value": "stepIndex", "file": "references/diagnostic-arguments.md" },
|
|
49
|
+
{ "kind": "skill-contains", "value": "never parse message text", "file": "references/diagnostic-arguments.md" },
|
|
45
50
|
{ "kind": "skill-contains", "value": "references/sources-and-streams.md" },
|
|
46
51
|
{ "kind": "skill-contains", "value": "CLI-RENDER-004" },
|
|
47
52
|
{ "kind": "skill-contains", "value": "Concept strategies (v15)" },
|
|
@@ -230,66 +230,23 @@ and the review checklist. `contribute to Navigation` stays the flat contribution
|
|
|
230
230
|
|
|
231
231
|
## Interactions — what a click does
|
|
232
232
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
| --- | --- |
|
|
238
|
-
| **Interaction trigger** | the `on <thing>` clause: `click`, `double click`, `select`, `submit`, `change`, `load`/`unload`, `enter`/`leave`, `event <Event>`, `interval <n> <unit>`, or a declared application trigger |
|
|
239
|
-
| **Action** | a closed set: `execute`, `navigate to`/`navigate back`, `open dialog`/`close dialog`, `refresh`, `set … to`, `notify`, `confirm`, `raise` |
|
|
240
|
-
| **Behavior** | a bundle of trigger-to-action bindings; inline (`on …`) or named (`behavior` + `uses`) |
|
|
233
|
+
An interaction wires an `on <thing>` trigger to actions, inline or through named
|
|
234
|
+
`behavior` + `uses`. This is closed UI wiring, not scripting; validation stays on
|
|
235
|
+
the command. Trigger/action syntax is in [interaction example](references/interaction-example.md)
|
|
236
|
+
and [guarded interactions](references/guarded-interactions.md).
|
|
241
237
|
|
|
242
238
|
Guarded alternatives and `where` deprecation:
|
|
243
239
|
[guarded interactions](references/guarded-interactions.md).
|
|
244
240
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
```screenplay
|
|
248
|
-
concept InvoiceId : Uuid
|
|
249
|
-
|
|
250
|
-
behavior ConfirmThenExecute
|
|
251
|
-
parameter command
|
|
252
|
-
parameter message
|
|
253
|
-
on click
|
|
254
|
-
confirm message
|
|
255
|
-
on success
|
|
256
|
-
execute command
|
|
257
|
-
|
|
258
|
-
module Invoicing
|
|
259
|
-
feature InvoiceManagement
|
|
260
|
-
slice StateChange CancelInvoice
|
|
261
|
-
command CancelInvoice
|
|
262
|
-
invoiceId InvoiceId identifier
|
|
263
|
-
produces event InvoiceCancelled
|
|
264
|
-
screen CancelInvoiceScreen
|
|
265
|
-
data InvoiceStatusView via query InvoiceStatusById by invoiceId
|
|
266
|
-
uses ConfirmThenExecute
|
|
267
|
-
command CancelInvoice
|
|
268
|
-
message "Cancel this invoice?"
|
|
269
|
-
on enter
|
|
270
|
-
refresh InvoiceStatusById
|
|
271
|
-
on failure
|
|
272
|
-
notify error "The invoice could not be loaded"
|
|
273
|
-
slice StateView InvoiceStatus
|
|
274
|
-
readmodel InvoiceStatusView
|
|
275
|
-
invoiceId InvoiceId
|
|
276
|
-
cancelled Bool
|
|
277
|
-
projection InvoiceStatuses => InvoiceStatusView
|
|
278
|
-
from InvoiceCancelled
|
|
279
|
-
invoiceId = $eventSourceId
|
|
280
|
-
cancelled = true
|
|
281
|
-
query InvoiceStatusById => InvoiceStatusView optional
|
|
282
|
-
by invoiceId InvoiceId
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
The inline event targets `invoiceId`; the projection gets it from event context.
|
|
241
|
+
Read [interaction example](references/interaction-example.md) when wiring a
|
|
242
|
+
named confirmation behavior and an inline refresh to the same screen.
|
|
286
243
|
Scalar/named `returns` bind and reference-execute (ESM v7).
|
|
287
244
|
Renderer generation/response limits: command-surface `references/generated-values-and-responses.md`.
|
|
288
245
|
Screenplay resolves response names in form submit and execute success (Requires Screenplay 4.148.0 or later);
|
|
289
246
|
own failure use is PLAY0685. No ESM change; Scene runtime binding remains downstream.
|
|
290
247
|
An existing success continuation does not imply a response contract.
|
|
291
|
-
Read [response continuations](references/response-continuations.md) for
|
|
292
|
-
|
|
248
|
+
Read [response continuations](references/response-continuations.md) for scope,
|
|
249
|
+
precedence, PLAY0485 and examples.
|
|
293
250
|
|
|
294
251
|
- Write the one-off case inline; name it with `behavior` when several places need
|
|
295
252
|
the same wiring. A `uses` site must supply exactly the declared parameters
|
|
@@ -307,8 +264,6 @@ nested/failure scopes, PLAY0485, examples and tagged evidence.
|
|
|
307
264
|
- **A declared `trigger` is not a UI event.** Use `on click`, not `trigger`, for a
|
|
308
265
|
button. `on <Trigger>` observes an application trigger and `raise <Trigger>`
|
|
309
266
|
fires one; that is where the two meet.
|
|
310
|
-
- Interactions are a closed vocabulary, not a scripting language. Validation stays
|
|
311
|
-
on the command; the UI surfaces it.
|
|
312
267
|
|
|
313
268
|
## `ui profile` and `theme`
|
|
314
269
|
|
package/package/corpus/skills/cratis-screenplay-ui-composition/references/file-references.md
CHANGED
|
@@ -6,8 +6,8 @@ This reference holds the three meanings of `file` and the rules for paths and lo
|
|
|
6
6
|
|
|
7
7
|
Three meanings, one word:
|
|
8
8
|
|
|
9
|
-
- **Backend implementation attachment.** On
|
|
10
|
-
|
|
9
|
+
- **Backend implementation attachment.** On an attached command `handler` (still
|
|
10
|
+
PLAY0268; pending described handlers instead bind v23 without a file), a validation
|
|
11
11
|
rule predicate, a query `performer`, a reducer rule, a reaction trigger, a
|
|
12
12
|
`constraint` and a `policy`, `file` stands in for the inline body: the
|
|
13
13
|
implementation lives there. These are the files a host inventories.
|
package/package/corpus/skills/cratis-screenplay-ui-composition/references/interaction-example.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<!-- Copyright (c) Cratis. All rights reserved. -->
|
|
2
|
+
<!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
|
|
3
|
+
|
|
4
|
+
# Named and inline interaction example
|
|
5
|
+
|
|
6
|
+
Interaction triggers are `click`, `double click`, `select`, `submit`, `change`,
|
|
7
|
+
`load`/`unload`, `enter`/`leave`, `event <Event>`, `interval <n> <unit>` or a declared
|
|
8
|
+
application trigger. Actions are `execute`, `navigate to`/`navigate back`,
|
|
9
|
+
`open dialog`/`close dialog`, `refresh`, `set … to`, `notify`, `confirm` and `raise`.
|
|
10
|
+
A behavior bundles trigger-to-action bindings, inline (`on …`) or named
|
|
11
|
+
(`behavior` + `uses`); these closed vocabularies are not scripting.
|
|
12
|
+
|
|
13
|
+
The named behavior confirms before executing; the screen also refreshes on enter.
|
|
14
|
+
The inline event targets `invoiceId`, which the projection reads from event context.
|
|
15
|
+
Validate the complete model with `screenplay <root> --warnaserror`; that validates
|
|
16
|
+
source, not Scene runtime wiring.
|
|
17
|
+
|
|
18
|
+
```screenplay
|
|
19
|
+
concept InvoiceId : Uuid
|
|
20
|
+
|
|
21
|
+
behavior ConfirmThenExecute
|
|
22
|
+
parameter command
|
|
23
|
+
parameter message
|
|
24
|
+
on click
|
|
25
|
+
confirm message
|
|
26
|
+
on success
|
|
27
|
+
execute command
|
|
28
|
+
|
|
29
|
+
module Invoicing
|
|
30
|
+
feature InvoiceManagement
|
|
31
|
+
slice StateChange CancelInvoice
|
|
32
|
+
command CancelInvoice
|
|
33
|
+
invoiceId InvoiceId identifier
|
|
34
|
+
produces event InvoiceCancelled
|
|
35
|
+
screen CancelInvoiceScreen
|
|
36
|
+
data InvoiceStatusView via query InvoiceStatusById by invoiceId
|
|
37
|
+
uses ConfirmThenExecute
|
|
38
|
+
command CancelInvoice
|
|
39
|
+
message "Cancel this invoice?"
|
|
40
|
+
on enter
|
|
41
|
+
refresh InvoiceStatusById
|
|
42
|
+
on failure
|
|
43
|
+
notify error "The invoice could not be loaded"
|
|
44
|
+
slice StateView InvoiceStatus
|
|
45
|
+
readmodel InvoiceStatusView
|
|
46
|
+
invoiceId InvoiceId
|
|
47
|
+
cancelled Bool
|
|
48
|
+
projection InvoiceStatuses => InvoiceStatusView
|
|
49
|
+
from InvoiceCancelled
|
|
50
|
+
invoiceId = $eventSourceId
|
|
51
|
+
cancelled = true
|
|
52
|
+
query InvoiceStatusById => InvoiceStatusView optional
|
|
53
|
+
by invoiceId InvoiceId
|
|
54
|
+
```
|
|
@@ -33,15 +33,18 @@
|
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"kind": "skill-contains",
|
|
36
|
-
"value": "produces event InvoiceCancelled"
|
|
36
|
+
"value": "produces event InvoiceCancelled",
|
|
37
|
+
"file": "references/interaction-example.md"
|
|
37
38
|
},
|
|
38
39
|
{
|
|
39
40
|
"kind": "skill-contains",
|
|
40
|
-
"value": "invoiceId = $eventSourceId"
|
|
41
|
+
"value": "invoiceId = $eventSourceId",
|
|
42
|
+
"file": "references/interaction-example.md"
|
|
41
43
|
},
|
|
42
44
|
{
|
|
43
45
|
"kind": "skill-contains",
|
|
44
|
-
"value": "InvoiceStatusView optional"
|
|
46
|
+
"value": "InvoiceStatusView optional",
|
|
47
|
+
"file": "references/interaction-example.md"
|
|
45
48
|
},
|
|
46
49
|
{
|
|
47
50
|
"kind": "skill-contains",
|
|
@@ -17,6 +17,12 @@ whether it is admitted; reading the admission rules is not a render result.
|
|
|
17
17
|
|
|
18
18
|
Requires cratis CLI ≥ 3.57 (`cratis --version`) to render ESM v14 and v15 models; an older CLI refuses newer ESM versions with `CLI-RENDER-004` (or `STAGE-ESM-016` from Stage directly).
|
|
19
19
|
|
|
20
|
+
## Batches, described handlers, text rules and protected reads
|
|
21
|
+
|
|
22
|
+
Read [language admission](../cratis-screenplay-toolchain/references/language-admission.md)
|
|
23
|
+
for v22–v25: text rules render, atomic batches/protected reads/described bodies do
|
|
24
|
+
not. Stub mode emits no described-body stubs. Keep protection and report refusal.
|
|
25
|
+
|
|
20
26
|
## When to use
|
|
21
27
|
|
|
22
28
|
- Deciding whether a model can be rendered, or reading a blocked render.
|
|
@@ -66,7 +72,14 @@ printed), `1` is a missing input. Add `-o json` for the counts and the publicati
|
|
|
66
72
|
|
|
67
73
|
Facts that surprise:
|
|
68
74
|
|
|
69
|
-
- **Binding uses the CLI's bundled
|
|
75
|
+
- **Binding uses the CLI's bundled compiler**, not the standalone one. Version admission
|
|
76
|
+
does not imply construct support: exact ESM v1–v21 and v23–v25 pairs are admitted,
|
|
77
|
+
while v22/v26 and mixed pairs refuse `STAGE-ESM-016`. Pattern/random generation and checksum validation
|
|
78
|
+
render with an admitting renderer; `generate rule` still refuses `STAGE-ESM-028`.
|
|
79
|
+
Read [references/admission.md](references/admission.md) for the introducing-release
|
|
80
|
+
prerequisites, all-Proven unpinned specifications and construct/pin checks (-011/-038).
|
|
81
|
+
An older CLI bundle can refuse `CLI-RENDER-004` (direct Stage: `STAGE-ESM-016`);
|
|
82
|
+
keep refused models for gap-fill.
|
|
70
83
|
- **Render never builds, tests or runs** the output. A published render is admission and
|
|
71
84
|
publication only; build and tests are separate results (see "Verify"). Admission can be
|
|
72
85
|
green while a rendered Debug test fails (for example a query assertion on the key).
|
|
@@ -81,7 +94,7 @@ Facts that surprise:
|
|
|
81
94
|
|
|
82
95
|
`--scope` renders an admitted part while other slices wait for hand-written code or
|
|
83
96
|
renderer support. The whole model must still compile and bind, so a `PLAY0268`, protected
|
|
84
|
-
identity/enum, handler or
|
|
97
|
+
identity/enum, attached handler or unsupported ESM version anywhere blocks even a scoped render.
|
|
85
98
|
`PLAN-*` problems in unselected slices become warnings and `STAGE-ESM-*` refusals in
|
|
86
99
|
unselected slices do not block. A scoped plan has no application scaffold or default Scene
|
|
87
100
|
(with no manifest in the destination the plain scaffold is added). A dependency in another
|
|
@@ -91,27 +104,11 @@ first). Unselected managed files are preserved. A scoped result is evidence for
|
|
|
91
104
|
|
|
92
105
|
## Publication and recovery
|
|
93
106
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
- An unmanaged file at a planned path is refused, even with `--force`.
|
|
100
|
-
- A user-modified managed file is refused unless it is still active **and** `--force` is
|
|
101
|
-
given; `--force` replaces it. It never overwrites unmanaged files and never deletes a
|
|
102
|
-
modified stale file. A stale managed file is removed only if its bytes still match.
|
|
103
|
-
- Recovery runs before planning, even when planning then fails. **`recovered: true` in the
|
|
104
|
-
result means stop and reconcile**: the receipt does not describe what recovery changed.
|
|
105
|
-
- An unchanged re-render writes nothing (`unchanged` equals the artifact count).
|
|
106
|
-
- Use exclusive access to the destination; a receipt is a filesystem result, not a Git commit, and the command creates no branch, commit or PR.
|
|
107
|
-
- Drift: `cratis render ... --check` is the first probe; exit `6` means pending changes.
|
|
108
|
-
Otherwise compare successive manifests' `semanticRevision` for renders with the same
|
|
109
|
-
`--name` and inputs. Do not compare the MCP `modelRevision` with the manifest: their
|
|
110
|
-
application identities can differ.
|
|
111
|
-
|
|
112
|
-
A modified managed file reports `Managed artifact 'Program.cs' was modified by the user; pass --force to replace it.`
|
|
113
|
-
Find out why it was edited, move the intent into the model or `Customizations/`, then
|
|
114
|
-
re-render; use `--force` only to discard the edit on purpose.
|
|
107
|
+
Read [publication and recovery](references/publication-and-recovery.md) before
|
|
108
|
+
publishing or using `--force`. Commit `.cratis-render.json`, never the
|
|
109
|
+
`.cratis-render/` control directory. Force never overwrites unmanaged files or
|
|
110
|
+
modified stale artifacts. Recovery runs before planning:
|
|
111
|
+
`recovered: true` means stop and reconcile. Use `--check` for drift, not MCP-to-manifest revision comparisons.
|
|
115
112
|
|
|
116
113
|
## Admission
|
|
117
114
|
|
|
@@ -126,14 +123,18 @@ One blocker publishes nothing. Codes, limits and fixes: [references/admission.md
|
|
|
126
123
|
single-hop reaction append specifications, Debug specifications and authored UI through Scene.
|
|
127
124
|
- **Refused:** Translate/captures, non-event triggers, opaque bodies and clock specs (`STAGE-ESM-024`);
|
|
128
125
|
mixed effects (`STAGE-ESM-037`, redelivery duplicates events); unsupported reaction mappings (`-039`),
|
|
129
|
-
protected identities/enums (`-040`)
|
|
126
|
+
protected identities/enums (`-040`); unsupported generated types/results (`-028`/`-038`);
|
|
130
127
|
appends beyond single-hop/cascade specs (`-011`), absence (`-027`), evolution (`STAGE-ESM-026`), public/foreign events
|
|
131
128
|
(`-032`/`-033`), claim-reading/opaque `runs as` gates (`-034`), legacy filters (`-035`), production
|
|
132
|
-
overrides (`-036`), code validation (`-005`),
|
|
133
|
-
productions, composite projection keys and `all
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
129
|
+
overrides (`-036`), code validation (`-005`), DateTime filters (`-010`),
|
|
130
|
+
unsupported conditional productions, composite projection keys and unsupported `all` shapes.
|
|
131
|
+
Protected reads refuse `STAGE-ESM-044`, described handlers `STAGE-IMPL-002`
|
|
132
|
+
(even Stub mode), and atomic mode in admitted pairs `STAGE-ESM-043`.
|
|
133
|
+
- **Binding refusals (`PLAY0268`/`PLAY0271`):** legacy reads, `concurrency`, attached
|
|
134
|
+
handlers, context/single-result filters, opaque scope/performer, composite `by`,
|
|
135
|
+
enum/identity compliance and subject lineage. Eligible protected reads bind v25;
|
|
136
|
+
pending handlers with unconditional productions bind v23, but neither renders.
|
|
137
|
+
Never drop protection.
|
|
137
138
|
|
|
138
139
|
A refusal is not a licence to weaken the model: drop no specification, event generation or
|
|
139
140
|
protection to get a render; keep the model, record the capability gap and gap-fill.
|
|
@@ -11,12 +11,28 @@
|
|
|
11
11
|
- Specification rules (`STAGE-ESM-011`)
|
|
12
12
|
- Refusals seen while drafting a model
|
|
13
13
|
|
|
14
|
-
Stage admits exact ESM v1–
|
|
15
|
-
|
|
14
|
+
Stage admits exact ESM v1–v21 and v23–v25 language/semantic pairs, then checks
|
|
15
|
+
constructs. V22, v26 and mixed or unknown pairs report `STAGE-ESM-016`. The CLI's bundled renderer
|
|
16
16
|
may stop at v16 and refuse newer models with `CLI-RENDER-004`.
|
|
17
17
|
|
|
18
|
-
Requires Stage 4.96.0 for v16, 4.101.0 for v17, 4.102.0 for v19, and 4.103.0 for rendered redelivery; older renderers refuse the respective shapes.
|
|
18
|
+
Requires Stage 4.96.0 for v16, 4.101.0 for v17, 4.102.0 for v19, 4.106.0 for v18, and 4.103.0 for rendered redelivery; older renderers refuse the respective shapes.
|
|
19
19
|
Requires Cratis CLI 3.60.0 (`cratis --version`) for v16 rendering.
|
|
20
|
+
Requires Stage 4.109.0 for v20 generated-concept rules; older renderers refuse v20.
|
|
21
|
+
It renders New() plus ConceptValidator and refuses invalid pins with STAGE-ESM-011.
|
|
22
|
+
Requires Stage 4.115.0 for v21 admission and all-Proven unpinned rendered specs;
|
|
23
|
+
older renderers refuse v21 or require rule-bearing pins even when Proven.
|
|
24
|
+
Requires Stage 4.117.0 for warning/info-severity generated-concept rules; older
|
|
25
|
+
renderers refuse them with STAGE-ESM-038. All severities are enforced at runtime.
|
|
26
|
+
Requires Stage 4.118.0 for semantic checksum validation; older renderers refuse it with STAGE-ESM-042.
|
|
27
|
+
Requires Stage 4.119.0 for pattern/random rendering, Host generation and independent executor fixture checks; older renderers refuse those strategies with STAGE-ESM-028.
|
|
28
|
+
`generate rule` still refuses -028. Any Unproven/Refuted rule needs a pin (-038);
|
|
29
|
+
opaque/unsupported rules refuse -005 before pin evaluation. Independent execution
|
|
30
|
+
always needs pins.
|
|
31
|
+
Requires Stage 4.124.0 for v24 text-rule admission (`cratis --version` identifies the CLI bundle); older renderers refuse v24 with STAGE-ESM-016.
|
|
32
|
+
Requires Stage 4.127.0 for v25 version admission; older renderers refuse v25 with STAGE-ESM-016. Protected reads still refuse STAGE-ESM-044.
|
|
33
|
+
Described handlers refuse STAGE-IMPL-002, even Stub mode; atomic mode in an
|
|
34
|
+
admitted pair refuses STAGE-ESM-043. Version admission never implements a body,
|
|
35
|
+
batch or protected decision.
|
|
20
36
|
|
|
21
37
|
Binding with the CLI's bundled compiler is a separate
|
|
22
38
|
prerequisite. The exhaustive construct table is `references/renderable-subset.md` in
|
|
@@ -115,13 +131,13 @@ Requires Stage 4.90.0 for snapshot/live lists, 4.96.0 for non-text secrets and 4
|
|
|
115
131
|
| `STAGE-ESM-005` | Code validation or rule predicate bodies; or a command beyond the first capability (optional event property, event revision other than the first, validation or requirement that cannot be rendered, neither `produces` nor a response) | Use declarative validation; non-initial event generations are not rendered |
|
|
116
132
|
| `STAGE-ESM-006` | `produces` that cannot render without changing its destination or mappings (expression/enum conditions, literal or computed mappings, `for` not a command identifier, mappings not one-to-one with event properties, duplicate tags) | Map properties one to one; supported conditional productions render as guarded events, not separate commands |
|
|
117
133
|
| `STAGE-ESM-007`, `-008`, `-009` | Projection count per read model (exactly one projection or reducer each); unresolvable properties or no single read-model transition (**flat** projections only); affected instance not one, not keyed by an event property, or not the event-source identity (flat projections only) | One projection per read model; see "Projections" below |
|
|
118
|
-
| `STAGE-ESM-010` | A query is neither an optional snapshot lookup by the read-model identifier nor a supported snapshot/observable collection query; each query is checked on its own. Both collection modes render.
|
|
134
|
+
| `STAGE-ESM-010` | A query is neither an optional snapshot lookup by the read-model identifier nor a supported snapshot/observable collection query; each query is checked on its own. Both collection modes render. Concept-typed keys and filters retain Arc validation, including composite members and collection elements; nullable concept keys or optional concept filters with `not empty` cannot preserve null semantics | Keyed `XById => X optional` queries or snapshot/observable lists. Equality filters render on both collections; DateTime filters, required filters after optional ones and unsupported null-validation shapes refuse 010. Filter-name collisions refuse 012. Context/single-result filters, opaque scope/performer and composite `by` remain PLAY0268 |
|
|
119
135
|
| `STAGE-ESM-011` | A specification cannot render (see the rules below) | Reshape it only if the assertion keeps its meaning; otherwise keep the specification, record the gap, and gap-fill with the specification as the oracle. Never weaken or delete it to get a render |
|
|
120
136
|
| `STAGE-ESM-012` | Generated C# names collide (properties, types, namespaces, constraints) | Rename |
|
|
121
137
|
| `STAGE-ESM-013` | An event-context value other than `$context.occurred` mapped in `produces` | Map a command property when that preserves the meaning; otherwise gap-fill |
|
|
122
138
|
| `STAGE-ESM-014` | A constraint Chronicle cannot reproduce (kind, scope, message; multi-claim in one command; optional or composite targets) | A different constraint is a requirement change for the model owner; otherwise gap-fill |
|
|
123
139
|
| `STAGE-ESM-015` | Authorization Stage cannot render exactly: a role-claim URI, an opaque policy nested inside a condition, an unresolved or non-portable policy, no single identifier, an opaque-policy subject that is not text, Uuid, Date or DateTime (a restriction on opaque-policy subjects, separate from declarative claim targets), an unsupported claim artifact. Role-only, authenticated, opaque pure policies, claim conditions with Uuid, Date, DateTime or text targets (numeric and Boolean claim matches render as always false) and `not`/and/or render; roles are read through the identity's `RoleClaimType` | Reshape the policy to a portable condition; otherwise gap-fill |
|
|
124
|
-
| `STAGE-ESM-016` | Model language/semantic pair is not
|
|
140
|
+
| `STAGE-ESM-016` | Model language/semantic pair is not admitted by the installed Stage; exact v1–v21 and v23–v25 pairs are admitted, v22/v26 and mixed pairs refused; older Stage also refuses the versions listed in the minimums above. A CLI bundle stopping at v16 reports `CLI-RENDER-004` above v16 first. v14 filters and v15 generation join v11 numbers, v12 enum numbers and v13 compliance as supported constructs, not blanket construct support | Not fixable by editing: the model needs a newer renderer. Keep the model, record the gap, gap-fill |
|
|
125
141
|
| `STAGE-ESM-017` | Read model or projection cannot render (property names that collide with Chronicle paths or expression syntax, mappings that overwrite the key or child identity, composite keys, unsupported `all` mappings, the refused scope shapes below) | Reshape the projection without changing what it records, or record the gap |
|
|
126
142
|
| `STAGE-ESM-018` | `$strings.` key missing in the default locale or containing formatting characters | Fix the strings |
|
|
127
143
|
| `STAGE-ESM-019` | Reducer structure or body not admitted (outside a `StateView`, impure, does not compile) | An equivalent pure body, or gap-fill |
|
|
@@ -131,8 +147,8 @@ Requires Stage 4.90.0 for snapshot/live lists, 4.96.0 for non-text secrets and 4
|
|
|
131
147
|
| `STAGE-ESM-026` | A selected event, or an event a selected slice depends on (producing command, observing projection or reducer, specification, constraint target), is above its initial revision: `Event 'X' has evolved to revision N; Stage does not render event migrations yet.` The whole selection is refused, nothing is emitted | Not fixable by editing without dropping the evolution. Gap-fill the evolved events and hand-write the migrations (`cratis-chronicle-event-type-migration`). A scoped slice of initial events that depends on no evolved event still renders |
|
|
132
148
|
| `STAGE-ESM-024` | Interval, schedule, application, startup and shutdown triggers, opaque reaction bodies, captures, Translate (including directed Translate), and clock/trigger/capture specifications. Event-triggered Automation slices render as Chronicle reactors, subject to `-013` and `-034` to `-040` below | Keep refused scope as gap-fill; do not confuse semantic Host settlement with live reactor delivery |
|
|
133
149
|
| `STAGE-ESM-027` | A specification asserting a read model is absent (`then no readmodel`) is not rendered (the semantic specification engine executes keyed absence) | Keep the specification; verify absence another way and record the gap |
|
|
134
|
-
| `STAGE-ESM-028`, `-029` | Generated values or responses Stage cannot render. Supported scalar UUID/String-concept strategies, v15 freshness, generation fixtures, scalar/named responses and `then returns` render; unsupported generated types report `-028` | Probe the supported form; preserve refused combinations as gap-fill |
|
|
135
|
-
| `STAGE-ESM-038` | Generated/response results combined with routes, generated-property
|
|
150
|
+
| `STAGE-ESM-028`, `-029` | Generated values or responses Stage cannot render. Supported scalar UUID/String-concept strategies and Int random, v15 freshness, generation fixtures, scalar/named responses and `then returns` render; `generate rule`, unknown strategies and unsupported generated types report `-028` | Probe the supported form; preserve refused combinations as gap-fill |
|
|
151
|
+
| `STAGE-ESM-038` | Generated/response results combined with routes, generated-property rules, legacy allocation, non-scalar/non-command response sources or generated-name collisions | Keep the model; gap-fill that command |
|
|
136
152
|
| `STAGE-ESM-039`, `-040` | Reaction conditions, destinations or mappings outside the faithful target subset; protected identity uses (including reaction destinations) and protected enum concepts | See the event-reaction boundary above; never declassify protected values |
|
|
137
153
|
| `STAGE-ESM-030` | Named event-source or stream definition with a reserved stored name; unformattable routed fixtures or command replay routes. The default sandbox engine also reports it for every routed model | Rename the reserved name; render the model with `cratis render`, not `cratis run` |
|
|
138
154
|
| `STAGE-ESM-031` | Whole-number literal outside the C# `int` range below ESM v8 (v8 and later render `long`) | Raise the model to v8 constructs or gap-fill |
|
|
@@ -141,6 +157,10 @@ Requires Stage 4.90.0 for snapshot/live lists, 4.96.0 for non-text secrets and 4
|
|
|
141
157
|
| `STAGE-ESM-035` | Observer filters on legacy syntax paths; semantic reaction/reducer filters render | Use semantic admission |
|
|
142
158
|
| `STAGE-ESM-036` | Per-production route overrides | Gap-fill |
|
|
143
159
|
| `STAGE-ESM-041` | Older renderers refuse non-text secrets; supported renderers keep their original types | Keep classification; upgrade the renderer, never declassify |
|
|
160
|
+
| `STAGE-ESM-042` | Unknown validation rule kinds; checksum on the legacy syntax path (semantic checksum renders) | Keep the rule; use an admitting semantic renderer or gap-fill |
|
|
161
|
+
| `STAGE-ESM-043` | `reaction batches atomic` in an admitted version pair | Keep the batch boundary; gap-fill without splitting it |
|
|
162
|
+
| `STAGE-ESM-044` | Protected-read preamble, command reads or read-backed conditions/mappings in renderer, Host or specification executor | Keep protection; gap-fill with independently verified target enforcement |
|
|
163
|
+
| `STAGE-IMPL-002` | Described command handler, naming command and RequirementId; also refused in Stub mode | Supply authorized implementation outside rendering; no generated stub is emitted |
|
|
144
164
|
| `STAGE-ESM-037` | Events and commands from one handler, even across separate triggers on the same event in one reaction. The scaffold's Arc supports mixed results, but appends events before commands; a refused command causes redelivery and duplicate events | **Do not split the modeled reaction or drop an effect.** Gap-fill only with a proven retry-safe implementation; `[OnceOnly]` excludes replay, not retry |
|
|
145
165
|
| `STAGE-ESM-023` | Information: transition bodies analysed | none |
|
|
146
166
|
| `STAGE-CRATIS-001` to `-005` | Profile or `scene.json` not the package-owned shape; unrecognized or missing scaffold input; artifact path collision (`-004`, for example case names that normalize to one path); a modeled module or feature that would render into the reserved `Customizations/` (`-005`) | Rename the module, feature or case |
|
|
@@ -222,8 +242,10 @@ context, no directives, no writes to statics, `throw` limited to
|
|
|
222
242
|
pure expressions, and no generated type shadowing a referenced one. Anything else is
|
|
223
243
|
`STAGE-ESM-019`, `-021` or `-022`. A reducer needs a `StateView` slice, its read model in the
|
|
224
244
|
same slice, a required Guid or text identifier and a matching keyed query. Code validation
|
|
225
|
-
(`STAGE-ESM-005`) is refused outright (opaque pure policies render)
|
|
226
|
-
|
|
245
|
+
(`STAGE-ESM-005`) is refused outright (opaque pure policies render). Attached
|
|
246
|
+
command handlers remain `PLAY0268`; a pending handler beside unconditional
|
|
247
|
+
productions binds as a described v23 command, but Stage refuses it with
|
|
248
|
+
`STAGE-IMPL-002`, even in Stub mode.
|
|
227
249
|
|
|
228
250
|
## Specification rules (`STAGE-ESM-011`)
|
|
229
251
|
|
|
@@ -247,6 +269,11 @@ same slice, a required Guid or text identifier and a matching keyed query. Code
|
|
|
247
269
|
query whose fixtures use streams other than the queried key.
|
|
248
270
|
- A when-less specification is admitted only as `then denied` on an authorized keyed
|
|
249
271
|
query, or `given readmodel` plus `then query` on an unprotected query.
|
|
272
|
+
- Generated pins must satisfy shape and concept rules; failing pins refuse -011,
|
|
273
|
+
not an input-validation or exception assertion. Unpinned generation with any
|
|
274
|
+
Unproven/Refuted rule refuses -038; all-Proven rules permit unpinned rendered
|
|
275
|
+
specs within the admitted expectation shapes. Independent execution still
|
|
276
|
+
requires pins; see the introducing-release prerequisites above.
|
|
250
277
|
- Descriptions and event documentation render only as XML doc comments; comments are never rendered, and neither is behavior.
|
|
251
278
|
|
|
252
279
|
## Refusals seen while drafting a model
|
package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/choosing-generation.md
CHANGED
|
@@ -9,20 +9,40 @@ Render only the supported part of the [shared shop model](../../cratis-screenpla
|
|
|
9
9
|
CustomerId (`cus_` + ULID), TypeID OrderId and NanoID InviteCode. ApiKey remains
|
|
10
10
|
secret with no generated property; do not turn .NET Bytes(32) credential generation
|
|
11
11
|
into a promise of Stage secret generation. The Arc context-aware OrderId is not
|
|
12
|
-
Stage's
|
|
12
|
+
tenant isolation: Stage's TypeID factory uses the command receipt time, not the
|
|
13
|
+
tenant. InvoiceNumber pattern/checksum and random Int TicketNumber render as
|
|
14
|
+
Fundamentals Pattern/Integer factories; dated patterns use receipt-time context.
|
|
15
|
+
Read [admission.md](admission.md) for checksum validation and pattern/random
|
|
16
|
+
rendering prerequisites and their STAGE-ESM-042/-028 refusals on older renderers.
|
|
13
17
|
|
|
14
18
|
Select the strategy on the model's concept, not in managed C#: implicit UUID for
|
|
15
19
|
ordinary identity, UUIDv7/ULID for time-ordered values, TypeID for typed text,
|
|
16
20
|
NanoID for opaque text or bytes for an exact entropy budget. Read the shared
|
|
17
21
|
[strategy, fixture and renderer reference](../../cratis-screenplay-command-surface/references/generated-values-and-responses.md)
|
|
18
|
-
for exact shapes and refusals. Time-ordered factories use
|
|
19
|
-
|
|
20
|
-
ID synthesis is promised.
|
|
22
|
+
for exact shapes and refusals. Time-ordered factories use receipt-time
|
|
23
|
+
`GenerationContext`.
|
|
24
|
+
Neither strict millisecond order nor `given clock` ID synthesis is promised.
|
|
25
|
+
Requires Stage 4.94.0 for receipt-time factories; older factories use wall clock.
|
|
26
|
+
Requires Stage 4.109.0 for v20 rule-bearing generated concepts; older renderers
|
|
27
|
+
refuse v20. It emits both New() and ConceptValidator; generated values failing
|
|
28
|
+
rules are server defects after authorization/input validation, never redraws.
|
|
29
|
+
Requires Stage 4.115.0 for all-Proven unpinned rendered specs; older renderers
|
|
30
|
+
require pins even when Proven. Any Unproven/Refuted rule still needs a pin (-038).
|
|
31
|
+
Invalid pins refuse STAGE-ESM-011; opaque/unsupported rules refuse -005 before
|
|
32
|
+
pin evaluation. Every severity is enforced at runtime.
|
|
33
|
+
Requires Stage 4.117.0 for warning/info-severity concept rules; older renderers refuse them with STAGE-ESM-038.
|
|
21
34
|
|
|
22
|
-
##
|
|
35
|
+
## When not to
|
|
23
36
|
|
|
24
37
|
Do not generate client-owned inputs, idempotency keys, gapless invoice numbers or
|
|
25
38
|
secrets. Generation is not authorization, projection readiness or external-effect
|
|
26
|
-
success.
|
|
27
|
-
|
|
28
|
-
|
|
39
|
+
success. Patterns are not gapless/sequential allocators or secrets; check digits
|
|
40
|
+
catch typos, not forgery. Short codes need uniqueness separate from whole-source
|
|
41
|
+
freshness. `generate rule` remains unsupported by Stage (STAGE-ESM-028), and
|
|
42
|
+
sequence is refused by Screenplay. Admitted command clock specs render. Stage
|
|
43
|
+
emits explicit whole-source scopes when the model serializes a strategy; models
|
|
44
|
+
with only implicit UUID stay Unguarded even at v20. This is not a general freshness
|
|
45
|
+
API. Unpinned rendered captures assert shape/range, rules and the fixed UTC date
|
|
46
|
+
for dated patterns; the independent executor still requires deterministic pins.
|
|
47
|
+
|
|
48
|
+
Requires Stage 4.95.0 for command clock specs; older renderers refuse them.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!-- Copyright (c) Cratis. All rights reserved. -->
|
|
2
|
+
<!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
|
|
3
|
+
|
|
4
|
+
# Managed publication and recovery
|
|
5
|
+
|
|
6
|
+
Ownership is the destination's `.cratis-render.json` manifest: semantic revision,
|
|
7
|
+
identity, path and SHA-256 per artifact, not in-file markers. Interrupted commits
|
|
8
|
+
are journaled in `.cratis-render/` (journal, staging, backups). Never stage that
|
|
9
|
+
control directory; commit the manifest with generated output.
|
|
10
|
+
|
|
11
|
+
- An unmanaged file at a planned path is refused, even with `--force`.
|
|
12
|
+
- A modified managed file is refused unless still active and `--force` is given.
|
|
13
|
+
Force replaces it, never overwrites unmanaged files and never deletes modified
|
|
14
|
+
stale files. Stale files are removed only when their bytes still match.
|
|
15
|
+
- Recovery precedes planning. `recovered: true` means stop and reconcile: the
|
|
16
|
+
publication receipt does not describe what recovery changed.
|
|
17
|
+
- An unchanged re-render writes nothing; `unchanged` equals the artifact count.
|
|
18
|
+
- Use exclusive destination access. A receipt is a filesystem result, not a Git
|
|
19
|
+
commit; rendering creates no branch, commit or PR.
|
|
20
|
+
- Probe drift with `cratis render ... --check` (exit 6 means pending changes).
|
|
21
|
+
Otherwise compare manifest `semanticRevision` for the same `--name` and inputs.
|
|
22
|
+
Do not compare MCP `modelRevision`: application identities can differ.
|
|
23
|
+
|
|
24
|
+
A modified managed file reports:
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
Managed artifact 'Program.cs' was modified by the user; pass --force to replace it.
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Find why it changed, move intent into the model or `Customizations/`, then
|
|
31
|
+
re-render. Use `--force` only to discard that edit deliberately.
|
|
@@ -61,6 +61,14 @@ launch failure, nonzero exit or invalid report is 502. The timeout defaults to 1
|
|
|
61
61
|
(1–600, including queue); specifications stay available after a later world-rebuild or
|
|
62
62
|
registration failure if the model was admitted.
|
|
63
63
|
|
|
64
|
+
### Semantic text rules versus the default syntax engine
|
|
65
|
+
|
|
66
|
+
The semantic Host/specification executor admits v24 literal `contains`, `not contains`,
|
|
67
|
+
`starts with` and `ends with` rules as ordinal UTF-16 comparisons; absence passes.
|
|
68
|
+
Empty operands pass contains/starts/ends and fail not-contains for present text.
|
|
69
|
+
The legacy EventModel default engine drops these rules: its list below is not evidence
|
|
70
|
+
of semantic support. Generated applications render these comparisons without regex.
|
|
71
|
+
|
|
64
72
|
### What the default engine enforces
|
|
65
73
|
|
|
66
74
|
When a command that declares at least one `produces` executes, the default engine
|
|
@@ -24,7 +24,10 @@
|
|
|
24
24
|
{ "kind": "skill-contains", "value": "`cratis run` has no `--engine` option", "file": "references/sandbox-and-specrunner.md" },
|
|
25
25
|
{ "kind": "skill-contains", "value": "the environment setting below", "file": "references/sandbox-and-specrunner.md" },
|
|
26
26
|
{ "kind": "skill-contains", "value": "fresh in-memory Chronicle log per specification", "file": "references/sandbox-and-specrunner.md" },
|
|
27
|
-
{ "kind": "skill-contains", "value": "
|
|
27
|
+
{ "kind": "skill-contains", "value": "exact ESM v1–v21 and v23–v25 pairs" },
|
|
28
|
+
{ "kind": "skill-contains", "value": "STAGE-ESM-044" },
|
|
29
|
+
{ "kind": "skill-contains", "value": "STAGE-IMPL-002" },
|
|
30
|
+
{ "kind": "skill-contains", "value": "all-Proven rules permit unpinned rendered", "file": "references/admission.md" },
|
|
28
31
|
{ "kind": "skill-contains", "value": "CLI-RENDER-004" },
|
|
29
32
|
{ "kind": "skill-contains", "value": "STAGE-ESM-024" },
|
|
30
33
|
{ "kind": "skill-contains", "value": "STAGE-ESM-026" },
|