Skip to content

Repository files navigation

bittheory

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

What the theory says, in brief

  • 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.

Who applies it

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

Read first

About

The contract theory behind the Bitspark repositories: contracts, realizations, instances, adapters, generators and their laws.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages