The contract theory behind the Bitspark repositories: contracts, their realizations and instances, adapters, generators, and the laws that relate them. This repository also holds a map from each law to its current evidence. A revisioned claim registry and pinned integration checks across released repositories are chartered work; the current checks cover the theory model, finite examples, and documentation.
Status: chartered 26 September 2026 by
Bitwire decision 0010.
The theory, developed in Nightseam in September 2026, lives in theory/:
its definitions and laws, a TypeScript model, checked examples and a
self-contained visual edition. Run its checks with:
pnpm --dir theory install --frozen-lockfile
pnpm --dir theory run verify
node scripts/links.mjs-
Contract, realization and instance are separate.
- A contract is a shape plus a specification of allowed behavior.
- A realization is that shape in one programming language.
- An instance is a running value, which may or may not satisfy the contract.
Structural conformance and satisfaction are different relations, and a declaration digest names content, not behavior.
-
Adapters map between realizations. Preserving satisfaction is weaker than preserving an instance's observable behavior. For the wire, bind and stub must round-trip.
-
Generators are functions with contracts of their own. The language a generator is written in is independent of the languages it reads and writes.
-
Shapes are finite keyed trees, related to Deixis through an explicit optional-value instantiation and faithful key encoding. The connecting chapter states that embedding. Navigation and substitution into holes obey composition laws, and those laws do not lift to behavior without an explicit interpretation.
Each repository declares which theory revision and which laws it claims. The tests for a law live with the owner of its semantics:
| Law | Tested by |
|---|---|
| Wire, carrier and operator laws | Bitwire's cases, run against bitruntime |
| Canonical declaration and generic-application laws | bittype |
| Descriptor and validator agreement | bitschema |
| The bind/stub round trip, the operation square, the construction square | Bitlink, with bittype fixtures |
| Released cross-repository combinations | The integration workspace chartered here; not implemented yet |
- The theory: its reading order, model and checks.
- Structure, behavior, representation, and authority: the connection to Deixis, opaque conveyance, structured services, and trust.
- Papers: One Structure, Two Modes, its standalone LaTeX source, compiled PDF, authorship, and migration provenance.
- Charter: what this repository owns, promises and is checked by.
- Working here as an agent.