@cratis/pi 7.21.0 → 7.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +31 -15
  2. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/audit-format.md +4 -3
  3. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/automation-patterns.md +13 -15
  4. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/cases-to-specify.md +4 -4
  5. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/effects-and-idempotency.md +21 -0
  6. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/provenance.md +4 -2
  7. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/todo-list-example.md +7 -4
  8. package/package/corpus/skills/cratis-screenplay-automations-and-translations/verification.json +4 -4
  9. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +41 -38
  10. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/complete-examples.md +1 -1
  11. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/invocation-identity.md +84 -0
  12. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/refusals-and-redelivery.md +102 -0
  13. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/specifying-triggers-and-clock.md +4 -2
  14. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/verification.json +1 -1
  15. package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +57 -44
  16. package/package/corpus/skills/cratis-screenplay-command-surface/references/compliance.md +154 -0
  17. package/package/corpus/skills/cratis-screenplay-command-surface/references/context.md +57 -0
  18. package/package/corpus/skills/cratis-screenplay-command-surface/references/generated-values-and-responses.md +15 -13
  19. package/package/corpus/skills/cratis-screenplay-command-surface/references/operations.md +80 -0
  20. package/package/corpus/skills/cratis-screenplay-command-surface/references/policy-persona-seed.md +23 -1
  21. package/package/corpus/skills/cratis-screenplay-command-surface/verification.json +8 -2
  22. package/package/corpus/skills/cratis-screenplay-discovery/SKILL.md +19 -9
  23. package/package/corpus/skills/cratis-screenplay-discovery/references/interview-questions.md +1 -1
  24. package/package/corpus/skills/cratis-screenplay-discovery/references/storming-loop.md +6 -5
  25. package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +10 -8
  26. package/package/corpus/skills/cratis-screenplay-event-modeling/references/naming-primitives.md +5 -3
  27. package/package/corpus/skills/cratis-screenplay-event-modeling/references/nine-steps.md +6 -5
  28. package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +41 -49
  29. package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +15 -5
  30. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generate-notes.md +48 -8
  31. package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +47 -42
  32. package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +79 -15
  33. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +49 -11
  34. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +155 -14
  35. package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +3 -3
  36. package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +19 -7
  37. package/package/corpus/skills/cratis-screenplay-model-review/references/anti-patterns.md +1 -1
  38. package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +11 -2
  39. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/SKILL.md +3 -3
  40. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/completeness-self-check.md +1 -1
  41. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/verdicts-and-modes.md +1 -1
  42. package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +17 -0
  43. package/package/corpus/skills/cratis-screenplay-read-surface/references/guarded-actions.md +79 -0
  44. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +11 -9
  45. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +6 -3
  46. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +1 -1
  47. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/verification.json +2 -2
  48. package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +3 -2
  49. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +13 -2
  50. package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +13 -3
  51. package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md +5 -3
  52. package/package/corpus/skills/cratis-screenplay-slice-design/references/review-questions.md +2 -1
  53. package/package/corpus/skills/cratis-screenplay-slice-design/references/rule-layers.md +4 -3
  54. package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +40 -0
  55. package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +24 -16
  56. package/package/corpus/skills/cratis-screenplay-specifications/references/examples-and-routes.md +111 -0
  57. package/package/corpus/skills/cratis-screenplay-specifications/references/reactions-and-cascades.md +5 -6
  58. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +22 -8
  59. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/chronicle-boundaries.md +8 -4
  60. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +10 -0
  61. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-patterns.md +13 -2
  62. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +3 -3
  63. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/verification.json +2 -2
  64. package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +44 -35
  65. package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet-example.md +3 -3
  66. package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet.md +58 -2
  67. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +128 -10
  68. package/package/corpus/skills/cratis-screenplay-toolchain/references/doc-contradictions.md +13 -1
  69. package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +37 -13
  70. package/package/corpus/skills/cratis-screenplay-toolchain/references/provenance.md +10 -2
  71. package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +23 -1
  72. package/package/corpus/skills/cratis-screenplay-toolchain/references/sources-and-streams.md +111 -27
  73. package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +27 -6
  74. package/package/corpus/skills/cratis-screenplay-toolchain/references/verdicts.md +34 -16
  75. package/package/corpus/skills/cratis-screenplay-toolchain/references/versions.md +98 -136
  76. package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +13 -5
  77. package/package/corpus/skills/cratis-screenplay-ui-composition/references/screen-composition-contract.md +20 -0
  78. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +10 -6
  79. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +8 -1
  80. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +2 -2
  81. package/package.json +1 -1
@@ -23,25 +23,13 @@ contract is in `cratis-screenplay-ui-composition`.
23
23
 
24
24
  ## Verified product sources
25
25
 
