@cratis/pi 7.72.1 → 7.73.1

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 (43) hide show
  1. package/README.md +5 -1
  2. package/package/corpus/harnesses/pi/agents/backend-developer.md +135 -0
  3. package/package/corpus/harnesses/pi/agents/code-reviewer.md +178 -0
  4. package/package/corpus/harnesses/pi/agents/coordinator.md +176 -0
  5. package/package/corpus/harnesses/pi/agents/frontend-developer.md +251 -0
  6. package/package/corpus/harnesses/pi/agents/orchestrator.md +210 -0
  7. package/package/corpus/harnesses/pi/agents/performance-reviewer.md +106 -0
  8. package/package/corpus/harnesses/pi/agents/planner.md +165 -0
  9. package/package/corpus/harnesses/pi/agents/repository-investigation-reviewer.md +43 -0
  10. package/package/corpus/harnesses/pi/agents/repository-investigator.md +47 -0
  11. package/package/corpus/harnesses/pi/agents/screenplay-modeler.md +64 -0
  12. package/package/corpus/harnesses/pi/agents/screenplay-renderer.md +52 -0
  13. package/package/corpus/harnesses/pi/agents/screenplay-reviewer.md +53 -0
  14. package/package/corpus/harnesses/pi/agents/security-reviewer.md +117 -0
  15. package/package/corpus/harnesses/pi/agents/slice-implementer.md +110 -0
  16. package/package/corpus/harnesses/pi/agents/spec-writer.md +160 -0
  17. package/package/corpus/harnesses/pi/extensions/subagent/agents.ts +8 -78
  18. package/package/corpus/harnesses/pi/extensions/subagent/tool-names.ts +77 -0
  19. package/package/corpus/product-sync.json +3 -3
  20. package/package/corpus/skills/cratis-application-slice-conformance/SKILL.md +1 -1
  21. package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +5 -2
  22. package/package/corpus/skills/cratis-screenplay-command-surface/references/described-handlers.md +7 -2
  23. package/package/corpus/skills/cratis-screenplay-command-surface/references/validate-rules.md +4 -2
  24. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generated-recovery.md +4 -1
  25. package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +4 -7
  26. package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +2 -1
  27. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +28 -0
  28. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +12 -1
  29. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +9 -1
  30. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +7 -2
  31. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +10 -1
  32. package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +4 -1
  33. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostic-arguments.md +3 -0
  34. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +5 -1
  35. package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +10 -5
  36. package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +5 -2
  37. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +218 -9
  38. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
  39. package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +1 -1
  40. package/package/corpus/skills/cratis-screenplay-ui-composition/references/file-references.md +5 -2
  41. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +7 -2
  42. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +5 -1
  43. package/package.json +6 -1
@@ -274,7 +274,8 @@ See read-surface `references/named-keys.md` for the collection-key exclusion alg
274
274
  | Protected command reads (ESM v25) | Root `command reads protected`; eligible read paths in requirements and production mappings, absence Validation, concurrent matching facts Conflict; Stage admits v25 and, in a new enough bundle, renders protected reads as Arc read protection, refusing unpreservable shapes and every older bundle with STAGE-ESM-044; semantic Host/executor execute admitted reads with non-Error protected requirements refused STAGE-ESM-045 |
275
275
  | Chronological command dates (ESM v26) | Same-primitive Date/DateTime `==`, `!=`, `>`, `>=`, `<`, `<=` in require/produces-when (property or literal RHS) and command/property rules (literal RHS only). DateTime uses UTC ticks, participating offset-less inputs reject Validation before rules; then matching stays ordinal. Requires Screenplay 4.199.0 (`screenplay --version`); older binders refuse PLAY0268. The Stage Host and executor run v26 (older Stage refuses STAGE-ESM-016); the renderer and legacy engines refuse STAGE-ESM-046 (toolchain `language-admission.md`). Read command-surface `references/date-comparisons.md`. |
276
276
  | Current routing and actor admission | Sources/streams and command/specification routes bind and reference-execute as v8; reaction `runs as system role` supplies the invocation actor as v10. Whole-workspace binding determines executable availability; CLI/Stage realization remains separate |
277
- | Blocks binding (`PLAY0268`) | enum/identity compliance and events combining personal or explicitly subject-scoped secret values with explicit subject marks; a compiler that stops before v13 refuses all `pii`/`secret` concepts ("compliance attributes require portable data-subject semantics"), while v13 binds them and Stage renders protection; attached command `handler` (PLAY0035 beside productions; pending described intent instead binds v23), bare `rule <Name>`, read paths without protected opt-in or in unsupported positions such as `produces when`, date comparisons with mixed primitives, optional condition operands, `$context`, protected read paths or `today`, date rules on concepts or reaction `where`, `$context.tenant`/claims/roles/causation in `produces`, `$env` conditions, `file` constraints, unquoted `import` of an external contract, a read model with neither explicit `key` nor unambiguous query-based identity as described above (several key marks bind as v27; older binders refuse PLAY0268; toolchain `language-admission.md`), queries with context `from` sources (typed query context is unadmitted), single-result filters (collections only), `scoped to` (opaque scope), `performer` (opaque implementation) or a `by` block on a list query or non-optional single result; optional keyed and collection queries, including caller-supplied equality filters and observable delivery, bind, `$causedBy` and templates in projections |
277
+ | Blocks binding (`PLAY0268`) | enum/identity compliance and events combining personal or explicitly subject-scoped secret values with explicit subject marks; a compiler that stops before v13 refuses all `pii`/`secret` concepts ("compliance attributes require portable data-subject semantics"), while v13 binds them and Stage renders protection; bare `rule <Name>`, read paths without protected opt-in or in unsupported positions such as `produces when`, date comparisons with mixed primitives, optional condition operands, `$context`, protected read paths or `today`, date rules on concepts or reaction `where`, `$context.tenant`/claims/roles/causation in `produces`, `$env` conditions, `file` constraints, unquoted `import` of an external contract, a read model with neither explicit `key` nor unambiguous query-based identity as described above (several key marks bind as v27; older binders refuse PLAY0268; toolchain `language-admission.md`), queries with context `from` sources (typed query context is unadmitted), single-result filters (collections only), `scoped to` (opaque scope), `performer` (opaque implementation) or a `by` block on a list query or non-optional single result; optional keyed and collection queries, including caller-supplied equality filters and observable delivery, bind, `$causedBy` and templates in projections |
278
+ | Blocks binding (`PLAY0800`, permanent attachment requirement) | Attached file/inline command `handler`: gap-fill the slice with a constrained implementation attachment, not by waiting for ESM admission. PLAY0035 beside productions; pending described intent instead binds v23. Read required typed `arguments.subject` for the command, never parse the message. Compiler prerequisite and older PLAY0268 attribution: [diagnostic arguments](../../cratis-screenplay-toolchain/references/diagnostic-arguments.md) |
278
279
  | Blocks binding (`PLAY0271`, legacy meaning) | Command reads without protected opt-in and `concurrency`; combined protected reads/concurrency is PLAY0783 |
