@cratis/pi 7.32.0 → 7.33.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 (51) hide show
  1. package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +2 -2
  2. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/audit-format.md +1 -1
  3. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/automation-patterns.md +2 -2
  4. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/provenance.md +3 -3
  5. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/public-events-and-direction.md +2 -2
  6. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +2 -2
  7. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/invocation-identity.md +2 -2
  8. package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +8 -6
  9. package/package/corpus/skills/cratis-screenplay-command-surface/references/context.md +1 -1
  10. package/package/corpus/skills/cratis-screenplay-command-surface/references/enum-numbers.md +93 -0
  11. package/package/corpus/skills/cratis-screenplay-command-surface/references/generated-values-and-responses.md +3 -4
  12. package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +3 -2
  13. package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +1 -1
  14. package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +25 -25
  15. package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +6 -0
  16. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +5 -0
  17. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +36 -8
  18. package/package/corpus/skills/cratis-screenplay-model-authoring/references/property-links.md +126 -0
  19. package/package/corpus/skills/cratis-screenplay-model-authoring/references/screen-authoring-workflow.md +3 -4
  20. package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +1 -1
  21. package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +1 -1
  22. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +6 -5
  23. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +2 -2
  24. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +3 -3
  25. package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +1 -1
  26. package/package/corpus/skills/cratis-screenplay-specifications/references/examples-and-routes.md +2 -2
  27. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +5 -2
  28. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution.md +17 -0
  29. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-patterns.md +1 -1
  30. package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +15 -6
  31. package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet.md +6 -3
  32. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +21 -2
  33. package/package/corpus/skills/cratis-screenplay-toolchain/references/doc-contradictions.md +2 -2
  34. package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +9 -3
  35. package/package/corpus/skills/cratis-screenplay-toolchain/references/production-routes-and-filters.md +1 -1
  36. package/package/corpus/skills/cratis-screenplay-toolchain/references/provenance.md +1 -1
  37. package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +5 -4
  38. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract-exceptions.json +1 -1
  39. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +1092 -17
  40. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
  41. package/package/corpus/skills/cratis-screenplay-toolchain/references/sources-and-streams.md +1 -1
  42. package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +3 -3
  43. package/package/corpus/skills/cratis-screenplay-toolchain/references/verdicts.md +4 -4
  44. package/package/corpus/skills/cratis-screenplay-toolchain/references/versions.md +32 -17
  45. package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +3 -1
  46. package/package/corpus/skills/cratis-screenplay-ui-composition/references/screen-composition-contract.md +2 -2
  47. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +8 -9
  48. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +4 -5
  49. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/case-tables-and-whole-numbers.md +2 -2
  50. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +1 -1
  51. package/package.json +1 -1
@@ -40,8 +40,8 @@ identity, effect and pending-work contract at that point; do not postpone it to
40
40
  - Reaction `runs as system role "<Role>"` declares an invocation actor (ESM v10).
41
41
  Without it the invoke has no caller. Historical CLI 3.41.0's 4.114.0 compiler
42
42
  rejected the syntax (PLAY0137); previous CLI 3.46.1 refused ESM v10
43
- at render admission (CLI-RENDER-004). CLI 3.50.0 reaches Stage 4.67.0's
44
- construct admission, which still refuses reaction identity (STAGE-ESM-034). Checked model/diagnostics: captures-and-reactions
43
+ at render admission (CLI-RENDER-004). The pinned CLI/Stage pair (toolchain
44
+ `references/versions.md`) reaches construct admission, which still refuses reaction identity (STAGE-ESM-034). Checked model/diagnostics: captures-and-reactions
45
45
  `references/invocation-identity.md`.
46
46
 
47
47
  ## Effect guarantees and recovery traps
@@ -12,7 +12,7 @@ technique: partial work stays visible and nothing is skipped because it looked r
12
12
  Result is `complete` only when every column is filled or says why it does not apply (for example
13
13
  "direct effect: immediate, internal, cannot fail"). `open` names the unresolved decision and who
14
14
  answers. `blocked` names the actual capability gap with intended behavior. For example,
15
- CLI 3.50.0 admits ESM v10 to Stage 4.67.0 construct checks, where reaction identity
15
+ the pinned CLI/Stage pair (toolchain `references/versions.md`) admits ESM v10 to construct checks, where reaction identity
16
16
  is refused with STAGE-ESM-034. Previous CLI 3.46.1 refused v10 at the version gate
17
17
  with CLI-RENDER-004; do not report that historical refusal as the current gap.
18
18
 
@@ -72,8 +72,8 @@ Screenplay 4.125.0 declares the actor with reaction-level `runs as system role
72
72
  "<Role>"` (ESM v10); without it a gated invocation has no caller and denies.
73
73
  `given caller` is not an invocation actor. Role requirements remain enforced;
74
74
  claim conditions for this system principal remain unknown. Historical CLI 3.41.0's
75
- older compiler rejected the syntax (PLAY0137). CLI 3.50.0 bundles Screenplay 4.131.0 / Stage 4.67.0 and reaches v10
76
- construct admission, but reaction identity still refuses STAGE-ESM-034.
75
+ older compiler rejected the syntax (PLAY0137). The pinned CLI/Stage pair (toolchain
76
+ `references/versions.md`) reaches v10 construct admission, but reaction identity still refuses STAGE-ESM-034.
77
77
  Previous CLI 3.46.1 refused v10 at its version gate; see toolchain `references/versions.md`.
78
78
  Use the checked model in captures-and-reactions `references/invocation-identity.md`.
