Skip to content

Screenplay interoperability and extensions

Screenplay extensions let you inspect a .play model, recover a model from existing source, or render compiled semantics as target artifacts. Choose the contract for the result you need: a syntax tool does not need to become a source adapter or a renderer.

You want to… Start with Next step
Inspect declarations or export their written structure Syntax tools Parse the document, traverse the tree, and print it if you need .play text
Recover a model from authored .NET code Source recovery Contribute framework evidence to Generation rather than printing syntax in the adapter
Generate artifacts for a target framework Target rendering Compile the executable semantic model and explicitly admit the capabilities your target can realize

A system an extension realizes maps the extension’s settings to configuration or named secrets and may override its activation; see system settings and named secrets. The package contract, its manifest and the lock that pins it are specified in extension contracts.

The executable semantic model (ESM) carries portable model meaning, not permission to execute every construct on every target. Reading a version, evaluating its reference specifications, rendering it, and recovering it from source are separate admission decisions. Here, admission means that a consumer explicitly accepts the contract it can implement; a package update alone does not make that decision.

A render planner decides how to realize admitted semantics for its target. It returns an artifact plan, while the caller owns publication and runtime orchestration. Source adapters likewise contribute evidence, not authority to change the workspace. These boundaries let you reuse the model without treating syntax recognition or a successful compilation as proof of runtime support.

Opt into specification-refused compilations (.NET)

Section titled “Opt into specification-refused compilations (.NET)”

SemanticModelCompiler.Compile still returns Success == false and Value == null when a specification has binding errors. A host that needs the executable model without those specifications can explicitly read CompilationResult<SemanticCompilation>.SpecificationRefusedValue:

var result = compiler.Compile(applicationName, documents);
var executable = result.Value ?? result.SpecificationRefusedValue;

This opt-in value is present only when every error belongs to a specification binding or case-value validation scope. Syntax, structural, extension-resolution, and semantic-contract validation errors leave it absent. Broken specifications are removed, not repaired. executable.RefusedSpecifications identifies each removed specification by its authoritative Id, original Error Diagnostics, and effective Origin when available. Healthy identities, documents, and source mappings remain; refusals are a sidecar, not a new ESM field or version.

Keep reporting result.Diagnostics and treating the result as failed verification. Reading this member does not change CLI, verification, or MCP success behavior, and does not admit the remaining model for a target automatically.

syntax tree

inspect or export

Authored source

Source host

IDotNetScreenplayAdapter

Neutral facts and diagnostics

Generation resolve, lower, print, and verify

Canonical Screenplay

SemanticModelCompiler

Executable semantic model

SemanticExecutionPlan

IArtifactRenderPlanner

ArtifactRenderPlan

Orchestrator and managed publisher

Target artifacts

ScreenplaySyntaxWalker

Syntax tool

Builders outside .NET read the executable semantic model through its published JSON Schema and rebuild only what changed by using the per-slice change summary.

Recovery and rendering are not inverses:

  • A source adapter explains what authored source proves and reports what it cannot recover.
  • A render planner makes explicit, versioned choices for one target and rejects semantics it cannot realize.

Recovering generated artifacts through a source adapter can provide a useful regression check, but it does not prove behavioral equivalence or a lossless round trip.

Use ScreenplaySyntaxWalker when the integration consumes Screenplay syntax directly: documentation tools, linters, indexes, visualizers, format-aware exporters, and other tree analyses.

The type ships in the Cratis.Screenplay package under Cratis.Screenplay.Syntax. Its general and root entry points are:

Member Purpose
public virtual void VisitNode(SyntaxNode node) Observe every node before node-specific traversal
public virtual void VisitApplication(ApplicationSyntax syntax) Walk a complete application
public virtual void VisitProjection(ProjectionSyntax syntax) Walk a standalone projection
public virtual void VisitSpecification(SpecificationSyntax syntax) Walk a standalone specification
public virtual void VisitCapture(CaptureSyntax syntax) Walk a standalone capture

Every concrete node kind also has a public virtual Visit... method. The walk is pre-order: VisitNode() runs before the node-specific method descends into children. An override that calls its base implementation continues into that subtree; an override that does not call base prunes it.

This is the compatibility-oriented extension point for syntax consumers. It is not the source-recovery contract and it is not the target-rendering contract. A generator that must make decisions from resolved semantic identity should consume the executable semantic model through a render planner instead of inferring meaning from syntax names.

See Visitors and traversal and Syntax tree compatibility for traversal and versioning details.

Use IDotNetScreenplayAdapter when an integration recovers authored .NET source into Screenplay. The adapter interprets framework or library evidence in Roslyn compilations and contributes neutral facts, evidence, and diagnostics.

The contract ships in Cratis.Screenplay.Generation.DotNet under Cratis.Screenplay.Generation.DotNet:

Member Contract
AdapterIdentity Identity { get; } Stable adapter identity and version
bool CanAnalyze(DotNetAnalysisContext context) Whether the adapter recognizes evidence it can analyze
AdapterContribution Analyze(DotNetAnalysisContext context, DotNetAdapterOptions options) Neutral facts and diagnostics from one analysis

The surrounding host owns workspace loading, the authoritative authored syntax trees, options, and explicit adapter selection. CanAnalyze() decides whether an already-selected adapter recognizes semantic evidence in that context. Analyze() returns one AdapterContribution; it does not construct syntax or print .play text.

Generation owns the framework-neutral pipeline after analysis. ScreenplayDefinitionGenerator.Generate(...) resolves all contributions together, lowers the resolved graph to Screenplay syntax, prints canonical source, and verifies that source with the Screenplay compiler.

Generation does not discover adapter packages automatically. A package, catalog entry, or implementation of the interface does not make an adapter active; a host must select and compose it.

For implementation details, source authority, evidence strength, deterministic identity, diagnostics, and verification, follow the canonical Generation source adapter guide.

Use IArtifactRenderPlanner when an integration turns compiled Screenplay semantics into target artifacts. Raw .play input is compiled first; the planner receives an immutable executable semantic model and its capability-admitted execution plan.

The contract ships in Cratis.Stage.Contracts under Cratis.Stage.Contracts.Rendering. Its public operation is ArtifactRenderPlan Plan(ArtifactRenderRequest request).

ArtifactRenderRequest is a sealed record with this exact positional contract:

Parameter Type Purpose
Model ExecutableSemanticModel Immutable executable semantic model
ExecutionPlan SemanticExecutionPlan Capability-admitted plan for that model
Profile ArtifactRenderProfile Fully resolved target and renderer profile
Scope ArtifactRenderScope Semantic scope to render

A scope identifies the application, one module, one feature, or one slice. The fully resolved profile identifies the target, renderer, versions, and immutable inputs.

The planner owns target admission and realization. It returns a complete deterministic ArtifactRenderPlan with planned paths, bytes, hashes, and typed diagnostics. It must not write files, start processes, use the network, read the clock, or inspect ambient dependency state. Publication belongs to the caller after a successful plan.

A target must fail closed when it cannot realize reachable semantics: return a refusal rather than guessed defaults, thinner behavior, placeholders, or to-do blocks. Follow the Stage renderer target guide to implement that contract. The sections below describe compilation and conformance inputs for consumers.

SemanticModelCompiler also implements IAdmissibleSemanticModelCompiler in Cratis.Screenplay.Semantics. Opt in with CompileAdmissible(applicationName, documents) to bind the supported subset of a source-valid application without changing the strict ISemanticModelCompiler.Compile contract.

The returned AdmissibleCompilationResult.Compilation is the usual semantic compilation result. Exclusions lists removed specifications, slices, imports and policies in source-location order, with their addresses, parent identities, authored locations and original binder diagnostics. A failing specification leaves its slice intact; other slice-owned failures remove the whole slice. Dependencies that stop binding are excluded on subsequent passes. Final warnings remain in Compilation.Diagnostics.

Each exclusion has a typed Cause: Root when its own binder errors excluded it, or Dependent when earlier exclusions removed a declaration it references or a policy/protected-read closure forced it out. DependsOn names the immediate exclusions as SemanticExclusionReference(Kind, Address) values, ordered like Exclusions; it is empty for a root. Follow those references to reach the roots—every chain ends at a Root. A unit with its own errors in the first binding pass remains a root even when it also references an excluded declaration. Causes come from the authored reference graph and closure provenance, never from diagnostic text or arguments.

Security exclusions never remove protection while retaining protected behavior. A policy/authorization failure excludes the policy and every explicitly or implicitly protected slice, including nested module/feature scopes. A refused protected command read excludes its read model’s slice and all reader slices. Unnamed and variant projections resolve to the read models they build; a command slice whose protected read cannot be protected (PLAY0781) or whose read path cannot be resolved (PLAY0784) is excluded with its dependants. Their exclusion Reason names the policy or protected read. Policy-forced slices depend on the policy; protected-read closures depend on the slice whose exclusion forced them. Excluding a policy also removes every whole persona naming it, every whole onboarding invitation whose by or grant lists name an affected persona (including tenant as grants), and every authored specification using given caller as that persona. Policies are never trimmed from a surviving persona, and invitation lists are never partially rewritten. Removed personas and invitations are identified by name or kind and source location in the policy exclusion’s Reason, not separate public exclusion kinds. Forced specifications depend on the policy, unless their own first-pass binder errors make them roots. A final syntax check requires surviving persona callers and invitations to resolve uniquely to retained personas. Ambiguous resolution, an unknown protected set, remaining references to excluded protection or personas, application-level binding refusals and source errors return the original strict failure with no partial model or exclusions.

This closure applies only to the compiler’s intermediate syntax. Source documents remain unchanged. Consumers such as Stage that reparse original persona or onboarding metadata must separately constrain runtime identities and invitations; a successful admissible compilation does not establish runtime identity safety or authorize runtime activation.

SemanticExecutionPlan and SemanticExecutionPlanCompilation ship in Cratis.Screenplay.Semantics.Execution.

Operation or member Contract
SemanticExecutionPlan.Compile(ExecutableSemanticModel model) Compiles the whole model; any admission issue blocks plan creation.
SemanticExecutionPlan.Compile(ExecutableSemanticModel model, IEnumerable<SemanticId> selectedSlices) Compiles for a selection of slice identities, including an empty selection. Unknown identities produce InvalidSliceSelection issues.
SemanticExecutionPlanCompilation.Plan The indexed plan, or null when blocking issues exist.
SemanticExecutionPlanCompilation.Issues Blocking admission issues: selected-slice issues and all application-level issues.
SemanticExecutionPlanCompilation.UnselectedIssues Non-blocking issues owned by unselected slices; empty for whole-model compilation.
SemanticExecutionPlanCompilation.Success true only when a plan exists and Issues is empty.
SemanticExecutionPlan.Model / Revision The original model and its unchanged semantic revision, including during scoped compilation.

