@cratis/pi 7.160.0 → 7.160.2

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.
Files changed (51) hide show
  1. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +1 -1
  2. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/reaction-forms.md +23 -0
  3. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/verification.json +4 -1
  4. package/package/corpus/skills/cratis-screenplay-command-surface/references/validate-rules.md +14 -0
  5. package/package/corpus/skills/cratis-screenplay-command-surface/verification.json +2 -1
  6. package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +2 -2
  7. package/package/corpus/skills/cratis-screenplay-model-authoring/references/model-notes.md +28 -1
  8. package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +2 -0
  9. package/package/corpus/skills/cratis-screenplay-model-review/references/mode-compliance.md +4 -0
  10. package/package/corpus/skills/cratis-screenplay-model-review/references/quick-self-check.md +1 -0
  11. package/package/corpus/skills/cratis-screenplay-model-review/verification.json +2 -1
  12. package/package/corpus/skills/cratis-screenplay-projections/SKILL.md +15 -4
  13. package/package/corpus/skills/cratis-screenplay-projections/references/graphs.md +112 -0
  14. package/package/corpus/skills/cratis-screenplay-projections/references/secret-concepts.md +23 -0
  15. package/package/corpus/skills/cratis-screenplay-projections/verification.json +9 -1
  16. package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +2 -0
  17. package/package/corpus/skills/cratis-screenplay-read-surface/references/graph-queries.md +22 -0
  18. package/package/corpus/skills/cratis-screenplay-read-surface/references/screen-patterns.md +11 -2
  19. package/package/corpus/skills/cratis-screenplay-read-surface/verification.json +4 -1
  20. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +3 -1
  21. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +4 -1
  22. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/verification.json +3 -1
  23. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +1 -1
  24. package/package/corpus/skills/cratis-screenplay-scenario-coverage/verification.json +2 -1
  25. package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +38 -0
  26. package/package/corpus/skills/cratis-screenplay-slice-design/verification.json +2 -0
  27. package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +9 -12
  28. package/package/corpus/skills/cratis-screenplay-specifications/references/date-comparisons.md +21 -0
  29. package/package/corpus/skills/cratis-screenplay-specifications/references/graph-steps.md +85 -2
  30. package/package/corpus/skills/cratis-screenplay-specifications/references/host-body-execution.md +29 -0
  31. package/package/corpus/skills/cratis-screenplay-specifications/references/producerless-events.md +63 -0
  32. package/package/corpus/skills/cratis-screenplay-specifications/references/worked-example.md +2 -1
  33. package/package/corpus/skills/cratis-screenplay-specifications/verification.json +9 -1
  34. package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +2 -0
  35. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +39 -0
  36. package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +14 -8
  37. package/package/corpus/skills/cratis-screenplay-toolchain/references/language-admission.md +5 -0
  38. package/package/corpus/skills/cratis-screenplay-toolchain/references/read-model-property-order.md +26 -0
  39. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +22 -0
  40. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
  41. package/package/corpus/skills/cratis-screenplay-toolchain/references/unknown-preserving-reader.md +57 -0
  42. package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +16 -1
  43. package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +5 -34
  44. package/package/corpus/skills/cratis-screenplay-ui-composition/references/action-subjects.md +27 -1
  45. package/package/corpus/skills/cratis-screenplay-ui-composition/references/deliverable-identity.md +41 -0
  46. package/package/corpus/skills/cratis-screenplay-ui-composition/references/guarded-interactions.md +2 -1
  47. package/package/corpus/skills/cratis-screenplay-ui-composition/references/screen-visuals.md +43 -0
  48. package/package/corpus/skills/cratis-screenplay-ui-composition/verification.json +8 -1
  49. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +3 -1
  50. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +2 -1
  51. package/package.json +1 -1
@@ -1,11 +1,18 @@
1
1
  # Action subjects: `for item` and `for screen`
2
2
 
3
+ ## Contents
4
+
5
+ - Table narrowing
6
+ - Repair repeated advisories one occurrence at a time
7
+
3
8
  Requires Screenplay 4.248.0 or later (`screenplay --version`). Source: Screenplay
4
9
  `Documentation/screenplay/action-subjects.md` (decision 0110).
5
10
 
6
11
  A plain or toolbar `action` states whether it acts on one chosen record or on the screen:
7
12
 