79
79
  Arc gap-fill uses `[ExecuteCommandsAsSystem("<role>")]` for returned commands,
@@ -44,8 +44,8 @@ binds); tool-qualified verdict text; the trusted-actor text now names `[ExecuteC
44
44
  `reactions.md`, `ReactionIdentityParser.cs`, `ReactionRefusalValidator.cs` and the
45
45
  binder's v10 selection; the checked scenario passed reference execution. CLI
46
46
  3.41.0's older parser and Stage 4.51.3's v7 planner were historical target limits.
47
- Previous CLI 3.46.1 refused v10 at its version gate. CLI 3.50.0 bundles
48
- Screenplay 4.131.0/Stage 4.67.0, reaches v10 construct checks, and still refuses
49
- reaction identity with STAGE-ESM-034; see toolchain `references/versions.md`.
47
+ Previous CLI 3.46.1 refused v10 at its version gate. The pinned CLI/Stage pair
48
+ (toolchain `references/versions.md`) reaches v10 construct checks and still
49
+ refuses reaction identity with STAGE-ESM-034.
50
50
  Public/direction forms and routes/filters follow Screenplay v4.135.0 decisions
51
51
  0049–0051 and 0060–0066, not the older inbound-only translation scope.
@@ -124,8 +124,8 @@ ESM v9 shipped in Screenplay 4.117.0 and is selected only by use of public event
124
124
  origins, direction, event-target builders or events-source captures. At 4.135.0,
125
125
  publication reference scenarios execute; imported shapes still refuse binding.
126
126
  Stage 4.52.0 (previous CLI 3.46.1) audits only through v7: CLI-RENDER-004 precedes
127
- its STAGE-ESM-016 version refusal. CLI 3.50.0/Stage 4.67.0 reaches construct
128
- admission through v10 but still refuses publication (STAGE-ESM-032), foreign
127
+ its STAGE-ESM-016 version refusal. The pinned CLI/Stage pair (toolchain `references/versions.md`)
128
+ reaches construct admission through v10 but still refuses publication (STAGE-ESM-032), foreign
129
129
  events/events-source captures (STAGE-ESM-033); source admission is not rendering.
130
130
 
131
131
  Source: Screenplay `v4.135.0:Documentation/screenplay/fixtures/public-events.play`,
@@ -75,8 +75,8 @@ Read [invocation identity](references/invocation-identity.md) for the checked
75
75
  scenario, claim/unknown semantics and PLAY0647–0652/0557 diagnostics.
76
76
 
77
77
  Historical CLI 3.41.0's 4.114.0 compiler rejected this source with PLAY0137.
78
- Previous CLI 3.46.1 refused v10 (CLI-RENDER-004); CLI 3.50.0 reaches
79
- Stage 4.67.0's construct admission, still refusing identity (STAGE-ESM-034).
78
+ Previous CLI 3.46.1 refused v10 (CLI-RENDER-004); the pinned CLI/Stage pair (toolchain
79
+ `references/versions.md`) reaches construct admission, still refusing identity (STAGE-ESM-034).
80
80
  Target realization is gap-fill, using Arc `[ExecuteCommandsAsSystem]` for returned commands. Without that attribute
81
81
  Arc supplies no principal and `[Authorize]`/`[Roles]` deny. Each invoked command
82
82
  is atomic, not the whole cascade; earlier accepted facts remain after a later refusal.
@@ -71,8 +71,8 @@ module Work
71
71
 
72
72
  Historical CLI 3.41.0 bundled Screenplay 4.114.0, which did not parse `runs as`:
73
73
  the example's `cratis screenplay validate --executable --warnings-as-errors`
74
- returned PLAY0137, exit 5. This is not a current parser claim. CLI 3.50.0 bundles
75
- Screenplay 4.131.0/Stage 4.67.0 and reaches v10 construct admission, but
74
+ returned PLAY0137, exit 5. This is not a current parser claim. The pinned CLI/Stage pair
75
+ (`cratis-screenplay-toolchain/references/versions.md`) reaches v10 construct admission, but
76
76
  reaction identity still refuses STAGE-ESM-034. Previous CLI 3.46.1/Stage 4.52.0
77
77
  audited through v7 only (`references/versions.md` in toolchain).
78
78
  Clock/application-trigger identities have no Stage Arc realization either.
@@ -75,6 +75,10 @@ scalar/composite stream-id types and nested route mapping sources, including leg
75
75
  markers. Keep a surrogate identity and carry protected data in the payload.
76
76
  Chronicle likewise rejects `[PII]`/`[Encrypted]` identifiers (CHR0034/CHR0052).
77
77
 
78
+ Read [enum numbers](references/enum-numbers.md) for `draft = 1`, unique int32
79
+ all-or-none pins, stored/public identity safety, `enum-pinning`, ESM v12 and the
80
+ CLI/Stage gap. Unnumbered enums keep positions; specifications use names.
81
+
78
82
  ⚠️ **Enum trap.** A value literally named `validate` is read as an empty validate
79
83
  block. Write `@validate` for the value; the compiler warns when it sees the
80
84
  ambiguity.
@@ -368,8 +372,8 @@ Four contexts, and **what each omits is load-bearing** — when writing a code b
368
372
  ## Verify
369
373
 
370
374
  - [ ] Validate the complete model root with warnings as errors; name the tool,
371
- version and result. Current pins: standalone 4.135.0 / CLI 3.50.0; bundle
372
- compatibility and execution are separate checks.
375
+ version and result. Pins: toolchain `references/versions.md`;
376
+ bundle compatibility and execution are separate checks.
373
377
  - [ ] No unintended `PLAY0478` or `PLAY0479` information remains.
374
378
  - [ ] At most one command property carries `identifier`, and no event property does.
375
379
  - [ ] Format rules live on the `concept`; state-dependent rules are specifications.
@@ -385,10 +389,8 @@ Four contexts, and **what each omits is load-bearing** — when writing a code b
385
389
  runnable or renderable without saying which tool admits it.
386
390
  - [ ] No event carries an optional property covering two situations.
387
391
 
388
- Read `cratis-screenplay-toolchain/references/versions.md` when selecting a compiler or determining which executable or renderable subset admits a construct.
389
-
390
- Versions, tool capabilities and the executable and renderable subsets: `cratis-screenplay-toolchain` (`references/versions.md`). Where a construct sits in the
391
- method: `cratis-screenplay-modeling-lifecycle` and `cratis-screenplay-slice-design`.
392
+ Compiler pins and admission: `cratis-screenplay-toolchain/references/versions.md`.
393
+ Method: `cratis-screenplay-modeling-lifecycle` and `cratis-screenplay-slice-design`.
392
394
 
393
395
  ## Route near misses
394
396
 
@@ -105,7 +105,7 @@ Checked at Screenplay 4.127.0: `$identity.<property>` is the same caller value a
105
105
  is supported, not deprecated. Historical `cratis` CLI 3.41.0 bundled Screenplay 4.114.0, which predated both:
106
106
  its parser rejected a top-level `identity` block (`PLAY0001`), and with `--executable` it read a
107
107
  `$identity.<property>` mapping as a raw expression (`PLAY0268`). Those checks used standalone 4.127.0;
108
- they are not current CLI 3.50.0/Screenplay 4.131.0 parser claims. Check current renderer
108
+ they are not current parser claims; compiler pins are in toolchain `references/versions.md`. Check current renderer
109
109
  admission separately before choosing caller mappings. Built-ins are `id`, `name`, `userName`,
110
110
  `isAuthenticated`, `roles`, `claims.<name>` (everything after `claims.` is opaque).
111
111
  Bare `$identity` reports PLAY0152; unknown properties report PLAY0155. Only
@@ -0,0 +1,93 @@
1
+ <!-- Copyright (c) Cratis. All rights reserved. -->
2
+ <!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
3
+
4
+ # Explicit enum member numbers
5
+
6
+ Authoring shipped in Screenplay 4.137.0; non-positional executable numbers shipped
7
+ in 4.139.0 as ESM v12 (decision 0065). The model owns member identity, not the renderer.
8
+
9
+ ```screenplay
10
+ domain EnumNumbers
11
+
12
+ concept InvoiceId : Uuid
13
+ concept InvoiceStatus : Enum
14
+ draft = 1
15
+ sent = 4
16
+ cancelled = -1
17
+
18
+ module Invoicing
19
+ feature Issuing
20
+ slice StateChange SendingInvoice
21
+ command SendInvoice
22
+ invoiceId InvoiceId identifier
23
+ status InvoiceStatus
24
+ produces InvoiceSent
25
+ for invoiceId
26
+ status = status
27
+ event InvoiceSent
28
+ status InvoiceStatus
29
+ specification Sending
30
+ when SendInvoice
31
+ invoiceId = "6f9619ff-8b86-d011-b42d-00c04fc964ff"
32
+ status = "sent"
33
+ then InvoiceSent
34
+ for "6f9619ff-8b86-d011-b42d-00c04fc964ff"
35
+ status = "sent"
36
+ ```
37
+
38
+ ## Source rules
39
+
40
+ - Number **all members or none**; there is no implicit continuation after a pin.
41
+ - Numbers are unique whole int32 values, from -2147483648 through 2147483647.
42
+ Gaps and negative numbers are allowed; aliases and flags semantics are not.
43
+ - Write decimal digits with an optional minus sign: no leading zeros, fraction,
44
+ exponent or plus sign. `-0` prints canonically as `0`.
45
+ - Escape a keyword member as usual, for example `@validate = 7`.
46
+ - Unnumbered enums retain zero-based positional meaning. Descriptions and
47
+ validation blocks still work. Specifications, fixtures, validation operands
48
+ and conditions use **member names**, never their numbers.
49
+
50
+ PLAY0667 reports mixed numbering, PLAY0668 duplicate numbers, PLAY0669 an
51
+ out-of-int32 value and PLAY0670 malformed number syntax. None has an automatic
52
+ repair: correcting a stored identity needs an author decision.
53
+
54
+ ## When to pin
55
+
56
+ Pin enums used in persisted events or a stable public contract, or when retaining
57
+ numbers extracted from an existing system. Before reordering, inserting or removing
58
+ members, establish the **stored** numbers first; numbering an already reordered list
59
+ would preserve the wrong meaning. Never renumber a published member or reuse its
60
+ number for another meaning. Pinning does not prove old readers accept a removed member.
61
+
62
+ A short-lived enum used only by command inputs or views may remain positional.
63
+ Ordinary compilation does not demand pins. Opt into `--check enum-pinning`
64
+ (or `PLAY0671` or `all`) for an Information hint on wholly unnumbered enums used
65
+ by event properties, including through composite types. MCP `diagnostics` uses
66
+ `checks: "enum-pinning"`. The hint suggests `propose-number-enum-members`, which
67
+ pins current positions; it is a refactoring, not a correctness repair. Read
68
+ model-authoring `references/mcp-tools.md` for the revision-checked proposal loop.
69
+
70
+ ## Executable contract and consumer boundary
71
+
72
+ ESM v12 adds an optional canonical **last** `numbers` array parallel to `values`.
73
+ For the concept above, `values` is `["draft", "sent", "cancelled"]` and `numbers`
74
+ is `[1, 4, -1]`. Non-positional numbers select v12. Pins equal to `0..n-1` are
75
+ retained in source/AST but omitted from ESM, preserving the previous executable
76
+ version, bytes and revision; unnumbered enums also preserve their old bytes.
77
+
78
+ Strict reading rejects `numbers` in older versions, without enum values, with a
79
+ length mismatch, duplicates, non-int32 entries or a positional array (non-canonical).
80
+ Programmatic validation enforces the same contract. Specifications still compare
81
+ names; numbers are neither alternative fixture values nor flags.
82
+
83
+ Consumers must **explicitly admit v12**. CLI 3.53.1 and Stage 4.73.1 both bundle
84
+ Screenplay 4.137.0: `cratis render`/Stage do not admit v12 yet. A model with
85
+ non-positional numbers compiles and binds with standalone Screenplay >= 4.139.0,
86
+ but does not render through that CLI. Do not remove its pins to pass rendering;
87
+ report the consumer gap. See toolchain `references/versions.md`.
88
+
89
+ Sources checked at `v4.139.0`: `Documentation/screenplay/concepts.md`,
90
+ `interoperability.md`, `diagnostics.md`, `mcp/authoring-tools.md`, decision 0065,
91
+ `Semantics/Versions.cs`, `SemanticModelValidator.EnumMemberNumbers.cs` and the
92
+ source-backed `EnumMemberNumbersCorpus.V12` (under `Source/DotNET/`). Consumer
93
+ pins: CLI `v3.53.1:Directory.Packages.props`, Stage `v4.73.1:Directory.Packages.props`.
@@ -1,9 +1,8 @@
1
1
  ## Generated values and responses (ESM v7)
2
2
 
3
3
  A `generated` command property and `returns` response bind and reference-execute
4
- as ESM v7 (checked at 4.68.0). Current pins are standalone Screenplay 4.135.0
5
- and CLI 3.50.0 (bundled Screenplay 4.131.0/Stage 4.67.0); `cratis-screenplay-toolchain`
6
- `references/versions.md` owns the table. CLI#261 is closed: CLI now admits v7
4
+ as ESM v7 (checked at 4.68.0). Current pins:
5
+ `cratis-screenplay-toolchain/references/versions.md`. CLI#261 is closed: CLI now admits v7
7
6
  to Stage planning. The historical CLI 3.41.0 v7 canonical corpus received Stage
8
7
  generated-value and response refusals STAGE-ESM-028/029. Do not turn this into a blanket compiler
9
8
  refusal or promise a render from binding alone. Preserve the contract for gap-fill
@@ -45,7 +44,7 @@ Rules (all read at `v4.68.0`):
45
44
 
46
45
  Operations remain authorable/unadmitted (PLAY0268). Named event sources,
47
46
  streams and command/specification routes instead bind and reference-execute as
48
- ESM v8 at 4.125.0; CLI 3.50.0 reaches Stage construct admission through v10,
47
+ ESM v8 at 4.125.0; the pinned CLI (toolchain `references/versions.md`) reaches Stage admission through v10,
49
48
  not blanket target support. Syntax/MCP acceptance alone is not execution. Source/stream
50
49
  forms and realization boundary: `cratis-screenplay-toolchain`
51
50
  `references/sources-and-streams.md`. Do not infer further syntax or provider
@@ -139,8 +139,9 @@ What binds depends on **which tool** you ask, so name the tool and its version:
139
139
  standalone 4.125.0. Use `screenplay test` or MCP `run-specifications` for V4.
140
140
  Operations/systems, exact numbers and refusal/redelivery remain unadmitted.
141
141
  Historical CLI 3.41.0 rejected `runs as` syntax and its Stage 4.51.3 check
142
- refused generated values/responses with STAGE-ESM-028/029. CLI 3.50.0 bundles
143
- Screenplay 4.131.0/Stage 4.67.0; v10 reaches construct admission, not full support.
142
+ refused generated values/responses with STAGE-ESM-028/029. For the pinned CLI/Stage pair
143
+ (`cratis-screenplay-toolchain/references/versions.md`), v10 reaches construct
144
+ admission, not full support.
144
145
  Source/binding admission and target realization are separate gates.
145
146
 
146
147
  The ESM versions, the full disposition table and the Step 7 clock example's binding
@@ -28,7 +28,7 @@ Pins and consumer boundaries: toolchain `references/versions.md`.
28
28
  | Command reads/concurrency | Legacy unprotected decisions, PLAY0271 |
29
29
  | Invokes-only trigger reads | Report-only, not protected state; direct production with reads refuses |
30
30
  | Generated values/responses | v7 binding/reference execution; historical Stage 4.51.3 check: member refusals STAGE-ESM-028/029 |
31
- | Sources/streams and command/specification routes | v8 binding/reference execution; CLI 3.50.0 reaches Stage construct checks through v10 |
31
+ | Sources/streams and command/specification routes | v8 binding/reference execution; the pinned CLI (toolchain `references/versions.md`) reaches Stage checks through v10 |
32
32
  | Declared reaction invocation actor | v10 binding/reference execution; older CLI parser PLAY0137; Stage planner refuses v10 |
33
33
  | Operations/systems, exact numbers, refusal/redelivery | Source accepted; whole binding refuses PLAY0268 |
34
34
  | UI | Authoring/deferred metadata; runtime support is a separate consumer contract |
@@ -6,30 +6,27 @@ license: MIT
6
6
 
7
7
  # Author a Screenplay model through its AST
8
8
 
9
- Screenplay describes an information system as one declarative document set.
10
- Prefer the Screenplay MCP tools to hand-edited text and throwaway regex scripts:
11
- the compiler already knows declarations, references, hierarchy and source ownership.
9
+ Prefer the Screenplay MCP tools to text/regex edits: the compiler owns declaration,
10
+ reference, hierarchy and source evidence for the declarative document set.
12
11
 
13
12
  Screenplay remains experimental. **Valid source is not necessarily executable.**
14
13
  It does not generate or run an application; Stage owns rendering/runtime admission.
15
14
  When selecting construct syntax or distinguishing source validity from execution, read the [language reference](references/language-reference.md) for constructs,
16
15
  the executable profile and a complete compiled model.
17
16
 
18
- For screen-heavy work, keep the parity contract explicit:
19
- discover the installed UI node schemas, propose/apply with revisions, then pass the
20
- same model root or workspace export to validate/render/runtime checks. The full
21
- workflow is `references/screen-authoring-workflow.md`; the UI syntax/support-level
22
- contract is in `cratis-screenplay-ui-composition`.
17
+ For screens: discover UI schemas, propose/apply with revisions, then pass the
18
+ same model root or workspace export to all checks. Workflow:
19
+ `references/screen-authoring-workflow.md`; syntax/support:
20
+ `cratis-screenplay-ui-composition`.
23
21
 
24
22
  ## Verified product sources
25
23
 
26
- Current authoring/MCP guidance follows Screenplay v4.135.0
24
+ Current authoring/MCP guidance follows Screenplay v4.139.0
27
25
  `Documentation/screenplay/mcp/`, `ast-authoring.md`, `folders.md`, `vscode.md`.
28
26
  Discover installed tools and schemas; CLI bundles can differ from the standalone
29
27
  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`.