Use the selection overload for scoped rendering when an unrelated slice fails portable execution admission. Expand module or feature selections to their slice identities before calling it; nested features are traversed, but only explicitly selected slices are selected. The plan retains every declaration, rather than manufacturing a subset model with a different revision. Application-level issues always block because selected declarations may depend on shared concepts or types. An empty selection blocks only on application-level issues and reports every slice-owned issue in UnselectedIssues; use it when a chosen scope has no slices left. The same evaluator guards apply to its deferred artifacts.

A successful scoped compilation does not admit the deferred artifacts for execution. The reference evaluator returns SemanticUnsupported with the existing Command, Query, or Projection capability when a deferred command or query is requested, a query reads a deferred projection’s read model, or appended/replayed facts would reach a deferred projection. This includes event-target projections and all facts that would be committed, both original and published. Reachability is conservative: any every or all block is treated as observing every event, regardless of whether a read-model instance exists. Deferred projections never enter either evaluation engine; refusal returns the input world without committing facts or read-model state. Reaction settlement likewise rolls back cascading effects when an invoked command is deferred. Inspect UnselectedIssues to report these limitations to the caller.

Minor versions and unknown-preserving admission

Section titled “Minor versions and unknown-preserving admission”

Use UnknownPreservingSemanticModelReader when a consumer needs to retain unknown additions without executing them. This opt-in reader sits beside the strict reader under decision 0118. The caller supplies an EsmAdmissionRange for one major with inclusive minor bounds. Admission requires that range and a shipped frozen baseline descriptor for the major; it is not restricted to the latest major. Unknowns are allowed only above the highest registered minor. Allocation is different: only additive, ignorable additions on the latest published major may receive a minor. No real minor is allocated here.

The read document retains original bytes, wire versions and the full revision, plus a validated known projection and owner-addressable unknown diagnostics. The projection uses the highest registered pair of its major: consumers must classify admission using the wire pair, not Model’s pair. Unknowns in known authorization/policy/caller/claim, identity, compliance/personal/secret or event-stream-routing positions are security flagged; other unknowns are Unclassified, not automatically unsafe. No unknown semantics execute. Known dangling references, unknown discriminators, noncanonical encoding, wrong hashes or out-of-range pairs refuse the whole document.

Canonical bytes use frozen per-major baseline schema ordering plus an ordinal extension region. Inside opaque extensions, object names are ordinal recursively, arrays retain received order, absent and null remain distinct, and existing NFC/ASCII string and decimal encoding applies. Future typed producers must preserve this grammar after promotion. Limits are 64 container depth, 8 MiB input, 64 unknown boundaries per owner, 1,024 per document, 64-character ASCII schema-token names (also nested), and 1 MiB total unknown value bytes. Breaches refuse, never truncate. Canonical/hash integrity is not producer trust, execution or rendering authority.

Use the table to identify the ESM contract selected by a construct before deciding whether your consumer supports it. Versions are cumulative and select only when their constructs are used. Reading, reference execution, rendering and reverse recovery each need their own admission decision. The allocation rules are recorded in decision 0025 and the published-version freeze in 0066.

Version Selecting constructs schemaVersion Decision Golden file Corpus vector
1.0 Baseline portable model without later constructs 1 0001, 0004 full-esm-v1.json RegisterProjectCorpus.LegacyV1
2.0 Typed command destinations, specification event sources, scalar event context 2 0004 full-esm-v2.json RegisterProjectCorpus.V2 (scenario now evolved to v4)
3.0 Implementation attachments: reducers, validation, policy predicates 3 0002, 0005 full-esm-v3.json No dedicated source-backed v3 corpus yet
4.0 Multiple event generations 4 0015 full-esm-v4.json RegisterProjectCorpus.V2
5.0 Keyed read-model absence assertions 5 0020 full-esm-v5.json ReadModelAbsenceCorpus.V5
6.0 Triggers, automation/translate slices, reactions, captures, clock and capture specifications 6 0022 full-esm-v6.json ReactionsCorpus.V6
7.0 Generated command properties, responses, generated fixtures, return expectations; policy negation (0027 extension) 7 0025, 0026, 0027 full-esm-v7.json RegisterProjectCorpus.V7, PolicyNegationCorpus.V7
8.0 Event sources and streams, scalar/composite command routes, specification routes and no-stream assertions 8 0036, 0031, 0033 full-esm-v8.json EventRoutesCorpus.V8, EventRoutesCorpus.SpecificationsV8, EventRoutesCorpus.CompositesV8, EventRoutesCorpus.CompositeCommandsV8
9.0 Public events and event origins, translation direction, event-target projections and reducers, and event-source captures 9 0051, 0050, 0049 full-esm-v9.json PublicEventsCorpus.V9
10.0 Reaction system identity (runs as system), production route overrides and observer from filters 10 0043, 0004, 0025, 0063, 0061, 0062, 0066 full-esm-v10.json ReactionIdentityCorpus.V10, EventRoutesCorpus.ProductionRoutesV10, EventRoutesCorpus.ObserverFiltersV10
11.0 Exact Double-mode lowering of a retained non-route number literal 11 0064, 0066, 0025 full-esm-v11.json NumberLiteralsCorpus.ExactLiteralsV11
12.0 Non-positional enum member numbers 12 0065, 0025, 0066 full-esm-v12.json EnumMemberNumbersCorpus.V12
13.0 Concept compliance markers (pii, secret), personal qualifiers and secret scope 13 0068, 0025, 0066 full-esm-v13.json ConceptComplianceCorpus.V13
14.0 Caller-supplied equality filters on collection queries 14 0069 full-esm-v14.json QueryFiltersCorpus.V14
15.0 Concept generation strategies and Guarded freshness 15 0054 full-esm-v15.json GeneratedValuesCorpus.V15
16.0 Event identity pins and stored event type names 16 0075 full-esm-v16.json StoredEventNamesCorpus.V16
17.0 Explicit no-event assertions and recovery redelivery 17 0074 full-esm-v17.json RecoverySpecificationsCorpus.V17
18.0 Actionless query validation rejection specifications 18 0072 full-esm-v18.json QueryValidationCorpus.V18
19.0 Reaction invocation refusal branches and String refusal values 19 0030 full-esm-v19.json InvocationRefusalsCorpus.V19
20.0 Rules on generated concepts, including implicit UUID generated properties 20 0054 full-esm-v20.json GeneratedConceptRulesCorpus.V20
21.0 Finite pattern/random generation, checksum validation and ValueGeneration implementations 21 0054 full-esm-v21.json GenerationSupportCorpus.V21, GenerationFixturesCorpus.V21 (frozen original), GenerationFixturesCorpus.V21R2 (portable body)
22.0 Explicit atomic reaction production batches 22 0078 full-esm-v22.json AtomicReactionBatchesCorpus.V22
23.0 Described command handlers with a pending payload implementation 23 0082 full-esm-v23.json DescribedCommandHandlersCorpus.V23
24.0 First-class ordinal text rules and Studio pattern desugaring (released in Screenplay v4.184.0) 24 0084 amendment full-esm-v24.json TextRulesCorpus.SourceForms
25.0 Explicit protected command reads, read paths, required absence and decide/commit conflicts (released in Screenplay v4.193.0) 25 0085 full-esm-v25.json ProtectedCommandReadsCorpus.V25 / protected-command-reads/v25, with an identical-source legacy refusal control
26.0 Chronological Date and DateTime comparisons in command conditions and command/property validation rules (released in Screenplay v4.199.0) 26 0087 full-esm-v26.json DateComparisonsCorpus.V26
27.0 Flat composite read-model keys, complete single-query by parts, projection parts keys and fixture identities (released in Screenplay v4.204.0) 27 0088 full-esm-v27.json CompositeReadModelKeysCorpus.V27
28.0 Uuid == and != comparisons in command require and produces when (released in Screenplay v4.205.0) 28 0090 full-esm-v28.json UuidComparisonsCorpus.V28
29.0 The Acme Commerce admissions of decision 0098: decimals <= N rules, add/subtract by a product, mapping between concepts over one primitive, application toolbar buttons, and command specifications stating published events 29 0098 full-esm-v29.json AcmeAdmissionsCorpus.V29
30.0 Commands that append to several event sources (for any required scalar property) and given generated <Command>.<property> = <value> pinned values for reaction-invoked commands (released in Screenplay v4.226.0) 30 0098 full-esm-v30.json AcmeSecondAdmissionsCorpus.V30
31.0 The anonymous policy condition (require anonymous): a policy every caller satisfies, with or without an identity, as the whole authorization of a command or query (released in Screenplay v4.240.6) 31 0103, 0092 full-esm-v31.json AnonymousPoliciesCorpus.V31
32.0 Typed event capture keys preserve the agreed source-property identity on capture appends and specification fixtures (released in Screenplay v4.241.0) 32 0105 full-esm-v32.json EsmGoldenVectors.Get(32)
33.0 An events capture keyed by its event source (key <property> is event source) (released in Screenplay v4.242.0) 33 0114 full-esm-v33.json EsmGoldenVectors.Get(33)
34.0 A specification stating the commands its slice’s reactions invoke (then invokes <Command>) (released in Screenplay v4.246.0) 34 0115 full-esm-v34.json EsmGoldenVectors.Get(34)
35.0 Command handlers that declare their possible events (handler → may produce, for one of): handler result contract v2 (released in Screenplay 5.4.0) 35 0119 full-esm-v35.json PossibleEventsCorpus.V35
36.0 State machines and workflows (stateMachines, workflows) (released in Screenplay 5.1.0) 36 0124 full-esm-v36.json EsmGoldenVectors.Get(36)
37.0 Clock operands in command rules (today, now, offsets, date of), command calendars, the application time zone, declared context time zones and given time zone (released in Screenplay 5.5.0) 37 0106, 0107, 0132 full-esm-v37.json ClockOperandsCorpus.V37
37.1 Opt-in read-model declaration-order metadata (propertyOrder) over a valid 37.0 calendar/clock base (released in Screenplay 5.6.0) 37 0118 full-esm-v37.1.json EsmGoldenVectors.GetMinor(SemanticVersion.V37_1)
38.0 Property graphs, the projections that build them and graph specifications (graphs, graphProjections, graphSpecifications) 38 0138 full-esm-v38.json EsmGoldenVectors.Get(38)
40.0 Queries that read a graph and an event-time clock in graph specifications (graphQueries, the graph specification clock; released in Screenplay 5.8.0) 40 0139 full-esm-v40.json EsmGoldenVectors.Get(40)
41.0 Graph projection handlers that run once per item of an event collection (forEach on a graph handler; released in Screenplay 5.10.0) 41 0140 full-esm-v41.json EsmGoldenVectors.Get(41)
42.0 Screens admitted on request as a stack-neutral UI contract (screens on a slice: data, actions, navigation and layout; released in Screenplay 6.8.0) 42 0149 full-esm-v42.json EsmGoldenVectors.Get(42)
43.0 Set-once projection mappings and children collections with a stored order ("operation":"setOnce", ordering on children) 43 0150 full-esm-v43.json EsmGoldenVectors.Get(43)
44.0 Policies that decide from recorded state (reads on a policy, "kind":"state" policy conditions) 44 0151 full-esm-v44.json EsmGoldenVectors.Get(44)
45.0 Text and membership operators in policy state conditions ("operator":"contains" and "startsWith") 45 0152 full-esm-v45.json EsmGoldenVectors.Get(45)