279
280
  | Deferred (`PLAY0269`, information) | Screens, layouts, templates, forms, contributions, UI profiles, themes, behaviors and `on`/`uses` |
280
281
  | Metadata only (`PLAY0270`, information) | `domain`, `seed`, `persona`, trigger and other descriptions, and `file` provenance on declarations |
@@ -9,6 +9,7 @@
9
9
  - Who owns the connection
10
10
  - The loop
11
11
  - One edit strategy
12
+ - Reference continuity and located conflicts
12
13
  - Self-describing identity migration refusals
13
14
  - Identity state (`.screenplay/identities.json`)
14
15
  - Read-only views worth knowing
@@ -236,6 +237,33 @@ uses; uniqueness changes append-time behavior. Derived regex, matches/checksum
236
237
  repairs and rule-proof status await phase 2b-2; details and source citations are in
237
238
  [concept generation](mcp-tools.md#concept-generation).
238
239
 
240
+ ## Reference continuity and located conflicts
241
+
242
+ Requires Screenplay 4.211.0 (`screenplay --version`) for independent reference-edit batches and string document/path fields; older servers can refuse independent remove/add batches and emit object-shaped fields. Upgrade before relying on this contract.
243
+
244
+ Batch independent reference removals and additions with different text in one
245
+ proposal, just as in sequential proposals. For example, removing a constraint's
246
+ `OrderRecalled` reference and adding a specification's `OrderLost` reference is
247
+ accepted when the remaining checks pass. Occurrence identity follows exact
248
+ correspondence, verified relocation pairing or trusted `propose-move` lineage;
249
+ unmatched references are removals/additions, not inferred moves.
250
+
251
+ Unmatched removed and added references with exactly the same text refuse as
252
+ ambiguous, even across owners/documents and under `Draft`. Comparison is ordinal:
253
+ qualification and case are not normalized; equal tail names alone are not identity.
254
+ Preserve a moved reference with `propose-move` or explicit semantic migrations.
255
+ `Safe` still refuses new unresolved references; matched references cannot lose a
256
+ resolved target, silently rebind unchanged text or capture existing debt.
257
+
258
+ On refusal, read `conflicts[].document` (document identity), `path` and `otherPath`
259
+ as plain strings when present, not objects with nested values. A conflict without
260
+ a document reports null. The message locates the reference text, member/role,
261
+ portable document path and line:column; ambiguous batches list disappeared and
262
+ introduced occurrences, capped at ten with a remaining count. Use these locations
263
+ instead of bisecting the batch. `candidates` stays empty for reference-validator
264
+ refusals; it is reserved for property-planner evidence. `propose-move` report
265
+ document fields are strings too.
266
+
239
267
  ## Self-describing identity migration refusals
240
268
 
241
269
  Read `identityMigrationIssues` on rejected proposals
@@ -59,7 +59,18 @@ the [MCP loop](mcp-loop.md).
59
59
  | Reference execution | `run-specifications` | Run the workspace or a retained proposal candidate read-only; not attached code or target tests |
60
60
  | Effects | `apply`, `recover-workspace` | Apply an accepted plan or explicitly recover an interrupted write |
61
61
 
62
- `propose-move` moves a slice to another feature, or a feature to another module or feature, keeping identities: copy the `target` and `newParent` `{kind, parts}` addresses from the identity inventory and pass `expectedRevision` and `expectedCatalogRevision`. It repairs qualified references and `depends on`, and refuses identity loss, capture, collisions, descendant destinations, inherited authorization or screen-interaction changes and glob imports; review `moveReport` (`identityMigrations`, `referenceRepairs`, `fragmentsMoved`). It does not rename events, change pins or move files, and declaration moves between slices are deferred. Use it for legacy re-slicing instead of retyping declarations.
62
+ `propose-move` moves a slice to another feature, or a feature to another module or feature, keeping identities: copy the `target` and `newParent` `{kind, parts}` addresses from the identity inventory and pass `expectedRevision` and `expectedCatalogRevision`. It repairs qualified references and `depends on`, and refuses identity loss, capture, collisions, descendant destinations, inherited authorization or screen-interaction changes and glob imports; review `moveReport` (`identityMigrations`, `referenceRepairs`, `fragmentsMoved`). It does not rename events, change pins or move files, and declaration moves between slices are deferred. Use it for legacy re-slicing instead of retyping declarations. Its report document fields are plain strings, not nested identity objects.
63
+
64
+ Requires Screenplay 4.211.0 (`screenplay --version`) for string conflict/move-report document fields and independent reference-edit batches; older servers can emit objects and refuse independent remove/add batches. Upgrade before relying on this contract.
65
+
66
+ Independent reference removals and additions with different text may share one
67
+ `propose-source` or `propose-ast` batch. Only unmatched same-text removals/additions
68
+ are refused for ambiguous correspondence, including under `Draft`; other reference
69
+ safety and identity checks still apply. Preserve genuine moves with `propose-move`
70
+ or semantic migrations. Read the refusal's `conflicts[].document`, `path` and
71
+ `otherPath` as strings when present and inspect its located disappeared/introduced
72
+ occurrences instead of bisecting the batch. Details and example:
73
+ [reference continuity](mcp-loop.md#reference-continuity-and-located-conflicts).
63
74
 
64
75
  `propose` is the executable-only whole-document interface. Prefer `propose-source`
65
76
  for whole `.play` text, `propose-ast` for focused typed edits, and `propose-rename`
@@ -39,6 +39,14 @@ for v22–v25: Stage rendering refuses atomic batches, described bodies (even St
39
39
  and protected reads. Semantic Host/executor support is not generated-app protection.
40
40
  Preserve contracts; reference success is not target realization.
41
41
 
42
+ File/inline command handlers refuse PLAY0800 (`CommandHandlerRequiresAttachment`):
43
+ a permanent requirement for a constrained implementation attachment. Gap-fill the
44
+ slice in code rather than wait for a new ESM version. Hosts identify the command
45
+ through the required typed `arguments.subject`, not message text. Requires
46
+ Screenplay 4.210.0 (`screenplay --version`); older binders use PLAY0268 for these
47
+ handlers. Other PLAY0268 families still mean not representable in a supported ESM
48
+ version yet; triage details: [renderability gate](references/renderability-gate.md).
49
+
42
50
  ## Interview phase
43
51
  **Skip if** the request names the model root, the application name, the destination and the
44
52
  decision on non-renderable scope. Otherwise ask only what is missing:
@@ -105,7 +113,7 @@ model still compiles and binds) and its V5 states the scope.
105
113
  against the destination without writing (exit 6 changes pending) and `--scope <Module.Feature.Slice>`
106
114
  (repeatable) to render an admitted part. Classify every
107
115
  diagnostic with `references/renderability-gate.md`: model fix in the chosen mode,
108
- capability gap, tool skew or environment. Group by code and count; do not paste the list.
116
+ capability gap, permanent implementation-attachment requirement, tool skew or environment. Group by code and count; do not paste the list.
109
117
  3. **When admission fails** (case A) present the options, the user decides:
110
118
  (a) keep design mode and record the gaps; (b) narrow to renderable mode, where the modeler
111
119
  changes the model for business reasons and **without** removing protection (`pii`,
@@ -10,7 +10,11 @@ probe reports and choosing what to do. Do not copy the code table here.
10
10
  1. The CLI compiles and binds the **whole** model with its **bundled** Screenplay (the ESM level it renders is bounded by the bundle; older bundles bound less). Binding is never scoped:
11
11
  any binding error blocks even a `--scope` render. Binding errors are `PLAY0268` (outside the admitted vertical), `PLAY0269`
12
12
  (deferred), `PLAY0270` (report-only information), `PLAY0271` (legacy semantics) and `PLAY0273`
13
- (a specification shape).
13
+ (a specification shape). File/inline command handlers instead report PLAY0800
14
+ (`CommandHandlerRequiresAttachment`), a permanent constrained-attachment requirement.
15
+ Requires Screenplay 4.210.0 (`screenplay --version`); older bundled binders use
16
+ PLAY0268 for these handlers. Hosts read the required typed `arguments.subject`
17
+ to identify the command, never the message.
14
18
  2. Execution planning builds the plan and can emit `PLAN-*` diagnostics before Stage runs.
15
19
  3. Stage plans the target and admits or rejects each member: `STAGE-ESM-0xx`; profile and path
16
20
  problems `STAGE-CRATIS-0xx`. An evolved event is reported with Stage's own `STAGE-ESM-026`
@@ -31,7 +35,8 @@ ESM). Only the probe answers renderability. `PLAY0270` entries are information,
31
35
  | Class | Meaning | Typical examples (each verified in `admission.md`) | Action |
32
36
  | --- | --- | --- | --- |
33
37
  | **Model fix (in mode)** | the model is in, or the user chose, renderable mode and breaks its own subset in a way that has a renderable equivalent with the same meaning | a `produces` whose `for` is not the command identifier; two projections for one read model (`-007`); a policy Stage cannot express portably (`-015`; role-only and opaque pure policies render) | edit request to the modeler session with address, change and rationale |
34
- | **Capability gap** | the intended meaning needs a construct Stage does not render yet | DateTime equality filters and required parameters after optional filters (`-010`); context/single-result filters, opaque `scoped to`/`performer` and a list-query `by` block remain PLAY0268; a read model with several key parts or a projection keyed by parts (v27) refuses `STAGE-ESM-048` and a single-instance query by parts `STAGE-ESM-047` (Chronicle#4265); Translate, clocks, captures, non-event triggers and opaque reaction bodies (`-024`); claim-reading/opaque `runs as` gates (`-034`), legacy `from` (`-035`), mixed effects in one handler (`-037`, retries can duplicate events; keep it whole), unsupported reaction mappings (`-039`); unsupported generated types/result combinations (`-028`/`-038`); `then no readmodel` (`-027`); evolved events (`STAGE-ESM-026`); unsupported expression/enum production conditions (`-006`; supported conditional productions render); legacy reads (`PLAY0271`), protected reads the renderer cannot preserve, or any protected read in an older CLI bundle (STAGE-ESM-044 despite v25 admission; semantic Host/executor support is separate); code validation (`-005`); protected identities/enums (`-040`) or unadmitted explicit subject lineage (`PLAY0268`); attached command handlers (PLAY0268), described handlers (v23, STAGE-IMPL-002 even Stub mode), atomic mode (STAGE-ESM-016 for v22, STAGE-ESM-043 in admitted v23–v27) | keep the model; fallback record entry; options a to c in `SKILL.md`; link the Stage issue |
38
+ | **Capability gap** | the intended meaning needs a construct Stage does not render yet | DateTime equality filters and required parameters after optional filters (`-010`); context/single-result filters, opaque `scoped to`/`performer` and a list-query `by` block remain PLAY0268; a read model with several key parts or a projection keyed by parts (v27) refuses `STAGE-ESM-048` and a single-instance query by parts `STAGE-ESM-047` (Chronicle#4265); Translate, clocks, captures, non-event triggers and opaque reaction bodies (`-024`); claim-reading/opaque `runs as` gates (`-034`), legacy `from` (`-035`), mixed effects in one handler (`-037`, retries can duplicate events; keep it whole), unsupported reaction mappings (`-039`); unsupported generated types/result combinations (`-028`/`-038`); `then no readmodel` (`-027`); evolved events (`STAGE-ESM-026`); unsupported expression/enum production conditions (`-006`; supported conditional productions render); legacy reads (`PLAY0271`), protected reads the renderer cannot preserve, or any protected read in an older CLI bundle (STAGE-ESM-044 despite v25 admission; semantic Host/executor support is separate); code validation (`-005`); protected identities/enums (`-040`) or unadmitted explicit subject lineage (`PLAY0268`); described handlers (v23, STAGE-IMPL-002 even Stub mode), atomic mode (STAGE-ESM-016 for v22, STAGE-ESM-043 in admitted v23–v27) | keep the model; fallback record entry; options a to c in `SKILL.md`; link the Stage issue |
39
+ | **Implementation attachment** | a permanent limitation, not future ESM admission | file/inline command handlers (PLAY0800; typed `subject` names the command) | keep the model contract and gap-fill the slice in code with a constrained implementation attachment; do not wait for a new ESM version |
35
40
  | **Tool skew** | the bundled compiler disagrees with documented semantics | the false `PLAY0285` on reaction cascades from an older bundle; codes the standalone compiler does not raise | record in the session state and the fallback record; never "fix" a correct model |
36
41
  | **Environment** | not the model | restore failures, missing SDK, a destination that is not writable | fix the environment or report blocked |
37
42
 
@@ -1,5 +1,11 @@
1
1
  # Specification forms by mode
2
2
 
3
+ ## Contents
4
+
5
+ - Design mode
6
+ - Executable mode
7
+ - Renderable mode
8
+
3
9
  The subsets themselves (what binds, what renders) are owned by `cratis-screenplay-toolchain`
4
10
  (its executable and renderable subset references); installed versions by its `SKILL.md`. This file
5
11
  says what that means for writing specs. A form outside the chosen mode is never deleted from a
@@ -38,10 +44,13 @@ Typed example/override forms: `cratis-screenplay-specifications`
38
44
  | Date rules using `today`, `$context`, mixed `Date`/`DateTime`, concept or reaction-`where` positions; nested paths | spec them in design | rule does not bind: `recorded` | `recorded` |
39
45
  | Bodied rules, code policies | spec them | spec reported **unsupported**, never passed | no |
40
46
  | Pending described command handlers (v23) | specify intent | binds; denial/validation execute, body-reaching specs Unsupported ImplementationBody; all-Unsupported is not green | STAGE-IMPL-002 even Stub mode |
41
- | Attached command handlers, `file` constraints, query `performer`s | spec them in design | blocked: PLAY0268 at binding, no spec runs (V3 blocked) | no |
47
+ | Attached command handlers | spec them in design | blocked: PLAY0800, no spec runs (V3 blocked); permanent constrained-attachment requirement, gap-fill in code | no |
48
+ | `file` constraints, query `performer`s | spec them in design | blocked: PLAY0268 at binding, no spec runs (V3 blocked) | no |
42
49
  | Atomic reaction mode (v22) | declare for new models | failed batch adds no facts or view changes; earlier batches/commands remain; `then error` alone is insufficient | v22 STAGE-ESM-016; mode in admitted v23–v27 STAGE-ESM-043 |
43
50
  | Protected command reads (v25) | declare opt-in for eligible reads | absence Validation; matching intervening facts Conflict; race vectors are not a new spec construct | Cratis C# rendering in a new enough bundle (STAGE-ESM-044 before, or for unpreservable shapes); semantic Host/executor execute admitted reads, non-Error protected requirements STAGE-ESM-045; v25 pair admitted |
44
51
 
52
+ Requires Screenplay 4.210.0 (`screenplay --version`) for attached handlers to report PLAY0800; older binders use PLAY0268. Other PLAY0268 families are unchanged.
53
+
45
54
  Requires Screenplay 4.105.0 or later (`screenplay --version`) for list-query specifications, and 4.143.0 or later for collection equality filters (ESM v14).
46
55
 
47
56
  Requires Screenplay 4.157.0 for v17, 4.160.0 for v19 and 4.161.0 for query validation/error assertions (`screenplay --version`); older compilers refuse those forms.
@@ -109,7 +109,10 @@ changes with the root folder name.
109
109
  filters, opaque `scoped to`/`performer` and a `by` block on a list query remain PLAY0268. Read
110
110
  read-surface [equality filters](../cratis-screenplay-read-surface/references/equality-filters.md).
111
111
  Pending handlers beside unconditional productions bind as described commands (v23),
112
- but reached bodies are Unsupported; attached handlers remain PLAY0268.
112
+ but reached bodies are Unsupported; attached file/inline handlers refuse PLAY0800
113
+ and require constrained implementation attachments (code gap-fill, not future ESM
114
+ admission).
115
+ Requires Screenplay 4.210.0 (`screenplay --version`); older binders use PLAY0268 for this refusal. Read `arguments.subject`, not the message, for the command.
113
116
  Eligible protected reads opt into v25; legacy reads and `concurrency` retain PLAY0271.
114
117
  Concept compliance binds as v13 (precise refusals: command-surface `references/compliance.md`);
115
118
  generated values and `returns` responses bind (ESM v7, `references/generated-responses-example.md`). Read [references/executable-example.md](references/executable-example.md) when you need a small StateChange and StateView model that binds executable, [references/pdl-example.md](references/pdl-example.md) when writing projection forms that bind and run, and [references/automation-translate-example.md](references/automation-translate-example.md) when writing Automation and Translate slices (ESM v6).
@@ -60,11 +60,14 @@ a separate `case` names an expansion. Argument order is immaterial.
60
60
  | PLAY0795 | `profile`, `template`, `blueprint?`, `outlet` |
61
61
  | PLAY0796 | `profile`, `template`, `blueprint?`, `option` |
62
62
  | PLAY0797 | `profile`, `value` |
63
+ | PLAY0800 | `subject` (required declaration: command) |
63
64
 
64
65
  PLAY0781–PLAY0785 need Screenplay 4.207.0; earlier compilers omit these arguments. `read` is the alias when the
65
66
  command gives one, else the read model name. The PLAY0781 `reason` keywords are listed in command-surface
66
67
  [protected reads](../../cratis-screenplay-command-surface/references/protected-reads.md); each refused read gets its own PLAY0781.
67
68
 
69
+ Requires Screenplay 4.210.0 (`screenplay --version`) for PLAY0800 (`CommandHandlerRequiresAttachment`) and its `subject`; older binders report attached command handlers as PLAY0268. `arguments.subject.kind` is `command` and `path` names the command. Treat the refusal as permanent: deliver a constrained implementation attachment by code gap-fill, not by waiting for ESM admission. Switch on the code and navigate the subject, never match message text.
70
+
68
71
  For PLAY0524, `step` is given, given readmodel, when, when append or then.
69
72
  `stepIndex` counts every authored given/when/then clause once across all forms,
70
73
  not nested lines, synthesized callers or defaults. Example/case expansion retains
@@ -376,9 +376,13 @@ keys (STAGE-ESM-048/-047). Read
376
376
  Requires Stage 4.129.0 for semantic Host/executor protected reads; older engines refuse -044.
377
377
 
378
378
  ## Binding (V2 and V3) - see `executable-subset.md` for the full table
379
+
380
+ Requires Screenplay 4.210.0 (`screenplay --version`) for PLAY0800 and its required typed `subject`; older binders attribute attached command handlers to PLAY0268. Other PLAY0268 refusal families are unchanged.
381
+
379
382
  | Code | Meaning | Fix |
380
383
  |---|---|---|
381
- | PLAY0268 | construct the ESM cannot represent; read the message for the construct (`executable-subset.md` lists attached handlers, unsupported query shapes, protected enum/identity concepts, read paths without opt-in or in `produces when`, Uuid ordering, different Uuid concepts and Uuid rules, and older bundled-compiler limits) | stay in design mode, or change the construct if the domain allows; never strip `pii`/authorization |
384
+ | PLAY0268 | construct not representable in a supported ESM version yet (`executable-subset.md` lists unsupported query shapes, protected enum/identity concepts, read paths without opt-in or in `produces when`, Uuid ordering, different Uuid concepts and Uuid rules, and older bundled-compiler limits) | stay in design mode, or change the construct if the domain allows; never strip `pii`/authorization |
385
+ | PLAY0800 | error `CommandHandlerRequiresAttachment`: a file/inline command handler requires a constrained implementation attachment; required typed `subject` identifies the command | permanent limitation: gap-fill the slice in code, not by waiting for ESM admission; hosts switch on the code and read `arguments.subject`, never match the message |
382
386
  | PLAY0269 / 0270 | UI deferred / authoring metadata (I) | none |
383
387
  | PLAY0271 | legacy `reads` or a `concurrency` block keeps its legacy meaning and cannot bind (error) | opt eligible command reads into v25 with reviewed preamble repair; `concurrency` remains unbound; uniqueness uses a constraint, target realization stays separate |
384
388
  | PLAY0273 | incoherent: ambiguous `for`, property not on event revision, operand type mismatch, derived `$eventContext` path, unparsable date literal or offset-less DateTime literal in an admitted v26 comparison, or a Uuid comparison literal that is not lowercase hyphenated (v28) | fix the reference or literal; DateTime needs offset/Z; Uuid literals are lowercase hyphenated |
@@ -313,8 +313,9 @@ v22–v28 and [described handlers](../../cratis-screenplay-command-surface/refer
313
313
  for the result contract. Attached handlers remain unbound.
314
314
 
315
315
  Inline fences (`csharp`, `typescript`, `react`, `html`, `sql`) and `file <path>` attach
316
- code to an owner. Three kinds block binding (PLAY0268, V3 blocked, no specification runs):
317
- the attached command `handler`, the `file` constraint (see below) and a query `performer`
316
+ code to an owner. Three kinds block binding (V3 blocked, no specification runs):
317
+ the attached command `handler` (PLAY0800), the `file` constraint (PLAY0268, see below)
318
+ and a query `performer` (PLAY0268)
318
319
  ("uses delivery, filtering, scope, or implementation behavior outside the first ESM v1
319
320
  vertical"). Everything else binds as an **opaque requirement** that needs a target to
320
321
  execute: reducer transitions, rule predicates, command and concept code validation, policy
@@ -327,8 +328,12 @@ bodies still leave their owner non-executable.
327
328
  can only declare uniqueness: declare it with `unique ...`, and put other rules in command
328
329
  validation or a `require` condition.
329
330
 
330
- - A file/fenced command `handler` remains PLAY0268, wrapped or direct. A pending
331
- intent instead selects v23 with unconditional productions (PLAY0695 information).
331
+ - A file/fenced command `handler` refuses PLAY0800, wrapped or direct: a permanent
332
+ requirement for a constrained implementation attachment, not future ESM admission.
333
+ Gap-fill the slice in code; hosts read the required typed `arguments.subject` for
334
+ the command rather than matching message text.
335
+ Requires Screenplay 4.210.0 (`screenplay --version`); older binders use PLAY0268.
336
+ A pending intent instead selects v23 with unconditional productions (PLAY0695 information).
332
337
  Missing productions use PLAY0696, conditional ones PLAY0697, duplicate handlers PLAY0698.
333
338
  Hints are not executable code, locks or confirmation.
334
339
  - A command property named rule also accepts an `implementation` block (ordered
@@ -362,7 +367,7 @@ bodies still leave their owner non-executable.
362
367
  | Uuid comparison with `<`, `>`, different concepts, optional operands, a validation rule or a concept rule | PLAY0268 | v28 admits `==`/`!=` in command conditions only, between the same concept or a bare Uuid and a concept |
363
368
  | Legacy `reads <View> ...` on a command | PLAY0271 (error) | `command reads protected` opts eligible views into v25; see command-surface protected reads |
364
369
  | `concurrency` block on a command | PLAY0271 (error) | "concurrency metadata keeps its legacy meaning and cannot bind to ESM v1" |
365
- | File/inline `handler` (see above) | PLAY0268 | pending described handlers instead bind v23; body execution and rendering remain gaps |
370
+ | File/inline `handler` (see above) | PLAY0800 | permanent attachment requirement: gap-fill in code; pending described handlers instead bind v23, with body execution/rendering separate |
366
371
  | `$context.tenant`, roles, claims, causation | PLAY0268 | no portable scalar counterpart |
367
372
  | Arithmetic or raw expression in a `produces` mapping | PLAY0268 | |
368
373
  | Template `` `${x}` `` or `$causedBy` in a projection | PLAY0268 | |
@@ -69,7 +69,7 @@ with STAGE-IMPL-002 (even Stub mode), and atomic mode in admitted pairs with
69
69
  STAGE-ESM-043. Literal
70
70
  text rules execute/render ordinal UTF-16 comparisons. Read [language admission](language-admission.md).
71
71
  A CLI's older bundled compiler may fail first: legacy reads/concurrency PLAY0271,
72
- attached handlers PLAY0268. Protected reads bind v25. Non-Error protected requirements
72
+ attached handlers PLAY0800 (PLAY0268 before Screenplay 4.210.0). Protected reads bind v25. Non-Error protected requirements
73
73
  refuse STAGE-ESM-045, including reaction invocations; this is not a rendering result.
74
74
  Requires Stage 4.129.0 for semantic Host/executor protected reads (older engines refuse -044) and Stage 4.138.0 for the Cratis renderer to render them.
75
75
  Response-name authoring scopes are not rendered and Scene runtime does not supply them.
@@ -98,7 +98,10 @@ ids into routing to fit a renderer (PLAY0515).
98
98
  older renderers refuse snapshot lists with STAGE-ESM-010.
99
99
  context/single-result filters, opaque `scoped to` and `performer` block binding. Keep a list the domain needs and report
100
100
  the capability gap; marking it `observable` or keying it is a modeling decision for the user.
101
- - Attached handlers remain PLAY0268. Pending handlers beside unconditional
101
+ - Attached file/inline handlers refuse PLAY0800 and require constrained implementation
102
+ attachments: gap-fill in code, not by waiting for ESM admission.
103
+ Requires Screenplay 4.210.0 (`screenplay --version`); older binders use PLAY0268.
104
+ Pending handlers beside unconditional
102
105
  productions bind v23 but Stage refuses their bodies (STAGE-IMPL-002), even Stub mode;
103
106
  deliver as authorized gap-fill, never as implemented generated stubs.
104
107
  - Descriptions and documentation render only as XML doc comments, never as
@@ -32472,7 +32472,21 @@
32472
32472
  ],
32473
32473
  "title": "Source syntax carries portable behavior that ESM v1 cannot represent.",
32474
32474
  "reserved": false,
32475
- "retired": false
32475
+ "retired": false,
32476
+ "arguments": [
32477
+ {
32478
+ "name": "subject",
32479
+ "kind": "declaration",
32480
+ "optional": true,
32481
+ "meaning": "The innermost declaration that contains the refused construct; absent for document-level refusals."
32482
+ },
32483
+ {
32484
+ "name": "issue",
32485
+ "kind": "text",
32486
+ "optional": true,
32487
+ "meaning": "The tracking issue named by the refusal, such as Cratis/Screenplay#600, when it cites one."
32488
+ }
32489
+ ]
32476
32490
  },
32477
32491
  {
32478
32492
  "code": "PLAY0269",
@@ -33465,7 +33479,33 @@
33465
33479
  ],
33466
33480
  "title": "A quoted match pattern is not a valid ECMAScript regular expression.",
33467
33481
  "reserved": false,
33468
- "retired": false
33482
+ "retired": false,
33483
+ "arguments": [
33484
+ {
33485
+ "name": "subject",
33486
+ "kind": "declaration",
33487
+ "optional": false,
33488
+ "meaning": "The command or concept that owns the match rule."
33489
+ },
33490
+ {
33491
+ "name": "property",
33492
+ "kind": "text",
33493
+ "optional": true,
33494
+ "meaning": "The constrained command property; absent for a concept\u0027s own value."
33495
+ },
33496
+ {
33497
+ "name": "pattern",
33498
+ "kind": "text",
33499
+ "optional": false,
33500
+ "meaning": "The decoded match pattern."
33501
+ },
33502
+ {
33503
+ "name": "offset",
33504
+ "kind": "index",
33505
+ "optional": false,
33506
+ "meaning": "The zero-based UTF-16 offset in the pattern where the problem starts."
33507
+ }
33508
+ ]
33469
33509
  },
33470
33510
  {
33471
33511
  "code": "PLAY0368",
@@ -36804,7 +36844,33 @@
36804
36844
  ],
36805
36845
  "title": "A match pattern uses a construct outside the portable linear dialect.",
36806
36846
  "reserved": false,
36807
- "retired": false
36847
+ "retired": false,
36848
+ "arguments": [
36849
+ {
36850
+ "name": "subject",
36851
+ "kind": "declaration",
36852
+ "optional": false,
36853
+ "meaning": "The command or concept that owns the match rule."
36854
+ },
36855
+ {
36856
+ "name": "property",
36857
+ "kind": "text",
36858
+ "optional": true,
36859
+ "meaning": "The constrained command property; absent for a concept\u0027s own value."
36860
+ },
36861
+ {
36862
+ "name": "pattern",
36863
+ "kind": "text",
36864
+ "optional": false,
36865
+ "meaning": "The decoded match pattern."
36866
+ },
36867
+ {
36868
+ "name": "offset",
36869
+ "kind": "index",
36870
+ "optional": false,
36871
+ "meaning": "The zero-based UTF-16 offset in the pattern where the problem starts."
36872
+ }
36873
+ ]
36808
36874
  },
36809
36875
  {
36810
36876
  "code": "PLAY0700",
@@ -37244,7 +37310,49 @@
37244
37310
  ],
37245
37311
  "title": "A command decision read cannot be protected, with a closed refusal reason describing its shape or key.",
37246
37312
  "reserved": false,
37247
- "retired": false
37313
+ "retired": false,
37314
+ "arguments": [
37315
+ {
37316
+ "name": "command",
37317
+ "kind": "declaration",
37318
+ "optional": false,
37319
+ "meaning": "The command declaring the read."
37320
+ },
37321
+ {
37322
+ "name": "read",
37323
+ "kind": "text",
37324
+ "optional": false,
37325
+ "meaning": "The read model name or alias as the command reads it."
37326
+ },
37327
+ {
37328
+ "name": "readModel",
37329
+ "kind": "declaration",
37330
+ "optional": false,
37331
+ "meaning": "The read model declaration that cannot be protected."
37332
+ },
37333
+ {
37334
+ "name": "reason",
37335
+ "kind": "keyword",
37336
+ "optional": false,
37337
+ "meaning": "The closed refusal reason, the name of the decision-read refusal.",
37338
+ "values": [
37339
+ "reducer",
37340
+ "join",
37341
+ "children",
37342
+ "open-subscription",
37343
+ "payload-key",
37344
+ "by-parts",
37345
+ "no-removal",
37346
+ "empty-handled-set",
37347
+ "named-source-or-stream",
37348
+ "singleton",
37349
+ "key-type",
37350
+ "generated-key",
37351
+ "optional-key",
37352
+ "collection-key"
37353
+ ]
37354
+ }
37355
+ ]
37248
37356
  },
37249
37357
  {
37250
37358
  "code": "PLAY0782",
@@ -37255,7 +37363,21 @@
37255
37363
  ],
37256
37364
  "title": "A protected command read omits its lookup property and the command has no declared identifier.",
37257
37365
  "reserved": false,
37258
- "retired": false
37366
+ "retired": false,
37367
+ "arguments": [
37368
+ {
37369
+ "name": "command",
37370
+ "kind": "declaration",
37371
+ "optional": false,
37372
+ "meaning": "The command declaring the read."
37373
+ },
37374
+ {
37375
+ "name": "read",
37376
+ "kind": "text",
37377
+ "optional": false,
37378
+ "meaning": "The read model name or alias as the command reads it."
37379
+ }
37380
+ ]
37259
37381
  },
37260
37382
  {
37261
37383
  "code": "PLAY0783",
@@ -37266,7 +37388,15 @@
37266
37388
  ],
37267
37389
  "title": "A command declares both protected reads and concurrency, making its consistency boundary ambiguous.",
37268
37390
  "reserved": false,
37269
- "retired": false
37391
+ "retired": false,
37392
+ "arguments": [
37393
+ {
37394
+ "name": "command",
37395
+ "kind": "declaration",
37396
+ "optional": false,
37397
+ "meaning": "The command declaring both reads and concurrency."
37398
+ }
37399
+ ]
37270
37400
  },