28
+ Historical probes remain 4.66.0; registration example compilation/execution
29
+ remains 4.68.0. Attribution: `references/provenance.md`.
33
30
 
34
31
  ## Locate and connect
35
32
 
@@ -54,12 +51,10 @@ are in [MCP loop](references/mcp-loop.md). Send `initialize` and
54
51
  schemas rather than relying on a remembered count.
55
52
 
56
53
 
57
- Look first for the project's existing `.play` files: the folder holding them is the
58
- model. A new model goes under the repository's `Source/` or `src/` folder, else in a
59
- `Screenplay/` folder at the repository root; never under `.cratis/`, which holds
60
- configuration and the shared AI corpus only. This is the
61
- conventional home for consumer-owned `.play` source. The source is the single flow model;
62
- keep explanatory Markdown in the owning repository's documentation.
54
+ Look first for the project's existing `.play` files: their folder is the model.
55
+ New models go in `Source/` or `src/`, else root `Screenplay/`, never `.cratis/`
56
+ (configuration/shared corpus only). The source is the single flow model;
57
+ explanatory Markdown belongs in repository documentation.
63
58
 
64
59
  `cratis ai install` manages `.cratis/ai/`, never model files. Select the
65
60
  `cratis/screenplay` profile in the project's AI configuration. The corpus-owned
