@cratis/pi 7.164.1 → 7.164.3

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 (23) hide show
  1. package/package/corpus/agents/spec-writer.md +1 -1
  2. package/package/corpus/harnesses/copilot/instructions/frontend-quality.instructions.md +1 -1
  3. package/package/corpus/harnesses/copilot/instructions/specs.csharp.instructions.md +1 -1
  4. package/package/corpus/harnesses/copilot/instructions/typescript.instructions.md +6 -2
  5. package/package/corpus/harnesses/pi/agents/spec-writer.md +1 -1
  6. package/package/corpus/rules/frontend-quality.md +1 -1
  7. package/package/corpus/rules/specs.csharp.md +1 -1
  8. package/package/corpus/rules/typescript.md +6 -2
  9. package/package/corpus/skills/cratis-code-review/SKILL.md +2 -1
  10. package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +1 -1
  11. package/package/corpus/skills/cratis-screenplay-command-surface/references/routes-and-external-operations.md +1 -1
  12. package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +16 -5
  13. package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +3 -3
  14. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +1 -1
  15. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +1 -1
  16. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/vocabulary-map.md +1 -1
  17. package/package/corpus/skills/cratis-screenplay-projections/references/graphs.md +3 -2
  18. package/package/corpus/skills/cratis-screenplay-slice-design/references/model-reasoning.md +1 -1
  19. package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +3 -2
  20. package/package/corpus/skills/cratis-screenplay-toolchain/references/sources-and-streams.md +2 -2
  21. package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +1 -1
  22. package/package/corpus/skills/cratis-specifications-csharp/references/csharp-patterns.md +13 -1
  23. package/package.json +1 -1
@@ -46,7 +46,7 @@ Select from these canonical rules in `.cratis/ai/rules/` only after applying the
46
46
 
47
47
  ## C# specs — start with the plain call
48
48
 
49
- Specify pure `Handle()`, validator, reducer and reactor decisions with plain calls and supplied read-model state. Follow `.cratis/ai/rules/specs.scenarios.csharp.md`: add exactly the scenarios its per-artifact decision table obligates (pipeline and authorization, constraints, projection and reducer dispatch, reactor dispatch and routing) plus application-owned race-policy proof, not a platform guard matrix. Keep the single cheap assembly-level admission spec for the application's own decision-model shapes. Prefer in-process helpers over out-of-process Chronicle hosts for the applicable behaviors:
49
+ Specify pure `Handle()`, validator, reducer and reactor decisions with plain calls and supplied read-model state. Follow `.cratis/ai/rules/specs.scenarios.csharp.md`: add exactly the scenarios its per-artifact decision table obligates (pipeline and authorization, constraints, projection and reducer dispatch, reactor dispatch and routing), not a platform guard matrix. Prove a rule that must hold under concurrent writers, such as the last seat, from supplied read-model state, never with a race scenario. Keep the single cheap assembly-level admission spec for the application's own decision-model shapes. Prefer in-process helpers over out-of-process Chronicle hosts for the applicable behaviors:
50
50
 
51
51
  | Tool | Use for |
52
52
  |---|---|
@@ -46,7 +46,7 @@ Stop-and-fix signals during implementation and review:
46
46
  - [ ] Reused existing primitives/wrappers instead of duplicating.
47
47
  - [ ] No smell guard above is triggered without a short, intentional reason.
48
48
  - [ ] File read past its final `};` — no orphaned code.
49
- - [ ] New/changed reusable or stateful components have Storybook stories.
49
+ - [ ] New/changed reusable or stateful components have Storybook stories, except live slice pages wired directly to Arc hooks or a backend ([storybook.md](./storybook.instructions.md)); verify those through behavior specs and the running app.
50
50
  - [ ] New/changed view-model/helper behavior has BDD specs (see [frontend-testing.md](./frontend-testing.instructions.md)).