37271
37401
  {
37272
37402
  "code": "PLAY0784",
@@ -37277,7 +37407,27 @@
37277
37407
  ],
37278
37408
  "title": "A read path does not name a declared command read or alias.",
37279
37409
  "reserved": false,
37280
- "retired": false
37410
+ "retired": false,
37411
+ "arguments": [
37412
+ {
37413
+ "name": "path",
37414
+ "kind": "text",
37415
+ "optional": false,
37416
+ "meaning": "The authored read path that resolves to no declared read and view property."
37417
+ },
37418
+ {
37419
+ "name": "read",
37420
+ "kind": "text",
37421
+ "optional": false,
37422
+ "meaning": "The first path segment, the read name or alias that resolves to no declared read."
37423
+ },
37424
+ {
37425
+ "name": "command",
37426
+ "kind": "declaration",
37427
+ "optional": false,
37428
+ "meaning": "The command whose read path is unknown."
37429
+ }
37430
+ ]
37281
37431
  },
37282
37432
  {
37283
37433
  "code": "PLAY0785",
@@ -37288,7 +37438,27 @@
37288
37438
  ],
37289
37439
  "title": "A read path names a view read more than once instead of a distinguishing alias.",
37290
37440
  "reserved": false,
37291
- "retired": false
37441
+ "retired": false,
37442
+ "arguments": [
37443
+ {
37444
+ "name": "path",
37445
+ "kind": "text",
37446
+ "optional": false,
37447
+ "meaning": "The authored read path that names a repeated read model."
37448
+ },
37449
+ {
37450
+ "name": "read",
37451
+ "kind": "text",
37452
+ "optional": false,
37453
+ "meaning": "The read model name read more than once."
37454
+ },
37455
+ {
37456
+ "name": "command",
37457
+ "kind": "declaration",
37458
+ "optional": false,
37459
+ "meaning": "The command whose read path is ambiguous."
37460
+ }
37461
+ ]
37292
37462
  },