@@ -87,6 +82,9 @@ can keep that entry point; use the project's supported installation channel.
87
82
  of `.play` files is one application, not independent files.
88
83
  2. Use `search-declarations`, `declaration-details`, `find-references` and
89
84
  `dependencies` to locate the owning declaration and affected references.
85
+ Before a property rename/removal, read [property links](references/property-links.md):
86
+ `kind: "Property"`, `Owner.member` / `Owner.generationN.member`, direct mappings.
87
+ `complete: false` is incomplete evidence, never a successful empty list.
90
88
  3. Read diagnostics and coverage limitations. Use `dependency-graph` for container
91
89
  edges, declared-dependency coverage, cycles and advisory order; the board's
92
90
  dependency-map toggle exposes this evidence visually. Unknown or ambiguous
@@ -209,6 +207,10 @@ from silently changing the reviewed candidate.
209
207
  migrates all occurrences together. Keep the `query Q => observable?` exception.
210
208
  - Compliance repairs PLAY0565/0653: [MCP tool guide](references/mcp-tools.md).
211
209
 
210
+ `propose-number-enum-members` pins an unnumbered enum to current positions.
211
+ Opt-in MCP `checks: "enum-pinning"` / `--check enum-pinning` (PLAY0671) hints at
212
+ stored enums, not correctness repairs. Arguments/review: `references/mcp-tools.md`.
213
+
212
214
  Use `propose-extract-inline-event` on the inline `EventSyntax` handle before adding