Read-model declaration order is optional, ignorable metadata. The historical Bind overload and default SemanticBindingOptions preserve existing versions, bytes and revisions. PreserveReadModelPropertyOrder: true selects language/semantic 37.1 only when metadata is emitted and removing it leaves a valid 37.0 model reading the application calendar or a clock. Otherwise the binder returns PropertyOrderMetadataRefusal with no executable value. A model with no read models emits no metadata and retains its version.

A read model writes optional propertyOrder after properties: a permutation of all its property semantic identities, in declaration order, including the key. Omitted metadata leaves historical bytes unchanged; malformed permutations and metadata outside 37.1 are refused. schemaVersion remains 37. Canonical wire bytes and revision remain identical when an old unknown-preserving reader treats the member as opaque and the new reader promotes it to typed metadata. The published Screenplay 5.5.0 reader is exercised against this golden as a 37.0 reader; it retains the full bytes and revision while projecting the complete older contract, including composite keys, lifecycles and the application calendar.

EsmGoldenVectors.Versions and Get(int) continue to describe only .0 vectors; Get(36) and Get(37) remain the frozen 36.0 and 37.0 goldens. Discover nonzero minors through MinorVersions and GetMinor(SemanticVersion.V37_1). Regeneration accepts SCREENPLAY_REGENERATE_GOLDEN=37.1 for the current minor; all earlier goldens, including 37.0, remain frozen.

This is a C# executable-model/binder API, not new .play syntax. The TypeScript compiler exposes syntax compilation, not executable semantic-model binding or ESM serialization; Monaco and VS Code therefore have no ESM metadata surface to update. Authoring syntax, diagnostics, samples and editor behavior remain unchanged.

Conformance-only footnote: under decision 0118, minor 4294967295 is reserved, never allocated or registered, and is not an ESM version or a table row. Strict readers refuse these pairs. Packaged conformance-vector bytes freeze on first publication; 0066 still freezes their bytes, not a version contract.

2026-10-06 — v7 extension accepted. Decision 0027 admits unary policy-condition not as a byte-preserving extension under 0004. Models using negation select v7; models without it keep their existing canonical bytes and revisions. Pre-extension v7 strict readers reject the new condition variant, so consumers must admit negation explicitly.

ESM v10 was released in Screenplay 4.125.0 under 0043. Production routes and observer filters extended it under 0063 in Screenplay 4.129.0; 0066 records that shipped extension as a retroactive exception, now part of frozen v10. Consumers admitting v10 must include those bytes. A model selects v10 when it uses any of these three features. Any release or prerelease NuGet or npm package exposing a version freezes it: later changes take a new version unless they are byte-preserving extensions under 0004. A claimed entry moves to the released table with its first publishing merge, in practice the admitting pull request’s release. ESM v11 (exact number literals, under 0064) was released in Screenplay 4.135.0. ESM v16 admits stored event type names under 0075. ESM v17 admits explicit no-event assertions and recovery redelivery under 0074; its admission merge publishes the contract. ESM v19 was released in Screenplay 4.160.0 for reaction refusal branches and $refusal values under 0030. ESM v18 admits query validation rejection specifications under 0072; it was admitted after v19 was released, so v19 includes v18’s version pairs. ESM v20 was released in Screenplay 4.164.0 for rules on generated concepts under 0054. ESM v21 admits finite pattern/random generation, checksum validation and ValueGeneration under 0054. ESM v22 is released for explicit atomic reaction production batches under 0078. ESM v23 was released in Screenplay 4.182.0 for described command handlers under 0082. ESM v24 was released in Screenplay 4.184.0 for first-class text rules under 0084. Protected command reads were released as ESM v25 in Screenplay v4.193.0 under 0085. Chronological command date comparisons were released as ESM v26 in Screenplay v4.199.0 under 0087; a model using them alongside protected reads selects v26. Flat composite read-model keys claim ESM v27 under 0088; a model using them alongside date comparisons or protected reads selects v27. ESM v7 was released in Screenplay 4.68.0, v8 in 4.101.0, and v9 in 4.117.0. Operations and exact source numeric mode have no numbered claim here; they receive a number only at admission. ESM v12 admits enum member numbers under 0065; its admission merge publishes the contract. Golden files live in Source/DotNET/Screenplay/Semantics/Serialization/Golden/. The v3 corpus gap is recorded by 0004; the table does not imply that a golden is a source-backed corpus.

A described command (pending handler implementation beside unconditional produces) selects language/semantic 23.0 and schemaVersion: 23. Its optional final command member is handler: { "requirementId": "…", "resultVersion": 1 }. produces doubles as its result contract: event payload values belong to the body, while the declared events, count, order, destinations, tags, generation, response and gates remain normative. Required payload properties may be unmapped; renderers and the reference evaluator never execute these mappings. A missing or duplicate identity, unknown result version or downgraded wire version is a contract error. The requirements sidecar carries a matching CommandHandler requirement with attachmentResolution: Pending, context/result versions 1, ordered hints, provisional and ambiguous flags, and no file/language/body/hash. A successful bind always has ambiguous: false. Hints stay out of canonical ESM and attachmentManifestRevision: they guide the fill, not its stub contract. Strict context linkage rejects dangling or mismatched requirements. Consumers must admit v23 or refuse the model, never drop the handler; Stage additionally refuses Pending outside explicit Stub mode and provisional/ambiguous requirements. Models without described commands retain prior bytes and versions. Reference execution reports Unsupported (ImplementationBody) at the body, with separate executed/unsupported counts. Realization and filled-body reuse are deferred; see Command handlers. DescribedCommandHandlersCorpus.V23 pins denial, validation and body-reaching outcomes directly and through reactions, with an earlier-version declarative control.

Chronological command date comparisons select language/semantic 26.0 and schemaVersion: 26 only when used, including alongside protected command reads. Conditions (require and produces when) compare required scalar command properties with same-primitive command properties or literals; command/property validation rules compare their subject with a literal. Date literals remain text: yyyy-MM-dd or UTC yyyy-MM-ddTHH:mm:ss.fffffffZ. Their primitive is inferred from the other operand or rule subject only from v26; earlier validators reject the shape. Date orders by calendar date; DateTime orders and tests equality by UTC ticks. Input DateTime values for every participating property require an explicit offset or Z before rules, even in skipped conditions. Concept date rules, reaction where, protected read paths, context and today stay refused. Other equality (specification expectations, keys, constraints and freshness) remains ordinal. Targets must explicitly admit v26 and preserve tick precision or refuse the comparison; client validators omit date ordering. DateComparisonsCorpus.V26 and the v26 golden pin this contract; models not using it retain prior bytes and versions.

The Acme Commerce admissions of decision 0098 select language/semantic 29.0 and schemaVersion: 29 only when used. They are: a decimalPlaces validation rule (decimals <= N, N a whole number from 0 to 28) on a Decimal concept or command property, whose operand is a whole number and whose evaluation is exact decimal arithmetic (trailing zeros do not count); an optional factor projection value on an add or subtract mapping, which makes the operand the exact product source * factor; and the mapping of a value of one concept (or primitive) to a property of a different concept (or primitive) over the same primitive, which adds no new member to the document but a new meaning for a mapping the validator used to refuse. That mapping is admitted only when the target concept declares no rule and no compliance classification the source does not also declare, and never for enumerations, composites, collections, or an optional source into a required target. Earlier strict readers reject decimalPlaces and factor, and earlier validators reject the concept conversion. A model that uses none of these keeps its version and bytes; a model whose only use is the concept conversion selects v29 because an earlier validator refuses it. Application toolbar buttons and the published event in a command specification are source constructs with no executable-model content, so they select no version. List captures, generated values in reaction-invoked commands and several event sources are not part of v29. AcmeAdmissionsCorpus.V29 and full-esm-v29.json pin the contract; all v1–v28 golden bytes remain frozen. Targets must admit v29 explicitly or refuse it.

The second Acme Commerce admissions of decision 0098 select language/semantic 30.0 and schemaVersion: 30 only when used: a command production whose for names a required scalar command property other than the identifier (several event sources), and a specification givenGenerated list (command, targetProperty, value) pinning generated values for reaction invocations. A model that uses neither keeps its version and bytes, and earlier readers refuse givenGenerated. The model carries no list-capture content: copying a list or an object across a boundary, and children or nested over events, change evaluator behaviour only and need no version. AcmeSecondAdmissionsCorpus.V30 and full-esm-v30.json pin the contract; v1 to v29 golden bytes remain frozen.

The anonymous policy condition of decision 0103 selects language/semantic 31.0 and schemaVersion: 31 when any policy declares it, even a policy nothing references. The condition is written {"kind":"anonymous"} and always holds: a caller without an identity, an authenticated caller, a system identity and a reaction running as an identity all pass. It is the whole require condition of its policy (PLAY0804, PLAY0805), and the policy is the whole effective authorization of each command or query it gates (PLAY0806, PLAY0807), so the reference semantics and a generated [AllowAnonymous] agree. A specification whose command or query is gated only by an anonymous policy may omit given caller. Earlier readers and validators reject the condition; a model that does not use it keeps the version and bytes it selected before.

