Cratis.CritterStack.Screenplay 0.21.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Cratis.CritterStack.Screenplay --version 0.21.0
                    
NuGet\Install-Package Cratis.CritterStack.Screenplay -Version 0.21.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Cratis.CritterStack.Screenplay" Version="0.21.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cratis.CritterStack.Screenplay" Version="0.21.0" />
                    
Directory.Packages.props
<PackageReference Include="Cratis.CritterStack.Screenplay" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Cratis.CritterStack.Screenplay --version 0.21.0
                    
#r "nuget: Cratis.CritterStack.Screenplay, 0.21.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Cratis.CritterStack.Screenplay@0.21.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Cratis.CritterStack.Screenplay&version=0.21.0
                    
Install as a Cake Addin
#tool nuget:?package=Cratis.CritterStack.Screenplay&version=0.21.0
                    
Install as a Cake Tool

Screenplay.CritterStack

Generate verified Cratis Screenplay definitions from Marten, Wolverine, and independently composed .NET source semantics.

Cratis.CritterStack.Screenplay follows the same package architecture as Cratis.Arc.Screenplay: a host supplies Roslyn compilations, and the package analyzes framework conventions, builds one semantic application model, lowers it through the shared Screenplay generation SDK, prints canonical .play source, and verifies it with the Screenplay compiler.

This is an independent Cratis compatibility project. It is not affiliated with or endorsed by JasperFx. Marten, Wolverine, JasperFx, and Critter Stack names belong to their respective owners. Generated models may require human review wherever diagnostics report semantic loss.

Goals

  • Marten-only event stores, documents, aggregates, projections, and queries.
  • Generic and instance-based Marten projection registrations, with exact authored projection name/version evidence and explicit diagnostics for unsupported async/live lifecycle semantics.
  • Async daemon mode and first-class subscription registration/configuration evidence without inventing state views, automations, translations, events, messages, or document consequences from arbitrary processing code.
  • Marten document identities from exact configuration, identity attributes, and conventions, without guessing unresolved expressions.
  • Authored Marten event/document tenancy declarations, attributes, and global policies retained as located MARTEN0013 diagnostic evidence without inferring effective state, runtime tenant resolution, or database topology.
  • Authored Marten event aliases, schema-version helpers, naming style, and current upcast registrations retained as MARTEN0011/MARTEN0012 diagnostic evidence without renaming or originating events or inferring upcast behavior.
  • Marten compiled-query execution linked to proven Wolverine HTTP query entry points, including public plan parameters; unresolved nested executable flow reports MARTEN0006 instead of guessing.
  • Marten + Wolverine HTTP and message handlers.
  • Vogen concepts, primitive representations, authored validation hooks, nullable usages, and explicit loss diagnostics through the separately composed Cratis.Screenplay.Generation.DotNet.Vogen adapter.
  • Current store-agnostic Wolverine event-sourcing APIs and legacy Marten-specific APIs.
  • Target-aware exact current and legacy IEventStream<T> appends across multiple handler parameters, including commandless HTTP and metadata-only loaded streams, with per-binding identities and explicit diagnostics instead of first-stream guesses.
  • Bounded current and legacy Wolverine DCB evidence from authored [DcbModel] / [BoundaryModel] parameters, direct EventTagQuery fluent chains, exact boundary appends, and safe declarative returns, with WOLVERINE0014/WOLVERINE0015 instead of invented stream topology.
  • Bounded authored Wolverine saga discovery for public concrete closed Wolverine.Saga state, grouped by message with Wolverine-compatible SagaChain admission. It preserves admitted role spellings and Async twins, constructor/returned-state creation constraints, collision-safe handler identities, exact correlation precedence (including inherited public members), cascades, timeouts, direct bus calls, and exact MarkCompleted() evidence. Saga state is excluded at every final HTTP query, message, and event admission boundary. WOLVERINE0016 is a report-only realization/provenance diagnostic: Wolverine-managed lifecycle is intentionally not lowered because authored source does not safely establish a portable domain workflow. Screenplay uses ordinary Event Modeling building blocks; this is not a language-gap request, and generated .play bytes remain unchanged. WOLVERINE0017 reports runtime-resolved correlation, while WOLVERINE0018 reports rejected lifecycle shapes without inventing persistence or transport topology.
  • Markerless event/message discovery from actual framework usage.
  • Deterministic output without starting the application or connecting to PostgreSQL.
  • Explicit diagnostics whenever source behavior cannot be represented faithfully.

Architecture

