Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Domain Model

Derived from docs/problem.md, schema/claim.schema.json, and the ADR log. Every entity here traces to a requirement; every relationship traces to a constraint.

Bounded contexts

ContextResponsibilityKey entity
Claim EmissionCreate, sign, and store claims in the storeClaim
Claim EvaluationCompute status by folding the logClaimStatus
Anchor ResolutionResolve anchors to code spans within a treeAnchor
Release GatingEvaluate release policy against claimsVerdict
Predicate EvaluationExecute predicate expressions (GATED by E0)Expression
Git ProjectionSynthesize git objects from the claim logGitCommit
elench StoreContent-addressed storage: blobs, trees, claimsStore
Envelope VerificationDSSE envelope signing and verificationEnvelope

Aggregates

Claim (root)

A signed assertion about a tree. The aggregate root of the claim log. Identity is the content address at creation; stable across status changes.

FieldTypeRequiredNotes
idstring ^cl_[0-9a-f]{64}$yesContent address, never reassigned
kindenum: assertion, falsification, verification, supersession, residue-acceptanceyesfalsification/verification/supersession require target
targetarray of claim idsnoClaims this record acts upon
assertionobjectyesContains form (predicate/annotation), optional expression, optional text
originobjectyesContains kind and producer
anchorobjectyesContains tree (elench OID) and strategy
timestampinteger (Unix epoch)yesSet by producer at emission. Used by ADR-0007 for deterministic commit synthesis.
evidencearraynoEmpty for agent-asserted claims by default
dependsOnarray of claim idsnoPremises. Transitive closure IS the blast radius.

Claim Log (root)

The append-only set of claims that IS the primary history (ADR-0001). No aggregate owns individual claims; the log is the aggregate that collects them. Status is computed by folding, never stored.

  • Append-only. No record is ever modified or deleted.
  • The git projection is derived from the claim log, not the other way around (ADR-0002).
  • No daemon. Everything is derivable from the store by a client-side binary.

elench Store (root)

The content-addressed substrate (ADR-0001). Holds blobs, trees, and claims. There is no separate git repository.

  • Content-addressed: blobs by content hash, trees by content hash, claims by content hash.
  • The store IS the history. There is no parallel ref namespace, no sidecar database.
  • The git projection reads from the store and synthesizes git objects on demand (ADR-0002).

Value objects

Assertion

FieldTypeRequiredNotes
formenum: predicate, annotationyespredicate can gate; annotation cannot
expressionobject: { language, source, digest? }required when form=predicateexecutable, deterministic, sandboxable
textstring, max 2000 charsnoHuman-readable. Never load-bearing.

Origin

FieldTypeRequiredNotes
kindenum: harness-observed, agent-asserted, human-assertedyesR2. Agents cannot emit harness-observed.
producerobject: { id, sessionId?, hermeticity? }yesDistinct from signer (envelope).

Anchor

FieldTypeRequiredNotes
treestring (elench tree OID)yesContent address of the tree state in the store. NOT a git commit OID.
strategyenum: path-range, symbol, content-digest, multiyesUNRESOLVED — E1 decides.
pathstringnoFor path-range strategy.
range[int, int]noFor path-range strategy.
symbolstringnoFor symbol strategy.
contentDigeststringnoFor content-digest strategy.

Evidence

FieldTypeRequiredNotes
kindenum: process-exit, test-report, artifact-digest, external-attestationyes
digeststringno
exitCodeintegernoFor process-exit.
uristringno

ClaimStatus (computed, not stored)

ValueMeaning
unevaluatedNo verification or falsification record targets this claim. Default.
passedA verification record exists and no falsification has invalidated it.
falsifiedA falsification record has changed this claim’s status.

Verdict

The result of evaluating a release policy against a claim log for a given tree. Not stored — computed at evaluation time.

FieldTypeNotes
resultenum: pass, fail
reasonsarray of stringsWhich conditions failed and why.
treestringThe elench tree OID evaluated.
policystringThe policy evaluated against.

GitCommit (projection, not stored)

A git commit object synthesized from the claim log by the git projection (ADR-0002, ADR-0007). Not stored in the elench store — generated on demand.

FieldTypeNotes
oidstringDeterministic function of (tree, parents, author, committer, message, timestamps).
treestringelench tree OID, mapped to a git tree OID.
parentsarray of git commit OIDsDerived from the claim log.
authorstringDerived from the claim’s producer.id.
committerstringSame as author (no separate committer).
messagestringDerived from an annotation claim, if present.

Store entities

Blob

FieldTypeRequiredNotes
oidstring [0-9a-f]{64}yesSHA-256 content hash. Identical to git SHA-256 blob OID.
databytesyesContent.

TreeEntry

FieldTypeRequiredNotes
namestringyesEntry name within the parent tree (e.g., “lib.rs”, “src”). NOT a full path — git-compatible.
modeintegeryesFile mode (0o100644 regular file, 0o100755 executable, 0o120000 symlink, 0o040000 directory).
oidstring [0-9a-f]{64}yesSHA-256 content hash. For files: blob OID. For directories: tree OID.
kindenum: blob, treeyesWhether this entry is a blob (file) or a tree (directory).

Tree

FieldTypeRequiredNotes
oidstring [0-9a-f]{64}yesSHA-256 content hash of the canonical serialization (git tree object format: mode space name null oid, sorted by name with trailing ‘/’ for directories). Identical to a git SHA-256 tree OID.
entriesarray of TreeEntryyesSorted by name. Directory names sort as if they have a trailing ‘/’.

Entity relationships

Claim
 ├── 1..* ──→ Claim (via dependsOn: premises)
 ├── 1..* ──→ Claim (via target: falsification/verification/supersession)
 ├── 1..* ──→ Evidence
 └── 1    ──→ Anchor

elench Store
 ├── 0..* ──→ Claim
 └── 0..* ──→ Tree (content-addressed)

GitCommit
 └── projected from ──→ Claim Log + elench Store

Verdict
 └── computed from ──→ Claim Log + Release Policy

Status machine

              ┌───────────┐    falsification      ┌──────────┐
   (default)  │unevaluated│ ──────────────────▶   │falsified │
              └───────────┘    supersession       └──────────┘
                    │ ▲                               ▲ │
          verification │ falsification                 │ │
                    ▼ │ of verification                │ │
              ┌───────────┐    falsification          │ │
              │  passed   │ ──────────────────────▶  │ │
              └───────────┘    supersession           │ │
                    │ ▲                               │ │
    falsification   │ │ falsification                 │ │
    of verification │ │ of falsification              │ │
                    ▼ │                               ▼ │
              ┌───────────┐                      ┌──────────┐
              │unevaluated│ ◀────────────────────│falsified │
              └───────────┘  (revert to previous) └──────────┘

Status is computed by folding the log, not stored. A claim’s status at any point in time is a pure function of the claims that target it. Falsification and supersession both change the target’s status to falsified. If a verification record is itself falsified, the target reverts to unevaluated (no valid verification remains). If a falsification record is itself falsified, the target reverts to its previous status (the falsification is void). This recursive fold — a claim’s status depends on the status of claims that target it — must be computed with cycle detection (INV-29).