Uuid command comparisons select language/semantic 28.0 and schemaVersion: 28 only when used, including alongside flat composite read-model keys, protected command reads and date comparisons. == and != compare Uuid values (the Uuid primitive, or a concept or identity over it) in command require and produces when; a protected read path is admitted only in require. Both operands are required scalars. When both sides are concepts they must be the same concept, a bare Uuid compares with any Uuid concept, and a literal takes the type of the other side. Literals stay text constants in canonical lowercase hyphenated spelling; a validator at v28 or later types the constant from the other operand and checks it as a canonical Uuid, so a hand-edited non-canonical literal fails validation, while earlier readers reject the shape. The comparison is ordinal equality of the canonical spelling, which is value equality because every Uuid reaching a condition is already canonical. Ordering, optional operands, other concepts, text, $context, reaction where, validation rules and concept rules remain refused. Targets must admit v28 explicitly, and how a target binds a non-canonical Uuid input it receives is unchanged by this version. See Uuid equality in command conditions.

Application-root command reads protected selects at least language/semantic 25.0 and schemaVersion: 25, including when first-class text rules are also used. Its optional final application member is commandReadMode: "protected"; command reads entries follow any v23 handler member. The strict reader and validator gate read entries and read-path nodes at v25. Without the preamble, earlier models retain their version, bytes and legacy read refusals. ProtectedCommandReadsCorpus.V25 pins source-backed execution and its identical-source legacy refusal control; all v1–v24 golden bytes remain frozen. Consumers must explicitly admit v25 or refuse it.