Roslyn compilations
  -> Vogen concept contribution (when exact authored evidence exists)
  -> Critter Stack Marten/Wolverine contribution (when framework evidence exists)
  -> subject-aware concept usage binding
  -> Cratis.Screenplay.Generation (all contributions, once)
  -> verified .play source

CritterStackScreenplayAdapter remains a low-level Marten/Wolverine adapter and matches those framework APIs by metadata name without runtime package references. The generator facade depends on the separate Vogen adapter package; neither production package depends on the Vogen source-generator/runtime package used by analyzed applications.

Generator composition

The parameterless facade composes Vogen and Critter Stack by default. Each adapter first identifies whether it can analyze the supplied projects, then contributes independently identified facts to one ScreenplayDefinitionGenerator:

var result = new CritterStackScreenplayGenerator().Generate(
    projects,
    new CritterStackScreenplayOptions { Domain = "Ordering" });

Hosts can replace the default composition with one collection expression. Adapter order does not choose conflicts, and each contribution retains its own adapter identity and evidence:

IDotNetScreenplayAdapter[] adapters =
[
    new VogenConceptScreenplayAdapter(),
    new CritterStackScreenplayAdapter(),
    externalAdapter
];

var generator = new CritterStackScreenplayGenerator(adapters);
var result = generator.Generate(projects, options);

The existing (IDotNetScreenplayAdapter, ScreenplayDefinitionGenerator) constructor remains available for hosts that supply one adapter and their own shared pipeline.

Shared generation infrastructure lives in Cratis/Screenplay.Generation. Cratis CLI owns MSBuildWorkspace, project/host selection, output, and the source context supplied for each selected project. The host must map its exact authored Project.Documents syntax trees and choose the stable project identity, display root, and case policy; adapters consume that context and do not infer source identity from physical Roslyn paths.

The canonical runner uses source-path policy v1 with workspace-relative display paths and ordinal identity casing. Its stable project identity is the repository-relative project path without the .csproj extension, and each source identity uses the project-relative document path. This preserves the existing displayed paths while keeping physical checkout roots out of identities and policy reporting.

A compatibility-only heuristic can supply a legacy display range for a source-backed referenced-project symbol after Critter Stack's existing semantic discovery has admitted that symbol. It considers only declarations accepted by the shared authored-source heuristic, orders safe workspace-relative ranges deterministically, excludes generated names and headers, and never participates in artifact or fact admission. The range carries no SourceFileIdentity. This fallback requires a fully qualified SourceRoot and a declaration beneath it; otherwise Source is omitted rather than exposing an absolute path or basename. The strict location path never admits generated or out-of-context trees. The Generate(Compilation, ...) convenience overload has neither host-owned source context nor a safe source root, so its evidence omits source provenance. Hosts that need stable identity must call the project-aware overload with an explicit source context.

Canonical fixtures

The compatibility plan uses:

  • Wolverine's current src/Samples/IncidentService;
  • JasperFx/CritterStackHelpDesk for Marten 6/Wolverine 1 behavior;
  • BankAccountES and other focused applications from the local Critter Stack sample corpus;
  • MartenWithProjectAspire for instance-registered async, multi-stream, and event projections;
  • the repository-owned VogenConcepts fixture pinned to Vogen 8.0.7, Marten 9.29.0, and Wolverine 6.29.2, including the canonical store-agnostic DCB and authored saga APIs.

See:

Build and test

dotnet test Screenplay.CritterStack.slnx --configuration Debug
dotnet build Screenplay.CritterStack.slnx --configuration Release
dotnet pack Screenplay.CritterStack.slnx --no-build --configuration Release -o Artifacts/NuGet

License

Screenplay.CritterStack is licensed under the MIT license.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.24.0 85 8/30/2026
0.23.1 89 8/27/2026
0.23.0 109 8/26/2026
0.22.0 111 8/25/2026
0.21.0 124 8/23/2026
0.20.0 92 8/23/2026
0.19.0 110 8/23/2026
0.18.0 88 8/23/2026
0.17.0 98 8/23/2026
0.16.0 98 8/22/2026
0.15.0 104 8/22/2026
0.14.0 92 8/22/2026
0.13.1 111 8/22/2026
0.13.0 94 8/22/2026
0.12.0 89 8/22/2026
0.11.0 93 8/22/2026
0.10.0 92 8/22/2026
0.7.0 86 8/22/2026
0.6.0 77 8/22/2026
0.5.0 77 8/22/2026
Loading failed