Contracts
Schemas, types and error codes declared once and shared by every service and client, as @chiralkit/registry-schema already does.
Concept · the state face of ChiralUI
Coming soon
The same spiral, seen from the data side.
ChiralUI is what people see. ChiralData is what holds it up: the contracts, the write and read paths, the flows and services behind every screen. It grows by the same rings and is still a concept, with nothing to install yet.
01 · What
ChiralData names the parts that hold an interface up: contracts, write and read paths, flows and services. It is a concept today, with nothing to install yet.
Schemas, types and error codes declared once and shared by every service and client, as @chiralkit/registry-schema already does.
Every write ships with the read that serves it: an append-only log and the projection over it, as @chiralkit/event-log and @chiralkit/agent-store already do.
02 · Why
Components get a design system; the state they render rarely does. Validation is copied between client and server, and reads drift away from writes. ChiralData gives state the same rings, so each ring of the UI has a data face that is just as explicit.
03 · How
Contracts are the seed. Primitives and patterns build on them, and at ring 2 every write meets its read. Flows and services compose all of it, ring by ring, as ChiralUI does with interfaces.
Every ring of the UI has a state face. Each one is built from the two before it, following Fibonacci: 0, 1, 1, 2, 3, 5. Contracts are the point everything starts from; at 2, chirality begins: every write ships with its read.
Schemas, types, error codes and config, declared once and shared by every service and client. In Chiralkit today, that is @chiralkit/registry-schema.
Single-purpose functions built straight from contracts: a validator, a query, a hash.
Recurring compositions of primitives: a request handler, a middleware chain, retries, pagination.
The chiral pair: the same envelope, mirrored in direction. An append-only log and the projection that reads it; @chiralkit/event-log and @chiralkit/agent-store already work this way.
End-to-end operations such as signing in, publishing a module or approving a change, assembled from patterns and the write/read pair.
The API of a domain, composed from flows. The surface other systems call; the top of the data spiral.