# @volter/world-core

The shared state kernel and vendor-independent runtime libraries used by `@volter/twin-<vendor>`.
The product CLI and SDK are in [`@volter/world`](../cli/README.md).

## State and branching

[The model](../../docs/concepts/the-model.md) is the canonical explanation: one logical log,
checkpoints, a branch's parent position and its own entries, and simulated or real execution at
the head. Push lands entries in a parent; deploy performs them against the vendor and records
receipts. The Git-inspired verbs do not imply staging, commits or a Git object database.

The file store has inherited entries (`events.jsonl`), branch entries (`actions.jsonl`),
`branch.json`, a fetched URL-parent cache (`origin.jsonl`) and checkpoints. These are storage
segments of that model, not independent observed-state and local-action truth systems.
See [`log.ts`](./src/log.ts) for the format and [`state-system.ts`](./src/state-system.ts) for
execution. Payloads use the [blob storage contract](../../docs/contributing/architecture.md#portable-host-and-immutable-payloads).

## Building a twin

A twin implements its vendor's request/response semantics while the shared kernel
owns log ordering, checkpoints, branching and the head's state system. Use the tree readers and
write path exported by [`src/index.ts`](./src/index.ts); do not reconstruct a serve-time view by
folding the log or use removed v1 confirmation/suppression APIs.

[Architecture](../../docs/contributing/architecture.md) owns the boundaries and the procedure a twin is built by
([Creating a pack](../../docs/contributing/architecture.md#creating-a-pack)); [gates](../../docs/contributing/gates.md)
owns verification. A twin author's checks are `@volter/twin-standard`'s.