8
- - `for item`: the nearest single `data` record, or the selected row of a collection. Inputs bind
13
+ - `for item`: the nearest single `data` record, or the selected row of a collection. When a screen
14
+ declares several `data` and a `table` in scope shows exactly one collection, that collection is the
15
+ subject (see [table narrowing](#table-narrowing)). Inputs bind
9
16
  from it: explicit `with <input> from item.<field>` first, then case-sensitive same-name
10
17
  fields, then one key field with the same declared concept.
11
18
  - `for screen`: independent of selection; no row fills the inputs. Use it for actions that
@@ -56,6 +63,25 @@ module Work
56
63
  column title label "Task"
57
64
  ```
58
65
 
66
+ ## Table narrowing
67
+
68
+ Requires Screenplay 6.18.0 or later (`screenplay --version`). A screen often shows a header
69
+ record next to a table of rows. An authored plain or toolbar `for item` action then acts on the
70
+ one collection `data` that a `table` in scope shows, so the header does not make it ambiguous:
71
+
72
+ ```play
73
+ data Header via query HeaderOf
74
+ data Row[] via query Rows
75
+ table Row
76
+ action RetryItem for item
77
+ ```
78
+
79
+ Unchanged and still ambiguous: a table over a record, two tables over two collections, and no
80
+ table. Guarded actions and inferred (omitted) subjects are unchanged. PLAY0346 names the candidate
81
+ `data`; use that list to pick the explicit fix: show one table, or move the action into a screen
82
+ section or slot with its own local `data`. The subject is a modeling statement, so do not
83
+ restructure a screen only to satisfy `for item`.
84
+
59
85
  State the subject on every plain and toolbar action. Without it, the compiler infers `for item`
60
86
  when there is exactly one collection `data`, one required non-generated identifier and one key
61
87
  with the same concept, and `for screen` otherwise. Inference follows types, not intent: here
@@ -0,0 +1,41 @@
1
+ # A deliverable app declares its identity, titles and labels
2
+
3
+ ## Symptom and fix
4
+
5
+ Symptom: a rendered app titled "Cratis Stage" whose buttons and dialogs show raw command names. The renderer
6
+ defaults to those when the model is silent, so declare, in every deliverable app:
7
+
8
+ - the layout's `logo image "<path>" title "<text>"` inside a navigation outlet (the
9
+ application title the shell shows; `logo initials` is only valid in a profile's `identity`);
10
+ - a `ui profile` with `root template`, shell `option` lines such as `option showFooter false`, and an `identity`
11
+ block (`name`, `logo initials`);
12
+ - a `title "<text>"` in each screen and a navigation item `<id> title "<text>" target <Module.Feature>` per screen;
13
+ - `label "<text>"` on **every** `action`.
14
+
15
+ ## Example
16
+
17
+ ```screenplay excerpt
18
+ layout AppShell
19
+ category application
20
+ content page routed primary
21
+
22
+ outlet sidebar of navigation
23
+ logo image "/assets/shop.svg" title "Shopfront"
24
+ default organizations title "Organizations" target Crm.Organizations
25
+
26
+ ui profile Desktop
27
+ target platform web
28
+ root template AppShell
29
+ option showFooter false
30
+ identity
31
+ name "Shopfront"
32
+ logo initials "SF"
33
+ ```
34
+
35
+ ```screenplay excerpt
36
+ screen Organizations
37
+ data OrganizationOverview[] via query AllOrganizations
38
+ title "Organizations"
39
+ action RegisterOrganization
40
+ label "New organization"
41
+ ```
@@ -52,7 +52,8 @@ item, and clearing selection runs nothing; change uses the item that changed (se
52
52
  single item or selected row, with guarded actions' sibling precedence. Check named
53
53
  behaviors at each `uses` site. Component `context` or `selectedItem` bindings do
54
54
  not supply the subject in this version; unresolved/equally near subjects report
55
- PLAY0346.
55
+ PLAY0346, which names the candidate data (see
56
+ [table narrowing](action-subjects.md#table-narrowing)).
56
57
 
57
58
  Submit, event, interval and application triggers have no alternatives.
58
59
  The one-line `on row-click navigate to … by …` remains unchanged. Opaque `where`
@@ -0,0 +1,43 @@
1
+ # Sketches, mockups and images on a screen
2
+
3
+ Early in modeling a screen is often a quick sketch, a screenshot of the system being replaced or a
4
+ hand-written HTML page. Keep them with the screen so they travel with the model and reach whoever
5
+ builds it. Requires Screenplay 6.7.0 or later (`screenplay --version`).
6
+
7
+ The compiler warns `PLAY0952` while a named file is missing, so this fence asserts that code; a
8
+ model whose files exist beside it compiles clean.
9
+
10
+ ```screenplay expect PLAY0952
11
+ module Ordering
12
+ feature Orders
13
+ slice StateView OpenOrdersView
14
+ screen OpenOrdersScreen
15
+ sketch Screens/open-orders.sketch.json
16
+ mockup Screens/open-orders/index.html
17
+ mockup Screens/open-orders/confirm.html
18
+ image Screens/open-orders-today.png
19
+ ```
20
+
21
+ | Line | Holds |
22
+ | --- | --- |
23
+ | `sketch <path>` | A drawing of the screen as vector drawing data, such as a board sketch export. |
24
+ | `mockup <path>` | One HTML/CSS page of a coded mockup. Repeat the line per page, in reading order. |
25
+ | `image <path>` | A screenshot or design export: PNG, JPG, GIF, SVG or WebP. |
26
+
27
+ - A screen can carry any number of each, beside or instead of its structure.
28
+ - Paths are relative to the model root, like the `file` directive, and the files live in the
29
+ repository next to the `.play` files.
30
+ - They are authoring metadata. The printer keeps them in the order written, after `description`,
31
+ `file` and `fits`; the AST and MCP editing tools carry them; they never change what the screen
32
+ does and never reach the executable semantic model.
33
+ - Do not use them to replace a composed screen once the screen is designed: they record the origin
34
+ or the intent, the `data`, `action` and layout lines state the contract.
35
+
36
+ | Code | Severity | Meaning |
37
+ | --- | --- | --- |
38
+ | `PLAY0950` | Error | A `sketch`, `mockup` or `image` line names no file. |
39
+ | `PLAY0951` | Warning | An `image` is not PNG, JPG, GIF, SVG or WebP, or a `mockup` is not an HTML page (`.html`, `.htm`). |
40
+ | `PLAY0952` | Warning | The file does not exist beside the model, or its path leaves the model root. |
41
+
42
+ `PLAY0952` needs the files, so the product reports it where a model root is opened (the MCP server,
43
+ `open-workspace`); the standalone tool reports it for a folder it compiles, as the fence above shows.
@@ -262,6 +262,13 @@
262
262
  { "kind": "skill-contains", "value": "where item.status == \"accepted\"", "file": "references/change-alternatives.md" },
263
263
  { "kind": "skill-contains", "value": "including the `otherwise` list", "file": "references/change-alternatives.md" },
264
264
  { "kind": "skill-contains", "value": "Compiler admission is not proof that a Stage renderer executes the gesture.", "file": "references/change-alternatives.md" },
265
- { "kind": "skill-contains", "value": "references/change-alternatives.md" }
265
+ { "kind": "skill-contains", "value": "references/change-alternatives.md" },
266
+ { "kind": "skill-contains", "value": "## Table narrowing", "file": "references/action-subjects.md" },
267
+ { "kind": "skill-contains", "value": "Requires Screenplay 6.18.0", "file": "references/action-subjects.md" },
268
+ { "kind": "skill-contains", "value": "PLAY0346 names the candidate", "file": "references/action-subjects.md" },
269
+ { "kind": "skill-contains", "value": "action-subjects.md#table-narrowing", "file": "references/guarded-interactions.md" },
270
+ { "kind": "skill-contains", "value": "references/screen-visuals.md" },
271
+ { "kind": "skill-contains", "value": "Requires Screenplay 6.7.0 or later", "file": "references/screen-visuals.md" },
272
+ { "kind": "skill-contains", "value": "`PLAY0951` | Warning", "file": "references/screen-visuals.md" }
266
273
  ]
267
274
  }
@@ -26,7 +26,9 @@ against Stage v4.197.0: matched language/ESM 1.0–30.0 and 32.0 are admitted, n
26
26
  Stage then applies matched-pair and construct gates. V32 needs a direct caller of
27
27
  the reviewed Stage baseline. See [CLI bundle details](../cratis-screenplay-toolchain/references/language-admission.md#stage-admission-and-execution).
28
28
  Renderer, semantic Host/specification execution and legacy syntax admission are
29
- separate gates.
29
+ separate gates. Reading a model that carries unknown additions is a further separate gate:
30
+ [the unknown-preserving reader](../cratis-screenplay-toolchain/references/unknown-preserving-reader.md)
31
+ retains them without executing or rendering them, so renderer admission of such a model is not implied.
30
32
  Bounded atomic batches render; unverifiable query performers can produce explicit
31
33
  gaps, not completed behavior. Described handlers still refuse even in Stub mode.
32
34
  Keep protection and report remaining refusals.
@@ -65,6 +65,7 @@
65
65
  { "kind": "skill-contains", "value": "Stage#847 lands, which needs Chronicle#5427", "file": "references/current-boundaries.md" },
66
66
  { "kind": "skill-contains", "value": "required single non-date, non-decimal primitive/concept", "file": "references/current-boundaries.md" },
67
67
  { "kind": "skill-contains", "value": "Single-instance lookup by parts remains `STAGE-ESM-047`", "file": "references/current-boundaries.md" },
68
- { "kind": "skill-contains", "value": "including DateTime and decimal key parts", "file": "SKILL.md" }
68
+ { "kind": "skill-contains", "value": "including DateTime and decimal key parts", "file": "SKILL.md" },
69
+ { "kind": "skill-contains", "value": "unknown-preserving-reader.md", "file": "SKILL.md" }
69
70
  ]
70
71
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/pi",
3
- "version": "7.160.0",
3
+ "version": "7.160.2",
4
4
  "description": "Configuration-aware Cratis AI integration for Pi",
5
5
  "type": "module",
6
6
  "files": [