SSOT / GOVERNING REFERENCEDOCUMENT 21 OF 28

Data model, schema contracts and field semantics

Status: normative inventory; schemas define shape and are not an execution authority.

Primary entities

Entity Identity Key required semantics
Owner owner_id Policy, data rights, ceiling, grant scope
TaskSpec task_id Immutable intent, inputs, data class, oracle and constraints
MicroContract micro_id@version#digest Typed ports, effects, resource/runtime and tests
MacroDAG macro_id@version#digest Nodes, edges, checkpoints, total policy, bounded control
CandidateRoute route_id Per-node worker mapping, reject reasons and expected cost
QuoteSnapshot quote_id Provider/account/region/currency/TTL and billable terms
ApprovalGrant grant_id Exact plan+quote hash, owner, effects, money/time/resource scopes
Lease lease_id + generation Fenced worker/resource claim and expires_at
Receipt receipt_id Claimed action, issuer, time, digest, verification status
CaptureRecord capture_id Exact input/context/output byte refs and hashes
RuleCandidate candidate_id Base reproduction, typed vars, 3+ variation proposals, suggestion queue
RuleRelease rule_id@version#digest Tests, oracle, reviewer, approval, rollback, data and effect scope
EvidenceEvent event_id Provenance of each meaningful transition and claim

Serialization

Use UTF-8 JSON with declared schema_version. Monetary amounts must be integer minor units, never float guesses; fictional planner microcredits have a separate explicit unit. Content digests use SHA-256 over exact bytes and must not be computed over an undocumented serialization. Timestamps are UTC RFC3339. Redacted derivatives reference their separate original evidence hashes subject to permission. Stable IDs cannot be repurposed when semantics change.

Schema sources in this distribution

contracts/task-spec.schema.json, contracts/micro-harness.schema.json, contracts/macro-harness.schema.json, contracts/route-preview.schema.json, contracts/capture-record.schema.json, contracts/rule-candidate.schema.json, contracts/approval-grant.schema.json, contracts/lease.schema.json, contracts/receipt.schema.json, and contracts/system-manifest.json plus examples/ valid fixtures. The schemas are carefully bounded reference types, not a full code generator, and include versioning and no-effects preview fields.

Evolution discipline

A new optional field may be a compatible minor revision; changed authority semantics, immutable identifiers, envelope meaning or unrecognized effect class require explicit major version review and negative tests. Schema validation must be complemented by semantic ownership/license/policy checks. The canonical docs govern meaning; release schema digests govern runtime serialization.

Related

API · Harnesses · Governance.