51
51
  - [ ] Lint, conditional test, and build pass (the project's frontend gates).
52
52
 
@@ -101,7 +101,7 @@ async Task Because() => _error = await Catch.Exception(_sut.DoSomething);
101
101
 
102
102
  Since 5.0 assertions live in `Cratis.Specifications`, with types forwarded by each framework package (namespace `Cratis.Specifications`); recompile and keep core/framework packages on the same version: `.ShouldEqual(expected)`, `.ShouldBeTrue()`, `.ShouldBeFalse()`, `.ShouldBeNull()`, `.ShouldNotBeNull()`, `.ShouldBeEmpty()`, `.ShouldNotBeEmpty()`, `.ShouldContain(item)`, `.ShouldNotContain(item)`, `.ShouldContainOnly(items)`, `.ShouldBeOfExactType<T>()`, `.ShouldBeGreaterThan(n)`, `.ShouldBeLessThan(n)`.
103
103
 
104
- Additional helpers include `ShouldNotEqual`, `ShouldBeSame`/`ShouldNotBeSame`, `ShouldMatch(Func<T, bool>)`, `ShouldBeInRange`, inclusive comparisons `ShouldBeGreaterThanOrEqual`/`ShouldBeLessThanOrEqual`, `ShouldContainSingleItem`, `ShouldEachConformTo`, ordered collection `ShouldEqual(IEnumerable<T>)`, collection `ShouldContain(Predicate<T>)`, `ShouldBeAssignableFrom<T>`, and string `ShouldContain(substring, StringComparison)`. `Catch.Exception` accepts `Action` or `Func<Task>`; `Catch.Exception<T>(Action)` catches only T.
104
+ Additional helpers include `ShouldNotEqual`, `ShouldBeSame`/`ShouldNotBeSame`, `ShouldMatch(Func<T, bool>)`, `ShouldBeInRange`, inclusive comparisons `ShouldBeGreaterThanOrEqual`/`ShouldBeLessThanOrEqual`, `ShouldContainSingleItem`, `ShouldEachConformTo`, ordered collection `ShouldEqual(IEnumerable<T>)`, collection `ShouldContain(Func<T, bool>)` (adapt a typed `Predicate<T>` with `x => predicate(x)`), `ShouldBeAssignableFrom<T>`, and string `ShouldContain(substring, StringComparison)`. `Catch.Exception` accepts `Action` or `Func<Task>`; `Catch.Exception<T>(Action)` catches only T.
105
105
 
106
106
  ## Conventions
107
107
 
@@ -88,9 +88,13 @@ const [result, perform] = AllProjects.use();
88
88
  // result.isSuccess — true when query completed without errors
89
89
  ```
90
90
 
91
- Paginated queries:
91
+ Paginated queries — the tuples differ, so skip the right number of slots:
92
92
  ```tsx
93
- const [result, , setPage] = AllProjects.useWithPaging(10);
93
+ // Plain query: [result, perform, setSorting, setPage, setPageSize]
94
+ const [result, , , setPage] = AllProjects.useWithPaging(10);
95
+
96
+ // Observable query has no perform: [result, setSorting, setPage, setPageSize]
97
+ const [liveResult, , setLivePage] = ObservedProjects.useWithPaging(10);
94
98
  ```
95
99
 
96
100
  ### CommandScope
@@ -41,7 +41,7 @@ Select from these canonical rules in `.cratis/ai/rules/` only after applying the
41
41
 
42
42
  ## C# specs — start with the plain call
43
43
 
44
- Specify pure `Handle()`, validator, reducer and reactor decisions with plain calls and supplied read-model state. Follow `.cratis/ai/rules/specs.scenarios.csharp.md`: add exactly the scenarios its per-artifact decision table obligates (pipeline and authorization, constraints, projection and reducer dispatch, reactor dispatch and routing) plus application-owned race-policy proof, not a platform guard matrix. Keep the single cheap assembly-level admission spec for the application's own decision-model shapes. Prefer in-process helpers over out-of-process Chronicle hosts for the applicable behaviors:
44
+ Specify pure `Handle()`, validator, reducer and reactor decisions with plain calls and supplied read-model state. Follow `.cratis/ai/rules/specs.scenarios.csharp.md`: add exactly the scenarios its per-artifact decision table obligates (pipeline and authorization, constraints, projection and reducer dispatch, reactor dispatch and routing), not a platform guard matrix. Prove a rule that must hold under concurrent writers, such as the last seat, from supplied read-model state, never with a race scenario. Keep the single cheap assembly-level admission spec for the application's own decision-model shapes. Prefer in-process helpers over out-of-process Chronicle hosts for the applicable behaviors:
45
45
 
46
46
  | Tool | Use for |
47
47
  |---|---|
@@ -45,7 +45,7 @@ Stop-and-fix signals during implementation and review:
45
45
  - [ ] Reused existing primitives/wrappers instead of duplicating.
46
46
  - [ ] No smell guard above is triggered without a short, intentional reason.
47
47
  - [ ] File read past its final `};` — no orphaned code.
48
- - [ ] New/changed reusable or stateful components have Storybook stories.
48
+ - [ ] New/changed reusable or stateful components have Storybook stories, except live slice pages wired directly to Arc hooks or a backend ([storybook.md](./storybook.md)); verify those through behavior specs and the running app.
49
49
  - [ ] New/changed view-model/helper behavior has BDD specs (see [frontend-testing.md](./frontend-testing.md)).
50
50
  - [ ] Lint, conditional test, and build pass (the project's frontend gates).
51
51
 
@@ -100,7 +100,7 @@ async Task Because() => _error = await Catch.Exception(_sut.DoSomething);
100
100
 
101
101
  Since 5.0 assertions live in `Cratis.Specifications`, with types forwarded by each framework package (namespace `Cratis.Specifications`); recompile and keep core/framework packages on the same version: `.ShouldEqual(expected)`, `.ShouldBeTrue()`, `.ShouldBeFalse()`, `.ShouldBeNull()`, `.ShouldNotBeNull()`, `.ShouldBeEmpty()`, `.ShouldNotBeEmpty()`, `.ShouldContain(item)`, `.ShouldNotContain(item)`, `.ShouldContainOnly(items)`, `.ShouldBeOfExactType<T>()`, `.ShouldBeGreaterThan(n)`, `.ShouldBeLessThan(n)`.
102
102
 
103
- Additional helpers include `ShouldNotEqual`, `ShouldBeSame`/`ShouldNotBeSame`, `ShouldMatch(Func<T, bool>)`, `ShouldBeInRange`, inclusive comparisons `ShouldBeGreaterThanOrEqual`/`ShouldBeLessThanOrEqual`, `ShouldContainSingleItem`, `ShouldEachConformTo`, ordered collection `ShouldEqual(IEnumerable<T>)`, collection `ShouldContain(Predicate<T>)`, `ShouldBeAssignableFrom<T>`, and string `ShouldContain(substring, StringComparison)`. `Catch.Exception` accepts `Action` or `Func<Task>`; `Catch.Exception<T>(Action)` catches only T.
103
+ Additional helpers include `ShouldNotEqual`, `ShouldBeSame`/`ShouldNotBeSame`, `ShouldMatch(Func<T, bool>)`, `ShouldBeInRange`, inclusive comparisons `ShouldBeGreaterThanOrEqual`/`ShouldBeLessThanOrEqual`, `ShouldContainSingleItem`, `ShouldEachConformTo`, ordered collection `ShouldEqual(IEnumerable<T>)`, collection `ShouldContain(Func<T, bool>)` (adapt a typed `Predicate<T>` with `x => predicate(x)`), `ShouldBeAssignableFrom<T>`, and string `ShouldContain(substring, StringComparison)`. `Catch.Exception` accepts `Action` or `Func<Task>`; `Catch.Exception<T>(Action)` catches only T.
104
104
 
105
105
  ## Conventions
106
106
 
@@ -87,9 +87,13 @@ const [result, perform] = AllProjects.use();
87
87
  // result.isSuccess — true when query completed without errors
88
88
  ```