213
215
  a generation (canonical formatting consent; refuses comment loss; no reverse
214
216
  operation). Event `propose-rename` pins `id "<old name>"` by default; use
@@ -293,7 +295,8 @@ that the code compiles or behaves. Read `references/mcp-tools.md#code-attachment
293
295
  clean run is not a bound or executable result.
294
296
  - Operations/`numbers exact` remain unadmitted; routes bind as v8, public
295
297
  boundaries v9, identity/overrides/filters v10, qualifying non-route Double
296
- literals v11. CLI 3.50.0 reaches Stage checks through v10. Never drop or stub source contracts to bind.
298
+ literals v11, non-positional enum numbers v12 (standalone 4.139.0).
299
+ CLI 3.53.1/Stage 4.73.1 bundle 4.137.0 and do not admit v12. Never drop or stub source contracts to bind.
297
300
  - Distinguish authoring acceptance from `executableReady`; unsupported backend
298
301
  capabilities are not a reason to drop source constructs or invent stubs.
299
302
  - If execution is intended, validate with the owning downstream runtime as well.
@@ -306,12 +309,9 @@ The ordinary CLI remains useful for whole-folder validation:
306
309
  cratis screenplay validate <model-folder> --warnings-as-errors
307
310
  ```
308
311
 
309
- For end-to-end screen changes, record the MCP transcript in `.ai-work/` and then
310
- run the render/runtime checks with the exact same root or workspace export. A
311
- transcript that applies one source and renders another is not evidence; neither is
312
- a generated app that silently drops authored UI. Use the Screenplay-owned canonical
313
- corpus fixture path when it exists instead of copying `.play` examples into this
314
- repository.
312
+ Record screen MCP transcripts in `.ai-work/`; render/runtime checks must use the
313
+ same source, never an app that silently drops authored UI. Use the Screenplay-owned canonical
314
+ corpus fixture path instead of copying available `.play` fixtures here.
315
315
 