26
- | Package | Version | Purpose |
27
- | --- | --- | --- |
28
- | `Cratis.Screenplay` / `Cratis.Screenplay.Tool` | `4.68.0` (`79801bf`) | Current compiler; admits ESM v7 (generated values and responses, decision 0026); examples compiled with `--warnaserror` and their specifications run |
29
- | `Cratis.Screenplay` / `Cratis.Screenplay.Tool` | `4.66.0` (`c89198b`) | MCP (29/30 tools), roots fix; the MCP behaviour below was probed on it |
30
- | `Cratis.Screenplay` | main `fd18129` | Inline events, repairs, rename/extraction and `optional` |
31
- | `Cratis.Screenplay` | `4.31.0` | Original compiler, ESM and workspace evidence |
32
- | `cratis` CLI | `3.28.3` | Bundles Screenplay 4.66.0 (no ESM v7) and Stage 4.24.2 (3.28.2 bundled 4.24.1; before 3.28.2: 4.60.1, ESM v5 at most, roots bug) |
33
-
34
- Facts about the MCP connection, source-map, `whenAppendedEvent`, identity
35
- persistence and the syntax-only constructs were read at tag `v4.66.0`
36
- (`Documentation/screenplay/mcp/{reference,install,edit}.md`,
37
- `Source/DotNET/Screenplay.Mcp/`) and probed against the 4.66.0 tool (persona,
38
- trigger, `@pii`, generated values, operations, streams, automation binding).
39
- Repair and refactoring guidance follows main `fd18129` (`commands.md`,
40
- `events.md`, `types.md`, `diagnostics.md`, `mcp/authoring-tools.md`, `vscode.md`,
41
- decision 0023); the `v4.31.0` documents (`ast-authoring`, `mcp`, `mcp-authoring`,
42
- `printing`, `file-references`, `diagnostics`) and release notes v4.17.0 to v4.31.0
43
- established the original baseline. When checking compiler, CLI or MCP compatibility, read the full version table in
44
- `cratis-screenplay-toolchain` (`references/versions.md`).
26
+ Current authoring/MCP guidance follows Screenplay v4.127.0
27
+ `Documentation/screenplay/mcp/`, `ast-authoring.md`, `folders.md`, `vscode.md`.
28
+ Discover installed tools and schemas; CLI bundles can differ from the standalone
29
+ tool. Pins are in `cratis-screenplay-toolchain` `references/versions.md`.
30
+ Historical connection/binding probes below remain labeled 4.66.0; the complete
31
+ registration example was compiled/tested at 4.68.0, not reclassified as a current
32
+ execution probe. Earlier source attribution is in `references/provenance.md`.
45
33
 
46
34
  ## Locate and connect
47
35
 
@@ -54,17 +42,16 @@ directory when it holds `.play` files). Only when it answers that no root was gi
54
42
  or that several roots are offered, pass `path`: the folder holding the project's `.play` files, otherwise the
55
43
  folder the user names. Without a project, the server works in `Documents/Screenplay`
56
44
  in the user's home folder, so do not invent a location. A root fixed at launch
57
- cannot be switched: another `path` returns `RootChangeRefused`.
45
+ can switch only to the corresponding model folder in a registered Git worktree
46
+ of the same repository. Pass the worktree checkout or exact model directory as
47
+ `path`; unrelated roots return `RootChangeRefused`. Switching clears proposals
48
+ and uses the destination's own identity state and journal; nothing migrates.
49
+ Submodules and `--separate-git-dir` checkouts require another connection.
58
50
 