89
89
 
90
- Paginated queries:
90
+ Paginated queries — the tuples differ, so skip the right number of slots:
91
91
  ```tsx
92
- const [result, , setPage] = AllProjects.useWithPaging(10);
92
+ // Plain query: [result, perform, setSorting, setPage, setPageSize]
93
+ const [result, , , setPage] = AllProjects.useWithPaging(10);
94
+
95
+ // Observable query has no perform: [result, setSorting, setPage, setPageSize]
96
+ const [liveResult, , setLivePage] = ObservedProjects.useWithPaging(10);
93
97
  ```
94
98
 
95
99
  ### CommandScope
@@ -158,7 +158,8 @@ degradations a reviewer can see without measuring:
158
158
  with supplied read-model state; scenarios cover exactly the obligations in the
159
159
  per-artifact decision table of `specs.scenarios.csharp.md` (pipeline and
160
160
  authorization, constraints, projection and reducer dispatch, reactor dispatch
161
- and routing) plus application-owned race-policy proof.
161
+ and routing) and none beyond it. A rule that must hold under concurrent
162
+ writers is proven from supplied read-model state, not a race scenario.
162
163
  - Every State Change command has a happy-path specification.
163
164
  - Every validation rule has a direct-call failure spec. Pipeline validation
164
165
  specs assert **both** `ShouldNotBeSuccessful()` and `ShouldHaveValidationErrors()`.