316
316
  Check installed `tools/list` schemas: the CLI bundle can differ. Never invent
317
317
  commands, parameters, syntax nodes or downstream capabilities.
@@ -65,6 +65,12 @@ qualifiers, secret scopes and validation. Legacy markers report PLAY0565 informa
65
65
  repeated header markers report PLAY0653 warning. Purposes declare the use/basis/retention
66
66
  separately; see command-surface `references/compliance.md`.
67
67
 
68
+ Enum member `name = N` pins are unique int32 values, all members or none.
69
+ Unnumbered enums retain positions. Non-positional numbers bind as ESM v12 from
70
+ 4.139.0; positional pins preserve older bytes/version. Fixtures and conditions
71
+ still name members. Syntax, stored-number safety and consumer admission:
72
+ command-surface `references/enum-numbers.md`.
73
+
68
74
  Projections and captures use their dedicated sub-grammars. Inline code uses a
69
75
  tagged fence (` ```csharp `); the older language-line form still parses with
70
76
  warning `PLAY0397`. Query the MCP's `syntax-schema` instead of inventing JSON
@@ -106,6 +106,11 @@ the server sends `roots/list` and serves `tools/list` after the reply).
106
106
  `find-specification-obligations` (presence, not execution), use
107
107
  `find-modeling-smells` as questions needing a domain consequence, and compare
108
108
  generated/curated exported snapshots with `semantic-diff`.
109
+ Before renaming/removing a property, use `find-references`/`dependencies`
110
+ `kind: "Property"` (4.138.0+) and `Owner.member` or historical event
111
+ `Owner.generationN.member`. Follow direct mapping counterparts one query at a
112
+ time; inspect incomplete/ambiguous evidence and `reasons`. `complete: false`
113
+ is not an empty successful result. Shapes/roles: [property links](property-links.md).
109
114
  3. `open-workspace` and keep `revision` and `catalogRevision`. Opening writes
110
115
  nothing. With `identityPersistence: "root-local-on-apply"` the identities file
111
116
  is written only by `apply`.
@@ -13,6 +13,7 @@
13
13
  - Identity, compliance and processing views
14
14
  - Evidence-pinned production repairs
15
15
  - Scoped diagnostics and completeness
16
+ - Property-reference evidence
16
17
  - Dependencies and intent inventories
17
18
  - Specification obligations and advisory smells
18
19
  - Semantic revision comparison
@@ -37,9 +38,9 @@ report unsupported adapters or drift.
37
38
 
38
39
  After `initialize` and `notifications/initialized`, discover current tools and
39
40
  argument schemas with `tools/list`; do not hard-code counts or infer arguments
40
- from these short descriptions. Screenplay v4.131.0's `McpToolCatalog.cs` has
41
- 37 tools without visualization, 38 with it; older issue counts are not this release.
42
- The additions below follow its `Documentation/screenplay/mcp/reference.md`.
41
+ from these short descriptions. Additions follow the released
42
+ `Documentation/screenplay/mcp/reference.md`; historical tool counts are not
43
+ current capability evidence.
43
44
  The connection procedure, edit routes, identity state and failure handling are in
44
45
  the [MCP loop](mcp-loop.md).
45
46
 
@@ -50,7 +51,7 @@ the [MCP loop](mcp-loop.md).
50
51
  | Source and validation | `diagnostics`, `read-document`, `merged-document`, `syntax-schema` | Read exact source or typed structure and diagnose problems |
51
52
  | Workspace inspection | `open-workspace`, `read-workspace`, `read-ast`, `workspace-state`, `export-workspace`, `repair-capabilities` | Obtain current identities, handles, readiness, code attachment requirements, source-map locations, durable-state status and the repair catalog |
52
53
  | Visual (MCP-Apps hosts only) | `visualize-model` | Draw the board for the model or a `proposalId`; its `sketch` argument previews a what-if of whole documents. Reads only |
53
- | Planning | `propose-source`, `propose-ast`, `propose-rename`, `propose-repair`, `propose-extract-inline-event`, `propose`, `recommend-layout`, `expand-layout` | Produce validated, reviewable candidates without writing them |
54
+ | Planning | `propose-source`, `propose-ast`, `propose-rename`, `propose-repair`, `propose-number-enum-members`, `propose-extract-inline-event`, `propose`, `recommend-layout`, `expand-layout` | Produce validated, reviewable candidates without writing them |
54
55
  | Review | `read-proposal`, `discard-proposal` | Inspect exact changes, dropped comments and proposed attachments, or abandon a connection-local proposal |
55
56
  | Effects | `apply`, `recover-workspace` | Apply an accepted plan or explicitly recover an interrupted write |
56
57
 
@@ -146,6 +147,24 @@ then explicitly confirm Apply. Dirty/untitled buffers and evidence drift refuse;
146
147
  uncertain Apply outcomes are never retried. Restricted Mode cannot launch it.
147
148
  Monaco has no production-repair host bridge. See v4.125.0 `vscode.md`.
148
149
 
150
+ ### Number enum members (4.137.0)
151
+
152
+ Find the unnumbered enum's `ConceptSyntax` handle with `read-ast`; pass it as
153
+ `subject` to `propose-number-enum-members` with `expectedRevision`,
154
+ `expectedCatalogRevision` and `formatting: "CanonicalizeTouchedDocuments"`.
155
+ Optional `validation` and `includeContent` follow ordinary proposals. It writes
156
+ `= 0..n-1` in current order, never renumbers numbered/mixed/invalid enums, and
157
+ requires retained comments/catalog assignments and unchanged executable bytes
158
+ when the original binds. Review with `read-proposal`, then `apply` with before
159
+ revisions; proposing writes nothing. Positional pins preserve executable version,
160
+ bytes and revision. Non-positional numbers require v12 (4.139.0) consumer admission.
161
+
162
+ Opt into `diagnostics` `checks: "enum-pinning"` (or `PLAY0671` or `all`) for an
163
+ Information hint on unnumbered enums used by event properties, including composite
164
+ uses. Ordinary compilation does not report it. This is a refactoring, not a
165
+ correctness repair; PLAY0667–0670 require an author decision, with no automatic repair.
166
+ Source: `v4.139.0:Documentation/screenplay/mcp/authoring-tools.md`.
167
+
149
168
  ## Syntax-only constructs through the MCP
150
169
 
151
170
  The 4.66.0/4.68.0 negative probes below are historical. At 4.125.0,
@@ -190,9 +209,8 @@ persona/policy and table/case/caseParameter provenance. Neither view executes.
190
209
  ## Identity, compliance and processing views
191
210
 
192
211
  Screenplay v4.127.0 `mcp/reference.md` and `authoring-tools.md` describe these
193
- additions (checked at 4.127.0); discover installed schemas because current
194
- Previous CLI 3.46.1 bundled Screenplay 4.130.0; CLI 3.50.0 bundles
195
- 4.131.0, so these source objects are available there too.
212
+ additions (checked at 4.127.0). Discover installed schemas; current compiler
213
+ and bundle pins are in `cratis-screenplay-toolchain/references/versions.md`.
196
214
 
197
215
  - Identity/detail summaries expose declared sources; `$identity` has its own
198
216
  expression node. The block alone stays executable-ready, but executable reads
@@ -248,6 +266,15 @@ They opt into findings, not execution proof. Whole-source errors skip them; repo
248
266
  `completenessStatus` as skipped, never passed. `completenessCoverage` states their
249
267
  limits. Continue with `expectedSourceRevision`.
250
268
 
269
+ ## Property-reference evidence
270
+
271
+ From 4.138.0, `find-references` and `dependencies` accept `kind: "Property"`
272
+ and `Owner.member`, or historical event `Owner.generationN.member`. Before a
273
+ rename/removal, read [property links](property-links.md) for exact query/result
274
+ shapes, roles, direct counterpart traversal, revision paging and `complete: false`
275
+ with `reasons`. Incomplete evidence is never a successful empty list. These tools
276
+ inspect authored links, not code execution or a transitive runtime graph.
277
+
251
278
  ## Dependencies and intent inventories
252
279
 
253
280
  `dependency-graph` edges point consumer → producer. Views: `edges`, `cycles`,
@@ -326,7 +353,8 @@ the open model as candidate:
326
353
  }
327
354
  ```
328
355
 
329
- These source objects require Screenplay 4.131.0; CLI 3.50.0 bundles it
356
+ These source objects require Screenplay 4.131.0; compare the bundled compiler
357
+ in `cratis-screenplay-toolchain/references/versions.md` with that minimum
330
358
  (previous CLI 3.46.1 bundled 4.130.0).
331
359
  Discover installed schemas rather than assuming bundle parity.
332
360
  Check that the registered worktree is checked out at the intended commit and
@@ -0,0 +1,126 @@
1
+ <!-- Copyright (c) Cratis. All rights reserved. -->
2
+ <!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
3
+
4
+ # Inspect a property's chain before changing it
5
+
6
+ ## Contents
7
+
8
+ - Address and query
9
+ - Read evidence, not just a count
10
+
11
+ Screenplay 4.138.0 released property-path evidence in `find-references` and
12
+ `dependencies`; this guidance was checked against 4.139.0. Discover installed
13
+ `tools/list`: CLI 3.53.1's 4.137.0 bundle predates it. These are read-only
14
+ inspection tools, not a property-change planner.
15
+
16
+ ## Address and query
17
+
18
+ Use `kind: "Property"`, case-sensitive. Append the member to its owner's exact
19
+ logical address: `Owner.member`. For an event this selects the current generation;
20
+ `Owner.generationN.member` selects a historical shape, whose target details carry
21
+ `historical: true`. Properties are not returned in declaration listings: locate
22
+ the owner and inspect its properties first.
23
+
24
+ On the command-surface [enum example](../../cratis-screenplay-command-surface/references/enum-numbers.md),
25
+ first inspect the event with `find-references`:
26
+
27
+ ```json
28
+ {
29
+ "address": "Invoicing.Issuing.SendingInvoice.InvoiceSent",
30
+ "kind": "Event"
31
+ }
32
+ ```
33
+
34
+ At 4.139.0 this returns two references (`produces`, `thenEvent`), with top-level
35
+ `totalCount: 2`, `references` and empty `ambiguous`, `incomplete`, `wrongKind`
36
+ arrays. The event response has no `complete` field. Query its property separately:
37
+
38
+ ```json
39
+ {
40
+ "address": "Invoicing.Issuing.SendingInvoice.InvoiceSent.status",
41
+ "kind": "Property"
42
+ }
43
+ ```
44
+
45
+ Then query direct mapping counterparts with `dependencies`:
46
+
47
+ ```json
48
+ {
49
+ "address": "Invoicing.Issuing.SendingInvoice.InvoiceSent.status",
50
+ "kind": "Property",
51
+ "direction": "outgoing"
52
+ }
53
+ ```
54
+
55
+ Both tools accept `offset`, `limit` and `expectedSourceRevision`; echo the first
56
+ response's `sourceRevision` on continuation pages. `dependencies` additionally
57
+ accepts `direction: "incoming"` (default), `descendants` and `document`. It follows
58
+ **direct mapping counterparts only**, not a transitive property chain or runtime
59
+ impact. Query each resolved counterpart separately when walking a longer chain.
60
+
61
+ ## Read evidence, not just a count
62
+
63
+ `find-references` returns top-level `references`, `ambiguous`, `incomplete`,
64
+ `complete`, `totalCount`, `offset`, `nextOffset` and `coverage`. Ambiguous/incomplete
65
+ rows contain `reference` and `candidates`. `dependencies` instead has
66
+ `page.items`, each carrying `reference`, `resolution` and `targets`, with paging
67
+ inside `page`; `complete` and `coverage` stay at the top level.
68
+
69
+ Each property reference retains `owner`, `location`, `role`, `reasons` and
70
+ `otherEnd` (the link's resolved other end, or null). For outgoing dependencies,
71
+ navigate `targets`, not an assumed interpretation of `otherEnd`. Evidence roles are:
72
+
73
+ | Role | Meaning |
74
+ | --- | --- |
75
+ | `mapping-source`, `mapping-target` | Explicit production, capture append or projection mapping end |
76
+ | `automap` | Derived case-insensitive projection link |
77
+ | `condition` | Declarative condition, including query filters and policy readers |
78
+ | `key` | Lookup/read, projection/join/removal/parent, constraint or stream-id key |
79
+ | `screen-binding` | Screen/form field use |
80
+ | `fixture`, `assertion` | Specification/example assignment or expected value |
81
+ | `response` | Command response property source |
82
+ | `opaque` | Text names the property; code is not resolved |
83
+ | `unclassified` | Conservative backstop found a name occurrence outside classified links |
84
+
85
+ ### Observed result on the compiled example (4.139.0)
86
+
87
+ The property `find-references` response has `success: true`, `complete: false`,
88
+ `totalCount: 3`, `nextOffset: null`: two resolved references (`mapping-target`
89
+ on the command's `status = status`, and `assertion` on `then InvoiceSent`),
90
+ and one `incomplete` entry. Its `reference.role` is `unclassified`, located at the
91
+ specification's command-input `status` assignment, with `reference.reasons`:
92
+
93
+ ```json
94
+ ["Property name occurs in referencing declaration text without a classified link."]
95
+ ```
96
+
97
+ Outgoing `dependencies` also reports `success: true`, `complete: false` and
98
+ `page.totalCount: 1`. Its resolved `page.items[0]` has a `mapping-source`
99
+ reference; `targets[0].address` is
100
+ `Invoicing.Issuing.SendingInvoice.SendInvoice.status`, while the reference's
101
+ `otherEnd.address` is the queried event property. The property's completeness
102
+ covers all indexed evidence even when the chosen direction's page has only a
103
+ resolved link. The workspace had `sourceSuccess: true`, no source diagnostics
104
+ and `readiness.executableReady: true`: compilation success does not imply
105
+ complete property evidence.
106
+
107
+ **`complete: false` is never a successful empty list.** Inspect every ambiguous
108
+ or incomplete row and its `reasons`/candidates, even when resolved `references`
109
+ is empty. `success` describes compilation, not completeness. Opaque occurrences,
110
+ unresolved counterparts, nested composite paths, legacy command reads and external
111
+ source items can leave incomplete evidence. The backstop counts whole-word names
112
+ case-insensitively in relevant typed source and comments, including quoted text;
113
+ same-named properties in unrelated declarations do not affect completeness.
114
+ External code contents and registrations remain outside coverage even with
115
+ `complete: true`; authored links do not prove executable admission.
116
+
117
+ Before a rename/removal: pin the revision, inspect incoming readers and outgoing
118
+ counterparts, page to completion, resolve uncertainties, then choose the supported
119
+ identity-safe edit route with the connection owner. Never infer safe deletion from
120
+ zero resolved hits or edit every same-named field. An event-property change still
121
+ needs a persisted-contract evolution decision; the catalog is not storage evidence.
122
+
123
+ Source/output authority: `v4.139.0:Documentation/screenplay/mcp/reference.md`
124
+ (property links), `Source/DotNET/Screenplay.Mcp/McpPropertyDependencies.cs`,
125
+ `McpToolSchemas.cs`, and decision 0044's released prerequisite index. The planner
126
+ phases in that decision are not release evidence.