Cohesive.Simulation 0.1.0-alpha.84

This is a prerelease version of Cohesive.Simulation.
dotnet add package Cohesive.Simulation --version 0.1.0-alpha.84
                    
NuGet\Install-Package Cohesive.Simulation -Version 0.1.0-alpha.84
                    
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="Cohesive.Simulation" Version="0.1.0-alpha.84" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cohesive.Simulation" Version="0.1.0-alpha.84" />
                    
Directory.Packages.props
<PackageReference Include="Cohesive.Simulation" />
                    
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 Cohesive.Simulation --version 0.1.0-alpha.84
                    
#r "nuget: Cohesive.Simulation, 0.1.0-alpha.84"
                    
#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 Cohesive.Simulation@0.1.0-alpha.84
                    
#: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=Cohesive.Simulation&version=0.1.0-alpha.84&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Cohesive.Simulation&version=0.1.0-alpha.84&prerelease
                    
Install as a Cake Tool

Cohesive.Simulation

Cohesive.Simulation provides deterministic synthetic-data generation, property cases, replayable worlds, scheduled scenarios, and provider-neutral provisioning over canonical Cohesive shapes. Typed C# builders are the ordinary authoring surface; portable IR remains the semantic authority used by tests, scripts, seeders, and tools.

Install

The current alpha targets .NET 10:

dotnet add package Cohesive.Simulation --prerelease

Add only the integrations the application uses:

Package Use it for
Cohesive.Simulation POCO generation, property cases, worlds, scenarios, artifacts, replay, and JSONL
Cohesive.Simulation.Relations References between generated populations
Cohesive.Simulation.Storage Seeding Cohesive entity repositories
Cohesive.Simulation.Transitions Executing scenario actions through canonical Cohesive Transitions
Cohesive.Simulation.Xunit Translating property-case results into xUnit failures
Cohesive.Simulation.Cli cohesive-sim for scripts, CI, and Playwright setup
Cohesive.Adapters.Bogus Optional finite Bogus imports into exact retained generation catalogs
Cohesive.Simulation.ExternalProcess Bounded provider-process imports from Python or another runtime
Cohesive.Adapters.Mimesis Typed finite Mimesis imports through the bounded Python process boundary

Core depends only on Cohesive; Relations, Storage, Transitions, xUnit, CLI, ExternalProcess, and provider integrations stay in optional packages. The CLI can consume a strict portable ExternalProcess import definition while keeping executable paths and process limits local to the invocation, then atomically retain and independently verify the resulting catalog.

Generate a POCO

using Cohesive.Simulation;
using Cohesive.Simulation.Generation;

var customers = Simulation.Define<Customer>(customer => customer
    .Member(value => value.Name, Gen.Categorical(
        Gen.Weighted("Ada", weight: 1d),
        Gen.Weighted("Grace", weight: 1d)))
    .Member(value => value.Age, Gen.Int32(minimum: 18, maximum: 90))
    .Member(value => value.IsActive, Gen.Bernoulli(probability: 0.85)));

Generated<Customer> generated = customers.Compile().Generate(seed: 42);

public sealed record Customer(string Name, int Age, bool IsActive);

The seed is only one replay coordinate. Exact definition identity, revision, fingerprint, scope, interpreter, entropy algorithm, and sequence index are retained with generated observations so replay fails closed against changed semantics.

Check properties

PropertyCaseRunResult run = customers.Compile().CheckProperty(
    seed: 42,
    property: static customer => customer.Age >= 18,
    options: new(requiredPassedCases: 250));

The runner-neutral result contains stable diagnostics, coverage, and a semantically shrunk counterexample with a replay token when the property fails. Cohesive.Simulation.Xunit adds PropertyCaseAssert.Passed(run) without making xUnit part of generation semantics.

Compose and retain a world

using Cohesive.Simulation.Artifacts;
using Cohesive.Simulation.Worlds;

var world = Simulation.DefineWorld("world/demo", "r1", builder => builder
    .Population("customers", count: 100, customers)
    .Exemplar("customer-for-browser", "customers", sequenceIndex: 7));

