@cratis/pi 7.20.0 → 7.22.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/rules/concepts.md +10 -2
- package/package/corpus/rules/vertical-slices.md +4 -2
- package/package/corpus/skills/cratis-fundamentals-concept/SKILL.md +58 -5
- package/package/corpus/skills/cratis-fundamentals-concept/verification.json +4 -1
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +19 -12
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/audit-format.md +4 -3
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/automation-patterns.md +13 -15
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/cases-to-specify.md +4 -4
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/effects-and-idempotency.md +21 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/provenance.md +4 -2
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/todo-list-example.md +7 -4
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/verification.json +4 -4
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +38 -36
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/complete-examples.md +1 -1
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/invocation-identity.md +84 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/refusals-and-redelivery.md +102 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/specifying-triggers-and-clock.md +4 -2
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/verification.json +1 -1
- package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +28 -16
- package/package/corpus/skills/cratis-screenplay-command-surface/references/context.md +9 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/generated-values-and-responses.md +15 -13
- package/package/corpus/skills/cratis-screenplay-command-surface/references/operations.md +80 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/policy-persona-seed.md +23 -1
- package/package/corpus/skills/cratis-screenplay-command-surface/verification.json +2 -2
- package/package/corpus/skills/cratis-screenplay-discovery/SKILL.md +9 -6
- package/package/corpus/skills/cratis-screenplay-discovery/references/storming-loop.md +6 -5
- package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +7 -5
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/nine-steps.md +6 -5
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +39 -49
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +5 -3
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generate-notes.md +48 -8
- package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +44 -42
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +46 -9
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +35 -11
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +118 -13
- package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +3 -3
- package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +11 -6
- package/package/corpus/skills/cratis-screenplay-model-review/references/anti-patterns.md +1 -1
- package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +11 -2
- package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +10 -0
- package/package/corpus/skills/cratis-screenplay-read-surface/references/guarded-actions.md +79 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +9 -7
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +6 -3
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/verification.json +2 -2
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +3 -2
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +13 -2
- package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +3 -2
- package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md +3 -2
- package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +40 -0
- package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +24 -16
- package/package/corpus/skills/cratis-screenplay-specifications/references/examples-and-routes.md +103 -0
- package/package/corpus/skills/cratis-screenplay-specifications/references/reactions-and-cascades.md +5 -6
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +4 -4
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-patterns.md +4 -2
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/verification.json +2 -2
- package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +34 -32
- package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet-example.md +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet.md +47 -2
- package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +57 -9
- package/package/corpus/skills/cratis-screenplay-toolchain/references/doc-contradictions.md +6 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +19 -10
- package/package/corpus/skills/cratis-screenplay-toolchain/references/provenance.md +4 -2
- package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +8 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/sources-and-streams.md +90 -27
- package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +10 -6
- package/package/corpus/skills/cratis-screenplay-toolchain/references/verdicts.md +29 -12
- package/package/corpus/skills/cratis-screenplay-toolchain/references/versions.md +91 -136
- package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +7 -5
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/screen-composition-contract.md +20 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +9 -5
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +8 -1
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +2 -2
- package/package.json +1 -1
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
- Tool groups
|
|
9
9
|
- Diagnostic repairs and refactorings
|
|
10
10
|
- Syntax-only constructs through the MCP
|
|
11
|
+
- Evidence-pinned production repairs
|
|
12
|
+
- Scoped diagnostics and completeness
|
|
13
|
+
- Dependencies and intent inventories
|
|
14
|
+
- Semantic revision comparison
|
|
11
15
|
- Source map and appended-event fixtures
|
|
12
16
|
- Revision and ownership rules
|
|
13
17
|
- Refusals are useful information
|
|
@@ -27,16 +31,17 @@ report unsupported adapters or drift.
|
|
|
27
31
|
|
|
28
32
|
## Tool groups
|
|
29
33
|
|
|
30
|
-
`
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
After `initialize` and `notifications/initialized`, discover current tools and
|
|
35
|
+
argument schemas with `tools/list`; do not hard-code counts or infer arguments
|
|
36
|
+
from these short descriptions. The additions below follow Screenplay v4.125.0's
|
|
37
|
+
`Documentation/screenplay/mcp/reference.md`.
|
|
33
38
|
The connection procedure, edit routes, identity state and failure handling are in
|
|
34
39
|
the [MCP loop](mcp-loop.md).
|
|
35
40
|
|
|
36
41
|
| Group | Tools | Intent |
|
|
37
42
|
| --- | --- | --- |
|
|
38
43
|
| Understanding | `describe-application`, `search-declarations`, `find-declaration`, `declaration-details` | Navigate logical hierarchy and inspect bounded details |
|
|
39
|
-
| References and examples | `find-references`, `dependencies`, `find-fixtures`, `find-assertion-gaps` | Inspect declared relationships and authored examples, not executed coverage |
|
|
44
|
+
| References and examples | `find-references`, `dependencies`, `dependency-graph`, `find-fixtures`, `find-assertion-gaps`, `semantic-diff` | Inspect declared relationships and authored examples, not executed coverage |
|
|
40
45
|
| Source and validation | `diagnostics`, `read-document`, `merged-document`, `syntax-schema` | Read exact source or typed structure and diagnose problems |
|
|
41
46
|
| Workspace inspection | `open-workspace`, `read-workspace`, `read-ast`, `workspace-state`, `export-workspace`, `repair-capabilities` | Obtain current identities, handles, readiness, code attachment requirements, source-map locations, durable-state status and the repair catalog |
|
|
42
47
|
| Visual (MCP-Apps hosts only) | `visualize-model` | Draw the board for the model or a `proposalId`; its `sketch` argument previews a what-if of whole documents. Reads only |
|
|
@@ -58,10 +63,11 @@ with `view: "diagnostics"`, then `view: "repairs"` at the current revision.
|
|
|
58
63
|
| Code | Offered repair and boundary |
|
|
59
64
|
| --- | --- |
|
|
60
65
|
| `PLAY0166` | Declare a missing command-produced event in its slice. Infer known command-path types (retaining concepts) or `$context.occurred` as `DateTime`; refuse uncertain/conflicting shapes, imports, existing declarations, cross-file producers and parser-invalid workspaces. |
|
|
61
|
-
| `PLAY0478` | Add `for <identifier>` to a plain production. Both models must be executable; refuse a version change or retargeting another production.
|
|
66
|
+
| `PLAY0478` | Add `for <identifier>` to a plain production. Both models must be executable; refuse a version change or retargeting another production. This changes routing: accept only if the identifier, not allocation, is intended; `canFixAll: false`. |
|
|
62
67
|
| `PLAY0471` | Remove a redundant event id only with unchanged executable model, catalog and comments. |
|
|
63
68
|
| `PLAY0469` | Remove an inline same-source identifier property and mapping, retiring its semantic address. This changes the contract; `canFixAll` is false. Refuse other consumers, opaque impact, changed routing or comment loss. Plain contracts get guidance only. |
|
|
64
69
|
| `PLAY0479` | Migrate one optional type spelling, or all in a document, preserving syntax and trivia. Exclude `query Q => observable?`. |
|
|
70
|
+
| `PLAY0516` | Move a producing sibling declaration/import before its consumer, or pin an already placed file before a retained glob. Preserve catalogs, comments, placement and executable readiness; introduce no timeline findings. Own-sub-feature edges, cycles, unranked members and mixed/different-parent boundaries have no repair. Rediscover after each move; pinned evidence is unsupported. |
|
|
65
71
|
|
|
66
72
|
These discoveries verify acceptance before listing a repair. Only compact
|
|
67
73
|
acceptance/conflict verdicts are cached on the immutable snapshot, not diagnostics,
|
|
@@ -98,22 +104,37 @@ pin, but retains a pin for a different earlier name. Contradictory generation pi
|
|
|
98
104
|
refuse the rename. Do not promise a generation-2 payload-removal repair or a
|
|
99
105
|
`PLAY0470` repair: neither is available.
|
|
100
106
|
|
|
101
|
-
VS Code and Monaco provide local optionality
|
|
102
|
-
|
|
107
|
+
VS Code and Monaco provide local PLAY0479 optionality and PLAY0471 redundant-id
|
|
108
|
+
fixes without .NET. PLAY0471 removes the whole id line; a trailing comment blocks
|
|
109
|
+
it. VS Code also has an experimental opt-in trusted C# bridge for PLAY0166/PLAY0478:
|
|
110
|
+
configure the executable/root in User settings, preview source and identity changes,
|
|
111
|
+
then explicitly confirm Apply. Dirty/untitled buffers and evidence drift refuse;
|
|
112
|
+
uncertain Apply outcomes are never retried. Restricted Mode cannot launch it.
|
|
113
|
+
Monaco has no production-repair host bridge. See v4.125.0 `vscode.md`.
|
|
103
114
|
|
|
104
115
|
## Syntax-only constructs through the MCP
|
|
105
116
|
|
|
106
|
-
|
|
107
|
-
|
|
117
|
+
The 4.66.0/4.68.0 negative probes below are historical. At 4.125.0,
|
|
118
|
+
sources/streams and command/specification routes bind as ESM v8 and have
|
|
119
|
+
catalog identities; `executionAvailable` still requires whole-workspace binding.
|
|
120
|
+
Source/stream `propose-rename` repairs bound route references. Operations and
|
|
121
|
+
exact numeric mode remain unadmitted. Check installed schemas, especially when
|
|
122
|
+
the CLI bundle predates the standalone tool.
|
|
123
|
+
|
|
124
|
+
Systems/operations remain authoring-only (PLAY0268). Sources/streams and their
|
|
125
|
+
routes are admitted v8, not syntax-only; see toolchain `references/sources-and-streams.md`.
|
|
108
126
|
`generated` properties and `returns` responses are admitted as ESM v7 by Screenplay 4.68.0 and bind
|
|
109
127
|
there (`PLAY0268` on the 4.66.0 in the cratis 3.28.x bundle). The server reads and edits them: `declaration-details` exposes `isGenerated`
|
|
110
128
|
and a command `response` view, `route` and `streams` views; `read-workspace` offers
|
|
111
129
|
the views `event-sources`, `event-streams`, `event-source-details`,
|
|
112
130
|
`event-stream-details`, `command-routes` and `event-source-diagnostics` (detail
|
|
113
|
-
views need the exact `authoringKey` from the inventory).
|
|
114
|
-
|
|
115
|
-
through typed `propose-ast`;
|
|
116
|
-
|
|
131
|
+
views need the exact `authoringKey` from the inventory). Executable availability
|
|
132
|
+
requires successful whole-workspace binding, not just an inventoried source node.
|
|
133
|
+
Discover `syntax-schema` and edit through typed `propose-ast`; source/stream rename
|
|
134
|
+
can repair proven route references on the current compiler. At 4.125.0, inline-event extraction
|
|
135
|
+
admits response-bearing commands when it proves byte-identical canonical ESM,
|
|
136
|
+
unchanged catalog assignments and exact comment preservation; responses are not
|
|
137
|
+
an automatic refusal.
|
|
117
138
|
|
|
118
139
|
For `generated`/`returns` on 4.68.0 (`mcp/reference.md` at `v4.68.0`): `propose-ast` accepts
|
|
119
140
|
`validation: "Executable"` for the admitted subset (use `"Authoring"` for full-language syntax); a
|
|
@@ -123,6 +144,85 @@ unadmitted feature. Null readiness does not prove the whole application binds or
|
|
|
123
144
|
fixture exists. Canonical `executable-model` pages include `generated`, `response`, `generatedValues`
|
|
124
145
|
and `thenReturns` when present. Form response scopes and a renderer response type remain downstream work.
|
|
125
146
|
|
|
147
|
+
## Evidence-pinned production repairs
|
|
148
|
+
|
|
149
|
+
For PLAY0166/PLAY0478, read `repair-capabilities` before opting in. Read workspace
|
|
150
|
+
`diagnostics` and `repairs`, retain their `repairEvidenceRevision`, and send
|
|
151
|
+
`pinRepairEvidence: true` with `expectedRepairEvidenceRevision` on `propose-repair`,
|
|
152
|
+
alongside workspace/catalog revisions, subject and formatting. Both evidence fields
|
|
153
|
+
are required together. The proposal retains `repairEvidence.beforeRevision` and
|
|
154
|
+
`candidateRevision`; preview every document and identity-state change. Echo the
|
|
155
|
+
before revision on `read-proposal`/`apply` if supplied; the retained pin is enforced
|
|
156
|
+
even when omitted there.
|
|
157
|
+
|
|
158
|
+
Evidence covers authoritative base/candidate attachment text and load/refusal
|
|
159
|
+
states, including missing files, not unreferenced files or implementation locks.
|
|
160
|
+
Changed inputs or loading diagnostics return `RepairEvidenceDrift`, not refreshed
|
|
161
|
+
readiness. Attachment inputs overlapping source/state/recovery writes return
|
|
162
|
+
`RepairEvidenceWriteConflict`; uncertain aliases fail closed. Never bypass these
|
|
163
|
+
refusals with text edits. A pin is a reviewed snapshot, not a crash-atomic write.
|
|
164
|
+
|
|
165
|
+
## Scoped diagnostics and completeness
|
|
166
|
+
|
|
167
|
+
`diagnostics` accepts an exact case-sensitive module/feature/slice `scope` and
|
|
168
|
+
optional `checks` (comma-separated names/codes or `all`). Unknown/ambiguous scopes
|
|
169
|
+
or check names refuse. Whole-application compilation still resolves references;
|
|
170
|
+
selection includes descendants and direct dependents, not transitive impact.
|
|
171
|
+
`success`/severity counts describe the selected set before document filtering and
|
|
172
|
+
paging; `wholeApplicationSuccess` retains the full verdict. Check `affectedScopes`
|
|
173
|
+
and coverage rather than claiming full application validity from a scoped page.
|
|
174
|
+
|
|
175
|
+
The six core structural families are `data-bindings`, `input-surfaces`,
|
|
176
|
+
`field-origins`, `query-keys`, `event-consumers`, `navigation` (PLAY0530–PLAY0537).
|
|
177
|
+
The current nine-family catalog also includes `personas`, `purposes` and
|
|
178
|
+
`privilege` (PLAY0652); discover names/codes from released `CompletenessChecks.cs`.
|
|
179
|
+
They opt into findings, not execution proof. Whole-source errors skip them; report
|
|
180
|
+
`completenessStatus` as skipped, never passed. `completenessCoverage` states their
|
|
181
|
+
limits. Continue with `expectedSourceRevision`.
|
|
182
|
+
|
|
183
|
+
## Dependencies and intent inventories
|
|
184
|
+
|
|
185
|
+
`dependency-graph` edges point consumer → producer. Views: `edges`, `cycles`,
|
|
186
|
+
`order`, `unresolved`, `declarations`; `from`/`to` select slice/feature/module
|
|
187
|
+
aggregation (`to` also accepts context). `scope`, `direction`, `kinds` and
|
|
188
|
+
`includeTestOnly` filter inferred views. Test-only `verifiedWith` edges are excluded
|
|
189
|
+
by default. Other kinds: `usesFactsFrom`, `reactsTo`, `decidesFrom`, `asks`, `shows`,
|
|
190
|
+
`outsideTheModel`. Code, expressions and property paths are not inferred.
|
|
191
|
+
|
|
192
|
+
`declarations` checks each opted-in container's own `depends on` inventory,
|
|
193
|
+
including descendant consumers. Rows retain declared/provisional/undeclared
|
|
194
|
+
coverage and declaration status used/provisional/unused/invalid. Ambiguous owners
|
|
195
|
+
are always provisional, never undeclared proof. Kind/direction/level filters do
|
|
196
|
+
not narrow this check. `evidenceLimit` (0–20, default 3) limits evidence, not counts
|
|
197
|
+
or checking. Pages default to 50, maximum 200; pin `expectedSourceRevision` on
|
|
198
|
+
continuation. Failed compilation may leave a partial graph.
|
|
199
|
+
|
|
200
|
+
Cycles and suggested order use only `usesFactsFrom`, `reactsTo`, `decidesFrom`.
|
|
201
|
+
Mixed-level cycles return no groups. Order puts producers first after removing
|
|
202
|
+
internal cycle edges, with authored ties and cycle-member order retained. It is
|
|
203
|
+
advisory, never an edit or runtime order. MCP App and VS Code boards can toggle to
|
|
204
|
+
a dependency map, with story-shaping edges by default and filters for other kinds;
|
|
205
|
+
select an edge to inspect slice pairs and reference evidence (VS Code opens source).
|
|
206
|
+
|
|
207
|
+
Workspace views `named-rule-intents`/`named-rule-intent-details` cover CommandNamedRule
|
|
208
|
+
only, including pending hints without a requirement ID. Details select either
|
|
209
|
+
`subject` or attached `requirementId`, not both. `handler-intents` and
|
|
210
|
+
`handler-intent-details` cover CommandHandler only; handler details select
|
|
211
|
+
`requirementId`. All page ordered hints, not implementation correctness. Continue
|
|
212
|
+
with `expectedRevision` and `expectedCatalogRevision`; provisional owner IDs are
|
|
213
|
+
not authoritative. Edit hints through reviewed `propose-ast`.
|
|
214
|
+
|
|
215
|
+
## Semantic revision comparison
|
|
216
|
+
|
|
217
|
+
`semantic-diff` takes `beforeWorkspaceJson` and `afterWorkspaceJson`: decoded,
|
|
218
|
+
reassembled canonical `export-workspace` JSON, not Git refs or raw source. Exports
|
|
219
|
+
must share the application identity and authoritative catalogs; the tool never
|
|
220
|
+
guesses rename continuity. Invalid exports return `UnreadableRevision`, different
|
|
221
|
+
applications `IncompatibleRevisions`. It does not open/replace the active workspace
|
|
222
|
+
or write state. Inspect incomplete sections and exclusions: structure comparison
|
|
223
|
+
is not executed behavior. Echo the ordered-pair `sourceRevision` on continuation.
|
|
224
|
+
Use `read-proposal` `view: "semantic-diff"` for an uninstalled proposal instead.
|
|
225
|
+
|
|
126
226
|
## Source map and appended-event fixtures
|
|
127
227
|
|
|
128
228
|
`read-workspace` `view: "source-map"` pages the compiler's semantic entries (ordered
|
|
@@ -132,6 +232,11 @@ span. Compilation must have succeeded for entries to exist (`available`).
|
|
|
132
232
|
`whenAppendedEventDestination` and `thenEvent` (and others for commands and
|
|
133
233
|
queries): a `when append` payload is labeled `whenAppendedEvent`, not `thenEvent`,
|
|
134
234
|
in `declaration-details`, `find-fixtures`, references and dependencies.
|
|
235
|
+
Event roles also have `…Stream`, `…StreamId` and `…NoStream` rows (`property`
|
|
236
|
+
respectively `stream`, `streamId`, `no stream`). Effective fixture values expose
|
|
237
|
+
`origin` (authored/example/override), example name and replaced value where present.
|
|
238
|
+
A whole-route replacement records `overriddenValue` once on its stream/no-stream
|
|
239
|
+
row; route parts retain their individual lineage. These are source facts, not execution.
|
|
135
240
|
|
|
136
241
|
## Revision and ownership rules
|
|
137
242
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"assertions": [
|
|
6
6
|
{
|
|
7
7
|
"kind": "skill-contains",
|
|
8
|
-
"value": "
|
|
8
|
+
"value": "Screenplay v4.125.0"
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
"kind": "skill-contains",
|
|
@@ -105,11 +105,11 @@
|
|
|
105
105
|
},
|
|
106
106
|
{
|
|
107
107
|
"kind": "skill-contains",
|
|
108
|
-
"value": "
|
|
108
|
+
"value": "registered Git worktree"
|
|
109
109
|
},
|
|
110
110
|
{
|
|
111
111
|
"kind": "skill-contains",
|
|
112
|
-
"value": "
|
|
112
|
+
"value": "schemas rather than relying on a remembered count"
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
"kind": "skill-contains",
|
|
@@ -62,7 +62,11 @@ model's behalf.
|
|
|
62
62
|
`read-workspace view=executable-diagnostics` when the mode needs them; `describe-application
|
|
63
63
|
view=summary`, `find-assertion-gaps` (slices with no assertion; authored, not executed) and
|
|
64
64
|
`dependencies direction=incoming` for orphans. The verdict lines are independent: a V1 pass is
|
|
65
|
-
necessary, never sufficient.
|
|
65
|
+
necessary, never sufficient. Opt into completeness with `--check` or MCP
|
|
66
|
+
`checks` for bindings, input surfaces, field origins, query keys, event consumers
|
|
67
|
+
and navigation; whole-source errors skip these checks. Record selected families,
|
|
68
|
+
skipped status and coverage limits, never a vacuous pass. Any line without
|
|
69
|
+
evidence is "not run: reason".
|
|
66
70
|
3. **Element sweep** (phase 1, mechanical, before any judgement). One line per gated element, event,
|
|
67
71
|
name, command, event property and slice; `references/checklist.md` S1-S7 gives each line's
|
|
68
72
|
format. Each `NONE` and each form name is its own finding naming that element. A repeated
|
|
@@ -164,11 +168,12 @@ labelled as such. The user decides whether it is enough (the user is sufficient
|
|
|
164
168
|
never blocked as a matter of authority.
|
|
165
169
|
|
|
166
170
|
## Rules
|
|
167
|
-
- Compiler contracts (defects when the mode needs them): V1 must pass with warnings
|
|
168
|
-
PLAY0029 means a construct was silently dropped.
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
171
|
+
- Compiler contracts (defects when the mode needs them): V1 must pass with warnings
|
|
172
|
+
as errors; PLAY0029 means a construct was silently dropped. Current source checks
|
|
173
|
+
warn on missing projection targets (PLAY0514) and removal/capture events
|
|
174
|
+
(PLAY0166). Opt-in field-origin warnings (PLAY0534) do not replace a manual
|
|
175
|
+
lineage walk when coverage is unknown. PLAY0516/0517 are presentation-only
|
|
176
|
+
information, not broken execution or a reason to fail warnings-as-errors.
|
|
172
177
|
- Modeling defaults (deviation needs a recorded reason, otherwise a finding): one business
|
|
173
178
|
decision, one event by default; one view per screen component; one command per `StateChange`
|
|
174
179
|
(renderable: required); facts carry decided or supplied data and running figures belong in
|
|
@@ -62,7 +62,7 @@ the problem, the checks it violates, the fix, all pinned to one declaration.
|
|
|
62
62
|
| Missing `for` | an event production (`produces <Event>` or `produces event`) without `for`. Not operation productions: they are authorable design intent, belong to commands, and take no event `for`, tags or routing | runtimes disagree on the destination | C (executable) / D | `for <identifier>` |
|
|
63
63
|
| Unbuilt read-model field | field no projection maps and AutoMap cannot fill | always empty; not reported by the compiler | D | map it or remove it |
|
|
64
64
|
| Undeclared removal/append event | `remove with` or capture `append` names an undeclared event | passes V1, fails binding (V2/V3, PLAY0273) | C (executable) / D | declare or fix the name; run V3 |
|
|
65
|
-
| Gated command invoked by a reaction | reaction `invokes` a command under a caller policy |
|
|
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; CLI 3.41.0 cannot render it yet, so 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
67
|
| `reads` treated as protection | rule "checked" because the command or reaction `reads` a view | `reads` enforces nothing | D (major) | keep or introduce `reads <View>` + `require ... message` as stated intent, mark it NOT enforced in the slice `description`, name the target (`[ProtectedDecision]` + `DecisionRead<T>`, Chronicle DCB, or a constraint where it fits); checklist E3 |
|
|
68
68
|
| Caller-supplied state rule | `require currentStatus == "open"` where the caller sends `currentStatus` | the caller decides its own permission | D (major) | read the stored state with `reads`; keep or introduce `reads <View>` + `require ... message` as stated intent, mark it NOT enforced in the slice `description`, name the target (`[ProtectedDecision]` + `DecisionRead<T>`, Chronicle DCB, or a constraint where it fits); checklist E3 |
|
|
@@ -74,7 +74,7 @@ the format in `worked-example.md`.
|
|
|
74
74
|
|
|
75
75
|
| Id | Check | Evidence | Tier |
|
|
76
76
|
|---|---|---|---|
|
|
77
|
-
| A1 | Every read-model field maps from an event field, `$eventSourceId`, `$eventContext`, a literal, or a documented derivation (`count`, `add ... by`) | projection blocks; AutoMap name matches (on by default) | D (
|
|
77
|
+
| A1 | Every read-model field maps from an event field, `$eventSourceId`, `$eventContext`, a literal, or a documented derivation (`count`, `add ... by`) | projection blocks; AutoMap name matches (on by default) | D (opt-in PLAY0534 detects known missing origins; unknown coverage still needs a walk. Absent mapping targets warn at V1 with PLAY0514, tier C for source validity) |
|
|
78
78
|
| A2 | Every event field comes from a command input, `$context` value, literal, capture field or reaction mapping | `produces` mappings, capture `map`, reaction `invokes` | C for undeclared names (warning), D for meaning |
|
|
79
79
|
| A3 | Every command input is supplied by someone: screen form field, reaction mapping, capture, or a caller who knows it | screens, forms, reactions | D |
|
|
80
80
|
| A4 | Every command input ends in an event field or is used by a rule | `produces`, `validate`, `require` | Q (an unused input is often a missed fact) |
|
|
@@ -100,7 +100,7 @@ the format in `worked-example.md`.
|
|
|
100
100
|
| C2 | A fact, not a request, a running calculation, a UI action or a technical step | names and payloads | D |
|
|
101
101
|
| C3 | No speculative or pending events ("MayBe...", "...Pending") where a decision is meant | names | Q |
|
|
102
102
|
| C4 | No nullable or optional event property by default: a required value, or a separate event for the second situation (CHR0012; a `null` in a specification value is PLAY0350); a kept `optional` has its reason in the `description` | `optional` members | D |
|
|
103
|
-
| C5 | Sensitive members marked (`@pii`/`@sensitive`) and not mixed across data subjects; operational secrets are `@sensitive`, not `@pii`; no `@pii` or `@sensitive` on the event-source id (no such identifier concept; use a surrogate id; Chronicle CHR0034 and CHR0052, and Screenplay PLAY0515 from 4.69.1 for `@pii` and 4.84.1 for `@sensitive`, only on tools at those versions -
|
|
103
|
+
| C5 | Sensitive members marked (`@pii`/`@sensitive`) and not mixed across data subjects; operational secrets are `@sensitive`, not `@pii`; no `@pii` or `@sensitive` on the event-source id (no such identifier concept; use a surrogate id; Chronicle CHR0034 and CHR0052, and Screenplay PLAY0515 from 4.69.1 for `@pii` and 4.84.1 for `@sensitive`, only on tools at those versions - current pins report it as a source error, including typed destinations and route-id parts); one data subject per event or stream | concepts and members | D; removal to pass tools = critical |
|
|
104
104
|
| C6 | No secret or bearer values as facts (tokens, magic links, signed URLs): record a keyed hash or a reference | event payloads | D |
|
|
105
105
|
| C7 | No two events of one kind of event source mean the same thing (a shared property set is a signal, not a defect: distinct facts may share a shape and historical generations are exempt; major only when meaning is lost, a rule bypassed or consumers ambiguous); one fact is not recorded twice (aggregate event plus per-item fan-out) | event declarations side by side | D |
|
|
106
106
|
| C8 | Corrections are new facts that name what they correct; redaction and crypto-erasure are compliance tools, not corrections | event names | D |
|
|
@@ -131,6 +131,15 @@ the format in `worked-example.md`.
|
|
|
131
131
|
| E9 | A decided refusal is a `then error` or `then denied` specification (permanent behavior), never a lingering open question; only a genuinely unanswered question counts as open, and resolving it means answering it | specs, `STATE.md` questions, descriptions | D |
|
|
132
132
|
|
|
133
133
|
## Phase 8. Flow and lifecycle (13 checks, F1-F13)
|
|
134
|
+
|
|
135
|
+
Review PLAY0516 backward-flow and PLAY0517 sibling-cycle findings as
|
|
136
|
+
**presentation-only** information: they do not fail `--warnaserror`, change
|
|
137
|
+
execution or prove a business deadlock. An ordering root is required; without
|
|
138
|
+
one the folder check is skipped. A real F6 defect needs a named domain
|
|
139
|
+
consequence, not just the diagram's cycle. Suggested graph order and safe
|
|
140
|
+
PLAY0516 moves preserve executable bytes/identities. Source: Screenplay
|
|
141
|
+
`v4.125.0:Documentation/screenplay/imports.md`, `diagnostics.md`.
|
|
142
|
+
|
|
134
143
|
| Id | Check | Evidence | Tier |
|
|
135
144
|
|---|---|---|---|
|
|
136
145
|
| F1 | Each entity has a first fact, a state-transition table (including refused transitions) and terminal states | slices, constraints, `description` | D |
|
|
@@ -231,6 +231,16 @@ block or a named `behavior` attached with `uses`. See
|
|
|
231
231
|
`cratis-screenplay-ui-composition`. Screens and interactions are deferred from the
|
|
232
232
|
executable model (information `PLAY0269`); they never block binding.
|
|
233
233
|
|
|
234
|
+
## Guarded screen actions
|
|
235
|
+
|
|
236
|
+
One labeled user decision can choose among commands using ordered
|
|
237
|
+
`when item.<path> ... execute <Command>` alternatives, with optional last
|
|
238
|
+
`otherwise execute` or `otherwise hidden`. First match wins; no item or no match
|
|
239
|
+
without an execute fallback hides it. Inputs use typed `with ... from ...`
|
|
240
|
+
bindings; the selected command still enforces its own gate/rules/constraints.
|
|
241
|
+
Read [guarded actions](references/guarded-actions.md) for the checked model,
|
|
242
|
+
missing-versus-null behavior and source-versus-renderer boundary.
|
|
243
|
+
|
|
234
244
|
## How a bare name resolves
|
|
235
245
|
|
|
236
246
|
**Inside out:** the slice, then the enclosing feature, then the module, then the
|
|
@@ -0,0 +1,79 @@
|
|
|
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
|
+
# Guarded screen actions
|
|
5
|
+
|
|
6
|
+
## Contents
|
|
7
|
+
|
|
8
|
+
- State one user decision
|
|
9
|
+
- Select and bind
|
|
10
|
+
- Guard boundaries
|
|
11
|
+
|
|
12
|
+
## State one user decision
|
|
13
|
+
|
|
14
|
+
A label-headed `action "<text>"` (or `$strings.<key>`) can choose a command
|
|
15
|
+
from the displayed item's state. The label replaces a plain action's `label`
|
|
16
|
+
child. This complete model compiled without warnings on Screenplay 4.125.0;
|
|
17
|
+
it is authoring evidence, not a rendered interaction test:
|
|
18
|
+
|
|
19
|
+
```screenplay
|
|
20
|
+
module Tasks
|
|
21
|
+
feature Work
|
|
22
|
+
slice StateChange CloseTask
|
|
23
|
+
command CloseTask
|
|
24
|
+
taskId String identifier
|
|
25
|
+
produces event TaskClosed
|
|
26
|
+
slice StateView Details
|
|
27
|
+
readmodel TaskDetails
|
|
28
|
+
taskId String
|
|
29
|
+
status String
|
|
30
|
+
query TaskById => TaskDetails optional
|
|
31
|
+
by taskId String
|
|
32
|
+
screen Details
|
|
33
|
+
data TaskDetails via query TaskById by taskId
|
|
34
|
+
action "Close"
|
|
35
|
+
when item.status == "open" execute CloseTask
|
|
36
|
+
with taskId from item.taskId
|
|
37
|
+
otherwise hidden
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Select and bind
|
|
41
|
+
|
|
42
|
+
`item` is the nearest container's data item, or selected element for collection
|
|
43
|
+
data. Sibling data in the action's container takes precedence over outer data
|
|
44
|
+
regardless of text order; ambiguous/missing data warns rather than guessing.
|
|
45
|
+
Without an item (loading/no selection), always hide the action, even if it has an
|
|
46
|
+
execute fallback.
|
|
47
|
+
|
|
48
|
+
Check alternatives in authored order whenever data changes; **first match wins**.
|
|
49
|
+
At least one when is required. Last optional `otherwise execute <Command>` is
|
|
50
|
+
a fallback; `otherwise hidden` or omission hides unmatched actions. Intentional
|
|
51
|
+
overlap is valid; only provable shadowing warns. Inputs resolve from explicit
|
|
52
|
+
`with <property> from <binding>`, matching subject fields, declared command form,
|
|
53
|
+
then renderer input. Terminal collection fields may fill collection inputs;
|
|
54
|
+
traversing through a collection is not supported.
|
|
55
|
+
|
|
56
|
+
A single `navigate to` runs after the chosen command succeeds, not to open that
|
|
57
|
+
command's input screen. Open a form/dialog first when it needs separate input.
|
|
58
|
+
A click runs the choice shown; if a click-time check changes it, refresh instead
|
|
59
|
+
of executing the newly selected command.
|
|
60
|
+
|
|
61
|
+
## Guard boundaries
|
|
62
|
+
|
|
63
|
+
Conditions compare item paths to literals, not other paths, route/screen state,
|
|
64
|
+
`$context` or `$env`. Equality/inequality, numeric ordering, string contains/starts
|
|
65
|
+
with and grouped and/or are supported; and binds tighter than or. Collections
|
|
66
|
+
cannot be condition operands. Missing/null fields compare false, including !=
|
|
67
|
+
to a non-null literal; == null matches an explicit null, not a missing member.
|
|
68
|
+
Type mismatches compare false. Editors validate syntax/shape, not runtime choices.
|
|
69
|
+
|
|
70
|
+
The guard controls an offer, never server permission. The selected command still
|
|
71
|
+
runs authorization, validation and constraints; denial never falls through to a
|
|
72
|
+
second command. Screens remain outside portable ESM execution. A downstream
|
|
73
|
+
renderer must explicitly admit guarded selection or report unsupported behavior,
|
|
74
|
+
not approximate it as a plain action. CLI 3.41.0's bundled screen renderer reports
|
|
75
|
+
unsupported guarded actions with STAGE-SCENE-ACTION-001; source compilation alone
|
|
76
|
+
cannot establish usable controls.
|
|
77
|
+
|
|
78
|
+
Authority: Screenplay `v4.125.0:Documentation/screenplay/screens.md`;
|
|
79
|
+
CLI `v3.41.0:Documentation/reference/screenplay.md` for renderer disposition.
|
|
@@ -25,9 +25,9 @@ Version pins live once in `cratis-screenplay-toolchain` `references/versions.md`
|
|
|
25
25
|
|
|
26
26
|
| Source | Pin | Used for |
|
|
27
27
|
| --- | --- | --- |
|
|
28
|
-
| cratis CLI | `3.
|
|
29
|
-
| Stage | `4.51.
|
|
30
|
-
| Screenplay | bundled `4.114.0`;
|
|
28
|
+
| cratis CLI | `3.41.0` (`v3.41.0`) | `cratis render` options, exit codes, publication receipt, UI-profile rejection (`CLI-RENDER-007` to `CLI-RENDER-010`); tag pins Stage 4.51.3, Screenplay 4.114.0 and `Cratis.Arc.Screenplay` 22.54.0, with `cratis/stage:4.51.3` as the runtime image. UI-profile rejection and render-then-recover shipped in 3.41.0 (Cratis/cli#301). The screens release vector was verified on 3.40.7 (`af9f18e`) with `cratis/stage:4.51.1`. Reading baselines: 3.40.3, 3.39.0 and 3.28.3 (`8b43fef`) |
|
|
29
|
+
| Stage | `4.51.3` (CLI 3.41.0 default) | admission (`STAGE-ESM-*`, and `PLAY0268` render refusals surfaced by the CLI), ownership manifest, `Customizations/` seams, Debug-only specifications, fail-closed guarded actions (`STAGE-SCENE-ACTION-001`) and interactions (`STAGE-SCENE-INTERACTION-001`). Older baselines: 4.49.5, 4.43.0 and `v4.24.2` (`32dcac4`) |
|
|
30
|
+
| Screenplay | bundled `4.114.0`; standalone `4.125.0` | standalone compiler for V1 to V3; binding codes `PLAY0268` and the code-attachment rules, read at `v4.66.0`; claims made through `cratis` are 4.114.0 claims |
|
|
31
31
|
| Rendered apps | Arc `22.25.0`, Chronicle `19.8.1`, Scene packages | `[ProtectedDecision]` (Arc 22.39.0 and later) is not available in code written into one; verify the generated package set before claiming exact Scene 4.14.0 runtime parity |
|
|
32
32
|
|
|
33
33
|
Facts were read at those tags and `cratis render` was run at 3.28.2 and 3.28.3 for the worked example
|
|
@@ -68,13 +68,15 @@ assume an answer to 4, and record it as `blocked` for the user.
|
|
|
68
68
|
Evolved events (a model that selects ESM v4) are gap-fill too: Stage 4.24.2 admits the v4 model but refuses any evolved event and its dependent scope with `STAGE-ESM-026`, because it cannot render Chronicle event-type migrations yet (Stage#204). Events at their initial revision still render. Hand-write the evolved events and their migrations per `cratis-chronicle-event-type-migration`, with the model as the contract. The cratis CLI bundles Stage 4.24.2 since 3.28.3 and reports an evolved event with `STAGE-ESM-026` (probed); 3.28.2 bundled Stage 4.24.1 (3.28.1 and earlier: 4.24.0) and refused a v4 model with `STAGE-ESM-016`.
|
|
69
69
|
|
|
70
70
|
Generated command values and `returns` responses (ESM v7) bind and run in the reference runner on standalone
|
|
71
|
-
Screenplay 4.68.0 but are not rendered:
|
|
72
|
-
|
|
71
|
+
Screenplay 4.68.0 and later but are not rendered: CLI 3.41.0 admits ESM v7 to Stage planning, and Stage 4.51.3
|
|
72
|
+
refuses generated values and responses with `STAGE-ESM-028`/`STAGE-ESM-029` (`cratis-screenplay-toolchain`
|
|
73
|
+
`references/versions.md`). A command that uses them is case A or C: keep
|
|
73
74
|
the model, hand-write the command and its response with the model (and its fixtures and `then returns`
|
|
74
75
|
specifications) as the contract, and report V3 from the standalone tool and V5 as `not run: no render`.
|
|
75
76
|
|
|
76
|
-
Models with event sources, streams or command routes
|
|
77
|
-
|
|
77
|
+
Models with event sources, streams or command routes bind and reference-execute as ESM v8 on standalone
|
|
78
|
+
Screenplay 4.125.0, so report V3 and V4 from that tool. They are still case A or C for rendering: CLI 3.41.0
|
|
79
|
+
refuses models above ESM v7 with `CLI-RENDER-004`, so hand-write the code with the model as the
|
|
78
80
|
contract (`cratis-screenplay-toolchain` `references/sources-and-streams.md`).
|
|
79
81
|
|
|
80
82
|
Two rules hold in every case: a customization never makes a rejected model renderable, and
|
package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md
CHANGED
|
@@ -75,9 +75,12 @@ gap-fill): the registration goes through the seams in `Customizations/Program.cs
|
|
|
75
75
|
not bind a modeled reaction or capture. Case C (no generated application): there is no generated
|
|
76
76
|
`Program.cs` or partial hook, so the registration follows the hand-written application's own
|
|
77
77
|
composition conventions (`rules/vertical-slices.md`, `cratis-chronicle-reactor`).
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
Declare the trusted actor with reaction `runs as system role "<Role>"`
|
|
79
|
+
(standalone 4.125.0, ESM v10); `given caller` is not an invocation actor.
|
|
80
|
+
CLI 3.41.0's older compiler rejects the syntax, and Stage 4.51.3's planner admits
|
|
81
|
+
through v7 only. Gap-fill retains the declared role and uses Arc
|
|
82
|
+
`[ExecuteCommandsAsSystem]` for returned commands. Checked model and diagnostics:
|
|
83
|
+
captures-and-reactions `references/invocation-identity.md`.
|
|
81
84
|
|
|
82
85
|
## Re-delivery
|
|
83
86
|
The work list is the full in-scope contract delta since the ledger's last verified source
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
"kind": "skill-contains",
|
|
40
|
-
"value": "case A or C
|
|
40
|
+
"value": "case A or C for rendering"
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
"kind": "skill-contains",
|
|
44
44
|
"value": "STAGE-ESM-026"
|
|
45
45
|
},
|
|
46
46
|
{ "kind": "skill-contains", "value": "Generated command values and `returns` responses (ESM v7) bind and run" },
|
|
47
|
-
{ "kind": "skill-contains", "value": "
|
|
47
|
+
{ "kind": "skill-contains", "value": "STAGE-ESM-028`/`STAGE-ESM-029" },
|
|
48
48
|
{ "kind": "skill-contains", "value": "authored-UI parity" },
|
|
49
49
|
{ "kind": "skill-contains", "value": "responsible tool version" }
|
|
50
50
|
]
|
|
@@ -183,8 +183,9 @@ scope is reported as explicitly incomplete); V1 passes with the tool named in
|
|
|
183
183
|
populated-then-removed spec.
|
|
184
184
|
- V1 passes (standalone `screenplay` required when cascades are specified); report tool and
|
|
185
185
|
version.
|
|
186
|
-
- V4
|
|
187
|
-
|
|
186
|
+
- Run V4 through standalone `screenplay test` or MCP `run-specifications`;
|
|
187
|
+
if not executed, report the actual host/input reason, not a blanket no-route
|
|
188
|
+
claim. Stage's runner is target-engine evidence, never V4; V1/V3 do not prove pass. V5 is "not run" unless rendering was attempted; report admission, publication, build and
|
|
188
189
|
tests separately.
|
|
189
190
|
- Match guarantees to evidence: `.play` outcomes, in-process Chronicle scenarios and real-kernel
|
|
190
191
|
tests are not interchangeable (`references/chronicle-verification.md`).
|
package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md
CHANGED
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
The subsets themselves (what binds, what renders) are owned by `cratis-screenplay-toolchain`
|
|
4
4
|
(its executable and renderable subset references); version facts by its `references/versions.md`. This file
|
|
5
5
|
says what that means for writing specs. A form outside the chosen mode is never deleted from a
|
|
6
|
-
design model: keep it and record the gap.
|
|
6
|
+
design model: keep it and record the gap. The detailed Stage 4.24.x rows below
|
|
7
|
+
retain historical admission evidence; current pins are Screenplay 4.125.0 / CLI
|
|
8
|
+
3.41.0. Run actual target admission instead of assuming old restrictions carry over.
|
|
9
|
+
Typed example/override forms: `cratis-screenplay-specifications`
|
|
10
|
+
`references/examples-and-routes.md`.
|
|
7
11
|
|
|
8
12
|
| Form | design | executable | renderable |
|
|
9
13
|
|---|---|---|---|
|
|
@@ -19,6 +23,10 @@ design model: keep it and record the gap.
|
|
|
19
23
|
| Command spec listing reaction cascade events | yes (v6 semantics) | false PLAY0285 on a cratis before 3.28.2 bundle only; see SKILL.md "Version skew" | no (no reactions) |
|
|
20
24
|
| `generated <name> = <value>` under `when`, `then returns` (ESM v7) | yes | yes on standalone Screenplay 4.68.0 or later; not on the 4.66.0 bundled in cratis 3.28.x (`PLAY0268`) | no (Stage does not render ESM v7) |
|
|
21
25
|
| `then events in any order` | yes | yes | yes |
|
|
26
|
+
| Event `stream` / `no stream`, typed `for` and stream ids | yes | ESM v8 at 4.125.0 | CLI 3.41.0 refuses models above v7 before planning |
|
|
27
|
+
| Typed examples and overrides | yes | expanded and type-checked before binding; required fields remain required | depends on expanded contract, not fixture reuse |
|
|
28
|
+
| `given operation ... fails`, `then operation`, `then compensated` | yes | unadmitted PLAY0268 | gap-fill |
|
|
29
|
+
| Refusal branches, `when redelivered`, `then no events` | yes | unadmitted PLAY0268 | gap-fill |
|
|
22
30
|
| Composite (JSON) values in specs | yes | yes | no |
|
|
23
31
|
| Rules over dates or `today`, nested paths | spec them in design | rule does not bind: `recorded` | `recorded` |
|
|
24
32
|
| Bodied rules, code policies | spec them | spec reported **unsupported**, never passed | no |
|
|
@@ -36,7 +44,10 @@ bundle is available). Mark each such spec in the coverage matrix as
|
|
|
36
44
|
the projection's effective key (`cratis-screenplay-slice-design` `references/read-model-design.md`
|
|
37
45
|
decision table). View specs assert through a keyed query.
|
|
38
46
|
- Run V3 (binding-ready, per `cratis-screenplay-toolchain`); binding-only codes (PLAY0273/0350/0352/0388/0389) appear only there.
|
|
39
|
-
- V4
|
|
47
|
+
- V4 runs through `screenplay test` or MCP `run-specifications`; record expected,
|
|
48
|
+
discovered/selected and passed/failed/unsupported counts. Unbound/unsupported
|
|
49
|
+
is not passed. Authoring-only refusal/redelivery/operation specs remain recorded
|
|
50
|
+
contracts; test them at the owning target after authorized gap-fill.
|
|
40
51
|
|
|
41
52
|
## Renderable mode
|
|
42
53
|
- Specs use given events, a command `when`, and then events / readmodel / query / error /
|
|
@@ -65,8 +65,9 @@ report and the slice `description`, and continue.
|
|
|
65
65
|
origin must be **reachable** (some screen, form, reaction or integration leads to the
|
|
66
66
|
command) and **authorized** (the persona's policies satisfy every gate on module, feature
|
|
67
67
|
and command). A command may have several origins; each must be real. A reaction's `invokes`
|
|
68
|
-
has no caller
|
|
69
|
-
|
|
68
|
+
has no caller unless the reaction declares `runs as system role "<Role>"` (ESM v10), so a
|
|
69
|
+
gated command it invokes is refused: declare that trusted path with the role the gate
|
|
70
|
+
admits, never delete the gate.
|
|
70
71
|
3. **Design the command** (`references/command-inventory.md`). Imperative business name for
|
|
71
72
|
**one** decision (`ReassignLocker`, `CorrectLockerVolume`). A form verb (`Update`, `Edit`,
|
|
72
73
|
`Save`, `Set`, `Change`, `Manage` + noun) means several decisions share a form: ask which
|
package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md
CHANGED
|
@@ -118,8 +118,9 @@ not been asked the refusal questions.
|
|
|
118
118
|
- Copying state into the command so `require` can read it, instead of `reads <View>`.
|
|
119
119
|
- An origin that is neither reachable (no screen, form or reaction leads there) nor authorized
|
|
120
120
|
for the persona who should act.
|
|
121
|
-
- A reaction invoking a gated command
|
|
122
|
-
trusted path
|
|
121
|
+
- A reaction invoking a gated command without `runs as system role "<Role>"`: the invocation has
|
|
122
|
+
no caller and is refused; declare the trusted path with the role the gate admits
|
|
123
|
+
(`cratis-screenplay-automations-and-translations`), never delete the gate.
|
|
123
124
|
- Refusals recorded as prose in the `description` with no layer and no spec row.
|
|
124
125
|
- Personal data or secrets as command input: values are by default recorded in the causation chain, so treat them as permanent
|
|
125
126
|
(retention can be configured in newer Chronicle; verify it, never audit secrets).
|
|
@@ -62,6 +62,46 @@ For `worked-example.md`:
|
|
|
62
62
|
| LockerBoard | LockerInstalled, LockerAssigned | InstallLocker, AssignLocker | |
|
|
63
63
|
| RequestProgress | LockerRequested, LockerAssigned | RequestLocker, AssignLocker | |
|
|
64
64
|
|
|
65
|
+
### Declare container dependencies
|
|
66
|
+
|
|
67
|
+
At Screenplay 4.125.0, modules and features may declare `depends on <Name>`, one
|
|
68
|
+
target per line. Use a bare sibling name or a qualified module/feature address.
|
|
69
|
+
Bare names resolve inside out: siblings, ancestor siblings, then root modules;
|
|
70
|
+
qualified names match an unambiguous trailing address. Ambiguity is `PLAY0198`.
|
|
71
|
+
Self, ancestor, descendant and unresolved targets warn with `PLAY0554`; repeats
|
|
72
|
+
keep the first resolved target and warn with `PLAY0555`.
|
|
73
|
+
|
|
74
|
+
Declarations accumulate on the same owner in ordinal file-path order, independent
|
|
75
|
+
of board import order. Layout expansion writes them only in the owner's file.
|
|
76
|
+
They are authoring metadata: no execution rule, implementation order, identity
|
|
77
|
+
or executable-model revision change.
|
|
78
|
+
|
|
79
|
+
Once a container declares dependencies, its own inventory must cover counted
|
|
80
|
+
explicit references leaving it, including descendants. Parent and child lists
|
|
81
|
+
are independent. Module targets cover all their features; feature targets cover
|
|
82
|
+
their descendants. `usesFactsFrom`, `reactsTo`, `decidesFrom`, `asks` and `shows`
|
|
83
|
+
count; specification-only and outside-context edges do not. `PLAY0552` warns on
|
|
84
|
+
uncovered producer modules; `PLAY0553` marks unused declarations and `PLAY0556`
|
|
85
|
+
mutual declarations as information. Ambiguous ownership is provisional, not proof
|
|
86
|
+
of an undeclared dependency. Inspect MCP `dependency-graph`'s `declarations` view.
|
|
87
|
+
|
|
88
|
+
Example: Payroll declares Timesheets; its Handover feature declares
|
|
89
|
+
Timesheets.Approval and sibling Runs. These are dependency inventories, not
|
|
90
|
+
actual references or execution dependencies:
|
|
91
|
+
|
|
92
|
+
```screenplay
|
|
93
|
+
module Payroll
|
|
94
|
+
depends on Timesheets
|
|
95
|
+
feature Handover
|
|
96
|
+
depends on Timesheets.Approval
|
|
97
|
+
depends on Runs
|
|
98
|
+
feature Runs
|
|
99
|
+
module Timesheets
|
|
100
|
+
feature Approval
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Source: Screenplay `v4.125.0:Documentation/screenplay/slices.md` and `folders.md`.
|
|
104
|
+
|
|
65
105
|
## State-transition table (per entity)
|
|
66
106
|
|
|
67
107
|
Rows are states (named after the fact that put the entity there); columns are commands. Each
|