@@ -208,7 +208,7 @@ Mapping sources that bind: a command property, a literal, `$context.occurred` an
208
208
 
209
209
  ## Routes and external operations
210
210
 
211
- Commands never produce public events; external work stays unadmitted (`PLAY0268`). Read [references/routes-and-external-operations.md](references/routes-and-external-operations.md) when choosing routes, `stream` overrides, public or foreign events, or `system`/`uses`/`operation` declarations (see also [operation intent](references/operations.md)).
211
+ Commands never produce public events; external operations stay unadmitted (`PLAY0268`); systems are admitted once any declares an ability (ESM v50). Read [references/routes-and-external-operations.md](references/routes-and-external-operations.md) when choosing routes, `stream` overrides, public or foreign events, or `system`/`uses`/`operation` declarations (see also [operation intent](references/operations.md)).
212
212
 
213
213
  ## `concurrency`
214
214
 
@@ -16,6 +16,6 @@ for the released ESM v9 boundary and quoted opaque origins.
16
16
 
17
17
  Use `system`, `uses` and inline/standalone `operation` declarations to state
18
18
  external work in the authored production sequence, with execute/compensate phase
19
- intent. These remain unadmitted (PLAY0268), not post-commit reactions. Read
19
+ intent. Operations remain unadmitted (PLAY0268), as do systems when no system declares an ability (any ability admits every system at ESM v50); none are post-commit reactions. Read
20
20
  [operation intent](operations.md) for forms, boundaries and checked
21
21
  failure/compensation specification syntax.
@@ -1,5 +1,14 @@
1
1
  # Parsed is not runnable: ESM versions and dispositions
2
2
 
3
+ ## Contents
4
+
5
+ - Which ESM version a model needs
6
+ - Dispositions to keep apart
7
+ - The Step 7 clock example
8
+ - Trigger reads and event generations
9
+ - What binds depends on which tool
10
+ - A CLI and Stage that admit v15
11
+
3
12
  Checked: `SemanticModelBinder.cs`, `Versions.cs`,
4
13
  `Documentation/screenplay/{commands,operations,event-sources,reactions,tool,interoperability}.md`.
5
14
  The binder selects v8 for event routes, v10 for declared reaction identity, v11 for retained
@@ -23,8 +32,10 @@ Tool versions and consumer boundaries: toolchain `SKILL.md`.
23
32
  Reasons remain report-only PLAY0270; binding proves neither encryption nor erasure.
24
33
  - v17 for `when redelivered` and `then no events`; v19 for reaction
25
34
  refusal branches and `$refusal` values. Older compilers report PLAY0268.
26
- - Operations/systems and the exact numeric **source mode** (`numbers exact`) remain unadmitted
27
- (PLAY0268). Version allocation is not inferred from an older planning decision.
35
+ - Operations and the exact numeric **source mode** (`numbers exact`) remain unadmitted
36
+ (PLAY0268), as do systems when no system in the model declares an ability. Once any system
37
+ declares one, every system is admitted at ESM v50 and an ability invocation selects v51.
38
+ Version allocation is not inferred from an older planning decision.
28
39
 
29
40
  ## Dispositions to keep apart
30
41
 
@@ -41,7 +52,7 @@ Tool versions and consumer boundaries: toolchain `SKILL.md`.
41
52
  | Declared reaction invocation actor | v10 binding/reference execution; older CLI parser PLAY0137; Stage renders role/authenticated reaction identity; claim-reading/opaque gates retain STAGE-ESM-034, not a v10 version refusal |
42
53
  | Redelivery and `then no events` | v17 binding/reference execution; older compilers refuse PLAY0268 |
43
54
  | Reaction refusal branches and `$refusal` | v19 binding/reference execution; older compilers refuse PLAY0268 |
44
- | Operations/systems, `numbers exact` source mode | Source accepted; whole binding refuses PLAY0268 |
55
+ | Operations, systems in a model with no ability, `numbers exact` source mode | Source accepted; whole binding refuses PLAY0268 |
45
56
  | UI | Authoring/deferred metadata; runtime support is a separate consumer contract |