37293
37463
  {
37294
37464
  "code": "PLAY0786",
@@ -37310,7 +37480,27 @@
37310
37480
  ],
37311
37481
  "title": "A Studio text-rule pattern has an equivalent first-class ordinal rule.",
37312
37482
  "reserved": false,
37313
- "retired": false
37483
+ "retired": false,
37484
+ "arguments": [
37485
+ {
37486
+ "name": "subject",
37487
+ "kind": "declaration",
37488
+ "optional": false,
37489
+ "meaning": "The command or concept that owns the match rule."
37490
+ },
37491
+ {
37492
+ "name": "property",
37493
+ "kind": "text",
37494
+ "optional": true,
37495
+ "meaning": "The constrained command property; absent for a concept\u0027s own value."
37496
+ },
37497
+ {
37498
+ "name": "pattern",
37499
+ "kind": "text",
37500
+ "optional": false,
37501
+ "meaning": "The decoded match pattern."
37502
+ }
37503
+ ]
37314
37504
  },
37315
37505
  {
37316
37506
  "code": "PLAY0788",
@@ -37629,6 +37819,25 @@
37629
37819
  "meaning": "The blueprint the template comes from."
37630
37820
  }
37631
37821
  ]
37822
+ },
37823
+ {
37824
+ "code": "PLAY0800",
37825
+ "name": "CommandHandlerRequiresAttachment",
37826
+ "severity": "error",
37827
+ "severities": [
37828
+ "error"
37829
+ ],
37830
+ "title": "A command handler requires a constrained implementation attachment.",
37831
+ "reserved": false,
37832
+ "retired": false,
37833
+ "arguments": [
37834
+ {
37835
+ "name": "subject",
37836
+ "kind": "declaration",
37837
+ "optional": false,
37838
+ "meaning": "The command whose handler requires a constrained implementation attachment."
37839
+ }
37840
+ ]
37632
37841
  }
