Run N leaders through this world in parallel via runBatch.
scenarios is fixed to [this.scenario]; supply leaders, turns,
seed, and any other BatchConfig fields.
For N-scenarios-×-M-leaders sweeps that span multiple worlds, call
runBatch directly with an explicit scenarios array.
Construct a new WorldModel positioned at the snapshot's turn. The
new WorldModel has no prior run of its own; calling .simulate()
on it resumes from the snapshot's kernel state, optionally with a
different leader, seed, or custom events.
metadata.forkedFrom on the subsequent .simulate() call's
returned RunArtifact is set to
{ parentRunId: snapshot.parentRunId, atTurn: snapshot.kernel.turn }.
The opts argument is accepted for API symmetry but not consumed
at fork time; the caller passes opts.leader / opts.seed /
opts.customEvents through to the subsequent .simulate() call
directly. A future spec may fold this into a single-call API.
Convenience: pulls the kernel snapshot at atTurn from
artifact.scenarioExtensions.kernelSnapshotsPerTurn (populated
when the parent run was created with captureSnapshots: true)
and calls WorldModel.fork with it.
Optionalaborted?: booleanOptionalassumptions?: string[]Assumptions held true during the simulation.
Optionalcitations?: { context: string; doi?: string; text: string; url: string }[]Optionalcost?: {Optionalbreakdown?: Record<string, number>Per-site / per-model breakdown: { director: 0.12, departments: 0.34 }.
OptionalcachedReadTokens?: numberOptionalcacheSavingsUSD?: numberOptionalinputTokens?: numberOptionalllmCalls?: numberOptionaloutputTokens?: numberOptionaldecisions?: {Every decision made during the run — one per commander choice in turn-loop.
Optionaldisclaimer?: stringScenario-supplied disclaimer (digital-twin simulations use this for medical / professional caveats).
OptionalfinalState?: {Optionalcapacities?: Record<string, number>Capacity constraints: life support, housing, budget.
Optionalenvironment?: Record<string, string | number | boolean>Environmental conditions: weather, radiation, depth, altitude.
Numeric gauges: food, power, population, morale, VO2max, whatever.
Optionalpolitics?: Record<string, string | number | boolean>Political/social pressures. Values may be numeric or categorical.
OptionalscenarioExtensions?: Record<string, unknown>Optionalstatuses?: Record<string, string | boolean>Categorical state: governance status, alignment, phase.
OptionalfinalSwarm?: {Final agent-swarm roster at end-of-run. Pairs with finalState: the
world snapshot is the macro view (metrics, statuses), the swarm
snapshot is the micro view (every agent's role, mood, family edges,
memory). Populated in turn-loop runs that exercised the swarm.
Use WorldModel.swarm() for the live equivalent during a run.
Every agent in the swarm at snapshot time, alive or dead.
Optionalbirths?: numberNumber of births this turn.
Optionaldeaths?: numberNumber of deaths this turn.
Optionalmorale?: numberAggregate morale 0..1 (population-weighted).
Aggregate counts derived from agents.
OptionalscenarioExtensions?: Record<string, unknown>Scenario time at snapshot (years/quarters/ticks per scenario).
Turn number this snapshot was taken at (0-indexed).
Optionalfingerprint?: Record<string, string | number>Loose classification scores. Paracosm heritage; scenarios may extend.
OptionalforgedTools?: {Optionalintervention?: {Intervention being tested on the subject.
OptionalleveragePoints?: string[]Actionable leverage points for consumers of the artifact.
Required. Identifies the run + scenario + mode.
OptionalcompletedAt?: stringOptionalforkedFrom?: { atTurn: number; parentRunId: string }When this run was produced by forking a prior run, records the parent run-id + the turn at which the fork happened. Consumers walking a fork chain follow this link transitively through stored artifacts. Omitted for fresh (non-forked) runs.
Added in 0.7.x with the WorldModel.fork() API. Additive + optional; no COMPILE_SCHEMA_VERSION bump required.
Unique identifier for this run. UUID, slug, or host-assigned id.
Optionalversion?: stringScenario version; not artifact version. Optional.
OptionalscenarioExtensions?: Record<string, unknown>Optionalseed?: numberAbsent for non-deterministic runs (LLM-only synthesis without a seeded kernel).
Optionaloverview?: stringShort headline summary. Digital-twin overview, paracosm verdict's
summary, a game's end-of-run narrator line.
OptionalproviderError?: OptionalriskFlags?: {Risk callouts. Maps to digital-twin risk_flags after camelCase rename.
OptionalscenarioExtensions?: Record<string, unknown>OptionalspecialistNotes?: {Specialist analyses across domains. Flat list; multiple entries per domain/turn OK.
Optionalsubject?: {Subject being simulated (person, character, organism, vessel, etc.).
Optionaltrajectory?: {Labeled trajectory of the simulation. trajectory.points for sparklines,
trajectory.timepoints for rich labeled snapshots. Both optional; at
least one populated in turn-loop and batch-trajectory modes.
Optionalpoints?: {Lightweight per-sample metric records; good for sparklines.
Optionaltimepoints?: {Rich labeled snapshots with narrative + score; good for timepoint cards.
Simulate an intervention applied to a subject within this world.
Sugar over WorldModel.simulate that names the digital-twin
pattern: a subject (a person, organization, system, or biological
entity) is held constant, an intervention (a treatment, policy, or
action) is applied, and the leader drives the run. The returned
RunArtifact carries subject and intervention for traceability.
Options bag containing the subject, intervention, actor, and normal simulation settings.
RunArtifact with subject and intervention populated.
import { WorldModel } from 'paracosm';
const wm = await WorldModel.fromJson(scenarioJson);
const artifact = await wm.intervene({
subject: { id: 'company', kind: 'organization', attributes: { headcount: 100 } },
intervention: { id: 'layoff', kind: 'policy', description: '25% RIF', parameters: { percent: 25 } },
actor: leader,
maxTurns: 4,
});
console.log(artifact.subject, artifact.intervention);
Quickstart: generate N contextual HEXACO leaders for this world and
run them in parallel against the same seed. Leaders are produced by
a structured-output LLM call (Zod schema with HEXACO bounds); each
run is a direct runSimulation call so captureSnapshots: true
flows through verbatim and the results are fork-eligible.
Unlike batch, this path assumes one scenario and same-seed runs across leaders: the entire product value is "same seed, different HEXACO, see divergence".
Re-execute the kernel transitions captured in artifact and report
whether today's kernel produces the same snapshots. The audit
use case named in the 2026-04-23 positioning spec is now a single
API call; pillar 2 (Reproducible) is verifiable in code rather
than promised in copy.
Implementation re-runs the deterministic between-turn progression
hook from each recorded snapshot to the next, captures fresh
snapshots, and compares the fresh kernelSnapshotsPerTurn array
to the input artifact's via canonical JSON. matches=true proves
the kernel is byte-equal-deterministic for this artifact's transitions.
Required preconditions on artifact:
scenarioExtensions.kernelSnapshotsPerTurn populated.decisions[] populated.metadata.scenario.id matches this WorldModel's scenario.The stored RunArtifact to replay.
Optionalaborted?: booleanOptionalassumptions?: string[]Assumptions held true during the simulation.
Optionalcitations?: { context: string; doi?: string; text: string; url: string }[]Optionalcost?: {Optionalbreakdown?: Record<string, number>Per-site / per-model breakdown: { director: 0.12, departments: 0.34 }.
OptionalcachedReadTokens?: numberOptionalcacheSavingsUSD?: numberOptionalinputTokens?: numberOptionalllmCalls?: numberOptionaloutputTokens?: numberOptionaldecisions?: {Every decision made during the run — one per commander choice in turn-loop.
Optionaldisclaimer?: stringScenario-supplied disclaimer (digital-twin simulations use this for medical / professional caveats).
OptionalfinalState?: {Optionalcapacities?: Record<string, number>Capacity constraints: life support, housing, budget.
Optionalenvironment?: Record<string, string | number | boolean>Environmental conditions: weather, radiation, depth, altitude.
Numeric gauges: food, power, population, morale, VO2max, whatever.
Optionalpolitics?: Record<string, string | number | boolean>Political/social pressures. Values may be numeric or categorical.
OptionalscenarioExtensions?: Record<string, unknown>Optionalstatuses?: Record<string, string | boolean>Categorical state: governance status, alignment, phase.
OptionalfinalSwarm?: {Final agent-swarm roster at end-of-run. Pairs with finalState: the
world snapshot is the macro view (metrics, statuses), the swarm
snapshot is the micro view (every agent's role, mood, family edges,
memory). Populated in turn-loop runs that exercised the swarm.
Use WorldModel.swarm() for the live equivalent during a run.
Every agent in the swarm at snapshot time, alive or dead.
Optionalbirths?: numberNumber of births this turn.
Optionaldeaths?: numberNumber of deaths this turn.
Optionalmorale?: numberAggregate morale 0..1 (population-weighted).
Aggregate counts derived from agents.
OptionalscenarioExtensions?: Record<string, unknown>Scenario time at snapshot (years/quarters/ticks per scenario).
Turn number this snapshot was taken at (0-indexed).
Optionalfingerprint?: Record<string, string | number>Loose classification scores. Paracosm heritage; scenarios may extend.
OptionalforgedTools?: {Optionalintervention?: {Intervention being tested on the subject.
OptionalleveragePoints?: string[]Actionable leverage points for consumers of the artifact.
Required. Identifies the run + scenario + mode.
OptionalcompletedAt?: stringOptionalforkedFrom?: { atTurn: number; parentRunId: string }When this run was produced by forking a prior run, records the parent run-id + the turn at which the fork happened. Consumers walking a fork chain follow this link transitively through stored artifacts. Omitted for fresh (non-forked) runs.
Added in 0.7.x with the WorldModel.fork() API. Additive + optional; no COMPILE_SCHEMA_VERSION bump required.
Unique identifier for this run. UUID, slug, or host-assigned id.
Optionalversion?: stringScenario version; not artifact version. Optional.
OptionalscenarioExtensions?: Record<string, unknown>Optionalseed?: numberAbsent for non-deterministic runs (LLM-only synthesis without a seeded kernel).
Optionaloverview?: stringShort headline summary. Digital-twin overview, paracosm verdict's
summary, a game's end-of-run narrator line.
OptionalproviderError?: OptionalriskFlags?: {Risk callouts. Maps to digital-twin risk_flags after camelCase rename.
OptionalscenarioExtensions?: Record<string, unknown>OptionalspecialistNotes?: {Specialist analyses across domains. Flat list; multiple entries per domain/turn OK.
Optionalsubject?: {Subject being simulated (person, character, organism, vessel, etc.).
Optionaltrajectory?: {Labeled trajectory of the simulation. trajectory.points for sparklines,
trajectory.timepoints for rich labeled snapshots. Both optional; at
least one populated in turn-loop and batch-trajectory modes.
Optionalpoints?: {Lightweight per-sample metric records; good for sparklines.
Optionaltimepoints?: {Rich labeled snapshots with narrative + score; good for timepoint cards.
Replay result: { artifact, matches, divergence }.
Run a single simulation through this world with the given leader.
Delegates to runSimulation with scenario pinned to this
instance.
keyPersonnel is optional for parity with the underlying API; most
callers pass [] or omit it. The returned RunArtifact is
the universal Zod-validated contract exported from paracosm/schema.
When this WorldModel was produced by WorldModel.fork or
WorldModel.forkFromArtifact, the pending
_resumeFrom + _forkedFrom context is threaded into the
underlying runSimulation via the internal _resumeFrom /
_forkedFrom fields on RunOptions. Both are cleared after
simulate() consumes them so a second simulate() on the same
WorldModel does not double-apply.
Capture a WorldModelSnapshot of the state at the end of
this WorldModel's most recent simulate() call. Requires
simulate(..., { captureSnapshots: true }) on that prior call;
throws with a clear pointer otherwise.
The returned snapshot is plain JSON-safe; serialize to disk with
JSON.stringify and reload with JSON.parse + fork().
StaticfromCompile a raw scenario JSON into a runnable WorldModel.
Delegates to compileScenario under the hood; all CompileOptions (cache, provider, model, seed ingestion) are supported.
StaticfromCompile a world model from prompt, brief, or document text (with an
optional domain hint and source URL). Delegates to
compileFromSeed: the LLM proposes a scenario draft against
DraftScenarioSchema, validates it, then routes it into the existing
compileScenario pipeline so the seedText research grounding
and hook generation stages still fire. JSON stays the canonical
contract; this wrapper only makes unstructured source material a
first-class authoring input.
StaticfromWrap an already-compiled ScenarioPackage (e.g. marsScenario,
lunarScenario, or any cached result of a prior compileScenario
call).
Pure construction, no I/O.
StaticswarmFinal agent-swarm snapshot from a RunArtifact, or undefined
if the run did not produce one (e.g., batch-point modes that bypass
the turn loop). Equivalent to reading artifact.finalSwarm directly;
provided so consumers have a single import surface for swarm access.
Optionalaborted?: booleanOptionalassumptions?: string[]Assumptions held true during the simulation.
Optionalcitations?: { context: string; doi?: string; text: string; url: string }[]Optionalcost?: {Optionalbreakdown?: Record<string, number>Per-site / per-model breakdown: { director: 0.12, departments: 0.34 }.
OptionalcachedReadTokens?: numberOptionalcacheSavingsUSD?: numberOptionalinputTokens?: numberOptionalllmCalls?: numberOptionaloutputTokens?: numberOptionaldecisions?: {Every decision made during the run — one per commander choice in turn-loop.
Optionaldisclaimer?: stringScenario-supplied disclaimer (digital-twin simulations use this for medical / professional caveats).
OptionalfinalState?: {Optionalcapacities?: Record<string, number>Capacity constraints: life support, housing, budget.
Optionalenvironment?: Record<string, string | number | boolean>Environmental conditions: weather, radiation, depth, altitude.
Numeric gauges: food, power, population, morale, VO2max, whatever.
Optionalpolitics?: Record<string, string | number | boolean>Political/social pressures. Values may be numeric or categorical.
OptionalscenarioExtensions?: Record<string, unknown>Optionalstatuses?: Record<string, string | boolean>Categorical state: governance status, alignment, phase.
OptionalfinalSwarm?: {Final agent-swarm roster at end-of-run. Pairs with finalState: the
world snapshot is the macro view (metrics, statuses), the swarm
snapshot is the micro view (every agent's role, mood, family edges,
memory). Populated in turn-loop runs that exercised the swarm.
Use WorldModel.swarm() for the live equivalent during a run.
Every agent in the swarm at snapshot time, alive or dead.
Optionalbirths?: numberNumber of births this turn.
Optionaldeaths?: numberNumber of deaths this turn.
Optionalmorale?: numberAggregate morale 0..1 (population-weighted).
Aggregate counts derived from agents.
OptionalscenarioExtensions?: Record<string, unknown>Scenario time at snapshot (years/quarters/ticks per scenario).
Turn number this snapshot was taken at (0-indexed).
Optionalfingerprint?: Record<string, string | number>Loose classification scores. Paracosm heritage; scenarios may extend.
OptionalforgedTools?: {Optionalintervention?: {Intervention being tested on the subject.
OptionalleveragePoints?: string[]Actionable leverage points for consumers of the artifact.
Required. Identifies the run + scenario + mode.
OptionalcompletedAt?: stringOptionalforkedFrom?: { atTurn: number; parentRunId: string }When this run was produced by forking a prior run, records the parent run-id + the turn at which the fork happened. Consumers walking a fork chain follow this link transitively through stored artifacts. Omitted for fresh (non-forked) runs.
Added in 0.7.x with the WorldModel.fork() API. Additive + optional; no COMPILE_SCHEMA_VERSION bump required.
Unique identifier for this run. UUID, slug, or host-assigned id.
Optionalversion?: stringScenario version; not artifact version. Optional.
OptionalscenarioExtensions?: Record<string, unknown>Optionalseed?: numberAbsent for non-deterministic runs (LLM-only synthesis without a seeded kernel).
Optionaloverview?: stringShort headline summary. Digital-twin overview, paracosm verdict's
summary, a game's end-of-run narrator line.
OptionalproviderError?: OptionalriskFlags?: {Risk callouts. Maps to digital-twin risk_flags after camelCase rename.
OptionalscenarioExtensions?: Record<string, unknown>OptionalspecialistNotes?: {Specialist analyses across domains. Flat list; multiple entries per domain/turn OK.
Optionalsubject?: {Subject being simulated (person, character, organism, vessel, etc.).
Optionaltrajectory?: {Labeled trajectory of the simulation. trajectory.points for sparklines,
trajectory.timepoints for rich labeled snapshots. Both optional; at
least one populated in turn-loop and batch-trajectory modes.
Optionalpoints?: {Lightweight per-sample metric records; good for sparklines.
Optionaltimepoints?: {Rich labeled snapshots with narrative + score; good for timepoint cards.
Every agent in the swarm at snapshot time, alive or dead.
Optionalbirths?: numberNumber of births this turn.
Optionaldeaths?: numberNumber of deaths this turn.
Optionalmorale?: numberAggregate morale 0..1 (population-weighted).
Aggregate counts derived from agents.
OptionalscenarioExtensions?: Record<string, unknown>Scenario time at snapshot (years/quarters/ticks per scenario).
Turn number this snapshot was taken at (0-indexed).
StaticswarmGroup the swarm by department. Returns a map keyed by department label; values are the (alive + dead) agents in that department, preserving insertion order from the snapshot. Delegates to import('paracosm/swarm').swarmByDepartment.
Useful for org-chart-style summaries: "Engineering: 18 agents (15 alive). Lead: Maria Chen."
Optionalaborted?: booleanOptionalassumptions?: string[]Assumptions held true during the simulation.
Optionalcitations?: { context: string; doi?: string; text: string; url: string }[]Optionalcost?: {Optionalbreakdown?: Record<string, number>Per-site / per-model breakdown: { director: 0.12, departments: 0.34 }.
OptionalcachedReadTokens?: numberOptionalcacheSavingsUSD?: numberOptionalinputTokens?: numberOptionalllmCalls?: numberOptionaloutputTokens?: numberOptionaldecisions?: {Every decision made during the run — one per commander choice in turn-loop.
Optionaldisclaimer?: stringScenario-supplied disclaimer (digital-twin simulations use this for medical / professional caveats).
OptionalfinalState?: {Optionalcapacities?: Record<string, number>Capacity constraints: life support, housing, budget.
Optionalenvironment?: Record<string, string | number | boolean>Environmental conditions: weather, radiation, depth, altitude.
Numeric gauges: food, power, population, morale, VO2max, whatever.
Optionalpolitics?: Record<string, string | number | boolean>Political/social pressures. Values may be numeric or categorical.
OptionalscenarioExtensions?: Record<string, unknown>Optionalstatuses?: Record<string, string | boolean>Categorical state: governance status, alignment, phase.
OptionalfinalSwarm?: {Final agent-swarm roster at end-of-run. Pairs with finalState: the
world snapshot is the macro view (metrics, statuses), the swarm
snapshot is the micro view (every agent's role, mood, family edges,
memory). Populated in turn-loop runs that exercised the swarm.
Use WorldModel.swarm() for the live equivalent during a run.
Every agent in the swarm at snapshot time, alive or dead.
Optionalbirths?: numberNumber of births this turn.
Optionaldeaths?: numberNumber of deaths this turn.
Optionalmorale?: numberAggregate morale 0..1 (population-weighted).
Aggregate counts derived from agents.
OptionalscenarioExtensions?: Record<string, unknown>Scenario time at snapshot (years/quarters/ticks per scenario).
Turn number this snapshot was taken at (0-indexed).
Optionalfingerprint?: Record<string, string | number>Loose classification scores. Paracosm heritage; scenarios may extend.
OptionalforgedTools?: {Optionalintervention?: {Intervention being tested on the subject.
OptionalleveragePoints?: string[]Actionable leverage points for consumers of the artifact.
Required. Identifies the run + scenario + mode.
OptionalcompletedAt?: stringOptionalforkedFrom?: { atTurn: number; parentRunId: string }When this run was produced by forking a prior run, records the parent run-id + the turn at which the fork happened. Consumers walking a fork chain follow this link transitively through stored artifacts. Omitted for fresh (non-forked) runs.
Added in 0.7.x with the WorldModel.fork() API. Additive + optional; no COMPILE_SCHEMA_VERSION bump required.
Unique identifier for this run. UUID, slug, or host-assigned id.
Optionalversion?: stringScenario version; not artifact version. Optional.
OptionalscenarioExtensions?: Record<string, unknown>Optionalseed?: numberAbsent for non-deterministic runs (LLM-only synthesis without a seeded kernel).
Optionaloverview?: stringShort headline summary. Digital-twin overview, paracosm verdict's
summary, a game's end-of-run narrator line.
OptionalproviderError?: OptionalriskFlags?: {Risk callouts. Maps to digital-twin risk_flags after camelCase rename.
OptionalscenarioExtensions?: Record<string, unknown>OptionalspecialistNotes?: {Specialist analyses across domains. Flat list; multiple entries per domain/turn OK.
Optionalsubject?: {Subject being simulated (person, character, organism, vessel, etc.).
Optionaltrajectory?: {Labeled trajectory of the simulation. trajectory.points for sparklines,
trajectory.timepoints for rich labeled snapshots. Both optional; at
least one populated in turn-loop and batch-trajectory modes.
Optionalpoints?: {Lightweight per-sample metric records; good for sparklines.
Optionaltimepoints?: {Rich labeled snapshots with narrative + score; good for timepoint cards.
StaticswarmBuild a family-tree adjacency map from the swarm: parent agentId → list of direct-descendant agentIds. Edge direction is parent→child; walk the map recursively to render multi-generation trees. Founders (no parent in the swarm) are the roots. Delegates to import('paracosm/swarm').swarmFamilyTree.
Returns an empty object when the run produced no swarm or the scenario does not track family edges.
Optionalaborted?: booleanOptionalassumptions?: string[]Assumptions held true during the simulation.
Optionalcitations?: { context: string; doi?: string; text: string; url: string }[]Optionalcost?: {Optionalbreakdown?: Record<string, number>Per-site / per-model breakdown: { director: 0.12, departments: 0.34 }.
OptionalcachedReadTokens?: numberOptionalcacheSavingsUSD?: numberOptionalinputTokens?: numberOptionalllmCalls?: numberOptionaloutputTokens?: numberOptionaldecisions?: {Every decision made during the run — one per commander choice in turn-loop.
Optionaldisclaimer?: stringScenario-supplied disclaimer (digital-twin simulations use this for medical / professional caveats).
OptionalfinalState?: {Optionalcapacities?: Record<string, number>Capacity constraints: life support, housing, budget.
Optionalenvironment?: Record<string, string | number | boolean>Environmental conditions: weather, radiation, depth, altitude.
Numeric gauges: food, power, population, morale, VO2max, whatever.
Optionalpolitics?: Record<string, string | number | boolean>Political/social pressures. Values may be numeric or categorical.
OptionalscenarioExtensions?: Record<string, unknown>Optionalstatuses?: Record<string, string | boolean>Categorical state: governance status, alignment, phase.
OptionalfinalSwarm?: {Final agent-swarm roster at end-of-run. Pairs with finalState: the
world snapshot is the macro view (metrics, statuses), the swarm
snapshot is the micro view (every agent's role, mood, family edges,
memory). Populated in turn-loop runs that exercised the swarm.
Use WorldModel.swarm() for the live equivalent during a run.
Every agent in the swarm at snapshot time, alive or dead.
Optionalbirths?: numberNumber of births this turn.
Optionaldeaths?: numberNumber of deaths this turn.
Optionalmorale?: numberAggregate morale 0..1 (population-weighted).
Aggregate counts derived from agents.
OptionalscenarioExtensions?: Record<string, unknown>Scenario time at snapshot (years/quarters/ticks per scenario).
Turn number this snapshot was taken at (0-indexed).
Optionalfingerprint?: Record<string, string | number>Loose classification scores. Paracosm heritage; scenarios may extend.
OptionalforgedTools?: {Optionalintervention?: {Intervention being tested on the subject.
OptionalleveragePoints?: string[]Actionable leverage points for consumers of the artifact.
Required. Identifies the run + scenario + mode.
OptionalcompletedAt?: stringOptionalforkedFrom?: { atTurn: number; parentRunId: string }When this run was produced by forking a prior run, records the parent run-id + the turn at which the fork happened. Consumers walking a fork chain follow this link transitively through stored artifacts. Omitted for fresh (non-forked) runs.
Added in 0.7.x with the WorldModel.fork() API. Additive + optional; no COMPILE_SCHEMA_VERSION bump required.
Unique identifier for this run. UUID, slug, or host-assigned id.
Optionalversion?: stringScenario version; not artifact version. Optional.
OptionalscenarioExtensions?: Record<string, unknown>Optionalseed?: numberAbsent for non-deterministic runs (LLM-only synthesis without a seeded kernel).
Optionaloverview?: stringShort headline summary. Digital-twin overview, paracosm verdict's
summary, a game's end-of-run narrator line.
OptionalproviderError?: OptionalriskFlags?: {Risk callouts. Maps to digital-twin risk_flags after camelCase rename.
OptionalscenarioExtensions?: Record<string, unknown>OptionalspecialistNotes?: {Specialist analyses across domains. Flat list; multiple entries per domain/turn OK.
Optionalsubject?: {Subject being simulated (person, character, organism, vessel, etc.).
Optionaltrajectory?: {Labeled trajectory of the simulation. trajectory.points for sparklines,
trajectory.timepoints for rich labeled snapshots. Both optional; at
least one populated in turn-loop and batch-trajectory modes.
Optionalpoints?: {Lightweight per-sample metric records; good for sparklines.
Optionaltimepoints?: {Rich labeled snapshots with narrative + score; good for timepoint cards.
A compiled, runnable world. Wraps a ScenarioPackage with convenience methods for simulating single leaders or running a batch.
Construct via WorldModel.fromJson (compile from raw JSON) or WorldModel.fromScenario (wrap an already-compiled scenario, e.g.
marsScenario).The underlying scenario is exposed via WorldModel.scenario as an escape hatch for callers that want the raw ScenarioPackage.
Example: Single-leader simulation
Example: Counterfactual branch via fork
Example: Pre-compiled scenario