46
57
 
47
58
  Run standalone `screenplay test` or MCP `run-specifications` for V4. Compile
@@ -83,8 +94,8 @@ accepted proposal or parsed node with a running application.
83
94
  and command/specification routes as v8; reaction `runs as` identity as v10;
84
95
  qualifying Double literals lower exactly as v11 and non-positional enum numbers
85
96
  as v12. Use `screenplay test` or MCP `run-specifications` for V4.
86
- Operations/systems and the `numbers exact` **source mode** remain unadmitted
87
- (PLAY0268); redelivery/no-event assertions execute as v17 and refusals as v19. The CLI and Stage render supported generation strategies and v15 freshness,
97
+ Operations and the `numbers exact` **source mode** remain unadmitted, as do systems when no
98
+ system declares an ability (PLAY0268; any ability admits all systems at v50); redelivery/no-event assertions execute as v17 and refusals as v19. The CLI and Stage render supported generation strategies and v15 freshness,
88
99
  scalar/named responses, enum numbers, compliance and supported event reactions.
89
100
  The pair reaches construct checks through the ESM version it bundles, not blanket rendering; supported v14 filters
90
101
  render. Current boundaries and source evidence:
@@ -23,7 +23,7 @@ repository is the full list; this page is the authoring summary.
23
23
 