59
- **Prefer a fixed root.** Screenplay up to 4.63.1 (so Cratis CLI before 3.28.2; fixed in
60
- 4.63.2, so not in CLI 3.28.2 or later, probed) fails a
61
- dynamic-root server right after `notifications/initialized` when the client
62
- advertises roots; real hosts then drop the connection, and `open-workspace.path`
63
- cannot prevent it. Start `screenplay mcp <model-folder>` or `cratis screenplay mcp`
64
- in a project (it locates the model: the project's `.play` files, else `Source/` or `src/`, else `Screenplay/`).
65
- Send `initialize` and `notifications/initialized` before any tool call;
66
- `tools/list` returns 29 tools (30 on MCP-Apps hosts). Read `references/mcp-loop.md` when connecting, coordinating connection ownership, or handling proposal and recovery failures. Details:
67
- [MCP loop](references/mcp-loop.md).
51
+ Prefer a fixed root; the historical dynamic-roots bug and connection procedure
52
+ are in [MCP loop](references/mcp-loop.md). Send `initialize` and
53
+ `notifications/initialized` before any tool call, then discover `tools/list`
54
+ schemas rather than relying on a remembered count.
68
55
 
69
56
 
70
57
  Look first for the project's existing `.play` files: the folder holding them is the
@@ -100,10 +87,14 @@ can keep that entry point; use the project's supported installation channel.
100
87
  of `.play` files is one application, not independent files.
101
88
  2. Use `search-declarations`, `declaration-details`, `find-references` and
102
89
  `dependencies` to locate the owning declaration and affected references.
103
- 3. Read diagnostics and coverage limitations. Unknown or ambiguous bindings are
104
- not an empty, successful dependency graph.
105
- 4. Use `find-fixtures` for value occurrences and `find-assertion-gaps` for authored
106
- assertion gaps. These tools do not execute specifications or prove coverage.
90
+ 3. Read diagnostics and coverage limitations. Use `dependency-graph` for container
91
+ edges, declared-dependency coverage, cycles and advisory order; the board's
92
+ dependency-map toggle exposes this evidence visually. Unknown or ambiguous
93
+ bindings are not an empty, successful dependency graph.
94
+ 4. Use `find-fixtures` for value occurrences (including example/override origins
95
+ and event routes) and `find-assertion-gaps` for authored assertion gaps. Neither
96
+ executes specifications. `diagnostics` accepts `scope` and opt-in `checks`;
97
+ skipped completeness checks are not passes. Details: `references/mcp-tools.md`.
107
98
  5. Echo `sourceRevision` on subsequent pages. Restart the query after drift;
108
99
  never combine pages from different snapshots.
109
100
  6. For screens, also discover the template, form, toolbar, package/icon and
@@ -187,21 +178,30 @@ each lost comment (`PLAY0288` also reports their count and lines). Untouched
187
178
  documents retain exact bytes. A printer that loses requested structural fields
188
179
  rejects the plan.
189
180
 
181
+ `identityMigrationIssues`: read the [MCP loop](references/mcp-loop.md).
182
+
190
183
  ## Repair or extract before rewriting
191
184
 
192
185
  Read `read-workspace` with `view: "diagnostics"`, then `view: "repairs"` at the
193
186
  same revision. Pass the returned `diagnosticCode`, `subject`, required formatting
194
187
  and both revisions to `propose-repair`; preview with `read-proposal`, then `apply`.
195
188
  Only verified repairs are listed, and the selected repair gets a fresh transaction.
189
+ For PLAY0166/PLAY0478, use the evidence-pinned loop in `references/mcp-tools.md`:
190
+ `pinRepairEvidence` plus `expectedRepairEvidenceRevision` prevent attachment drift
191
+ from silently changing the reviewed candidate.
196
192
 
197
193
  - `PLAY0166` declares a missing produced event; `PLAY0478` is a routing decision
198
- (identifier destination); `PLAY0471` removes a redundant name-equal event pin.
194
+ (identifier destination, never fix-all); `PLAY0471` removes a redundant name-equal event pin.
195
+ - `PLAY0516` repairs presentation order by moving a sibling or import, or pinning
196
+ a producer before a glob. It preserves semantics/identities and introduces no
197
+ new timeline findings; evidence pinning is unsupported for this repair.
199
198
  - `PLAY0469` removes an inline identifier payload copy: it **changes the event
200
199
  contract**, refuses consumer/opaque impact, has no fix-all, and the catalog does
201
200
  not prove events were persisted, so ask about stored contracts first.
202
201
  No automatic generation-evolution repair ships.
203
202
  - `PLAY0479`: migrate optionality spelling with `PreserveTrivia`; document scope
204
203
  migrates all occurrences together. Keep the `query Q => observable?` exception.
204
+ - Compliance repairs PLAY0565/0653: [MCP tool guide](references/mcp-tools.md).
205
205
 
206
206
  Use `propose-extract-inline-event` on the inline `EventSyntax` handle before adding
207
207
  a generation (canonical formatting consent; refuses comment loss; no reverse
@@ -226,9 +226,10 @@ module and its features, each feature importing its folder
226
226
  (`import "Orders/*.play"`); a slice file holds only its `slice`, because the
227
227
  import places it in its feature. When you write or reorganize files yourself,
228
228
  do not restate `module`/`feature` in a slice file, and do not leave a barrel
229
- that declares a scope but imports nothing. `expand-layout` still writes that
230
- older merge-only layout; it compiles as a folder, and you can compose it with
231
- imports afterwards. When choosing file placement, read the
229
+ that declares a scope but imports nothing. At 4.125.0 `expand-layout` writes
230
+ import barrels and slice-only leaves, preserving sibling and interleaved member
231
+ order. It refuses a proposal that would change that order; without an ordering
232
+ root its review discloses the path-order fallback. When choosing file placement, read the
232
233
  [language reference](references/language-reference.md) for placement rules.
233
234
 
234
235
  Parent scaffolding carries no duplicated module forms or contributions. Compile
@@ -243,6 +244,11 @@ a model only ever text-edited has none. A restart must not silently mint new IDs
243
244
  do not delete or overwrite conflicting identity state to get a green result, and do
244
245
  not text-rename identity-affecting declarations in a model that has it.
245
246
 
247
+ Default root discovery preserves ancestor identity state and journals. Inspect
248
+ `rootBindingConflict` in `open-workspace`/`workspace-state` when several state roots
249
+ compete; do not delete state or mint replacement identities. To recover a competing
250
+ journal, first open that root explicitly, then inspect its operation ID.
251
+
246
252
  A pending journal blocks normal work. Inspect `workspace-state`; invoke
247
253
  `recover-workspace` only for the identified interrupted operation within the
248
254
  requested recovery scope. Unexpected external edits block rollback. Preserve
@@ -278,10 +284,9 @@ that the code compiles or behaves. Read `references/mcp-tools.md#code-attachment
278
284
  it defines them and maps them onto V1 to V5. `screenplay --warnaserror` checks
279
285
  syntax plus the consistency rules (`PLAY0282`-`PLAY0294`) but never binds, so a
280
286
  clean run is not a bound or executable result.
281
- - Personas are report-only, operations and event sources/streams are authorable but
282
- not executable (not admitted by any supported ESM version), and `generated`/`returns`
283
- bind only from standalone 4.68.0 (ESM v7; not on the cratis 3.28.x bundle, not rendered by
284
- Stage 4.24.2): none is a reason to drop or stub the construct.
287
+ - Operations/exact numbers remain unadmitted; source/stream routes bind as ESM v8,
288
+ and generated values/responses as v7. CLI 3.41.0 render passes v7 to Stage but
289
+ refuses newer versions. A source contract is never dropped or stubbed to bind.
285
290
  - Distinguish authoring acceptance from `executableReady`; unsupported backend
286
291
  capabilities are not a reason to drop source constructs or invent stubs.
287
292
  - If execution is intended, validate with the owning downstream runtime as well.
@@ -301,7 +306,7 @@ a generated app that silently drops authored UI. Use the Screenplay-owned canoni
301
306
  corpus fixture path when it exists instead of copying `.play` examples into this
302
307
  repository.
303
308
 
304
- Repair and refactoring guidance follows Screenplay main `fd18129`. The Cratis
309
+ Repair and refactoring guidance follows Screenplay v4.127.0. The Cratis
305
310
  CLI bundles its own Screenplay version, so check the installed `tools/list`
306
311
  schemas before relying on a view or argument named here (for example
307
312
  `dropped-comments` or `implementation-requirements`). Do not invent a command,
@@ -6,6 +6,8 @@
6
6
  ## Contents
7
7
 
8
8
  - Accepted constructs
9
+ - Caller, subject and stream nodes
10
+ - Container dependencies and exact numbers
9
11
  - Complete model
10
12
  - Source validity is not execution
11
13
  - Not in the language yet
@@ -20,8 +22,8 @@ repository is the full list; this page is the authoring summary.
20
22
  ## Accepted constructs
21
23
 
22
24
  **Top level:** `domain`, `import`, `concept`, `type`, `policy`, `persona`,
23
- `authentication`, `trigger`, `theme`, `layout`, `ui profile`, `behavior`,
24
- `module`, `seed`, and the syntax-only `system` and `eventsource` (with its `stream`s).
25
+ `authentication`, `identity`, `purpose`, `trigger`, `theme`, `layout`, `ui profile`, `behavior`,
26
+ `module`, `seed`, authoring-only `system`, and admitted `eventsource` with its `stream`s (ESM v8).
25
27
 
26
28
  **Inside a module:** `description`, `authorize`, `import "<glob>"`,
27
29
  `screen`/`dialog` templates, `form`, `contribute`, `on`/`uses` behavior
@@ -58,13 +60,66 @@ compiling the entire document set.
58
60
 
59
61
  Concept primitives are `Uuid`, `String`, `Int`, `Decimal`, `Bool`, `Date` and
60
62
  `DateTime`; `Enum` is a separate concept kind whose members are indented below
61
- it. Concepts can carry `@pii`, `@sensitive`, reasons and validation.
63
+ it. Concepts carry bare `pii` (`personal` alias), `secret`, reasons, personal-data
64
+ qualifiers, secret scopes and validation. Legacy markers report PLAY0565 information;
65
+ repeated header markers report PLAY0653 warning. Purposes declare the use/basis/retention
66
+ separately; see command-surface `references/compliance.md`.
62
67
 
63
68
  Projections and captures use their dedicated sub-grammars. Inline code uses a
64
69
  tagged fence (` ```csharp `); the older language-line form still parses with
65
70
  warning `PLAY0397`. Query the MCP's `syntax-schema` instead of inventing JSON
66
71
  members or translating names from memory.
67
72
 
73
+ ## Caller, subject and stream nodes
74
+
75
+ At v4.127.0 the typed syntax includes `IdentityExpressionSyntax` (`$identity`),
76
+ `IdentitySyntax`, `IdentityDetailSyntax`, `ClaimIdentitySourceSyntax`,
77
+ `QueryIdentitySourceSyntax`, `CodeIdentitySourceSyntax`, `FileIdentitySourceSyntax`.
78
+ `ApplicationSyntax.Identity` carries the block; query schemas before editing JSON.
79
+ Built-in caller paths are aliases of `$context.identity`; declared detail reads
80
+ are authoring-only and refuse executable binding (PLAY0268), while the block alone
81
+ does not block readiness. Claim/query sources have exactly one source and no body.
82
+ See command-surface `references/context.md` for key/type/gate restrictions.
83
+
84
+ `PropertySyntax.isSubject` marks an event's required unprotected scalar subject,
85
+ omitted from structural JSON when false. It is lineage metadata (PLAY0270), not
86
+ runtime subject propagation or generated C# `[Subject]`. Read-model marks are
87
+ unsupported. `ReactionSyntax.RunsAs` / `ReactionIdentitySyntax` carry the system
88
+ actor (ESM v10); MCP `declaration-details` includes `runsAs`.
89
+
90
+ `EventStreamIdPartSyntax` and `streamIdParts` describe a composite stream-id schema;
91
+ route mappings cover all named parts. Current routes are admitted as v8, not an
92
+ old PLAY0268 gap. Never infer composite parts by splitting legacy scalar ids.
93
+
94
+ ## Container dependencies and exact numbers
95
+
96
+ At Screenplay 4.125.0, modules and features accept `depends on <Name>`, one
97
+ per line. Bare targets resolve inside out (siblings, ancestor siblings, root
98
+ modules); qualified targets match an unambiguous trailing address. Merged files
99
+ accumulate each owner's declarations in file-path order; imports affect board
100
+ order, not accumulation. Dependencies are optional authoring metadata, not runtime
101
+ or implementation order. See `cratis-screenplay-slice-design` `references/slicing.md`
102
+ for coverage diagnostics and MCP `dependency-graph` `declarations` evidence.
103
+
104
+ A top-level `numbers exact` preamble opts each file into bounded decimal source
105
+ literals without Double rounding. All files/import barrels must agree on mode
106
+ (PLAY0508–PLAY0513 diagnose directive/range/mode errors). Exact mode is authorable,
107
+ not admitted by any supported ESM version (`PLAY0268`). Do not confuse this with
108
+ ESM v7 generated values and responses.
109
+
110
+ Typed roots (`ApplicationSyntax`, `ProjectionSyntax`, `CaptureSyntax`,
111
+ `SpecificationSyntax`) carry `sourceOptions: {"numericMode":"exact"}`. Missing
112
+ options default independently to Legacy, including nested roots; null/unknown
113
+ options and conflicting modes reject. Exact literal slots use
114
+ `{"literalType":"ExactNumber","value":"9007199254740993"}`: a canonical fixed-point
115
+ string, not a JSON number/JavaScript Number. Plain numbers, legacy envelopes and
116
+ noncanonical/out-of-range strings reject in Exact trees. An ExactNumber tag does
117
+ not opt a Legacy root in. Change mode as a whole-tree edit (leaves and all root
118
+ options), not just a flag; fragment printing keeps the owner's mode without a
119
+ nested preamble.
120
+
121
+ Sources: v4.125.0 `slices.md`, `folders.md`, `ast-authoring.md`, `grammar.md`.
122
+
68
123
  ## Complete model
69
124
 
70
125
  This registration model uses an inline event and context identity rather than
@@ -121,13 +176,20 @@ module Projects
121
176
 
122
177
  ## Source validity is not execution
123
178
 
179
+ The table and binding inventory below retain their historical 4.66.0/4.68.0
180
+ probe labels; do not use them as current tool admission evidence. At 4.125.0,
181
+ `screenplay test` and MCP `run-specifications` expose reference execution,
182
+ and sources/streams/routes bind as ESM v8. Operations and exact numeric mode
183
+ still refuse binding. Use the installed tool and the version table in
184
+ `cratis-screenplay-toolchain` for current verdicts, not an older negative probe.
185
+
124
186
  A construct can be in one of four states. Say which one you checked.
125
187
 
126
188
  | State | What establishes it | What it does not prove |
127
189
  | --- | --- | --- |
128
190
  | **Parsed** | `screenplay <folder> --warnaserror` or MCP authoring diagnostics: syntax plus the model-consistency checks (`PLAY0282`-`PLAY0294`, for example a specification event that no producer can emit, `PLAY0285`) | Binding, execution, or anything about attached code. It never binds, so it cannot report `PLAY0268`, and the tool never reads `file` attachments |
129
191
  | **Bound** | Semantic binding to the executable semantic model (ESM): MCP `executableReady`, executable diagnostics | That the reference execution plan admits the model, or that any specification passes |
130
- | **Reference-executed** | The reference runner passes the specification (library only: no MCP tool and no `screenplay` command runs it) | Target behavior; opaque code never runs here |
192
+ | **Reference-executed** | `screenplay test` or MCP `run-specifications` passes the selected specification | Target behavior; opaque code and external services never run here |
131
193
  | **Target-executed** | Stage or a rendered application runs it with the implementations supplied | Nothing further in Screenplay |
132
194
 
133
195
  Map the states onto the verdicts of `cratis-screenplay-modeling-lifecycle`:
@@ -185,13 +247,14 @@ Screenplay 4.66.0 (before 3.28.2, Screenplay 4.60.1, differ where stated).
185
247
  | --- | --- |
186
248
  | Binds and runs in the reference runner | `StateChange`/`StateView` slices; `produces` including `when` conditions over command properties and literal tags; the portable validation rules, `matches email`, quoted `matches` patterns and `require` over command properties; declarative policies and `authorize` on modules, features, commands and keyed queries; `unique` constraints; projections as Chronicle lowers them, including variants, except the projection constructs in the next row; specifications, including `given caller`, `then denied` and `when append` |
187
249
  | Binds, but the reference execution plan refuses it | A projection-level `remove via join`; `all` beside removals, `children` or `nested`; a `join`, `children` or `remove via join` inside `nested`; any event-context value other than the event source identity in a projection mapping or key, such as `$eventContext.occurred`, `$eventContext.sequenceNumber` or `$eventContext.causedBy.subject` (`$eventSourceId` and `$eventContext.eventSourceId` run) |
188
- | Binds as ESM v6 on Screenplay 4.66.0, standalone and Cratis CLI 3.28.2 (probed); `PLAY0268` on Cratis CLI before 3.28.2 | `Automation` and `Translate` slices, reactions that produce or invoke, captures, top-level `trigger`, clock, trigger and capture specifications. The library reference runner evaluates them (v6 actions); no `screenplay` command or MCP tool runs it, and Stage 4.24.2 renders none of them (the whole automation is gap-fill) |
250
+ | Binds as ESM v6 on Screenplay 4.66.0, standalone and Cratis CLI 3.28.2 (probed); `PLAY0268` on Cratis CLI before 3.28.2 | `Automation` and `Translate` slices, reactions that produce or invoke, captures, top-level `trigger`, clock, trigger and capture specifications. The current standalone `screenplay test`/MCP reference route evaluates admitted v6 actions; the historical Stage 4.24.2 probe rendered none of them (the whole automation is gap-fill) |
189
251
  | Reaction with trigger `reads` | Direct-producing (or code-bodied) reaction with `reads`: `PLAY0268` ("ESM v6 cannot protect that decision dependency", decision 0006), non-executable. Invokes-only reaction with `reads`: information only; the invoked command must declare and protect its own decision reads. Keep the `reads`; never remove them to obtain binding |
190
252
  | 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 4.24.0 admits |
191
253
  | Information only, never blocks (probed) | `persona` (report-only: `PLAY0270`, the policies it lists must exist), `authentication`, `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 |
192
254
  | Binds as ESM v7 on standalone Screenplay 4.68.0 (source and release notes; `PLAY0268` on the 4.66.0 in Cratis CLI 3.28.x, probed) | `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 a generated property on a concept with validation rules is `PLAY0268`. Stage 4.24.2 does not render them (`STAGE-ESM-016`, tracked in Stage#201): gap-fill |
193
- | Authorable, not executable (`PLAY0268`, probed) | `system` and `operation`, `eventsource` and `stream` (not admitted by any supported ESM version; see `cratis-screenplay-toolchain` `references/sources-and-streams.md`). The MCP reads and edits them (`declaration-details`, `find-fixtures`, `read-workspace` views `event-sources`/`event-streams`/`command-routes`) with `executionAvailable: false`. Keep them in the model as intent; do not strip them to make the model bind, and do not call the model executable |
194
- | Blocks binding (`PLAY0268`) | `@pii`/`@sensitive` concepts (probed: "compliance attributes require portable data-subject semantics"), command `handler` (never binds; a command cannot declare both `produces` and `handler`, `PLAY0035`), bare `rule <Name>`, `require` or conditions over read-model paths, dates and `today` in comparisons, `$context.tenant`/claims/roles/causation in `produces`, `$env` conditions, `file` constraints, unquoted `import` of an external contract, a read model whose keyed queries in its own slice do not share one `by` property (none, or two different properties; several queries over the same property bind), any query other than `=> <ReadModel> optional` with one caller-supplied `by` argument (so also observable, filtered, scoped and performer-backed queries), `$causedBy` and templates in projections |
255
+ | Authorable, not executable (PLAY0268) | Systems/operations, exact numbers and refusal/redelivery remain unadmitted |
256
+ | 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 on 4.125.0. Whole-workspace binding determines executable availability; CLI/Stage realization remains separate |
257
+ | Blocks binding (`PLAY0268`) | `pii`/`secret` concepts (also legacy spellings; historical probe: "compliance attributes require portable data-subject semantics"), command `handler` (never binds; a command cannot declare both `produces` and `handler`, `PLAY0035`), bare `rule <Name>`, `require` or conditions over read-model paths, dates and `today` in comparisons, `$context.tenant`/claims/roles/causation in `produces`, `$env` conditions, `file` constraints, unquoted `import` of an external contract, a read model whose keyed queries in its own slice do not share one `by` property (none, or two different properties; several queries over the same property bind), any query other than `=> <ReadModel> optional` with one caller-supplied `by` argument (so also observable, filtered, scoped and performer-backed queries), `$causedBy` and templates in projections |
195
258
  | Blocks binding (`PLAY0271`, legacy meaning) | Command `reads` and `concurrency` |
196
259
  | Deferred (`PLAY0269`, information) | Screens, layouts, templates, forms, contributions, UI profiles, themes, behaviors and `on`/`uses` |
197
260
  | Metadata only (`PLAY0270`, information) | `domain`, `seed`, `persona`, trigger and other descriptions, and `file` provenance on declarations |
@@ -220,16 +283,17 @@ full historical shapes, not deployed-schema immutability or a working migrator.
220
283
  Code attachment/source-map support likewise does not prove code round-trip
221
284
  execution equivalence.
222
285
 
223
- Decision 0023's operations and named event sources/streams are **authorable** at
224
- v4.68.0 (syntax only, see the table above and `operations.md`, `event-sources.md` in
225
- the Screenplay documentation): write them, but binding reports `PLAY0268` and nothing
226
- executes them, because no supported ESM version admits them (a number is assigned only
227
- at a release-ready admission, decision 0025). Do not drop them for the sake of a green bind.
286
+ Operations remain authorable/unadmitted (PLAY0268). Named event sources/streams
287
+ and routes bind and reference-execute as v8 on 4.125.0; reaction identity as v10.
288
+ Use standalone `screenplay test` or MCP `run-specifications` for a reference
289
+ verdict, and independently check CLI/Stage admission. Never drop a contract to bind.
228
290
  Generated values and `returns` are no longer in this group: they bind from 4.68.0 (ESM v7).
229
291
  Protected reads and `derive`/`provide` (not admitted by any supported ESM version) have no documented
230
- syntax at v4.68.0: do not teach or invent one. Affected-instance declarations, per-event data
231
- subjects, external event origin and query paging/sorting/change-set delivery also
232
- remain unavailable here.
292
+ syntax at v4.68.0: do not teach or invent one. Affected-instance declarations and query paging/sorting/change-set delivery
293
+ remain unavailable here. Event `subject` is report-only authoring metadata at
294
+ 4.127.0; public events/origin are admitted as ESM v9 (not provider realization).
295
+ Purpose declarations, references and processing records are authoring metadata,
296
+ not retention or lawful-processing enforcement.
233
297
 
234
298
  `Type optional` is canonical for admitted type references; `Type?` remains
235
299
  compatible with information `PLAY0479`. The modifier follows `[]` for an optional
@@ -9,6 +9,7 @@
9
9
  - Who owns the connection
10
10
  - The loop
11
11
  - One edit strategy
12
+ - Self-describing identity migration refusals
12
13
  - Identity state (`.screenplay/identities.json`)
13
14
  - Read-only views worth knowing
14
15
  - Failures (use `failureKind`, never message text)
@@ -35,12 +36,17 @@ Cratis CLI before 3.28.2 bundled 4.60.1, whose tool set and views differ: read `
35
36
  notifications/initialized before using tools".
36
37
  3. Pass a physical path. Symbolic links and reparse points are refused, including
37
38
  `.screenplay` metadata.
38
- 4. `tools/list` returns **29 tools**, or **30 on hosts that advertise the MCP-Apps
39
- UI extension** (the extra tool is `visualize-model`). Read the schemas once per
40
- connection; never hard-code a count or an argument list.
41
- 5. A root given at startup is fixed for the connection: `open-workspace.path` may
42
- name the same directory, anything else returns `RootChangeRefused`. Start a
43
- separately authorized connection to model another application.
39
+ 4. Read `tools/list` schemas once per connection; never hard-code counts or
40
+ argument lists. MCP-Apps hosts also expose `visualize-model`.
41
+ 5. At 4.125.0 a startup root may switch to the same relative model folder in a
42
+ registered Git worktree of its repository. `open-workspace.path` accepts the
43
+ checkout or exact model folder. Shared Git directory and registration
44
+ back-pointer must agree physically; unrelated/malformed/unregistered roots,
45
+ submodules and `--separate-git-dir` checkouts refuse (`RootChangeRefused`).
46
+ Switching clears proposals and cached state, then uses that worktree's own
47
+ identities/journal. A pending journal blocks only its root. If an opened
48
+ worktree is removed, explicitly return to the startup root; if the startup
49
+ root is removed, start a new connection. No simultaneous named workspaces.
44
50
 
45
51
  ### Roots bug and the workaround
46
52
 
@@ -93,7 +99,9 @@ the server sends `roots/list` and serves `tools/list` after the reply).
93
99
 
94
100
  1. `tools/list` once per connection.
95
101
  2. Orient cheaply: `describe-application` summary, `diagnostics`, then scoped
96
- `search-declarations`, `declaration-details`, `dependencies`. Paging with
102
+ `search-declarations`, `declaration-details`, `dependencies`/`dependency-graph`.
103
+ Diagnostics `scope` includes descendants and direct dependents; `checks` opts
104
+ into completeness warnings (skipped on whole-source errors). Paging with
97
105
  `offset > 0` requires `expectedSourceRevision`.
98
106
  3. `open-workspace` and keep `revision` and `catalogRevision`. Opening writes
99
107
  nothing. With `identityPersistence: "root-local-on-apply"` the identities file
@@ -111,8 +119,8 @@ the server sends `roots/list` and serves `tools/list` after the reply).
111
119
  Proposed, and its `sketch` argument previews a what-if of whole documents
112
120
  without writing. An
113
121
  unintended executable regression is discarded (`discard-proposal`) and
114
- re-proposed. Intent the user has accepted that does not run yet (`system`/`operation`, `eventsource`/`stream`, and `generated`/
115
- `returns` on a tool older than 4.68.0; `PLAY0268` by design)
122
+ re-proposed. Intent the user has accepted that does not run yet (operations,
123
+ exact numbers or refusal/redelivery; PLAY0268 by design)
116
124
  may be applied from a reviewed `Authoring` proposal: disclose the new
117
125
  diagnostics, report V3 as not binding-ready, and never drop or stub the
118
126
  construct. The server's own guidance is to apply such a proposal only when
@@ -154,10 +162,24 @@ the server sends `roots/list` and serves `tools/list` after the reply).
154
162
  | --- | --- | --- |
155
163
  | Address-preserving | descriptions; bodies of rules and expressions; mappings between members that already exist; any edit that adds, removes or renames no addressed element. Also every edit in a model with no `.screenplay/identities.json` except persisted names | bounded text edit of the `.play` file, then compile the folder; or `propose-ast` |
156
164
  | Catalog-changing (identity file present) | add, remove or rename a declaration (slice, command, event, read model, projection, ...), a property of a command, event, read model, composite type or trigger, a query, a query argument or a specification; create, delete, rename or move a mapped `.play` document (McpState refuses reopening with `IdentityMappingConflict`; use document operations in `propose-ast`); rename, remove or move an event, command, read model, constraint, module, feature or slice; move declarations between files; contract evolution of a persisted event (new generation, property added, removed or retyped) | `propose-rename` or a reviewed `propose-ast`; never a blind text rename. Renaming a constraint resets its uniqueness index: ask first unless the request names it, then report the reset. A persisted event rename needs `id "OldName"` (added by default) |
157
- | Repair | `PLAY0166`, `0478`, `0469`, `0471`, `0479` (and recipe-only `0397`) | `propose-repair` with `formatting` |
165
+ | Repair | `PLAY0166`, `0478`, `0469`, `0471`, `0479`, `0516`, `0565`, `0653` (and recipe-only `0397`) | `propose-repair` with `formatting`; PLAY0166/0478 may pin attachment evidence (`pinRepairEvidence` and `expectedRepairEvidenceRevision`), never fix-all PLAY0478 |
158
166
  | Inline event extraction | `produces event ...` to a declared event | `propose-extract-inline-event` |
159
167
  | Parser-invalid document | no editable handles | `propose-ast` `replace-document` with a whole typed document, or fix the text |
160
- | Syntax-only constructs | `system`/`operation`, `eventsource`/`stream` (and `generated`/`returns` before 4.68.0) | typed `propose-ast` edits; no automatic rename or routing repair exists |
168
+ | Unadmitted constructs | systems/operations, exact numbers, refusal/redelivery | reviewed Authoring `propose-ast`; preserve intent and report PLAY0268 |
169
+ | Admitted source/stream routing | ESM v8 at 4.125.0 | typed `propose-ast`; `propose-rename` repairs proven route references; target admission separate |
170
+
171
+ ## Self-describing identity migration refusals
172
+
173
+ At Screenplay 4.127.0, read `identityMigrationIssues` on rejected proposals
174
+ (conflict `InvalidIdentityMigration`). Each entry names typed `address.kind` and
175
+ `address.parts`, and the input `arguments` it belongs in: `semanticRenames`,
176
+ `eventRenames`, `retiredSemanticAddresses`, `retiredEventAddresses`. Stale renames
177
+ name both endpoints; missing continuity lists rename/retirement alternatives,
178
+ not an instruction to retire. Include both event-contract and semantic assignments
179
+ and all assigned descendants. Rename/apply messages name the same offending addresses.
180
+ Supply exactly the entries required for the intended change instead of retrying
181
+ by trial and error. Re-read actual revisions when stale; never clear the catalog.
182
+ Authority: v4.127.0 `mcp/reference.md`, `mcp/authoring-tools.md`.
161
183
 
162
184
  ## Identity state (`.screenplay/identities.json`)
163
185
 
@@ -175,6 +197,22 @@ the server sends `roots/list` and serves `tools/list` after the reply).
175
197
  "semantics"` returns identity assignments, not a model summary.
176
198
  - See "Make one coherent proposal" in SKILL.md for the exclusive-write prerequisite of `apply`.
177
199
 
200
+ ### Root discovery conflicts
201
+
202
+ At Screenplay 4.125.0 default discovery preserves `.screenplay/identities.json`
203
+ or `pending.json` on the ancestor-or-self path from the offered project to the
204
+ discovered model. Empty metadata folders/backups do not count. With several
205
+ state roots, the nearest the offered project wins. `rootBindingConflict` in
206
+ `open-workspace`/`workspace-state` contains `kind: "WorkspaceRootConflict"`,
207
+ `boundRoot`, ordered `stateRoots` and `pendingRoots`; it is omitted without a
208
+ conflict. A journal anywhere on that path blocks bound-root reads/writes too.
209
+
210
+ To recover a competing journal, explicitly `open-workspace` on its root (which
211
+ may return `PendingOperation`), inspect `workspace-state` there, then recover
212
+ that operation within the approved scope. Recovery at the outer root cannot
213
+ recover a nested journal. Never delete metadata, migrate identities implicitly
214
+ or create a fallback folder to bypass the conflict.
215
+
178
216
  ## Read-only views worth knowing
179
217
 
180
218
  - **`source-map`** (`read-workspace`): the compiler's semantic entries ordered by