Application-root reaction batches atomic selects language/semantic 22.0 and writes optional final application member reactionProductionMode: "atomic". Absence writes no member and retains legacy per-fact outcomes, regardless of model version. Earlier readers and programmatic validators reject the member; null, false and unknown values are invalid. Each direct trigger occurrence and selected refusal branch is its own batch, with invoked commands separate. Private append claims and projections are adopted all or none after reserving primary facts plus publications against the fact budget. Consumers must admit the mode explicitly or refuse it, preserve it through source recovery and never aggregate separate triggers. AtomicReactionBatchesCorpus.V22 and its legacy control pin bytes, revisions, world counts and outcomes; prior v1–v21 vectors remain unchanged. Direct routing and closure are not admitted by this mode (#770).

Enum member numbers that differ from declaration positions select language/semantic 12.0 and schemaVersion: 12. The syntax AST carries optional valueNumbers; SemanticConcept.Numbers is an optional immutable int32 array serialized as numbers, after validations and before optional v13 compliance, parallel to values. Absence means zero-based positional identity. Explicit pins equal to 0..n-1 bind as absence and keep the earlier version, canonical bytes and revision. The strict reader and programmatic validator refuse numbers below v12, without enum values, on non-text concepts, with mismatched cardinality, with duplicates, or when positional; JSON also refuses non-integers and values outside int32. V12 requires at least one non-positional array and includes every v11 and earlier contract, including v11 literal lowering, without requiring an exact literal to activate v12. Specifications and conditions compare member names, not numbers. Consumers must explicitly admit v12 and preserve stored numbers, never guess or silently discard them. full-esm-v12.json and EnumMemberNumbersCorpus.V12 pin the contract and name-based outcomes across equivalent source forms. Released v1–v11 vectors are unchanged. See Enum concepts.

Concept compliance selects language/semantic 13.0 and schemaVersion: 13 only when a concept has a marker. SemanticConcept.Compliance is optional and serialized as compliance after numbers (or after validations when numbers are absent). Its optional personal object carries one special category and optional criminal: true; bare pii writes {"personal":{}}. Its optional secret object carries scope: "subject", "namespace" or "global", omitted when unspecified. pii secret writes {"personal":{},"secret":{}}: personal takes precedence, and the binder drops secret scope next to personal. Reasons are report-only and not written. Classification propagates through type references, including composite members and collection elements, without per-property bytes.

V13 includes v11 exact-number lowering, v12 enum member numbers and every earlier contract. Unmarked models retain their version, bytes and revision. The validator and strict reader refuse compliance below v13, unknown categories or scopes, secret scope next to personal, and compliance on event-source/stream identities or enum concepts. The binder additionally refuses an event holding personal or explicitly subject-scoped secret values together with an explicit subject mark; subject marks stay report-only and have no ESM bytes. The event source is the default data subject. Reference specifications execute with unchanged outcomes: encryption, storage and causation are outside that evaluator. Consumers must explicitly admit v13 rather than drop protection. full-esm-v13.json and ConceptComplianceCorpus.V13 pin bytes, revision and outcomes across equivalent source forms; released v1–v12 vectors remain unchanged. See Concepts.

Explicit then no events or when redelivered selects language/semantic 17.0 and schemaVersion: 17. A specification writes optional whenRedelivered: {"reaction":"<semantic id>","given":<zero-based index>} after its other command/append action members and before thenEvents. Optional thenNoEvents: true follows thenEvents, before thenEventsInAnyOrder. Both members are omitted when unused. Redelivery must identify an existing given fact and a reaction with an event trigger on its event; only that reaction receives the existing fact, then ordinary cascades settle. No-event assertions compare all newly accepted facts, excluding an append action’s own fact, and count as a success outcome. They conflict with event, event-order, error and denial expectations. Strict readers below v17 reject both members. Refusal branches and $refusal values select ESM v19. full-esm-v17.json and RecoverySpecificationsCorpus.V17 pin bytes, revisions and reference outcomes across equivalent source forms; prior vectors are unchanged. V17 includes stored event type names and every earlier contract. Consumers must explicitly admit v17 rather than omit either action or assertion.

Invocation refusal branches select language/semantic 19.0 and schemaVersion: 19. An invocation’s optional ordered onRefused array follows mappings; each branch writes selector (any, validation, constraint or authorization), optional constraint (the constraint name, its executable identity), then produces. Empty produces means acknowledge. Refusal expressions write kind: "refusal", member (reason, constraint or message) and primitive String type. They are available only in branch event mappings; constraint requires a constraint selector. Named constraints must resolve and target one of the invoked command’s events. Event triggers default branch destinations to the observed event source; other triggers require for. Earlier strict readers reject these members and expression variants. The first matching branch handles the refusal and stops the remaining invocations of that trigger. Authorization wins over constraint, then validation; bare refusal excludes authorization. Messages are joined with \n in result order, without trimming or resolving symbolic keys. Contract, concurrency and Unsupported outcomes never match. A branch append failure ends the scenario. full-esm-v19.json and InvocationRefusalsCorpus.V19 pin canonical bytes and reference outcomes; all prior golden and corpus bytes remain unchanged. Consumers must explicitly admit v19. See Refusal branches.

An actionless specification with exactly one queried call, one error and no other outcome selects language/semantic 18.0 and schemaVersion: 18. Both when query … then error and then query … arguments followed by an error lower to one existing thenQueries entry with results: [] plus thenErrors. A result block, explicit then no result, denial, another call or another outcome is refused. The runner requires exactly Validation; Contract, Unauthorized and Unsupported do not pass. V18 requires this shape and earlier versions refuse it. Query concept rules on the key and supplied filters run after authorization in every ESM version without changing earlier bytes; omitted optional filters are not validated. full-esm-v18.json and QueryValidationCorpus.V18 pin the new contract. Consumers must explicitly admit v18. See Query validation rejections.

Concept generation selects language/semantic 15.0 and schemaVersion: 15 when any concept serializes its optional last member generation, after compliance. A strategy object carries kind, its size/count/encoding arguments, and only declared non-default alphabet/prefix/case modifiers. Unmodified Uuid uuid generation omits the member, preserving earlier bytes and revision. V15 includes v11–v14. The validator refuses generation below v15, v15 without generation, unsupported strategies, malformed modifiers, compliance on explicitly generated concepts, rules below V20, and identifiers below 64 random bits. When the model declares a serialized concept generation strategy, the evaluator checks exact fixture shapes (including implicit UUIDv4) and rejects an append to a generated source with prior facts as Concurrency; it inspects pre-invocation history across all streams and event types. Models without such a strategy remain Unguarded, even when another construct selects a later version. Consumers must explicitly admit v15 and preserve its freshness policy. See Generated values.

Rules on an explicitly generated concept, or on a concept used by a generated command property (including implicit UUID), select language/semantic 20.0 and schemaVersion: 20. V20 builds on V19 and includes every earlier contract, including v18. There are no new serialized members: existing validations carry the rules, and proof status is derived, never stored. After deserialization, .NET consumers call Cratis.Screenplay.Semantics.Generation.RuleConsistency.Check(concept, utcAssessmentYear: null) for concepts used by generated properties, including implicit UUID. Results are parallel to concept.Validations and deterministic for a concept, package version and UTC year (default: DateTimeOffset.UtcNow.Year). Keeping status derivable avoids stale proofs after a package or year change. Renderers supporting unpinned generation may use it when all rules are Proven; any Unproven rule requires pinned fixtures. See rule consistency. Binding admits Proven rules silently, reports Refuted rules as PLAY0688 with a quoted witness, and warns for Unproven rules with PLAY0689 and a reason. Below V20 the validator and strict reader refuse these rules; at V20 the validator re-runs the proof and throws InvalidSemanticContract on Refuted programmatic models. Generation compliance and unsupported generation strategies remain refused. Every generated fixture is shape-checked, then rule-checked; failure is Rejected(Contract), never a redraw. Opaque rules remain Unsupported. Feature use, not a version comparison, drives reference execution. full-esm-v20.json and GeneratedConceptRulesCorpus.V20 pin proven matches, unproven opaque validation and a rule-failing fixture. Prior ESM golden and corpus bytes are unchanged. Consumers must explicitly admit V20 and validate generated values, or refuse it.

An event id pin that differs from the event name selects language/semantic 16.0 and schemaVersion: 16; an equal-name pin keeps the earlier version, canonical bytes and revision. Each event contract’s optional storedName string follows name, before properties; absence means the display name. The value is the pin, omitted when equal to name (including an explicitly equal pin). Prior generations share the current contract’s stored name. Binding rejects invalid pins, inconsistent generation pins and duplicate effective stored names across the application. A valid pin uses the same identifier rule as an event name. Strict readers and programmatic models below v16 refuse the member. V16 requires at least one event contract with storedName; unpinned events and equal-name pins in the same model omit the member. A source without differing pins selects its earlier version and retains its bytes and revision. Reference evaluation is unchanged: facts are addressed by contract and display name, not by stored type. Consumers must explicitly admit v16 and preserve the name or refuse the model. full-esm-v16.json and StoredEventNamesCorpus.V16 pin mixed pinned/unpinned bytes and outcomes; v1–v15 goldens remain unchanged. See Events.

Caller-supplied equality filters on collection queries select language/semantic 14.0 and schemaVersion: 14. A query’s optional filters array follows argument and keyProperty (or readModel when unkeyed), before cardinality, in declaration order. Each entry carries id, name, type and the same-named read-model property identity. The type reference alone carries optionality: there is no separate optional flag. Each specification query result, evaluator request and evaluator result carries only supplied {filter, value} entries, after key, in query filter order. Empty arrays are omitted.

V14 includes v11 exact-number lowering, v12 enum member numbers and v13 concept compliance. Filter-free models keep their earlier version, bytes and revision. The validator refuses filters below v14 and v14 without filters. Filters require collection results, distinct names not equal to by, scalar primitive/concept/enum properties and matching nominal types ignoring optionality. Context-sourced filters, explicit scopes, performers and single-result filters remain unadmitted. The strict reader and evaluator refuse unknown or repeated filter values, missing required filters, supplied null and mismatched types. Optional omission does not narrow; by and supplied equality filters combine with AND. Policies still see only by. Collection specifications match rows by read model and key without regard to order, with exact row count; query call identity includes supplied filters. full-esm-v14.json and QueryFiltersCorpus.V14 pin bytes, revision and execution across equivalent source forms. Consumers must explicitly admit v14 rather than drop filters; Stage rendering is a separate admission. See Queries.

A reaction declaring runs as system, with zero or more roles, selects language/semantic 10.0 and schemaVersion: 10 only when used. Its optional runsAs member follows triggers, carries the closed kind system and an ordinally sorted roles array, and is omitted when absent. The reference invocation authenticates the system principal with exactly those roles; every claim condition is unknown, including under not, and a final unknown denies. This authorization identity does not supply audit identity. Models without it retain their earlier bytes and revisions unless another v10 feature is used. Earlier strict readers reject runsAs; consumers must refuse v10 until they explicitly admit it. ReactionIdentityCorpus.V10 pins accepted role-gated invocation and unauthorized invocation without identity across single-file and folder forms; the shared full-esm-v10.json also pins empty roles alongside routes, filters and earlier constructs.

EventRoutesCorpus.ProductionRoutesV10 pins scalar and composite overrides, an override without a command route, and atomic failure from a skipped production’s route. EventRoutesCorpus.ObserverFiltersV10 pins routed-only reaction delivery and an opaque reducer reached only through matching source metadata. Both preserve single-file, folder, reordered and relocated canonical bytes. Versions 1 through 9 retain their bytes and outcomes.

A retained non-route Double-mode number literal selects language/semantic 11.0 and schemaVersion: 11 when its lowered decimal differs detectably from legacy lowering (0064). Lowering is pure: parse the invariant shortest round-tripping Double representation into a decimal, then use it only when converting that decimal through Double with the legacy conversion produces a different value (or overflows); otherwise keep the legacy value. Decimal scale can round away digits, so 0.00000000000000012345678901235 keeps the legacy 0.0000000000000001234567890123 and does not select v11. Selection follows the retained graph: unused examples, overridden values and validation-only binding do not count. Already-lossless route literals and route-feeding inputs do not select v11. Every literal in a v11 model uses this lowering; v11 includes every v10 feature. A v11 model without an exact non-route number is refused. Programmatic v1–v10 models remain valid with any decimal permitted by their existing contracts, including precise decimals in the frozen v10 golden. Models not selecting v11 retain their existing bytes, revisions and outcomes. This does not admit numbers exact or add numericMode. Consumers must explicitly admit v11; NumberLiteralsCorpus.ExactLiteralsV11 pins exact integers, a 17-digit fraction and reference outcomes across equivalent source forms, and full-esm-v11.json adds exact event payloads to the full v10 model without changing its golden.

PublicEventsCorpus.V9 pins the source-backed single-file form of an outbound translation that publishes one public event through an event-target projection and an inbound translation that consumes a foreign public event with a source-events capture, the v9 canonical bytes and revision, and the accepted outcome of the publication specification. Semantics/Serialization/Golden/full-esm-v9.json additionally pins event-target reducers. Consumers must reject either vector until they explicitly support v9.

The event routes implementation follows 0036: source declarations, scalar/composite command routes and specification routes select its ESM v8 contract. Models without routes retain v1–v7 bytes and outcomes. Catalog identities survive renames and relocation, but an unpinned rename changes the stored route name; pin before renaming declarations with stored events. Consumers must explicitly admit the strict-read, reference-execution, rendering and recovery contracts they support, and refuse the rest. Arc’s earlier stream-id computation is not equivalent to the portable post-validation route phase. ESM v8 was released in Screenplay 4.101.0.

Screenplay writes a model as language/semantic 1.0 and canonical JSON schemaVersion: 1 unless the model uses a v2 construct. A typed command destination from produces … for without duplicating the identity in the event payload, a specification event-source for assertion, or an admitted scalar $context value in produces selects language/semantic 2.0 and schemaVersion: 2. The strict reader accepts these paired versions; v1 canonical bytes and revisions do not change. Historical v1 sources that already used produces … for while copying the same identifier into event payloads keep their v1 contract; v2 models promote the typed command destination independently of that legacy payload. A target pinned to v1 must reject v2 rather than treating the new context and destination as payload or ignoring them. See Specifications and Contexts for the admitted syntax.

An implementation attachment admitted by the ESM (a bodied reducer transition, code validation, or policy predicate) selects language/semantic 3.0 and schemaVersion: 3; v3 includes all v2 semantics, including typed command destination promotion, and sources without a v3 construct retain their v1/v2 bytes and revisions. Its ESM reducer entry names the built read model, observed event contracts, event-source key, null initial state, state-or-delete result, and each rule’s implementation requirement id. The body is not portable executable code. Screenplay names the pure capability; a target provider owns the allowlist and must reject code it cannot admit. An unresolved file attachment has no content hash until its host supplies contents; the authored path never serves as its revision. Rule predicates on command properties and concepts bind their guarded value, name, message, severity and requirement id; whole-command code validation binds ordered requirement ids and yields zero or more rejection messages. These attachments require context/result contract version 1 and capability pure. An opaque policy’s condition is {"kind":"opaque"} with a requirementId on its policy entry; portable policy entries retain their v1/v2 bytes. The documented RuleContext supplies the value and, for a command predicate, the command artifact; a predicate returns accept or reject. A strict v1/v2 consumer must reject v3 explicitly. A specification that reads reducer-built state gets SemanticUnsupported naming the reducer rather than synthesized reducer state. An executed command that carries code validation, including through nested or collection concepts, gets SemanticUnsupported naming the rule rather than a guessed validation result. A command or query whose authorization depends on an opaque policy returns SemanticUnsupported with the Authorization capability and the policy name rather than claiming a denial or permission. In authored order, a portable left-hand and denial or or allowance short-circuits; an opaque operand reached first makes the result unsupported even if a later operand could decide it (see decision 0001 and Policies). Unrelated specifications remain runnable.

An event with multiple declared generations selects ESM language/semantic 4.0 and schemaVersion: 4, including when the same document uses v2 destinations or v3 attachments. A lone generation-1 marker does not select v4. Only evolved event records carry predecessor and priorRevisions; ordinary single-generation events in a v4 model omit both fields. Preceding revisions appear in numeric order, with revision-specific property identities and tags. History changes canonical bytes and SemanticRevision. In v4, flat projection transitions carry no affected-instance cardinality: they always affect one instance. A v4 model carrying zeroOrOne or many there is invalid; v1–v3 bytes and query cardinality are unchanged. The strict reader rejects noncanonical versions/bytes and revision mismatches. Deployment to Chronicle requires an admitted transformation chain; a target lacking one must reject evolution, never guess a conversion. See Events and decision 0015.

A then no readmodel <View> for <key> assertion selects ESM language/semantic 5.0 and schemaVersion: 5 only when used. Each v5 specification carries thenAbsentReadModels (an array of typed view-id/key pairs, empty for specifications with no absence assertion). Its key is required and type-checked against the read-model identifier; an assertion of presence and absence for one pair is contradictory. Projection-backed absence executes by semantic key equality, while reducer-dependent absence returns typed Unsupported. ESM v5 retains v4’s event generation history and prohibition of legacy flat transition cardinalities. Existing v1–v4 canonical bytes and golden vectors stay unchanged. Stage, CLI, Studio and Generation must admit v5 explicitly; until then each must reject it rather than silently ignore thenAbsentReadModels. See decision 0020.

An application trigger, an automation or translate slice, a reaction, a capture, or a specification given clock, when clock, when trigger, given capture or when capture selects ESM language/semantic 6.0 and schemaVersion: 6 only when used (decision 0022). The application carries triggers; a slice carries reactions and captures; a reaction trigger names its kind (event, applicationTrigger, startup, shutdown, interval or schedule), its source, its schedule in seconds (an interval counts from the Unix epoch, a time of day is UTC), its where, the events it produces - with a destinationType when it appends to an event source of its own - the commands it invokes, and a requirementId when its body is code. A capture carries its key, its ordered map operations, its guarded appends with their event-source type, and its children and nested records; a specification carries round-trip UTC clock instants and typed capture records. Each v6 member is written only when present, so v1–v5 canonical bytes and golden vectors are unchanged. ESM v6 retains v5 absence, v4 lineage and every earlier construct. The reference evaluator runs reactions after every accepted fact until they settle, fires clock occurrences once each in time order, and evaluates captures against the record they last saw; an opaque reaction body returns typed Unsupported. Stage, CLI, Studio and Generation must admit v6 explicitly; until then each must reject it rather than drop reactions, captures or clocks. See Specifications, Reactions and Captures.

A generated command property, command response, generated fixture or then returns expectation selects ESM language/semantic 7.0 and schemaVersion: 7 only when used (decision 0026). Request inputs exclude generated properties; generation follows authorization and validation. Generated properties are required scalar UUID-backed concepts without validation rules. Pre-generation policies, rules and requirements cannot reference them. A generated identifier’s when … for supplies its generation fixture, not a legacy allocated destination; when … generated supplies other generated values. Missing reached fixtures return Unsupported(IdentityAllocation), never guessed identifiers. Responses are scalar or ordered named records over complete command values and exist only on successful acceptance; a later scenario failure keeps accepted facts but no response. Record then returns asserts a non-empty named subset. The strict reader admits the new members only at v7 or later and still rejects numericMode; exact-mode binding remains unsupported. Models without these constructs retain their v1–v6 bytes, revisions and outcomes. Consumers must explicitly admit v7 or reject it. The v7 contract does not deliver rendering or UI continuations.

A policy condition using unary not also selects v7 under 0027. Its canonical variant is {"kind":"not","operand":<condition>}; it is refused in earlier versions and cannot contain an opaque predicate. not binds tighter than and, then or; parentheses override precedence. The reference runner uses three-valued Kleene logic: a claim comparison against a missing or null target, an absent subject, or a non-text target is unknown; not unknown remains unknown. For and, false decides the result and true passes through the other operand; for or, true decides the result and false passes through the other operand, in either operand order. Other combinations involving unknown remain unknown. Only a final true result allows access; false and unknown deny. Existing absent-caller refusal and comparison rules remain unchanged, and authored-order short-circuiting applies when the left operand decides the result. See Policies: portable evaluation. policy-negation-v7.json and PolicyNegationCorpus.V7 pin role/claim exclusions and allowed/denied outcomes across single, split, reordered and relocated sources without altering the original v1–v7 fixtures.

Version Selecting constructs schemaVersion Decision Golden file Corpus vector
46.0 Typed policy inputs and input mappings under authorize ("inputs" on a policy, "mappings" on a policy authorization) 46 0153 full-esm-v46.json EsmGoldenVectors.Get(46)
47.0 A collection query that narrows its rows by a policy ("narrowing" on a query) 47 0154 full-esm-v47.json EsmGoldenVectors.Get(47)
48.0 An explicit application-root agents allowlist, including an empty one 48 Agent exposure full-esm-v48.json EsmGoldenVectors.Get(48)
49.0 The caller’s identifier in a policy state condition ("callerId" on a condition operand, "id" on a caller fixture) 49 0157 full-esm-v49.json EsmGoldenVectors.Get(49)
50.0 Systems with abilities ("systems" on the application, each with "abilities", effect classes, typed inputs and returned values, outcomes and realization) 50 0159 full-esm-v50.json EsmGoldenVectors.Get(50)
51.0 Ability invocations from reactions, workflow actions and state entries: the call’s inputs, one branch per answer (returned, failed or a declared outcome) and the answers a specification scripts for an ability 51 0159 full-esm-v51.json EsmGoldenVectors.Get(51)
52.0 Extension components on screens (extensions and components on a screen, each component placed through its system with the properties the screen gives it and the commands each handled signal executes; admitted with ExecutableScreens.Admit, so a default compilation is unchanged) 52 0159 full-esm-v52.json EsmGoldenVectors.Get(52)
53.0 Provided values and availability gates ("provides" on the application, modules and slices; the application’s "audiences" and "availabilities"; "available" gates on modules, features, slices, commands, queries and screens). See Provided values and Audiences and availability 53 0161, 0162 full-esm-v53.json EsmGoldenVectors.Get(53)
54.0 A graph query that collects nested rows along an edge from its root ("collects" on a graph query: the read-model property, the root alias, the followed hop, the cardinality many or one, the row type and members of kind property or edgeProperty) 54 0163 full-esm-v54.json EsmGoldenVectors.Get(54)
55.0 Exact ordered tag expectations on a specification’s then event ("expectedTags", including an empty array for no tags) 55 0165 full-esm-v55.json EsmGoldenVectors.Get(55)
56.0 Screens declared free of any slice and the slices that adopt them (screens on the application, with the needs a screen leaves to its adopters and the scope of a screen declared in a module or feature; adoptions on a slice, each naming the adopted screen and the query that provides each need; admitted with ExecutableScreens.Admit, so a default compilation is unchanged) 55 0165 full-esm-v56.json EsmGoldenVectors.Get(55)
57.0 A provided value computed by a file or code block ("kind":"code" and "requirementId" on its source; opaque to the reference evaluator) 57 0167 full-esm-v57.json EsmGoldenVectors.Get(57)
58.0 A negated audience in an availability gate ("negated":true on an audience requirement, written only when true; not of an unknown audience is unknown; opaque to the reference evaluator) 58 0169 full-esm-v58.json EsmGoldenVectors.Get(58)
59.0 Availability gates on screen elements ("available" on a screen data entry and a screen action, written only when the element has a gate; an element gate only narrows what the bound query or command allows; opaque to the reference evaluator, which reports everything available unless it is given the audiences and suspensions) 59 0169 full-esm-v59.json EsmGoldenVectors.Get(59)
60.0 A graph projection’s declaring slice ("declaringSlice" after edges, omitted on older models) 60 0170 full-esm-v60.json EsmGoldenVectors.Get(60)

A model that declares a set once projection mapping or a children insert first or sort by selects language/semantic 43.0 and schemaVersion: 43, also when its screens are admitted; the version number is provisional until it is admitted by consumers; see decision 0150. insert last is what a children block does without an ordering and keeps the model’s version.

A screen that places an extension component (component <System>.<Component>) is admitted at 52.0: the screen lists the extensions it needs, and each placement names its system, the component, the properties the screen gives it and the commands each handled signal executes. See Extension components.

Screens stay deferred (PLAY0269) by default, so a default compilation keeps its version, bytes and revision. ExecutableScreens.Admit in Cratis.Screenplay.Ui, screenplay export --screens and the MCP read-workspace view executable-model with screens: true admit them: the result selects language/semantic 42.0 and schemaVersion: 42, and each slice writes optional final member screens. A screen holds its id, name, title, optional description, ordered data (a query identity, an optional by and the fields it shows), ordered actions (a command identity, label, subject, every command input as a property identity with an optional from, an optional when and an optional then screen identity), ordered navigation (a target screen identity, a trigger, optional by and opens) and a layout of fits and nested regions. A reference that does not resolve to a query, command or screen of the executable model refuses admission; it is never dropped. Scene presentation (templates, component properties, toolbars, outlets) stays in the screenplay-ui/1 contract; see UI contract and decision 0149.

A model that declares a graph handler with foreach selects language/semantic 41.0 and schemaVersion: 41; see decision 0140.

An application-root agents block selects language/semantic 48.0 and schemaVersion: 48. It records token kinds and resolved query/command identities, descriptions and scopes; it grants no authorization and implements no endpoints or tokens. Models without it retain their versions and bytes. See Agent exposure.

A model that declares a query ... graph <Graph> or a given clock in a graph specification selects language/semantic 40.0 and schemaVersion: 40; a model that declares only graphs, graph projections and graph steps stays at 38.0. The version number is provisional until it is admitted by consumers; see decision 0139.

A model that declares a graph, a projection ... => graph or a given graph or then graph step selects language/semantic 38.0 and schemaVersion: 38. A model without one keeps its version and bytes. The version number is provisional until it is admitted by consumers; see decision 0138.

Consumers of Cratis.Screenplay.CanonicalCorpus can use EsmGoldenVectors.LifecycleV36R2 and LifecycleV57R2 as runnable acceptance vectors. These are named replacements at ESM 36.0 and 57.0, not new semantic versions. Integer/minor lookups and every published original byte sequence remain frozen. V36R2 changes three Collect expectations to waits Final; V57R2 supplies the required OrderPacked.parcelId in two lifecycle facts and serves as the replacement for V51–V57. Both recompute their semantic revisions.

EsmGoldenVectors.LifecycleDispositions provides seventeen exact, immutable per-specification dispositions: three for V36 and two each for V51–V57. Entries carry original vector ID, version, revision, byte SHA-256, lifecycle owner kind/name, specification, complete ordered failure messages, rationale and replacement ID. IDs use public API names such as EsmGoldenVectors.V36 and EsmGoldenVectors.LifecycleV36R2.

For acceptance, discover all exported vector entries (preserving aliases), including collections, integer and minor goldens, and named replacements. Strictly deserialize and retain canonical byte/revision checks for every entry. Run every declared lifecycle specification and require an exact result count and owner/name match. An original result may fail only when every disposition field and failure message matches exactly; all undisposed and replacement results must pass. Fail for new or changed failures, unexpectedly passing originals, missing or duplicate results, duplicate/unused dispositions, missing replacements or cycles. A disposition never waives admission, normalization, hashing or serialization checks.

See decision 0168.

Clock schedule fixture version 1 is published at Source/DotNET/Screenplay.CanonicalCorpus/Corpus/ClockSchedules/clock-schedules.v1.json. In the release that contains it, the NuGet package Cratis.Screenplay.CanonicalCorpus exposes Cratis.Screenplay.CanonicalCorpus.ClockScheduleVectors.Bytes, Version and Sha256. Alternatively, fetch the file at that release’s tag, replacing vX.Y.Z with the actual tag:

https://raw.githubusercontent.com/Cratis/Screenplay/vX.Y.Z/Source/DotNET/Screenplay.CanonicalCorpus/Corpus/ClockSchedules/clock-schedules.v1.json

Consumers verify the SHA-256 of the exact file bytes against ClockScheduleVectors.Sha256, a pinned lowercase hexadecimal digest; do not reserialize the JSON before hashing. The vectors pin epoch-based intervals, UTC daily/weekly/monthly schedules, exclusive from and inclusive to boundaries, calendar edges and the shared 10,000-occurrence limit. A refused advance returns no occurrences; its count is therefore zero. Fixture versioning is independent of ESM version admission.

To regenerate expected outcomes from the reference clock, set SCREENPLAY_REGENERATE_CLOCK_VECTORS=1 and run the for_ClockScheduleVectors.when_executing_every_vector spec in Screenplay.CanonicalVectors.Specs. Regeneration intentionally fails: review the diff, deliberately update the Sha256 constant (and the fixture version when semantics change), rebuild and rerun without the variable. The specs execute every vector and check that the published bytes match the repository file.

A host that renders protected command reads must answer a key the event store refuses (empty, whitespace-only, *, containing #, or padded with whitespace) with the missing-view Validation outcome and exact message <ReadModel> does not exist., not an error from its store client, even when the world holds an instance at that key. Missing instances use the same keyless message. Neither refusal includes runtime keys or event details; refused-key shapes, validation ordering and world preservation are unchanged. ProtectedReadReplacements.V25R2 is the runnable keyless replacement for the frozen ProtectedCommandReadsCorpus.V25; it carries the vectors RefusedEmptyKey, RefusedWhitespaceKey, RefusedStarKey, RefusedHashKey, RefusedPaddedKey and RefusedStarKeyWithStoredInstance. See decision 0171, which supersedes 0091.

Race vector fixture version 1 proves the protected command read conflict rule, under decision 0089. Cratis.Screenplay.CanonicalCorpus.ProtectedCommandReadRaceVectors exposes Bytes, Version and Sha256 for races.v1.json, and Model, a CanonicalCorpusVector with the source-backed ESM v25 model the vectors run against: races.play (which declares command reads protected), its identity catalog, canonical ESM bytes and semantic revision. The files live in Source/DotNET/Screenplay.CanonicalCorpus/Corpus/ProtectedCommandReads/races-v1/. Verify the SHA-256 of the exact bytes; do not reserialize first.

The original bytes, Version and Sha256 remain frozen. The additive V1R2 revision exposes BytesV1R2, VersionV1R2, Sha256V1R2 and ModelV1R2. Its races.v1r2.json lives in the sibling races-v1r2/ directory and keeps fixture contract version 1, all sixteen V1 vectors unchanged and in order, and the same source, identity catalog, ESM v25 bytes and semantic revision. It adds read-race-and-late-uniqueness-claim: a later fact changes the protected state while another claims the value captured by the command’s decision. Commit returns the Constraint rejection (UniqueValue), not a read conflict, and appends no command facts.

Under decision 0171, ProtectedReadReplacements.RacesV1R3 is the runnable keyless replacement. Its RacesV1R3Sha256 pins the exact bytes in races-v1r3/races.v1r3.json; RaceModelV1R3 shares the frozen model. It preserves all seventeen V1R2 cases and fixture contract version 1, changing only absent-then-created’s first commit message to View does not exist.. This is a named corpus revision, not an in-place re-pin or a new ESM version. The portable contract change requires a major release.

Following decision 0168, ProtectedReadReplacements.SpecificationDispositions and RaceDispositions pin the original identity, revision, byte hash, exact mismatch, replacement and reason for each incompatible expectation. Run originals and require precisely those mismatches; all unaffected expectations remain mandatory. Reject missing, duplicate, unused or drifting dispositions. All replacement cases must pass normally, without a disposition. Original source-form, serializer and hash checks remain strict. Regeneration targets V25R2 and V1R3 only and never writes the frozen originals.

Each vector gives decided facts, a request, the expected dependencies, and commits. A commit extends the decided world with later facts, or replaces it with a history, and states the expected outcome: accepted with the command’s facts, conflict with its category, or rejected with category, code and message. Every outcome lists the event names of the world it settled against. A host runs one vector with the public calls only: EstablishWorld(decided), Decide(request), then for each commit ExtendWorld(decided, later) (or EstablishWorld(history)) followed by Commit of that same decision. A vector with several commits is the explicit repeated Commit.

The conflict contract needs no C# type:

  • The boundary is the count of facts in the decided world.
  • A dependency is a key value plus a set of event contract ids: the reading view’s from events and removals, merged per key.
  • A conflict is any fact after the boundary whose event contract is in the set and whose destination equals the key, compared ordinally.
  • A world that is not a prefix-extension is rejected with Contract before settlement; a decision refused at decide time keeps its captured refusal without conflict checking.
  • Otherwise, settle against the later log first. A Constraint rejection takes precedence over a protected-read conflict.
  • For every other settlement outcome, a matching dependency returns Conflict with category DecisionStateChanged and no facts. With no matching dependency, return the settlement outcome.

The vectors cover handled, removed and unrelated events at the read key and at another key, a second view of the same key, merged keys, commands that produce no facts, absent and rejected decisions, a late uniqueness claim, a decision committed against its own world, three repeated-commit cases (accepted then conflicting, accepted then constraint-rejected, and a generated event source taken by another writer), and a commit world that is shorter than or rewrites the decided history. Non-canonical UUID key casing is not a vector: the public path refuses it. The vectors do not cover the guarded write after settlement; that window is a host obligation.

To regenerate V1R3 without writing either frozen original, set SCREENPLAY_REGENERATE_PROTECTED_READ_RACES_V1R3=1 and run the for_ProtectedCommandReadRaceVectors.when_loading_the_v1r3_replacement spec in Screenplay.CanonicalVectors.Specs. Each case states the outcome it is meant to show, so unexpected execution fails. Regeneration intentionally fails at the end: review the replacement fixture, deliberately pin ProtectedReadReplacements.RacesV1R3Sha256, rebuild and rerun without the variable. The specs compare the replacement with V1R2, permitting only the disposed message change. The old V1/V1R2 regeneration switches refuse to write originals.

For ESM-version admission checks, use the released golden bytes from Cratis.Screenplay.CanonicalCorpus instead of vendoring serializer fixtures. EsmGoldenVectors.Versions lists the full ESM vectors in ascending order. EsmGoldenVectors.Get(version) returns an EsmGoldenVector containing Version, immutable Bytes, and SemanticRevision verified by the strict ESM reader; an unavailable version throws EsmGoldenVectorNotFound. EsmGoldenVectors.PolicyNegationV7 provides the separate byte-preserving v7 policy-negation extension. These resources are linked from the compiler’s Golden folder in Debug and Release packages. New full-esm-v<N>.json files are included automatically at build time. Expression, identity-catalog and typed-context sidecars are not ESM and are excluded from this API. Availability does not grant admission: your consumer still decides which ESM versions and extensions it supports.

Full goldens below the current ESM version are frozen. Their specs round-trip checked-in bytes instead of rebuilding older models from shared fixtures. A checked-in SHA-256 table in Semantics/Serialization/given/frozen_esm_goldens.cs pins every byte. The compiler spec requires a hash for each supported earlier version, checks every file exists, and rejects even a one-byte change. Reserved versions are not published contracts and do not need a golden. SCREENPLAY_REGENERATE_GOLDEN=1 rewrites the current full golden and non-ESM sidecars, never older full goldens. The helper derives the current version from the declared SemanticVersion fields. Frozen-version selectors, including SCREENPLAY_REGENERATE_GOLDEN=28, and the legacy event-routes regeneration switch fail before writing. When adding a new ESM version, preserve the previous current golden and add its SHA-256 to that table, move its spec to frozen-byte round trips while retaining feature assertions, and update the current builder used for regeneration. Do not update an existing hash to accept a changed frozen file. The golden-vector regeneration guide has the commands and rebuild steps.

Cratis.Screenplay.CanonicalCorpus provides source-backed vectors for consumers that compile Screenplay independently of their rendering pipeline. RegisterProjectCorpus.LegacyV1 contains single-file, folder, reverse-ordered, and relocated forms of the same application. Each form carries exact UTF-8 bytes, stable document keys, portable display paths, and identity-catalog bytes; all compile to the pinned semantic revision, canonical ESM bytes, and normalized specification outcomes. A relocated path changes the workspace transport revision, not the semantic revision.

RegisterProjectCorpus.V2 names the evolved scenario, not the ESM schema. It pins new ESM v4 bytes and revision: generation 1 of ProjectRegistered carries projectId and name, while generation 2 carries only name; the command and expected event specify the stream with for, and the projection keys from the event source. The single-file and folder forms have distinct persisted catalogs; reordered and relocated forms reuse the folder catalog. All four produce the same bytes, identities and outcomes. Consumers pinned to v1–v3 must reject this v4 vector. The identity catalog retains schemaVersion: 1 while its typed property addresses can now include a Generation part and its event assignments can carry revisions above 1. Readers without support for those address parts must reject the catalog rather than drop lineage. The legacy v1 corpus and v1–v3 serializer golden bytes remain unchanged. Semantics/Serialization/Golden/full-esm-v4.json is the source-backed mixed v4 serializer vector.

GenerationFixturesCorpus.V21R2 (generation-fixtures/v21r2) is an additive ESM v21 fixture revision. Its SourceFormsV21R2 use a portable C# TenantOrder body with context.Now, tenant interpolation and BCL types. GenerationFixturesCorpus.V21 and SourceForms remain the frozen original, including the original non-compilable return value; body. Implementation body bytes are not ESM bytes: both revisions retain the same canonical ESM, semantic revision and ten specification outcomes. The reference runner uses supplied fixtures and never executes the body. Regenerate only the new revision with SCREENPLAY_REGENERATE_GENERATION_FIXTURES_V21R2_CORPUS=1 and the for_GenerationSupportCorpus.when_loading_v21r2_fixture_outcomes spec; the original switch and spec target only v21. Regeneration intentionally fails; review the new revision’s expected files, rebuild and rerun without the switch.

ReadModelAbsenceCorpus.V5 pins source-backed single-file, folder, reordered and relocated forms, the v5 canonical bytes and revision, and the accepted outcome for a projection removal that leaves the other key intact. Semantics/Serialization/Golden/full-esm-v5.json additionally pins v4 lineage alongside a negative read-model assertion in a mixed v5 model. Consumers must reject either vector until they explicitly support v5.

ReactionsCorpus.V6 pins source-backed single-file, folder, reordered and relocated forms of an application with an application trigger, reactions that produce and invoke, a weekly clock reaction and a capture, together with the v6 canonical bytes and revision and normalized positive and negative outcomes: accepted command cascades, trigger invocations, clock schedules and capture transitions, validation and invoked-command constraint rejections, and a reached opaque Startup effect that is unsupported. Semantics/Serialization/Golden/full-esm-v6.json additionally pins every reaction trigger kind, map operation, capture condition and record shape in one model. Consumers must reject either vector until they explicitly support v6.

RegisterProjectCorpus.V7 pins single-file, folder, reordered and relocated forms of a command with a generated identifier and a second generated UUID-backed concept, inline event production and an ordered record response. All forms share canonical v7 bytes and revision and three normalized outcomes: accepted with a matching response, missing-allocation Unsupported(IdentityAllocation), and accepted execution with a mismatched return assertion. A failed assertion does not undo the accepted fact or response. CanonicalCorpusSpecificationExpectation.Response carries canonical response JSON in contract field order, or null when no response exists. Generated request input is not an execution vector in this corpus: the syntax validator refuses it before binding. full-esm-v7.json additionally pins scalar and record response contracts, generated fixtures and return assertions. Consumers must reject both vectors until they explicitly admit v7.

ScreenCompositionCorpus.V1 pins the source-owned screens-release authoring fixture: single-file, folder, reordered and relocated forms of the same master/detail workspace with command forms, nested sections, navigation contribution, dialog template, package profile, and dialog-opening interaction probes. Its positive behavior contract now points at the real source/folder form: master/detail selection, query rebinding and clearing, native validation and command submission, navigation/outlet/dialog routing, package profile/fallback behavior and browser control behavior all carry authored machine-checkable assertions. It also carries the positive typed source case for the screen-release authoring grammar, typed-source MCP edit invariants, folder-source MCP import/edit/export assertions, and harness entry points with explicit executed vs pending status. The browser, folder-MCP and Studio harnesses keep their pending reasons; the CLI/Stage harness records the exact refusals observed on the released CLI 3.39.0 + Stage 4.43.0 vector - the bundled compiler 4.93.0 predates the screens authoring syntax and refuses template slots (PLAY0025), screen directives (PLAY0103), profile icons (PLAY0207), form columns (PLAY0210) and slice templates (PLAY0029), while the pre-4.94 corpus form parses but the renderer’s ESM vertical refuses its observable list queries (PLAY0268) and publishes zero artifacts. Those red vectors are preserved, not regenerated into green. The current backend ESM deliberately rejects UI declarations with pinned PLAY0268/PLAY0269 diagnostics. Consumers use it to prove authoring, import/export, renderer admission and runtime behavior without pretending screens are executable backend semantics.

ScreenCompositionCorpus.V1.WorkingBranchHarnesses records the working-branch full-app assertion runs. It names exact branch heads for Stage PR #260, Studio PR #1615/#1617, the local Scene form-geometry branch and the Screenplay MCP transcript, together with the command that ran, the release-switch rule and the assertions each harness must satisfy before final packages publish. Stage PR #260 currently passes the focused screen-corpus planning specs, Studio’s Screenplay MCP transport specs pass, and Scene form-geometry model specs pass; browser-native controls, production Studio save/export/import/Play and folder-source MCP revision editing remain pending with their blockers recorded.

ScreenCompositionCorpus.V1.ReleasedVectorResults records exact released-vector execution, one entry per public CLI and Stage pair, and keeps every earlier red or partial result rather than overwriting it. The CLI renders the folder source as authored Scene composition (WorkItemList, WorkItemDetails, CommentThread, AppShell, MasterDetail, Navigation, EditDialog and the Desktop profile) with two guarded-action warnings for the Close action and the double-click interaction. The committed browser harness starts cratis run, drives Chromium through two seeded work items, and asserts scoped selection, query identity, stale-response handling, deep links, native form validation and submission, persistence and theme effect. run-public-acceptance.sh reruns it, the MCP stdio transcript and the Studio production harness against the installed CLI and the Stage image it defaults to. The version-scoped public execution results and remaining runtime limitations are in the screens release acceptance matrix.

RegisterProjectCorpus.ExecutedStagePlan is an additional compatibility vector, not screens acceptance: the legacy v1 source form rendered end to end on the exact released screens vector (Screenplay 4.97.0 + CLI 3.39.0 with bundled compiler 4.93.0 + Stage 4.43.0 + Scene 4.10.0 + Studio 0.135.1). It pins the produced .cratis-render.json manifest, scene.json plan and generated src/bindings.ts as embedded evidence whose semantic revision equals the corpus’s pinned revision, an ordered 28-artifact expectation with SHA-256 hashes, and authored assertions over manifest metadata, the native Cratis.Components:commandForm/queryInputForm markers, typed-binding resolvers and zero placeholder components. A specification evaluates every assertion against the pinned bytes, so a future toolchain regression fails instead of silently drifting. Consumers prove deterministic CLI/Stage compatibility through it without requiring the released toolchain in CI, but full screens parity remains owned by ScreenCompositionCorpus.V1.

RegisterProjectCorpus.UnsupportedSequence is a CanonicalCorpusRejectionVector: compilation returns no ESM, its expected PLAY0268 diagnostic is explicit, and ArtifactPaths is empty. Treat failed binding as zero publishable artifacts; an empty manifest alone is not evidence that a renderer ran. RegisterProjectCorpus.GeneratedPropertySuppliedAsInput is a rejection vector of the same shape for ESM v7: its specification supplies a generated property as input, so compilation returns no ESM, the expected diagnostic is PLAY0485, and ArtifactPaths is empty. These vectors are conformance inputs, not renderer plans or a CLI activation policy.

SourcelessGivensCorpus.V2 pins single-file, folder, reordered and relocated forms of specifications whose given events state no event source, with the canonical bytes, revision and seven outcomes (decision 0101). A sourceless given belongs to the event source the specification acts on: a unique event constraint refuses the command, a unique <property> constraint lets the command reclaim the given’s value, and a projection that needs the given’s event source identity is Unsupported with capability Projection, with or without an action. A host that appends givens to real event streams appends sourceless ones to the action’s event source. Regenerate with SCREENPLAY_REGENERATE_SOURCELESS_GIVENS_CORPUS=1 and the for_SourcelessGivensCorpus specs; review the diff and rerun without the variable.

For profiles, admission, deterministic planning, scope behavior, publication boundaries, and verification, follow the canonical Stage renderer target guide.

The composite-key executable contract carries named, typed parts, not a storage encoding or an invented key type. A read model has several identifier: true properties. Optional single-instance queries carry keyParts sorted by key-property id, replacing the scalar argument/keyProperty pair. Scoped projection keys carry kind: "parts" with complete part mappings, sorted by property id and without type. Requests, fixture identities and absence keys reuse composite values.

Only read models with at least two parts select this contract; a single explicit key keeps the same bytes as its inferred equivalent. Earlier contracts reject these shapes. Every renderer must explicitly admit the contract and either realize the named parts or refuse them. Stage must refuse single-instance composite lookups until Chronicle#4265 is realized; equality-filter list queries do not require that lookup capability. A Chronicle typed key, Marten identity or SQL column set remains the renderer’s choice. See read-model keys and projection key semantics.

Owner Semantic responsibility Does not own
Screenplay The language, syntax tree, compiler, printer, semantic identities, executable semantic model, and portable execution plan Source-framework interpretation, target-specific realization, or CLI admission
Generation adapters Interpretation of authored source into neutral facts, evidence, and diagnostics Workspace authority, Screenplay language semantics, syntax printing, or target artifacts
Generation core Deterministic resolution, lowering, canonical printing, and compiler verification across adapter contributions Adapter discovery or framework-specific source interpretation
Stage renderers Target capability admission and pure, deterministic artifact planning from the executable semantic model Source recovery, file publication, process execution, or CLI command policy
CLI orchestration Command-line selection, fully resolved profiles, planner invocation, diagnostics, staging, and publication Screenplay semantics or target realization rules

The source-recovery host and the rendering CLI are composition boundaries. They decide which trusted integrations to invoke; implementing an extension contract does not grant that trust.

An extension catalog describes interoperability options. It is documentation, not a plugin loader, package-discovery mechanism, trust decision, compatibility guarantee, or CLI allowlist.

A model reaches systems outside itself through systems and abilities: a system declares typed abilities with outcomes and effect classes, and the executable model (ESM v50) carries them in application.systems. Which extension or implementation realizes a system is realization metadata, kept beside the model rather than in its bytes. Packages and loading belong to Cratis Stage; see its ESM feature matrix.

Extension level Public entry point Input Output Activation model
Syntax consumer ScreenplaySyntaxWalker Screenplay syntax root or subtree Consumer-defined analysis or export The consuming tool constructs and invokes its walker
.NET source recovery IDotNetScreenplayAdapter DotNetAnalysisContext and DotNetAdapterOptions AdapterContribution A source host explicitly selects and composes adapters
Target rendering IArtifactRenderPlanner ArtifactRenderRequest ArtifactRenderPlan A caller explicitly constructs the planner and profile; a CLI may separately bundle a reviewed target

Examples include the Vogen source adapter in Screenplay Generation, the Critter Stack source adapter as a framework-specific integration, and the Cratis artifact render planner in Stage. Ecosystem-specific adapters and renderers are owned separately from the core extension contracts. Catalog membership documents an integration; it does not imply admission to or support by the Cratis CLI.

The Cratis CLI currently uses a static, reviewed renderer-target roster. A renderer appearing in this catalog, being installed beside a workspace, or implementing IArtifactRenderPlanner does not admit it to that roster. CLI support requires a separate orchestration change, explicit profile construction, publication wiring, and verification.

A specification that states then invokes <Command> selects language/semantic 34.0 and schemaVersion: 34. The specification writes an optional thenInvocations array as its last member, after the automation members, and omits it when empty, so a model without the statement keeps its version, bytes and revision. Each entry is {"command":"<semantic id>","values":[{"targetProperty":"<semantic id>","value":{…}}]}, in authored order, with the stated non-generated command property values ordered by target identity. A reference run records every invocation the specification’s own slice’s reactions make, accepted or refused and whether or not the slice owns the command, and compares the stated invocations exactly in count and order (as a multiset under thenEventsInAnyOrder), comparing only stated values. A stated invocation counts as a success outcome. Strict readers below v34 reject thenInvocations; consumers must admit v34 and compare invocations or refuse the model, never drop the assertion. See Invocation expectations.

A model with a state machine or a workflow selects language/semantic 36.0 and schemaVersion: 36, including when it also declares handler possible events. ESM v36 includes the v35 handler result contract v2; a model using possible events without a lifecycle selects v35. The application writes stateMachines and workflows, after triggers and before eventSources, each omitted when empty and ordered by name, so a model without either keeps its version, bytes and revision. A state machine is {name, readModel, states, transitions} with specifications last when present: each state is {name, initial, final, entering} (an entry is {kind: "send", command} or {kind: "start", workflow}) and each transition {from, event, guard?, to}; transitions keep declaration order, which is semantic (the first matching transition the current state allows is taken). A workflow is {name, subject, nodes, edges} with specifications last when present; a node is {name, kind} with kind trigger, action, decision, wait, approval, forEach or join plus the members of its kind, and an edge is {from, outlet, to}. The outlets are those of Cratis.Orleans WellKnownOutlets: next, failed, resumed, expired, approved, rejected, each and completed; a decision names its own through whenTrue and whenFalse. Durations are whole seconds. A specification is {name, given, whenAppended?, whenStarted?, outcomes, then}. Strict readers below v36 reject these members; consumers must admit v36 and run the state machines and workflows or refuse the model. See State machines and Workflows.

A model that uses a clock operand, a command calendar, a declared context member or given time zone selects language/semantic 37.0 and schemaVersion: 37. At v37 the application always writes timeZone as {id, configurable} (UTC and not configurable when the model declares none) after its other members, then contextMembers as [{name, type: "timeZone"}], omitted when empty. A command writes calendar last, as {timeZone} for a fixed IANA zone or {contextMember} for $context.timeZone or a declared member. A condition operand or a validation rule writes clock as {kind, offset?, dateOf?}, where kind is today or now, offset is {amount, unit} with unit day, hour or minute (omitted for a zero-day offset) and dateOf is true only when present; a property operand reduced by date of writes dateOf: true. A specification writes givenTimeZone last. A model without any of these keeps its version, bytes and revision. Strict readers below v37 reject every one of these members, and the canonical writer refuses to write them below v37; consumers must admit v37 and evaluate the clock in the stated zone or refuse the model. The typed-context sidecar writes contractRevision: 3, the application-context source kind and contextMembers: [{name, runtimeToken: "TimeZone"}] only when a model reads a declared member, so earlier sidecar bytes are unchanged.

An events capture that declares key <property> is event source selects ESM v33 and serializes keyIsEventSource; see Keying by the event source. Typed event capture keys select ESM v32 only when their inferred identities change; see Typed event capture keys for fallback rules, canonical effects and consumer admission.