24
24
  **Top level:** `domain`, `import`, `concept`, `type`, `policy`, `persona`, `user` (development identity; [users](../../cratis-screenplay-command-surface/references/policy-persona-seed.md#users)),
25
25
  `authentication`, `identity`, `purpose`, `storyline` (authoring-only; [storylines](storylines.md)), `trigger`, `design system` (one per application: `modes`, `default theme`, `tokens`, `components`, `words`, `rules`), `theme` (`implements`, `compatible with`, `palette`, `values`, a block per mode), `layout`, `ui profile`, `behavior`,
26
- `sink`, `module`, `seed`, authoring-only `system`, and admitted `eventsource` with its `stream`s (ESM v8).
26
+ `sink`, `module`, `seed`, `system` (admitted at ESM v50 once any system declares an ability; otherwise authoring-only), and admitted `eventsource` with its `stream`s (ESM v8).
27
27
 
28
28
  **Inside a module:** `description`, `authorize`, `import "<glob>"`,
29
29
  `screen`/`dialog` templates, `form`, `contribute`, `on`/`uses` behavior
@@ -305,7 +305,7 @@ See read-surface `references/named-keys.md` for the collection-key exclusion alg
305
305
  | Binds as opaque code (v3); reference runner reports unsupported | Bodied reducers, bodied named rules, fenced `validate` blocks, code or file policies. A pure reducer body is the only attachment Stage admits |
306
306
  | Information only, never blocks | `persona` (report-only: `PLAY0270`, the policies it lists must exist), `authentication`, `onboarding` (see `cratis-screenplay-authentication-and-onboarding`), `domain`, `seed`, descriptions and `file` provenance. A persona does not block binding and does not change behavior, so state persona scope in a description or a policy the model uses |
307
307
  | Binds as ESM v7 (`PLAY0268` on a compiler that stops before v7) | `generated` properties and `returns` responses, generated fixtures and `then returns`: bound and executed by the reference runner; a policy, rule or requirement that references a generated value is `PLAY0273`, and generated-concept rules select v20 with PLAY0688/0689 proof diagnostics. Stage renders supported UUID/String strategies, scalar/named responses and fixtures; unsupported types/result combinations remain `-028`/`-038` |
308
- | Authorable, not executable (PLAY0268) | Systems/operations, the `numbers exact` source mode (PLAY0268; exact lowering of qualifying Double literals is the admitted v11) remain unadmitted |
308
+ | Authorable, not executable (PLAY0268) | Operations, systems when no system declares an ability (any ability admits every system at v50), the `numbers exact` source mode (PLAY0268; exact lowering of qualifying Double literals is the admitted v11) remain unadmitted |
309
309
  | Concept generation strategies (ESM v15) | Required scalar generatable Uuid/String concepts; concept-owned uuid/uuidv7/ulid/typeid/nanoid/bytes strategies and admitted modifiers. Strict fixture encoding; Guarded whole-source freshness rejects Concurrency with no append/retry. Generated secrets and sequence remain refused; generated-concept rules select v20, pattern/random/rule and checksum validation select v21. Stage renders supported strategies: command-surface `references/generated-values-and-responses.md` |
310
310
  | Response-name UI continuations (no ESM change) | Form submit and execute-success scopes, own failure PLAY0685, nested shadowing and outer success in inner failure; field/parameter precedence. An older bundled compiler lacks resolution; Scene runtime binding remains downstream. UI composition `references/response-continuations.md` |
311
311
  | Collection equality filters (ESM v14) | Caller-supplied `filter name Type [optional]`, no `from`, matching a same-named scalar primitive/concept/enum read-model property with the same nominal type. AND with `by`; optional omission does not narrow, supplied null is refused. PLAY0468 covers unknown/repeated/missing required spec arguments; result rows compare by read-model/key regardless of order. Read read-surface `references/equality-filters.md` for the compiled example and renderer ceilings |
@@ -349,7 +349,7 @@ full historical shapes, not deployed-schema immutability or a working migrator.
349
349
  Code attachment/source-map support likewise does not prove code round-trip
350
350
  execution equivalence.
351
351
 
352
- Operations remain authorable/unadmitted (PLAY0268). Named event sources/streams
352
+ Operations remain authorable/unadmitted (PLAY0268); systems are admitted once any system declares an ability. Named event sources/streams
353
353
  and routes bind and reference-execute as v8; reaction identity as v10.
354
354
  Use standalone `screenplay test` or MCP `run-specifications` for a reference
355
355
  verdict, and independently check CLI/Stage admission. Never drop a contract to bind.
@@ -234,7 +234,7 @@ connection. Passing `open-workspace.path` does **not** avoid it, because the err
234
234
  | Repair | `PLAY0166`, `0478`, `0469`, `0471`, `0479`, `0516`, `0563`, `0564`, `0565`, `0614`, `0653`, `0683`, `0684` (and recipe-only `0397`); `PLAY0470` only with author intent ([destination intent repair](destination-intent-repair.md)) | `propose-repair` with `formatting`; PLAY0166/0478 may pin attachment evidence (`pinRepairEvidence` and `expectedRepairEvidenceRevision`), never fix-all PLAY0478 |
235
235
  | Inline event extraction | `produces event ...` to a declared event | `propose-extract-inline-event` |
236
236
  | Parser-invalid document | no editable handles | `propose-source` `replace-document` with corrected source, or typed `propose-ast` document replacement |
237
- | Unadmitted constructs | systems/operations, the `numbers exact` source mode | reviewed Authoring `propose-source` (whole documents) or `propose-ast` (typed edits); preserve intent and report PLAY0268 |
237
+ | Unadmitted constructs | operations, systems when no system declares an ability, the `numbers exact` source mode | reviewed Authoring `propose-source` (whole documents) or `propose-ast` (typed edits); preserve intent and report PLAY0268 |
238
238
  | Admitted source/stream routing | ESM v8 | typed `propose-ast`; `propose-rename` repairs proven route references; target admission separate |
239
239
 
240
240
  PLAY0683/PLAY0684 repairs raise NanoID size or bytes count to at least 64 random
@@ -497,7 +497,7 @@ cannot rename a part through `propose-rename`. Operations and
497
497
  exact numeric mode remain unadmitted. Check installed schemas, especially when
498
498
  the CLI bundle predates the standalone tool.
499
499
 
500
- Systems/operations remain authoring-only (PLAY0268). Sources/streams and their
500
+ Operations remain authoring-only (PLAY0268), as do systems when no system declares an ability; any ability admits every system at ESM v50. Sources/streams and their
501
501
  routes are admitted v8, not syntax-only; see toolchain `references/sources-and-streams.md`.
502
502
  `generated` properties and `returns` responses are admitted as ESM v7 and bind. The server reads and edits them: `declaration-details` exposes `isGenerated`
503
503
  and a command `response` view, `route` and `streams` views; `read-workspace` offers
@@ -23,7 +23,7 @@ speaks in them; never model board mechanics (lanes, node ids, positions).
23
23
  | Role permission ("Cannot") | `policy` + `authorize` + `then denied` spec; ownership via `claim ... matches subject` | `[Authorize(Policy)]`, generated policies | authorization |
24
24
  | Precondition on stream state | `command reads protected` + eligible `reads`/`require` (v25 reference protection); legacy/refused reads remain stated intent. the Cratis renderer renders protected reads as Arc read protection once the CLI bundles a Stage that supports it (older bundles refuse them with STAGE-ESM-044; releases in command-surface `references/protected-reads.md`); semantic-engine execution is separate from generated-app protection. Target Arc `[ProtectedDecision]` + `DecisionRead<T>` or Chronicle DCB needs separate verification | decision over a guarded read | command validation |
25
25
  | Generated id (`derived:uuid4()`) | `generated` (authorable, not executable) | id supplied before `Handle()` | commands |
26
- | External system / outbound call | `Translate` slice (inbound); `system`/`operation` (authorable, not executable) or Automation (outbound) | `ICommandOperation` / reactor | operations, reactors |
26
+ | External system / outbound call | `Translate` slice (inbound); `system` with abilities (admitted ESM v50), `operation` (authorable, not executable) or Automation (outbound) | `ICommandOperation` / reactor | operations, reactors |
27
27
  | HTML mockup | `screen` Level 1 + board (`visualize-model`) | default Scene composition | ui composition |
28
28
  | Event sequence / inbox, outbox / observer | event source `for` identity / not modeled in `.play` (record as target) / `reaction` or projection | event sequence / inbox, outbox / observer | event sources, observers |
29
29
  | Ready (corpus behaviour lifecycle) | P6 accepted on a source identity | n/a | n/a |
@@ -373,8 +373,9 @@ identified by label and key; edges by type, source, target and the `identified b
373
373
 
374
374
  ## What a graph projection cannot say
375
375
 
376
- `children`, `nested`, `join`, `all`, `clear with`, `remove via join`, `variant`, a
377
- projection-level `key` or `sequence`, and `automap` blocks are `PLAY0872`. There is
376
+ `children`, `nested`, `join`, `all`, `clear with`, `variant`, a
377
+ projection-level `key` or `sequence`, and `automap` blocks are `PLAY0872`;
378
+ `remove via join` is read as a malformed removal and is `PLAY0873`. There is
378
379
  no engine-native block: whatever the language cannot say is not supported. The event
379
380
  model board, find-references and rename do not follow graph projections, so renaming
380
381
  an event leaves a graph projection reported as unknown.
@@ -6,7 +6,7 @@
6
6
  Use `description` for a short summary and `documentation` for assumptions,
7
7
  boundaries, trade-offs and rejected alternatives. Put reasoning on the declaration
8
8
  it explains, not in comments or disconnected session notes. Modules, features,
9
- slices, commands, events, read models and reactions accept one nonempty block,
9
+ slices, commands, events, read models, graphs and reactions accept one nonempty block,
10
10
  directly in their body (not beneath a reaction trigger). Queries, personas and other
11
11
  declarations do not accept `documentation`: keep their intent in `description` (a
12
12
  query's ordering, "oldest first", for example). A short status marker such as **NOT
@@ -22,7 +22,8 @@
22
22
  What the binder admits, and what it refuses with which code, depends on the compiler: the
23
23
  standalone tool binds the newest ESM versions, while the compiler bundled in the CLI (and the
24
24
  renderer that uses it) admits through an older version. Operations, the `numbers exact`
25
- **source mode** (PLAY0268) remain unadmitted. Routes bind as
25
+ **source mode** (PLAY0268) and systems in a model where none declares an ability remain
26
+ unadmitted; any ability admits every system at v50. Routes bind as
26
27
  ESM v8, public/direction constructs as v9, identity/overrides/filters as v10, qualifying
27
28
  non-route Double literals (exact lowering of Double-mode literals) as v11, non-positional enum
28
29
  numbers as v12, concept compliance as v13, caller-supplied collection equality filters as v14,
@@ -420,7 +421,7 @@ standalone single-event reaction body (Requires Screenplay 4.258.0; see
420
421
  | `$eventContext.occurred.Week` | PLAY0273 | derived value |
421
422
  | Projection `parent p` where `p` is not on the child event | PLAY0273 | "Event property not found" |
422
423
  | `generated` or `returns` on an older compiler | PLAY0268 | admitted from ESM v7, see above |
423
- | Operations or systems, `numbers exact` source mode | PLAY0268 | not admitted by any supported ESM version; one such construct leaves the **whole** application without an executable model. Event sources/streams/routes instead bind as ESM v8 on the current compiler (`sources-and-streams.md`) |
424
+ | Operations, systems when no system declares an ability, `numbers exact` source mode | PLAY0268 | not admitted by any supported ESM version (once any system declares an ability, all systems bind at v50); one such construct leaves the **whole** application without an executable model. Event sources/streams/routes instead bind as ESM v8 on the current compiler (`sources-and-streams.md`) |
424
425
  | Spec of a gated command or query without `given caller` | PLAY0389 | module and feature gates count |
425
426
  | `given` or `then readmodel` missing key parts | PLAY0351 | explicit `key` marks replace inference; composite fixtures need every part (v27) |
426
427
  | When-less spec asserting events or errors | PLAY0352 | |
@@ -22,8 +22,8 @@ with CLI-RENDER-004. Keep routing intact when a target refuses it;
22
22
  never remove routing to obtain a render. Per-production
23
23
  v10 overrides and observer filters: `production-routes-and-filters.md`.
24
24
 
25
- Systems/operations and `numbers exact` source mode still report
26
- PLAY0268; they are separate capabilities, not evidence against v8 routing.
25
+ Operations, systems in a model where none declares an ability, and `numbers exact`
26
+ source mode still report PLAY0268 (any ability admits every system at ESM v50); they are separate capabilities, not evidence against v8 routing.
27
27
 
28
28
  ## Declare and route
29
29
 
@@ -27,7 +27,7 @@ Compiler syntax: `cheat-sheet.md`. Negative capability claims depend on the tool
27
27
  23. `@` escapes are mandatory for `tag`, `authorize`, `produces`, `reads`, `file`, `validate`, `sequence`, `occurred`, `causedBy`, `namespace`, `correlation`, `causation`, and projection `key`/`parent`/`with` as names.
28
28
  24. Canonicalizing edits can drop unplaceable comments (PLAY0288; inspect `droppedCommentCount`); keep durable rationale in fenced Markdown `documentation`, not `//`, and summaries in `description`. Documentation survives canonical printing but changes neither executable bytes nor `modelRevision`; it is not rendered code.
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
- 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`).
30
+ 26. Operations, `numbers exact` source mode and systems in a model where none declares an ability remain unadmitted (any ability admits every system at v50). 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
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
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`.
@@ -111,10 +111,22 @@ From the `Cratis.Specifications.XUnit` package, namespace `Cratis.Specifications
111
111
  | `.ShouldBeGreaterThanOrEqual(n)` / `.ShouldBeLessThanOrEqual(n)` | Inclusive comparison |
112
112
  | `.ShouldContainSingleItem()` / `.ShouldEachConformTo(predicate)` | Collection cardinality / each-item predicate |
113
113
  | Collection `.ShouldEqual(IEnumerable<T>)` | Ordered sequence equality |
114
- | Collection `.ShouldContain(Predicate<T>)` | At least one matching item |
114
+ | Collection `.ShouldContain(Func<T, bool>)` | At least one matching item |
115
115
  | `.ShouldBeAssignableFrom<T>()` | Actual object is assignable to T |
116
116
  | String `.ShouldContain(substring, StringComparison)` | Explicit string comparison |
117
117
 
118
+ The collection filter is `Func<T, bool>`. A lambda or a `Func<T, bool>` is
119
+ accepted directly; a typed `Predicate<T>` does not convert, so adapt it:
120
+
121
+ ```csharp
122
+ Func<<ItemType>, bool> isExpected = item => item.<Property> == <expected>;
123
+ _items.ShouldContain(isExpected);
124
+ _items.ShouldContain(item => item.<Property> == <expected>);
125
+
126
+ Predicate<<ItemType>> matches = item => item.<Property> == <expected>;
127
+ _items.ShouldContain(item => matches(item));
128
+ ```
129
+
118
130
  Assert on values and types. Do not assert on presentation message strings by
119
131
  default; assert exact text only when that wording is the specified behavior,
120
132
  and name that behavior in the fact.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/pi",
3
- "version": "7.164.1",
3
+ "version": "7.164.3",
4
4
  "description": "Configuration-aware Cratis AI integration for Pi",
5
5
  "type": "module",
6
6
  "files": [