CompiledWorldPlan plan = world.Compile();
WorldArtifactManifest artifact = WorldArtifactManifest.FromWorld(plan, rootSeed: 42);
string manifestJson = WorldArtifactManifestJsonSerializer.Serialize(artifact);

The manifest is the retained cross-process authority. It embeds the exact portable world, root seed, interpreter, entropy algorithm, compiled population projections, and exemplars behind a content-addressed artifact ID. Persist it before provisioning when data crosses a process or storage boundary.

using Cohesive.Simulation.Provisioning;

await using var output = File.Create("demo.jsonl");
var sink = new WorldJsonLinesSink("demo/artifact", output);
await WorldProvisioner.ProvisionAsync(artifact, sink, new(batchSize: 500));

output.Position = 0;
await WorldJsonLinesVerifier.VerifyAsync(artifact, output);

Provisioning is bounded, deterministic, and sink-neutral. Stable run and batch identities support reconciliation, but the reference provisioner does not invent retries or transactional guarantees a destination cannot provide.

Current alpha boundary

Implemented generators are constants, inclusive uniform Int32, Bernoulli, weighted categorical, exact retained generation catalogs, object/member composition, and correlated record sampling with typed projections. Catalog documents pin values, weights, locale, adapter/provider versions, normalized producer capability profiles, distinct profile and import source evidence, known deviations, and a semantic fingerprint. The same canonical definitions support direct examples, bounded sequences, property cases, static populations, named exemplars, relationship-linked worlds, repository seeding, and portable artifacts.

Worlds currently describe static initial state. Scenarios add actors, declared operations, fixed virtual-time actions, deterministic actor materialization, an explicit runtime interpreter seam, contract-checked outcomes, and fingerprint-verified complete traces. Core and relationship-world materializers expose each actor's observation, entity identity, and origin replay evidence to the runner. Actions can return explicit complete before/after actor replacements; the runner applies them immutably between actions, rejects stale evidence, and retains the verified state chain for final-world reconstruction. Actor creation and deletion, events, queues, resources, and fault policies remain later explicit interpretations rather than implicit callback behavior. Cohesive.Adapters.Bogus and Cohesive.Adapters.Mimesis provide optional snapshot producers without making either provider a core dependency.

Current portable schemas and replay tokens reject earlier versions rather than silently assigning compatibility semantics. See the compatibility guide before retaining artifacts across package upgrades.

Learn more

Product Compatible and additional computed target framework versions.
.NET 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 (6)

Showing the top 5 NuGet packages that depend on Cohesive.Simulation:

Package Downloads
Cohesive.Simulation.Storage

Repository provisioning integration for deterministic Cohesive simulation worlds.

Cohesive.Simulation.Xunit

xUnit assertion integration for deterministic Cohesive simulation property cases.

Cohesive.Simulation.Relations

Canonical relationship integration for deterministic Cohesive simulation worlds.

Cohesive.Adapters.Bogus

Bogus snapshot import adapter for portable Cohesive.Simulation generation catalogs.

Cohesive.Simulation.ExternalProcess

Bounded external-process snapshot import adapter for Cohesive.Simulation generation catalogs.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-alpha.84 0 9/17/2026
0.1.0-alpha.83 0 9/16/2026
0.1.0-alpha.82 31 9/16/2026
0.1.0-alpha.81 31 9/16/2026
0.1.0-alpha.80 99 9/8/2026
0.1.0-alpha.79 95 9/7/2026
0.1.0-alpha.78 87 9/7/2026
0.1.0-alpha.77 89 9/7/2026
0.1.0-alpha.76 85 9/6/2026
0.1.0-alpha.75 77 9/6/2026
0.1.0-alpha.74 71 9/6/2026
0.1.0-alpha.73 89 9/5/2026
0.1.0-alpha.72 67 9/5/2026
0.1.0-alpha.71 66 9/4/2026
0.1.0-alpha.70 71 9/4/2026
0.1.0-alpha.69 59 9/2/2026
0.1.0-alpha.68 62 8/30/2026
0.1.0-alpha.67 69 8/26/2026