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.
Optionalprovenance?: { aiGenerated: true; generator: "paracosm"; models: Record<string, string> }Present on new runs. Historical artifacts may omit it.
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.
The digital-twin form of WorldModel.simulate: a subject (a
person, an organization, a system) is held constant, an intervention
(a treatment, a policy, a product change) is applied, and the actor
drives the run. The run's departments read both in their system text,
the actor in each decision request (its session keeps the block once,
and a later decision prompt names them in one line) and the Event
Director in each prompt, and the first played turn's department
prompts open with one sentence naming them. The run's start (the
commander's system text, its opening message and the promotions)
reads neither, so two arms from one seed and one actor start alike.
The returned RunArtifact records subject and intervention
verbatim, and
scenarioExtensions.paracosmInternal.twinContext holds the block the
models were sent. For a subject's baseline, call simulate with the
subject alone. A fork applies only what its own call passes.
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: 'northwind', name: 'Northwind', profile: { headcount: 100 } },
intervention: {
id: 'layoff', name: 'Reduction in force',
description: 'A 25% reduction in force across all departments.',
category: 'policy',
},
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-run each between-turn step artifact recorded and report whether
today's kernel produces the same state after it. The audit use case
named in the 2026-04-23 positioning spec is a single API call.
Each step restarts from the state it started from in the run (the
run's start snapshot for the first, else the end-of-turn snapshot of
the turn before) and is compared with the state the run saved right
after it, before the turn's decisions moved it. matches=true shows
the current kernel code reproduces every step the run took. Replay
calls no model and does not re-apply the turns' decisions, outcomes or
drift (#235).
Required preconditions on artifact:
scenarioExtensions.kernelSnapshotAtStart and
kernelSnapshotsAfterProgression, which the turn loop saves with
captureSnapshots: true. A run saved before the turn loop kept them gets a
WorldModelReplayError saying replay cannot verify it, never a
match or a mismatch.kernelSnapshotsPerTurn), the state it started from;
and for every end-of-turn snapshot, the state after that turn's
step. A run missing one (a turn that ended in an error saves no
end-of-turn snapshot) gets the same cannot-verify error.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.
Optionalprovenance?: { aiGenerated: true; generator: "paracosm"; models: Record<string, string> }Present on new runs. Historical artifacts may omit it.
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.
Optional engine implementation; fork runners retain the same resume handling.
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.
Optionalprovenance?: { aiGenerated: true; generator: "paracosm"; models: Record<string, string> }Present on new runs. Historical artifacts may omit it.
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.
Optionalprovenance?: { aiGenerated: true; generator: "paracosm"; models: Record<string, string> }Present on new runs. Historical artifacts may omit it.
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.
Optionalprovenance?: { aiGenerated: true; generator: "paracosm"; models: Record<string, string> }Present on new runs. Historical artifacts may omit it.
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