@cratis/pi 7.179.3 → 7.181.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/hooks/scripts/cratis-cleanup-worktrees.sh +1 -0
- package/package/corpus/skills/cratis-engineering-inherited-work/SKILL.md +2 -2
- package/package/corpus/skills/cratis-engineering-issue-design-note/SKILL.md +42 -23
- package/package/corpus/skills/cratis-engineering-issue-design-note/verification.json +8 -1
- package/package/corpus/skills/cratis-engineering-issue-hygiene/SKILL.md +56 -85
- package/package/corpus/skills/cratis-engineering-issue-hygiene/verification.json +12 -1
- package/package/corpus/skills/cratis-screenplay-availability/SKILL.md +4 -2
- package/package/corpus/skills/cratis-screenplay-availability/references/review-checks.md +1 -1
- package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +1 -1
- package/package/corpus/skills/cratis-screenplay-command-surface/references/constraints-produces-concurrency.md +1 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/verification.json +2 -0
- package/package/corpus/skills/cratis-screenplay-delivery-planning/SKILL.md +15 -10
- package/package/corpus/skills/cratis-screenplay-delivery-planning/references/parallel-delivery.md +3 -2
- package/package/corpus/skills/cratis-screenplay-delivery-planning/verification.json +6 -0
- package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +1 -0
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +7 -1
- package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +5 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/phases.md +3 -2
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +2 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/quality-checklist.md +3 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/verification.json +3 -0
- package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +1 -0
- package/package/corpus/skills/cratis-screenplay-specifications/references/event-tags.md +54 -0
- package/package/corpus/skills/cratis-screenplay-specifications/references/outcome-comparison.md +1 -0
- package/package/corpus/skills/cratis-screenplay-specifications/verification.json +10 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +3 -2
- package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +3 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/language-admission.md +4 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/model-export-diff-rename.md +7 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +1558 -42
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/verdicts.md +1 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +10 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/action-subjects.md +17 -0
- package/package.json +1 -1
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
"input": "Write the specifications for a ReserveBerth command and its read model, and tell me what coverage is missing.",
|
|
4
4
|
"fixtures": [],
|
|
5
5
|
"assertions": [
|
|
6
|
+
{ "kind": "skill-contains", "value": "event-tags.md" },
|
|
7
|
+
{ "kind": "skill-contains", "value": "Tag-sensitive outcomes", "file": "references/quality-checklist.md" },
|
|
8
|
+
{ "kind": "skill-contains", "value": "Missing tag expectations in a board or fixture view are not proof of coverage", "file": "references/quality-checklist.md" },
|
|
6
9
|
{ "kind": "play-compiles" },
|
|
7
10
|
{ "kind": "skill-contains", "value": "a whitespace-only rejection" },
|
|
8
11
|
{ "kind": "skill-contains", "value": "parent never arrives" },
|
|
@@ -164,6 +164,7 @@ Screenplay 5.7.0 (`screenplay --version`). Read
|
|
|
164
164
|
|
|
165
165
|
Events compare as the complete new set in authored order (exact count). Read models and query rows: only the asserted properties must match (add `exactly` for all). Rejections: `then error "<message>"` matches the message, never severity. Bare `then error` never matches
|
|
166
166
|
a denial. Read [references/outcome-comparison.md](references/outcome-comparison.md) for events, rows, ordering or a localized rejection key.
|
|
167
|
+
For exact ordered event tags, `no tags` versus unchecked tags, and fixture/board visibility, read [then-event tags](references/event-tags.md), including the compiler prerequisite and ESM v55 boundary.
|
|
167
168
|
|
|
168
169
|
## Worked example
|
|
169
170
|
|
|
@@ -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
|
+
# Assert tags on a then event
|
|
5
|
+
|
|
6
|
+
Requires Screenplay 6.31.0 or later (`screenplay --version`); tag expectations select ESM v55.
|
|
7
|
+
|
|
8
|
+
Under a `then` event, `tag <identifier-or-string>` asserts the exact tag list in order, duplicates included, with the same count. `no tags` asserts an empty list. Omitting both leaves tags unspecified, not empty. Event order (`then events in any order`) does not relax the order within a tag list.
|
|
9
|
+
|
|
10
|
+
```screenplay
|
|
11
|
+
concept InvoiceId : Uuid
|
|
12
|
+
module Billing
|
|
13
|
+
feature Invoices
|
|
14
|
+
slice StateChange Register
|
|
15
|
+
event InvoiceRegistered
|
|
16
|
+
tag invoicing
|
|
17
|
+
tag "billing"
|
|
18
|
+
tag invoicing
|
|
19
|
+
event InvoiceRecorded
|
|
20
|
+
command RegisterInvoice
|
|
21
|
+
invoiceId InvoiceId identifier
|
|
22
|
+
produces InvoiceRegistered
|
|
23
|
+
for invoiceId
|
|
24
|
+
produces InvoiceRecorded
|
|
25
|
+
for invoiceId
|
|
26
|
+
screen Register
|
|
27
|
+
action RegisterInvoice for screen
|
|
28
|
+
specification RegisteringWithExactTags
|
|
29
|
+
when RegisterInvoice
|
|
30
|
+
invoiceId = "9c858901-8a57-4791-81fe-4c455b099bc9"
|
|
31
|
+
then InvoiceRegistered
|
|
32
|
+
for "9c858901-8a57-4791-81fe-4c455b099bc9"
|
|
33
|
+
tag invoicing
|
|
34
|
+
tag "billing"
|
|
35
|
+
tag invoicing
|
|
36
|
+
then InvoiceRecorded
|
|
37
|
+
for "9c858901-8a57-4791-81fe-4c455b099bc9"
|
|
38
|
+
no tags
|
|
39
|
+
specification RegisteringWithoutCheckingTags
|
|
40
|
+
when RegisterInvoice
|
|
41
|
+
invoiceId = "9c858901-8a57-4791-81fe-4c455b099bc9"
|
|
42
|
+
then InvoiceRegistered
|
|
43
|
+
for "9c858901-8a57-4791-81fe-4c455b099bc9"
|
|
44
|
+
then InvoiceRecorded
|
|
45
|
+
for "9c858901-8a57-4791-81fe-4c455b099bc9"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Declaration and production tags describe what is appended; only the `then` lines above assert it. Keep payload properties, `for` and route expectations as well: tags do not replace any of them. Payload assignments such as `tag = "payload"` and `tags = "payload"` remain ordinary property assertions, not tag metadata. A tag-sensitive success needs an explicit list or `no tags`, not merely a passing payload comparison.
|
|
49
|
+
|
|
50
|
+
`PLAY1148` rejects tag expectations outside a `then` event: `given`, any `when` (including `when append`), redelivery locators and event examples cannot carry them. `no tags` cannot repeat or combine with `tag`; neither form takes children. Values must be identifiers or strings, never `$context` and `$env` expressions: dynamic production tags resolve at append time, so assert the resulting concrete values.
|
|
51
|
+
|
|
52
|
+
The MCP fixture-occurrence view and event-model board do not expose tag expectations; this is display-only, not lost execution semantics. Inspect the authored specification or ESM v55 `expectedTags`, and run `screenplay test` or MCP `run-specifications` for V4 evidence. A compiler pass or an absent field in a view is not a passing tag assertion. Failure output is described in [verdicts](../../cratis-screenplay-toolchain/references/verdicts.md#v4-reference-specifications-run).
|
|
53
|
+
|
|
54
|
+
Earlier models without these expectations keep their semantics; reference admission does not prove Stage or CLI rendering support.
|
package/package/corpus/skills/cratis-screenplay-specifications/references/outcome-comparison.md
CHANGED
|
@@ -8,6 +8,7 @@ This reference holds the comparison rules for events, read models, query rows an
|
|
|
8
8
|
`then events in any order` is stated. The count is always exact. After
|
|
9
9
|
`when append`, a model before ESM v6 expects the appended fact itself; from
|
|
10
10
|
ESM v6 the appended event is the action and `then` lists only what followed it.
|
|
11
|
+
From ESM v55 (Requires Screenplay 6.31.0), a `then` event's `tag` lines compare the exact ordered list, including duplicates; `no tags` asserts empty, while neither leaves tags unchecked. See [then-event tags](event-tags.md) for syntax, refusals and the fixture/board display boundary.
|
|
11
12
|
- **Read models and query rows:** only the asserted properties must match
|
|
12
13
|
(subset); add `exactly` to require every property. Query row count is exact;
|
|
13
14
|
collection rows match by read model/key regardless of order. Ordering within a
|
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
"input": "Write given/when/then specifications for a Screenplay slice.",
|
|
4
4
|
"fixtures": [],
|
|
5
5
|
"assertions": [
|
|
6
|
+
{ "kind": "skill-contains", "value": "references/event-tags.md" },
|
|
7
|
+
{ "kind": "skill-contains", "value": "Requires Screenplay 6.31.0", "file": "references/event-tags.md" },
|
|
8
|
+
{ "kind": "skill-contains", "value": "in order, duplicates included", "file": "references/event-tags.md" },
|
|
9
|
+
{ "kind": "skill-contains", "value": "leaves tags unspecified", "file": "references/event-tags.md" },
|
|
10
|
+
{ "kind": "skill-contains", "value": "PLAY1148", "file": "references/event-tags.md" },
|
|
11
|
+
{ "kind": "skill-contains", "value": "`$context` and `$env`", "file": "references/event-tags.md" },
|
|
12
|
+
{ "kind": "skill-contains", "value": "ESM v55 `expectedTags`", "file": "references/event-tags.md" },
|
|
13
|
+
{ "kind": "skill-contains", "value": "do not expose tag expectations", "file": "references/event-tags.md" },
|
|
14
|
+
{ "kind": "skill-contains", "value": "`tag = \"payload\"`", "file": "references/event-tags.md" },
|
|
15
|
+
{ "kind": "skill-contains", "value": "`tags = \"payload\"`", "file": "references/event-tags.md" },
|
|
6
16
|
{ "kind": "skill-contains", "value": "AuthorizeAsync", "file": "references/host-body-execution.md" },
|
|
7
17
|
{ "kind": "skill-contains", "value": "Validate the whole result before any append", "file": "references/host-body-execution.md" },
|
|
8
18
|
{ "kind": "skill-contains", "value": "SemanticCommandBodyFaultException", "file": "references/host-body-execution.md" },
|
|
@@ -149,6 +149,7 @@ with ordered imports means future files need explicit imports.
|
|
|
149
149
|
[generation strategies](references/generation-strategies-example.md) for Guarded
|
|
150
150
|
freshness and strict fixtures, and command-surface
|
|
151
151
|
`references/generated-values-and-responses.md` for strategy/refusal depth.
|
|
152
|
+
- **v55 tag assertions:** exact ordered `then` tags, explicit `no tags`, and unchecked omission have a separate compiler prerequisite. Read [then-event tags](../cratis-screenplay-specifications/references/event-tags.md), [language admission](references/language-admission.md) and [V4 verdicts](references/verdicts.md#v4-reference-specifications-run); fixture/board visibility and reference support do not prove rendering.
|
|
152
153
|
- **v17–v21:** recovery/no-events (v17), query Validation errors (v18), refusal
|
|
153
154
|
branches (v19), generated-concept proofs (v20), pattern/random/rule/checksum (v21).
|
|
154
155
|
Read `references/executable-subset.md` for version prerequisites and
|
|
@@ -177,7 +178,7 @@ with ordered imports means future files need explicit imports.
|
|
|
177
178
|
not legal compliance, retention or runtime subject realization. See
|
|
178
179
|
command-surface `references/context.md` and `references/compliance.md`.
|
|
179
180
|
|
|
180
|
-
`audience`, `availability`, `available` and `provide` diagnostics are PLAY1119-PLAY1141;
|
|
181
|
+
`audience`, `availability`, `available` and `provide` diagnostics are PLAY1119-PLAY1141; a `file` or inline-code `provide` needs ESM v57 (older: PLAY0268). Specifications treat every gate as available; opaque sources are unsupported, never allowed or denied. See `cratis-screenplay-availability`.
|
|
181
182
|
|
|
182
183
|
## Edit strategy
|
|
183
184
|
|
|
@@ -239,7 +240,7 @@ Requires Cratis CLI 3.60.0 or later (`cratis --version`) for that option; older
|
|
|
239
240
|
|
|
240
241
|
Read [language admission](references/language-admission.md#esm-json-schemas) for the published ESM JSON Schemas (shape, not admission).
|
|
241
242
|
|
|
242
|
-
Read [export, compare and rename](references/model-export-diff-rename.md) for `screenplay export`, `diff` and `rename
|
|
243
|
+
Read [export, compare and rename](references/model-export-diff-rename.md) for `screenplay export`, `diff` and `rename`, persisted identities, and the separate prerequisite/refusals for outermost `provide` rename.
|
|
243
244
|
|
|
244
245
|
Read [fast path](references/fast-path.md) for the ordered requirements-to-running-app checklist (validate, `render --check`, render, build, run, check in a browser, run the specs).
|
|
245
246
|
|
|
@@ -281,6 +281,8 @@ migration. Preview every repair; legal notes never move automatically.
|
|
|
281
281
|
|
|
282
282
|
| Code | Severity | Meaning / fix |
|
|
283
283
|
| --- | --- | --- |
|
|
284
|
+
| PLAY1148 | E | Invalid tag expectation: only `then` events accept literal `tag` or a single childless `no tags`; never combine them. See [then-event tags](../../cratis-screenplay-specifications/references/event-tags.md) (Requires Screenplay 6.31.0, ESM v55) |
|
|
285
|
+
| PLAY1166 | E | Invalid action presentation: `presentation` hints need a plain action with explicit `for item`; keys unique and nonempty, `placement` nonempty. Add `for item`, use a plain action or remove the hint. See [advisory row-menu placement](../../cratis-screenplay-ui-composition/references/action-subjects.md#advisory-row-menu-placement) |
|
|
284
286
|
| PLAY0558 | E | Module/feature/slice/command/read-model/reaction documentation must be one nonempty fenced Markdown block; remove repeats or fix the fence. Events retain PLAY0477. |
|
|
285
287
|
| PLAY0559 | W | Conflicting module/feature documentation across files; first wins. Choose one owning text; identical copies are accepted. |
|
|
286
288
|
| PLAY0572 | E | Malformed/unknown persona caller or body lines; use a declared top-level persona with no body. |
|
|
@@ -365,7 +367,7 @@ Requires a Screenplay release that carries design systems (next minor after 6.2.
|
|
|
365
367
|
|
|
366
368
|
## Provided values (PLAY1119-PLAY1129)
|
|
367
369
|
|
|
368
|
-
`provide` needs Screenplay 6.25.0. Fix by changing the model;
|
|
370
|
+
`provide` needs Screenplay 6.25.0. Fix by changing the model; a `file` or inline-code source needs ESM v57; older models refuse it with PLAY0268.
|
|
369
371
|
|
|
370
372
|
| Code | Fix |
|
|
371
373
|
| --- | --- |
|
|
@@ -39,6 +39,8 @@ exact language/semantic pairs; binding, reference execution and rendering are se
|
|
|
39
39
|
| v43 | `set once` or a `children` ordering line (PLAY0956-PLAY0963) | Serializes the `setOnce` operation and `ordering`; earlier models keep their version and bytes | Admission by Stage is separate; a refusal means the model is not renderable yet |
|
|
40
40
|
| v53 | `audience`, `availability` and `available` gates (decision 0162; PLAY1130-PLAY1141) | Serializes the gates; specifications and the reference evaluator treat every gate as available and report opaque `provide` sources as unsupported; earlier models keep their version and bytes | Admission by Stage is separate: a refusal such as `STAGE-ESM-016` means the model is not renderable yet, never a reason to drop the gate. See `../../cratis-screenplay-availability/SKILL.md` |
|
|
41
41
|
| v54 | A graph query `collect` (decision 0163; PLAY1144-PLAY1147) | Serializes the collects on the query; earlier models keep their version and bytes | Admission by Stage is separate: a refusal means the model is not renderable yet, never a reason to drop the collect. Check `cratis render` |
|
|
42
|
+
| v55 | `then` event `tag` lines or `no tags` | Exact ordered tag comparison, including duplicates; `expectedTags` absent/null means unchecked, `[]` means explicitly empty | Reference admission is not renderer admission; inspect bundled Stage support separately |
|
|
43
|
+
| v57 | `provide` from a `file` or inline code block (decision 0167) | Carries the body as an opaque `ProvideValue` implementation attachment; readers and writers below v57 refuse it with PLAY0268, and models without one keep their version and bytes | The reference evaluator never runs it and never yields allowed or denied; a runtime that lacks the attachment reports it unsupported |
|
|
42
44
|
|
|
43
45
|
Constructs of decision 0098 with no executable-model content need no version: application-level hooks in a layout's actions outlet (`default <id> title "..." slice <Slice>` with an optional indented `authorize <Policy>`), and a capture over events that copies a list (`lines = $.lines`) or fans out with `children lines identified by sku`. Check `screenplay --version` against the release that admitted v29 and v30 before relying on them. Decision 0115 withdrew 0098's command specification that states the public event its outbound Translate slice publishes: a specification runs only its own slice, so the Translate slice states the public event in its own `when append` specification.
|
|
44
46
|
|
|
@@ -51,6 +53,8 @@ Requires Screenplay 6.2.0 or later (`screenplay --version`). A JSON Schema (draf
|
|
|
51
53
|
|
|
52
54
|
## Compiler and target minimums
|
|
53
55
|
|
|
56
|
+
Requires Screenplay 6.31.0 or later (`screenplay --version`) for `then` event tag expectations (v55). See [then-event tags](../../cratis-screenplay-specifications/references/event-tags.md) for syntax and PLAY1148; older models without expectations keep their semantics.
|
|
57
|
+
|
|
54
58
|
Requires Screenplay 4.181.0 or later (`screenplay --version`) for atomic batches; older compilers cannot admit the preamble.
|
|
55
59
|
|
|
56
60
|
Requires Screenplay 4.182.0 or later (`screenplay --version`) for described handlers; older binders report PLAY0268.
|
package/package/corpus/skills/cratis-screenplay-toolchain/references/model-export-diff-rename.md
CHANGED
|
@@ -52,7 +52,13 @@ A reference the executable model does not hold refuses admission: CLI exit 1 wit
|
|
|
52
52
|
|
|
53
53
|
## Rename
|
|
54
54
|
|
|
55
|
-
`screenplay rename <address> <new-name> [<folder>] [--kind <Command|EventContract|ReadModel|...>]` is the scriptable form of MCP `propose-rename` plus `apply`: it repairs references across files, keeps the element's semantic identity, pins a renamed event's stored type name with `id`, and writes (creating on the first rename) `.screenplay/identities.json`. Exit 0 renamed, 1 refused, 2 could not run.
|
|
55
|
+
`screenplay rename <address> <new-name> [<folder>] [--kind <Command|EventContract|ReadModel|...>]` is the scriptable form of MCP `propose-rename` plus `apply`: for identity-bearing declarations, it repairs references across files, keeps the element's semantic identity, pins a renamed event's stored type name with `id`, and writes (creating on the first rename) `.screenplay/identities.json`. Exit 0 renamed, 1 refused, 2 could not run.
|
|
56
|
+
|
|
57
|
+
Requires Screenplay 6.35.0 or later (`screenplay --version`) to rename a provided value through this CLI or MCP `propose-rename`. A `provide` has no semantic identity to preserve. Address it by its declaring module/feature/slice plus its name, or just its name at application scope, for example `screenplay rename Billing.Invoices.vessel ship path/to/screenplays`.
|
|
58
|
+
|
|
59
|
+
Target the outermost declaration of the override chain. The planner renames it and its nested overrides, rewriting only the first path segment of each `$context.<name>` read proven to resolve to that chain; `$context.vessel.code` becomes `$context.ship.code`, not a payload-property rename. Unrelated chains and strings stay unchanged. Renaming an override, using a built-in context name, colliding with a provided name in an overlapping scope or capturing an existing read of the new name is refused. Unprovable opaque/unsupported reads, including ambiguous reusable availability reads across separate chains, also refuse: inspect the refusal and coordinate explicit typed edits where needed, never global replacement.
|
|
60
|
+
|
|
61
|
+
Below the required version, upgrade the actual CLI/MCP or defer the rename. Use CLI/MCP, not VS Code/Monaco or a TypeScript rename operation. Do not infer editor or TypeScript support. MCP proposal review/apply details: [model authoring](../../cratis-screenplay-model-authoring/references/mcp-tools.md).
|
|
56
62
|
|
|
57
63
|
## Trace a value's lineage
|
|
58
64
|
|