37633
37842
  ],
37634
37843
  "mcpTools": [
@@ -62,7 +62,7 @@ Identity and compliance traps (`identity.md`, `concepts.md`, `events.md`, `purpo
62
62
  unknown, not safe. Arc needs `[ExecuteCommandsAsSystem]` to supply a principal.
63
63
 
64
64
  Traps 39 to 44 are tool traps.
65
- 39. Attached handlers remain PLAY0268; pending `handler implementation` beside unconditional productions binds as a described v23 command (PLAY0695). Body-reaching specs are Unsupported ImplementationBody; Stage refuses STAGE-IMPL-002, including Stub mode. `implementation` and `hint` are accepted on a command handler, an operation execute/compensate phase and a command property named rule, and are rejected on concept rules, built-in property rules and whole-command `require`/`validate` bodies; hints do not execute, lock or confirm a body. A handler slice is gap-fill, not a customization of a rendered slice.
65
+ 39. Attached file/inline command handlers refuse PLAY0800 (`CommandHandlerRequiresAttachment`): permanent constrained-attachment requirement, so gap-fill in code rather than wait for ESM admission. Read required typed `arguments.subject`, not the message; older binders use PLAY0268 (version gate: [diagnostic arguments](diagnostic-arguments.md)). Pending `handler implementation` beside unconditional productions binds as a described v23 command (PLAY0695). Body-reaching specs are Unsupported ImplementationBody; Stage refuses STAGE-IMPL-002, including Stub mode. `implementation` and `hint` are accepted on a command handler, an operation execute/compensate phase and a command property named rule, and are rejected on concept rules, built-in property rules and whole-command `require`/`validate` bodies; hints do not execute, lock or confirm a body. A handler slice is gap-fill, not a customization of a rendered slice.
66
66
  40. `numbers exact` (the source mode) parses but never binds (PLAY0268; "not admitted by any supported executable model (ESM) version yet") and is PLAY0001 on older compilers; it is absent from `grammar.md`. Exact lowering of qualifying Double-mode literals is separate (v11). Never use it in a model or example meant to execute.
67
67
  41. MCP roots bug: a dynamic-root server on an old tool answers the roots request with an `id: null` error right after `notifications/initialized`; hosts treat it as fatal, and `open-workspace.path` does not help. Start with a fixed root (`screenplay mcp <folder>`, `cratis screenplay mcp` in a project with `.cratis/ai.json`).
68
68
  Requires Screenplay 4.63.2 or later (`screenplay --version`) for a dynamic-root server; the compiler bundled in older cratis releases lacks it.
@@ -6,8 +6,9 @@ This reference holds the three meanings of `file` and the rules for paths and lo
6
6
 
7
7
  Three meanings, one word:
8
8
 
9
- - **Backend implementation attachment.** On an attached command `handler` (still
10
- PLAY0268; pending described handlers instead bind v23 without a file), a validation
9
+ - **Backend implementation attachment.** On an attached command `handler`
10
+ (PLAY0800: permanent constrained-attachment requirement, gap-filled in code;
11
+ pending described handlers instead bind v23 without a file), a validation
11
12
  rule predicate, a query `performer`, a reducer rule, a reaction trigger, a
12
13
  `constraint` and a `policy`, `file` stands in for the inline body: the
13
14
  implementation lives there. These are the files a host inventories.
@@ -21,6 +22,8 @@ Three meanings, one word:
21
22
  `readmodel`, `projection`, `slice`, `specification`, top-level `trigger` — it
22
23
  only records which file realizes it.
23
24
 
25
+ Requires Screenplay 4.210.0 (`screenplay --version`) for the file/inline handler's PLAY0800; older binders use PLAY0268. Read its required typed `arguments.subject` to identify the command, never the message.
26
+
24
27
  The rules:
25
28
 
26
29
  - **Repository relative, never absolute** (an absolute path is warning `PLAY0264`).
@@ -134,8 +134,13 @@ One blocker publishes nothing. Codes, limits and fixes: [references/admission.md
134
134
  unsupported conditional productions, composite read-model keys (`STAGE-ESM-048`, and `-047` for a single-instance query by parts) and unsupported `all` shapes.
135
135
  Protected reads render as Arc read protection in a new enough bundle; shapes it cannot preserve, and every protected read in an older bundle, refuse `STAGE-ESM-044` (see admission.md). The renderer refuses described handlers `STAGE-IMPL-002`
136
136
  (even Stub mode), and atomic mode in admitted pairs `STAGE-ESM-043`.
137
- - **Binding refusals (`PLAY0268`/`PLAY0271`):** legacy reads, `concurrency`, attached
138
- handlers, context/single-result filters, opaque scope/performer, a list-query `by` block,
137
+ - **Attached command handlers (`PLAY0800`):** file/inline handlers permanently require
138
+ constrained implementation attachments: gap-fill the slice in code, not by waiting
139
+ for ESM admission. Read the required typed `arguments.subject` for the command,
140
+ never match message text. Requires Screenplay 4.210.0 (`screenplay --version`);
141
+ older bundled binders use PLAY0268 for these handlers.
142
+ - **Binding refusals (`PLAY0268`/`PLAY0271`):** legacy reads, `concurrency`,
143
+ context/single-result filters, opaque scope/performer, a list-query `by` block,
139
144
  enum/identity compliance and subject lineage. Eligible protected reads bind v25;
140
145
  pending handlers with unconditional productions bind v23, but neither renders. A read model with several key parts (v27) is admitted but refuses rendering (`STAGE-ESM-048`).
141
146
  Never drop protection.