first build target
compile a finexa authored world into scene-ready compiled data, then drive the viewer with mocked live overlays that already obey the runtime contract shapes. no visual object is allowed to imply new world truth.
proto.computer / section 3
this section is the rust-land contract doc. it turns the boundary spec into an implementation-facing split: authored world and set, compiled world and set, durable runtime truth, and viewer frames. the first build target stays viewer-first, but the viewer is forced to read contract-backed world truth instead of inventing its own ontology.
this is a clean break from the older pre-reset proto model. proto/core/primitives.proto remains legacy reference only; new work does not
try to map back through interface / stream / workflow / mint as the primary ontology. the new basis is the boundary/runtime split described in
section 1 and the finexa mapping in section 2.
first build target
compile a finexa authored world into scene-ready compiled data, then drive the viewer with mocked live overlays that already obey the runtime contract shapes. no visual object is allowed to imply new world truth.
naming + versioning
rust type names stay stable and unsuffixed. versioning lives in artifact metadata via schema_edition, crate semver,
content hash, and optional git commit. persisted data migrates by edition and hash, not by spraying V1 through the type system.
| family | protobuf package | root artifacts | who produces it | persistence rule |
|---|---|---|---|---|
| authored | proto.world.authored |
AuthoredWorld, AuthoredSet |
rust builder dsl | durable source-of-truth input |
| compiled | proto.world.compiled |
CompiledWorld, CompiledSet |
world compiler | durable deterministic output |
| runtime | proto.world.runtime |
Datum, RouteSelection, Attempt, LaneKey, Proposal, Receipt, RecordEnvelope, ObligationEnvelope, DischargeReceipt, ReplayInput |
machinery and readout pipeline | durable where noted below; authoritative truth lives in records and obligations, not viewer state |
| viewer | proto.world.viewer |
ViewerFrame |
viewer adapter or mocked viewer harness | derived frame contract; may be transient or mocked, but must reference compiled ids and runtime truth |
ArtifactMeta is the shared root header across families. codegen may place it in a small helper proto if that makes imports cleaner,
but the semantic split remains these four families.
section 3 freezes one authored split that the compiler must preserve: PortBinding owns boundary composition,
FieldBinding owns proto-field maintenance, and ProtoBay owns local identity bind/birth plus lane/authority defaults.
| concern | declared in | resolved in | durable / derived / mocked |
|---|---|---|---|
| sources, ports, port bindings, faces, protos, field bindings, bays, processes, routes, effects, projections | AuthoredWorld |
CompiledWorld |
authored then durable compiled |
| districts, anchors, tracks, docks, screens, authored layout hints | AuthoredSet |
CompiledSet |
authored then durable compiled |
| ids, references, lane keys, authority matrix, discharge rules, default edges, default layout handles | not hand-authored | CompiledWorld and CompiledSet |
compiled deterministic output |
| attempts, receipts, records, obligations, discharge receipts, replay inputs | runtime operators | proto.world.runtime |
durable runtime truth |
| selection, hover, camera, mocked lag and pulses, live overlays | viewer harness or runtime adapter | ViewerFrame |
derived or mocked; never authoritative business truth |
this is the authored contract surface. rust authors typed semantic and set artifacts, protobuf serializes them, and the compiler lowers them into
deterministic compiled artifacts. authored ids are stable semantic slugs such as credit_request and activation.credit.create;
compiled and runtime artifacts receive UUIDv7 object ids later. name is display metadata, not the authored reference.
semantic layer
rust authors world law through typed, macro-light builders. boundary composition lives on Port and PortBinding;
field hydration lives on Proto and FieldBinding; identity crossing lives on ProtoBay; boundary admission lives on
Face and Ruleset; process motion and obligations live on Process, Route, and Effect.
set layer
SetSpec is a sibling dsl, not a second ontology. it places districts, faces, anchors, tracks, docks, screens, and camera/lens hints using
district-local 3d coordinates. compiler-only pieces such as conduits, gates, switches, chambers, relation bridges, overlay channels, and default labels stay derived.
WorldSpecroot authored world artifact. it gathers all semantic nouns, shared defaults, and schema metadata for one world.
id slug, optional name, schema_edition, thesis/principles, world-default authority and discharge defaults, plus collections of sources, ports, faces, rulesets, protos, proto bays, processes, routes, effects, and projections. ports carry nested PortBinding values; protos carry nested FieldBinding values.AuthoredWorld; compiles into CompiledWorld.let world = WorldSpec::new("finexa_credit_world")
.schema_edition("2026.q1")
.name("finexa credit ops world")
.source(Source::http_surface("qr_campaign_surface"))
.proto(Proto::new("credit_request"))
.route(Route::new("origination.request.submit"));
Sourcedeclares one outside system or material origin on the far side of the world boundary.
id, optional name, kind, emitted material kinds, delivery mode, connection/auth hints, and trust classification.Source::webhook("whatsapp_business_api")
.emits(["chat_event", "flow_submission", "delivery_receipt"])
.trust("signed_vendor_boundary");
Portdeclares one deployed contact point where source material is caught or outbound obligations are delivered.
id, optional name, direction, transport family, deployment hints, nested PortBinding values, and allowed faces or effect faces.PortBinding.Face, outbound effect definitions, and compiled delivery policies.Port::https("finexa_http_ingress")
.binding(PortBinding::new("whatsapp_flow_in")
.source("whatsapp_business_api")
.parser("flow_submission")
.matcher("request_ref_and_phone")
.trust_posture("signed_vendor_boundary"))
.routes_to_faces(["qr_entry", "whatsapp_chat", "whatsapp_flow", "trello_pipeline"]);
PortBindingdeclares one concrete boundary composition on a port. this is where source composition becomes typed law instead of folklore.
id, optional name, direction, source_ref, source_kind, credential/auth contract, protocol, parser, material contract, matcher, admit policy, bind rule, birth rule, effect policy, deployment, and trust posture.PortBinding owns boundary composition only. it may normalize, authenticate, parse, match, and classify source material, but it does not maintain business fields and it does not decide local identity beyond the authored bind/birth hooks it exposes to ProtoBay.source_kind + credential + protocol + parser + matcher + admit_policy + bind_rule + birth_rule + effect_policy + deployment + trust_posture.Port; compiles into compiled_port_bindings and the boundary side of admission/discharge machinery.PortBinding::new("trello_pipeline_watch")
.direction("ingress")
.source("trello")
.source_kind("board_watch")
.credential("oauth_workspace_token")
.protocol("https_webhook")
.parser("trello_card_event")
.material_contract("trello.pipeline.event")
.matcher("list_and_label_match")
.admit_policy("mapped_operator_action_only")
.bind_rule("credit_request_keys")
.birth_rule("deny")
.deployment("mx-prod-west")
.trust_posture("operator_observation_only");
Facedeclares the semantic aperture where caught material becomes candidate datum under authored rules.
id, kind, source refs, port refs, optional port-binding refs, ruleset ref, target proto bays, optional admitted datum kinds, and reject/quarantine outlets.PortBinding explicitly.Datum through machinery admit; referenced by routes as datum_face.Face::write("whatsapp_flow")
.sources(["whatsapp_business_api"])
.ports(["finexa_http_ingress"])
.port_bindings(["whatsapp_flow_in"])
.ruleset("whatsapp_flow_rules")
.targets(["party", "credit_request"]);
Rulesetdeclares the executable boundary and transformation graph. rulesets are declarative operator DAGs, not opaque blobs.
id, face or effect context, optional boundary contract refs, stage graph, input datum or payload contracts, output contracts, schema/version handling, and explicit operator nodes.map, filter, join, window, aggregate, project, schema_map, quarantine, reject.Ruleset::new("whatsapp_flow_rules")
.input("flow_submission")
.stage("schema_map", "version_form_schema")
.stage("map", "map_form_fields")
.stage("filter", "require_pending_request_ref")
.stage("quarantine", "schema_drift_or_missing_identity");
Protodeclares the semantic schema and the maintenance contract for one durable kind. proto is the field-level queryable meaning surface of the world.
id, optional name, description, keys, lookups, relations, field set, optional field groups, and maintenance defaults.Proto::new("credit")
.key("credit_id")
.lookup("fibo_credit_id")
.lookup("croop_credit_id")
.field(ProtoField::string("credit_id").required())
.field(ProtoField::money("principal_balance").group("balance"))
.field(ProtoField::enum_("status").group("lifecycle"));
ProtoFielddeclares one field inside a proto, including type and maintenance semantics.
FieldBinding, never inside BindStrategy.Proto; referenced by FieldBinding and field-group authority policies.ProtoField::money("principal_balance")
.nullable(false)
.group("balance")
.derive_mode("aggregate")
.required_for_shape(true);
FieldBindingdeclares how one proto field is maintained from one or more upstream sources or ruleset outputs.
Proto; lowered into compiled field hydration/query plans.FieldBinding::for_field("principal_balance")
.from_face("croop_api")
.via_ruleset("croop_api_rules")
.join_on([("croop_credit_id", "croop_credit_id")])
.fresh_for("4h")
.on_missing("preserve_previous_and_raise_drift");
ProtoBaydeclares identity crossing for one proto: which faces may approach, how bind precedence works, when birth is allowed, and what lane/authority defaults apply.
route, place, and commit; compiles into crossing policy.ProtoBay::new("credit_request")
.intake(["qr_entry", "whatsapp_chat", "whatsapp_flow", "trello_pipeline"])
.bind(BindStrategy::by_precedence([
KeyRef::field("request_id"),
KeyRef::compound(["qr_context_id", "phone"]),
KeyRef::field("trello_card_id"),
]))
.birth(BirthStrategy::new().when("commit").requires(["phone"]).shape("minimal_shell").on_fail("quarantine"))
.lane(LanePolicy::explicit("credit_request/request_id"));
Processdeclares one FSM of lawful motion over a durable kind or cross-kind operating track.
id, tracked proto or family, statuses, transitions, and optional route attachments.Process::new("risk_review")
.status(ProcessStatus::new("pending_bureau"))
.status(ProcessStatus::new("analyst_review"))
.status(ProcessStatus::terminal("approved"))
.transition(ProcessTransition::new("analyst_review", "approved"));
ProcessStatusdeclares one named process state.
Process; referenced by transitions and viewer track rendering.ProcessStatus::terminal("approved").label("approved")
ProcessTransitiondeclares one legal edge in a process FSM, including any required side effects or guards.
Process; consumed by Route and compiled track logic.ProcessTransition::new("analyst_review", "approved")
.via_route("risk.review.decide")
.effects(["notify_mattermost"]);
Routedeclares one legal interpretation path for one admitted datum family.
id, datum face, eligible datum kind, touched proto bays, process transition, lane policy, commit fact kinds, birth permissions, effects/obligations, authority override, discharge override, and failure/quarantine policy.RouteSelection at runtime and drives decide plus commit.Route::new("activation.credit.create")
.datum_face("trello_pipeline")
.datum_kind("normalized_activation_command")
.touches(["credit", "credit_request"])
.process_transition("activation:approved->active")
.lane(LanePolicy::explicit("credit_request/request_id"))
.commit_facts(["credit.created", "credit_request.linked"])
.births(["credit"])
.effects(["create_or_move_trello_card", "sync_to_fibo"])
.on_fail("quarantine");
Effectdeclares one outbound obligation family owed to the outside world.
id, effect face, destination source, payload contract, discharge policy, retry/escalation hints, and emitted receipt kinds.ObligationEnvelope values; closed by DischargeReceipt.Effect::new("sync_to_fibo")
.through_face("fibo_outbound")
.payload("credit_sync_payload")
.discharge(DischargePolicy::new().receipt("fibo.accepted").timeout("30m"));
Projectiondeclares one read surface or derived operational view over durable record.
id, source protos or processes, readout intent, refresh mode, and screen affinity.Projection::new("active_credits_lens")
.from_protos(["credit"])
.from_process("servicing")
.kind("readout_lens");
LanePolicydeclares how one admitted route resolves to its local serial commit domain.
place.LanePolicy::explicit("credit_request/request_id")
BindStrategydeclares identity-only matching precedence for entering a proto bay.
ProtoBay; compiled into crossing policy.BindStrategy::by_precedence([
KeyRef::field("request_id"),
KeyRef::compound(["qr_context_id", "phone"]),
KeyRef::field("trello_card_id"),
])
BirthStrategydeclares composable birth law. mental model: when + requires + shape + on_fail.
ProtoBay; consulted during commit.BirthStrategy::new()
.when("commit")
.requires(["phone"])
.shape("minimal_shell")
.on_fail("quarantine")
AuthorityPolicydeclares who is canonical for maintained truth. granularity is world default, proto field-group policy, and route override.
balance, lifecycle, and external_refs must be nameable and governable.authority_matrix; checked during commit and sync discharge.AuthorityPolicy::world_canonical()
.field_group("balance", "compiled_world")
.observe_from_faces(["croop_api"])
.writeback_effects(["sync_to_fibo"]);
DischargePolicydeclares what closes an obligation. mental model: satisfying receipt kinds plus timeout, escalation, and terminal failure behavior.
Effect or route override; compiled into discharge rules and emitted DischargeReceipt matching logic.DischargePolicy::new()
.receipt("fibo.accepted")
.timeout("30m")
.escalate("notify_mattermost")
.on_terminal_failure("raise_fault");
SetSpecroot authored set artifact. it places semantic landmarks in district-local 3d space without redefining world law.
AuthoredSet; compiles into CompiledSet.let set = SetSpec::new("finexa_credit_world")
.world("finexa_credit_world")
.district(DistrictPlacement::new("center").origin([0.0, 0.0, 0.0]))
.anchor(AnchorPlacement::new("credit_request").district("center").at([0.0, 0.0, 0.0]));
DistrictPlacementdeclares one local spatial frame for a semantic district such as west, center, north, east, or south.
SetSpec; used when resolving placements.DistrictPlacement::new("center")
.origin([0.0, 0.0, 0.0])
.extent([14.0, 8.0, 6.0]);
FacePlacementplaces one semantic face landmark in district-local space.
SetSpec; compiled into a face landmark in CompiledSet.FacePlacement::new("whatsapp_flow")
.district("west")
.at([1.5, 3.0, 0.5]);
AnchorPlacementplaces one proto anchor orb in district-local space.
SetSpec; compiled into anchor nodes.AnchorPlacement::new("credit")
.district("center")
.at([4.0, 0.5, 0.0]);
TrackPlacementplaces one process track using semantic connection points plus optional control points.
SetSpec; compiled into track geometry and stop metadata.TrackPlacement::new("activation")
.district("north")
.connect("credit_request", "credit")
.control_points([[1.5, 1.0, 0.0], [2.5, 1.2, 0.0]]);
DockPlacementplaces one outbound effect dock in district-local space.
SetSpec; compiled into dock landmarks.DockPlacement::new("sync_to_fibo")
.district("south")
.at([3.0, -2.0, 0.0]);
ScreenPlacementplaces one projection screen or readout slab in district-local space.
SetSpec; compiled into screen landmarks.ScreenPlacement::new("active_credits_lens")
.district("east")
.at([2.0, 1.0, 0.0]);
CameraHintauthors basic camera intent for default world framing, focus zones, or entry views.
SetSpec; exposed to viewer defaults.CameraHint::new("default_finexa_view")
.target_districts(["west", "center", "north"])
.offset([0.0, 0.0, 18.0]);
LensHintauthors basic readout and overlay emphasis intent for a screen or viewport lens.
SetSpec; consumed by viewer/frame defaults.LensHint::new("risk_queue_focus")
.projection("risk_queue")
.show_channels(["attempts", "obligations", "faults"]);
finexa authored world snippet
let world = WorldSpec::new("finexa_credit_world")
.schema_edition("2026.q1")
.source(Source::webhook("whatsapp_business_api"))
.port(Port::https("finexa_http_ingress"))
.face(
Face::write("whatsapp_flow")
.sources(["whatsapp_business_api"])
.ports(["finexa_http_ingress"])
.ruleset("whatsapp_flow_rules")
.targets(["party", "credit_request"]),
)
.proto(
Proto::new("credit_request")
.key("request_id")
.lookup("qr_context_id")
.lookup("trello_card_id")
.lookup("phone")
.field(ProtoField::string("request_id").required())
.field(ProtoField::string("phone").group("identity"))
.field(ProtoField::enum_("status").group("lifecycle"))
.binding(
FieldBinding::for_field("status")
.from_face("trello_pipeline")
.via_ruleset("trello_pipeline_rules")
.fresh_for("1h")
.on_missing("preserve_previous"),
),
)
.proto_bay(
ProtoBay::new("credit_request")
.intake(["qr_entry", "whatsapp_chat", "whatsapp_flow", "trello_pipeline"])
.bind(BindStrategy::by_precedence([
KeyRef::field("request_id"),
KeyRef::compound(["qr_context_id", "phone"]),
KeyRef::field("trello_card_id"),
]))
.birth(BirthStrategy::new().when("commit").requires(["phone"]).shape("minimal_shell").on_fail("quarantine"))
.lane(LanePolicy::explicit("credit_request/request_id")));
finexa authored set snippet
let set = SetSpec::new("finexa_credit_world")
.world("finexa_credit_world")
.district(DistrictPlacement::new("west").origin([0.0, 0.0, 0.0]))
.district(DistrictPlacement::new("center").origin([16.0, 0.0, 0.0]))
.district(DistrictPlacement::new("north").origin([16.0, 10.0, 0.0]))
.face(FacePlacement::new("whatsapp_flow").district("west").at([1.5, 2.0, 0.5]))
.anchor(AnchorPlacement::new("credit_request").district("center").at([0.0, 0.0, 0.0]))
.anchor(AnchorPlacement::new("credit").district("center").at([4.0, 0.5, 0.0]))
.track(
TrackPlacement::new("activation")
.district("north")
.connect("credit_request", "credit")
.control_points([[1.5, 0.8, 0.0], [2.8, 1.2, 0.0]]),
)
.dock(DockPlacement::new("sync_to_fibo").district("south").at([3.0, -2.0, 0.0]))
.screen(ScreenPlacement::new("active_credits_lens").district("east").at([2.0, 1.0, 0.0]));
this is rust-embedded authoring, not a textual mini-language pasted into strings. the dsl remains regular rust data construction so normal tests, refactors, traits, and code review still apply.
the compiler exists to make authored law executable, not to invent missing law.
compiled artifacts are the first implementation-facing IR. they freeze authored slugs into resolved handles, lower boundary and field plans into executable policy,
and carry every topology element the static viewer needs. ViewerFrame stays thin because compiled artifacts already own topology, positions, labels, and handles.
this section stays high-level on purpose. the full typed compiler reference now lives in compiler ir spec, including the rust-only normalization layers, the typed lowered ruleset dag, the strict expression ast, the precedence products, and the full symbol/strata mini-map on every surface.
CompiledWorlddeterministic world IR for law, machinery, replay, and viewer adapters.
meta, authored_world_ref, resolved_ids, compiled_sources, compiled_ports, compiled_port_bindings, compiled_faces, compiled_rulesets, compiled_protos, compiled_proto_bays, compiled_processes, compiled_routes, compiled_projections, bind_plans, birth_plans, lane_key_plans, authority_matrix, discharge_rules, viewer_handles, and compile_diagnostics.route.lane_policy_override > proto_bay.lane_policy; authority resolves as route.authority_override > proto.field_group_policy > world.default_authority; discharge resolves as route.discharge_override > effect.discharge_policy; bind/birth strategy resolves only from ProtoBay.Law, Machinery, Readout, and static/dynamic viewer loaders.high-level summary only here. full typed catalog: compiler_ir_spec.html#compiled-world compiler_ir_spec.html#resolved-ids-public compiler_ir_spec.html#compiled-route
CompiledPortBindingthe lowered boundary object for one deployed source composition path.
Datum.CompiledWorld; consumed by admit and outbound delivery/discharge machinery.CompiledPortBinding {
binding_id: "pb_whatsapp_flow_in_01...",
port_id: "prt_finexa_http_ingress_01...",
source_id: "src_whatsapp_business_api_01...",
protocol_adapter: "https_webhook",
parser_plan: "flow_submission.v3",
matcher_plan: "request_ref_and_phone",
trust_posture: "signed_vendor_boundary",
}
CompiledSetdeterministic scene IR resolved against compiled world ids.
meta, authored_set_ref, compiled_world_ref, districts, face_placements, anchors, tracks, docks, screens, semantic_connection_points, optional control_points, resolved_global_positions, derived_conduits, derived_gates, derived_switches, derived_chambers, relation_bridges, overlay_channels, default_labels, default_camera_state, default_lens_state, and compile_diagnostics.CompiledWorld; ViewerFrame never duplicates them.high-level summary only here. full typed catalog: compiler_ir_spec.html#compiled-set compiler_ir_spec.html#resolved-district compiler_ir_spec.html#resolved-track
| policy surface | declaration sites | compile-time resolution | ambiguity rule |
|---|---|---|---|
| lane | Route, ProtoBay |
route.lane_policy_override > proto_bay.lane_policy |
missing resolution is a compile error; same-tier conflicts are compile errors |
| authority | Route, Proto.field_group_policy, WorldSpec.default_authority |
route.authority_override > proto.field_group_policy > world.default_authority |
same-tier conflicts are compile errors; illegal truth promotion is rejected in compilation |
| discharge | Route, Effect |
route.discharge_override > effect.discharge_policy |
same-tier conflicts are compile errors; unresolved discharge means the effect is illegal |
| bind/birth | ProtoBay, route birth permission |
ProtoBay defines bind/birth strategy; route may allow or deny authored birth targets but may not redefine strategy |
route-side strategy redefinition is a compile error |
the operator split from section 1 becomes the rust execution boundary here:
pub trait Compiler {
fn compile_world(&self, world: &AuthoredWorld) -> CompiledWorld;
fn compile_set(&self, set: &AuthoredSet, world: &CompiledWorld) -> CompiledSet;
}
pub trait Law {
fn decide(
&self,
world: &CompiledWorld,
snapshot: &WorldSnapshot,
route: &RouteSelection,
datum: &Datum,
) -> Vec<Proposal>;
}
pub trait Machinery {
fn admit(
&self,
world: &CompiledWorld,
intake: SourceMaterial,
face_id: FaceId,
) -> AdmitOutcome;
fn route(
&self,
world: &CompiledWorld,
datum: &Datum,
) -> Vec<RouteSelection>;
fn spawn(
&self,
world: &CompiledWorld,
datum: &Datum,
route: &RouteSelection,
) -> Attempt;
fn place(
&self,
world: &CompiledWorld,
attempt: &Attempt,
) -> LaneKey;
fn commit(
&self,
world: &CompiledWorld,
snapshot: &WorldSnapshot,
attempt: &Attempt,
lane: &LaneKey,
route: &RouteSelection,
datum: &Datum,
proposals: &[Proposal],
) -> CommitResult;
}
pub trait Readout {
fn measure(
&self,
world: &CompiledWorld,
records: &[RecordEnvelope],
) -> ReadoutState;
}
pub trait Staging {
fn render(
&self,
set: &CompiledSet,
readout: &ReadoutState,
live: &ViewerFrame,
) -> Picture;
}
protobuf contracts stop at durable or boundary-relevant artifacts. Datum, RouteSelection, Attempt, LaneKey,
Receipt, RecordEnvelope, ObligationEnvelope, DischargeReceipt, ReplayInput, and
ViewerFrame are contract types. SourceMaterial, AdmitOutcome, WorldSnapshot, CommitResult,
ReadoutState, and Picture are Rust-only internal shapes with explicit mappings documented below.
| runtime type | status | durability rule |
|---|---|---|
Datum |
admitted boundary input | durable ingress truth for replay and traceability |
RouteSelection |
chosen path for one admitted datum | durable as part of attempt and replay input |
Attempt |
one concrete runtime responsibility | durable coordination record |
LaneKey |
resolved local commit domain | durable wherever attempt or record needs commit ordering |
Proposal |
law output, not truth | transient by default; may be persisted for diagnostics, but replay must not depend on proposal storage |
Receipt |
commit summary | durable runtime outcome |
RecordEnvelope |
durable committed fact | authoritative immutable fact atom; the only durable runtime truth besides obligations and discharge receipts |
ObligationEnvelope |
durable promise to the outside | authoritative until discharged or failed terminally |
DischargeReceipt |
proof of obligation discharge | durable runtime truth |
ReplayInput |
reconstruction bundle | durable replay contract |
ViewerFrame |
viewer/live envelope | derived or mocked; never the authoritative record |
CommitResult is the runtime join point: it contains a Receipt, emitted RecordEnvelope values, and emitted
ObligationEnvelope values. only records change world truth. obligations change what the world owes. receipts summarize what happened.
RecordEnvelopedurable committed truth. each record carries one immutable fact atom and never stores a diff as canonical truth.
record_id, route_id, attempt_id, lane_key, affected epi refs, timestamps, provenance refs, and fact_atom.fact_atom union. exactly one of event, assertion, relation_fact, or observation.diff is never durable truth. diffs, snapshots, and projections are derived from committed fact atoms.observation may maintain proto fields only when a FieldBinding explicitly consumes observations and the resolved authority matrix allows that source for the relevant field group.RecordEnvelope {
record_id: "rec_01...",
route_id: "activation.credit.create",
attempt_id: "att_01...",
lane_key: "credit_request:req_942",
affected_epi_ids: ["credit:cr_443", "credit_request:req_942"],
fact_atom: {
event: {
kind: "credit.created",
credit_id: "cr_443",
request_id: "req_942"
}
}
}
ObligationEnvelopedurable runtime promise owed by the world to an external boundary.
obligation_id, effect_id, through-face ref, payload ref or payload hash, discharge rule ref, retry state, timeout state, and terminal status.DischargeReceipt closes it or it reaches terminal failure according to authored policy.ObligationEnvelope {
obligation_id: "obl_01...",
effect_id: "sync_to_fibo",
through_face: "fibo_outbound",
discharge_rule_id: "dr_sync_to_fibo_receipt",
status: "owed"
}
ViewerFramethin viewer/live envelope. it references compiled artifacts and runtime truth but does not duplicate topology.
meta, compiled_world_ref, compiled_set_ref, camera state, visible districts/layers, selection, hover/highlight state, pinned entities, live attempt refs, live obligation refs, and optional mocked overlay slots such as lag, faults, and pulses.CompiledWorld plus CompiledSet. static ViewerFrame only seeds presentation state.ViewerFrame {
meta: ArtifactMeta { schema_edition: "2026.q1", producer_semver: "0.1.0", schema_hash: "sha256:..." },
compiled_world_ref: "fixtures/finexa/compiled_world.pbjson",
compiled_set_ref: "fixtures/finexa/compiled_set.pbjson",
camera_state: { preset: "default_overview" },
visible_districts: ["west", "center", "north", "east", "south"],
selection: "credit_request",
live_attempts: ["att_01..."],
live_obligations: ["obl_01..."],
mocked_overlays: {
lag: [],
faults: [],
pulses: ["activation.credit.create"]
}
}
these nouns stay in rust land. they are allowed as internal execution surfaces only because their protobuf boundary mappings are explicit.
| internal type | role | protobuf mapping |
|---|---|---|
SourceMaterial |
raw boundary input after transport/auth/parsing but before semantic admission | maps into admitted Datum plus intake diagnostics |
AdmitOutcome |
internal result of running admit |
maps into Datum, route candidates, reject/quarantine diagnostics |
WorldSnapshot |
assembled execution read model over compiled world plus committed truth | materialized from CompiledWorld, RecordEnvelope[], and ObligationEnvelope[] |
CommitResult |
internal join point at commit | maps into one Receipt, zero or more RecordEnvelope, zero or more ObligationEnvelope, and optional DischargeReceipt |
ReadoutState |
internal staged read model before viewer framing | maps into ViewerFrame inputs and derived presentation state |
Picture |
final render product for one staging backend | no protobuf contract; terminal backend output only |
| topic | rule | implementation consequence |
|---|---|---|
| compiler posture | explicit authoring is required for ontology, routes, bind/birth, key precedence, lane policy, authority, discharge, and effects | compiler inference stays narrow: ids, obvious scene edges, default districts, default layout hints, viewer handles |
| bind/birth | every ProtoBay declares ordered bind precedence and explicit birth strategy |
missing or ambiguous resolution goes to quarantine unless the authored birth strategy explicitly allows birth |
| lane policy | every route or proto bay declares an explicit LanePolicy |
compiler resolves one lane key plan per admitted route; fanout means multiple admitted routes, not one multi-domain commit blob |
| precedence | route overrides enclosing policy; proto policy overrides world defaults; same-tier conflicts are illegal | ambiguity is a compile error for lane, authority, and discharge; runtime never guesses between authored policies |
| authority | compiled/runtime world is canonical for balances and servicing truth | croop, fibo, sheets, trello, and similar systems can observe, mirror, or receive syncs, but they do not silently become ontology |
| trello | only explicitly mapped trello/operator actions may become admitted datums for legal routes | raw card/list/archive state is never canonical business truth by itself |
| credit birth | activation.credit.create births credit at commit |
external sync receipts may confirm delivery and discharge obligations, but may not define birth |
| payment truth | payments become canonical at reconciliation commit | sheet visibility or vendor visibility may confirm or drift-check, but does not define the payment fact |
| record algebra | RecordEnvelope.fact_atom is exactly one of event, assertion, relation_fact, or observation |
diffs and snapshots stay derived; replay and proto maintenance run over immutable fact atoms only |
| discharge | only declared receipts may discharge declared obligations | delivery success must be captured as DischargeReceipt; external state change without matching receipt does not close the obligation |
| viewer bootstrap | compiled artifacts own topology, positions, labels, and handles | the first static viewer loads CompiledWorld, CompiledSet, and a thin ViewerFrame without inventing new graph structure |
finexa key precedence
party party_id > government_id > phone > employee_code credit_request request_id > (qr_context_id + phone) > trello_card_id credit credit_id > fibo_credit_id > croop_credit_id payment payment_id > (external_payment_ref + credit_id)
discharge stance
send / sync obligation commit creates obligation effect face attempts delivery declared receipt matches policy DischargeReceipt closes obligation no receipt = still owed external side effect without record ≠ world truth
the first static viewer target is the canonical Finexa specimen set: authored world + authored set + compiled world + compiled set + thin static frame.
the normative fixture paths are fixtures/finexa/authored_world.pbjson, fixtures/finexa/authored_set.pbjson,
fixtures/finexa/compiled_world.pbjson, fixtures/finexa/compiled_set.pbjson, and
fixtures/finexa/static_viewer_frame.pbjson.
authored world snippet
let world = WorldSpec::new("finexa_credit_world")
.schema_edition("2026.q1")
.source(Source::webhook("whatsapp_business_api"))
.port(
Port::https("finexa_http_ingress")
.binding(
PortBinding::new("whatsapp_flow_in")
.direction("ingress")
.source("whatsapp_business_api")
.source_kind("flow_submission")
.credential("signed_vendor_secret")
.protocol("https_webhook")
.parser("flow_submission_v3")
.material_contract("whatsapp.flow.submission")
.matcher("request_ref_and_phone")
.admit_policy("require_request_ref")
.bind_rule("credit_request_keys")
.birth_rule("deny")
.deployment("mx-prod-west")
.trust_posture("signed_vendor_boundary"),
),
)
.face(
Face::write("whatsapp_flow")
.sources(["whatsapp_business_api"])
.ports(["finexa_http_ingress"])
.port_bindings(["whatsapp_flow_in"])
.ruleset("whatsapp_flow_rules")
.targets(["party", "credit_request"]),
)
.proto(
Proto::new("credit")
.field(ProtoField::money("principal_balance").group("balance"))
.field_binding(
FieldBinding::for_field("principal_balance")
.from_face("croop_api")
.via_ruleset("croop_api_rules")
.join_on([("croop_credit_id", "croop_credit_id")])
.on_missing("preserve_previous_and_raise_drift"),
),
)
.proto_bay(
ProtoBay::new("credit_request")
.intake(["qr_entry", "whatsapp_chat", "whatsapp_flow", "trello_pipeline", "google_form_interview", "docs_upload"])
.bind(BindStrategy::by_precedence([
KeyRef::field("request_id"),
KeyRef::compound(["qr_context_id", "phone"]),
KeyRef::field("trello_card_id"),
]))
.birth(BirthStrategy::minimal_shell())
.lane(LanePolicy::explicit("credit_request/request_id")),
)
.route(
Route::new("activation.credit.create")
.datum_face("trello_pipeline")
.touches(["credit", "credit_request"])
.births("credit")
.lane(LanePolicy::explicit("credit_request/request_id"))
.authority(AuthorityPolicy::world_canonical())
.discharge(DischargePolicy::by_receipt("fibo.accepted"))
.effects(["create_or_move_trello_card", "sync_to_fibo"]),
);
authored set snippet
let set = SetSpec::new("finexa_credit_world")
.district("west").origin([0.0, 0.0, 0.0]).extent([12.0, 8.0, 6.0]).members(["qr_entry", "whatsapp_chat", "whatsapp_flow", "google_form_interview", "docs_upload", "croop_api"])
.district("center").origin([18.0, 0.0, 0.0]).extent([14.0, 8.0, 6.0]).members(["party", "credit_request", "credit", "payment"])
.district("north").origin([18.0, 12.0, 0.0]).extent([14.0, 6.0, 4.0]).members(["origination", "risk_review", "activation", "servicing"])
.district("east").origin([36.0, 0.0, 0.0]).extent([10.0, 8.0, 6.0]).members(["pipeline_board", "active_credits_lens", "trello_pipeline", "trello_outbound", "fibo_outbound"])
.district("south").origin([18.0, -12.0, 0.0]).extent([14.0, 6.0, 4.0]).members(["create_or_move_trello_card", "sync_to_fibo"])
.anchor(AnchorPlacement::new("credit_request").district("center").at([0.0, 0.0, 0.0]))
.anchor(AnchorPlacement::new("credit").district("center").at([4.0, 0.0, 0.0]))
.track(
TrackPlacement::new("risk_review")
.district("north")
.connect("credit_request", "credit_request")
.from_point([-0.2, 1.4, 0.0])
.to_point([0.2, 1.4, 0.0])
.control_points([[1.4, 2.2, 0.0], [-1.4, 2.2, 0.0]]),
)
.track(
TrackPlacement::new("activation")
.district("north")
.connect("credit_request", "credit")
.from_point([0.5, 0.0, 0.0])
.to_point([3.5, 0.0, 0.0])
.control_points([[1.5, 0.8, 0.0], [2.5, 0.8, 0.0]]),
)
.dock(DockPlacement::new("sync_to_fibo").district("south").at([3.0, -2.0, 0.0]));
compiled world excerpt
CompiledWorld {
meta: ArtifactMeta {
schema_edition: "2026.q1",
producer_semver: "0.1.0",
schema_hash: "sha256:...",
git_commit: Some("...")
},
resolved_ids: {
world: "cw.finexa_credit_world",
faces: { "trello_pipeline": "cw.finexa_credit_world.face.trello_pipeline" }
},
compiled_port_bindings: {
"whatsapp_flow_in": {
source_ref: "cw.finexa_credit_world.source.whatsapp_business_api",
matcher_plan: "request_ref_and_phone",
trust_posture: "signed_vendor_boundary"
}
},
compiled_processes: {
"activation": {
statuses: ["approved", "active"],
transitions: [{ from: "approved", to: "active", effects: ["create_or_move_trello_card", "sync_to_fibo"] }]
}
},
compiled_routes: {
"activation.credit.create": {
lane_key_plan: "credit_request.request_id",
birth_targets: ["credit"],
authority: "AUTHORITY_OWNER_COMPILED_WORLD",
discharge_rules: ["sync_to_fibo"],
process_transition: { process: "activation", from: "approved", to: "active" }
}
},
authority_matrix: {
"credit.balance.*": "AUTHORITY_OWNER_COMPILED_WORLD",
"trello.card_state": "AUTHORITY_OWNER_PROJECTION_ONLY",
"croop.balance_snapshot": "AUTHORITY_OWNER_BOUNDARY_OBSERVATION_ONLY"
},
compile_diagnostics: []
}
compiled set excerpt
CompiledSet {
compiled_world_ref: "fixtures/finexa/compiled_world.pbjson",
districts: {
"center": { origin: [18.0, 0.0, 0.0], extent: [14.0, 8.0, 6.0], members: ["party", "credit_request", "credit", "payment"] }
},
anchors: {
"credit_request": { global_position: [18.0, 0.0, 0.0] },
"credit": { global_position: [22.0, 0.0, 0.0] }
},
tracks: {
"activation": {
from: "credit_request",
to: "credit",
semantic_connection_points: { from_point: [18.5, 12.0, 0.0], to_point: [21.5, 12.0, 0.0] },
control_points: [[19.5, 12.8, 0.0], [20.5, 12.8, 0.0]]
}
},
derived_conduits: ["west.whatsapp_flow->center.credit_request"],
relation_bridges: ["credit_request->credit"],
default_camera_state: { preset: "default_overview" }
}
runtime truth excerpt
Attempt {
attempt_id: "att_01...",
datum_id: "dat_01...",
route_id: "activation.credit.create",
lane_key: "credit_request:req_942",
}
RecordEnvelope {
record_id: "rec_01...",
route_id: "activation.credit.create",
attempt_id: "att_01...",
lane_key: "credit_request:req_942",
affected_epi_ids: ["credit:cr_443", "credit_request:req_942"],
fact_atom: {
event: { kind: "credit.created", credit_id: "cr_443", request_id: "req_942" }
}
}
ObligationEnvelope {
obligation_id: "obl_01...",
effect_id: "sync_to_fibo",
through_face: "fibo_outbound",
discharge_rule_id: "dr_sync_to_fibo_receipt"
}
viewer frame excerpt
ViewerFrame {
meta: ArtifactMeta {
schema_edition: "2026.q1",
producer_semver: "0.1.0",
schema_hash: "sha256:..."
},
compiled_world_ref: "fixtures/finexa/compiled_world.pbjson",
compiled_set_ref: "fixtures/finexa/compiled_set.pbjson",
camera_state: { preset: "default_overview" },
visible_districts: ["west", "center", "north", "east", "south"],
selection: "credit_request",
highlight_state: { highlighted_routes: ["activation.credit.create"] },
live_attempts: ["att_01..."],
live_obligations: ["obl_01..."],
mocked_overlays: {
lag: [],
faults: [],
pulses: ["activation.credit.create"]
}
}
the first viewer slice may mock overlays, but the shape is already the real contract shape. later runtime wiring swaps the producer, not the ontology.
fixture set
fixtures/finexa/ authored_world.pbjson authored_set.pbjson compiled_world.pbjson compiled_set.pbjson static_viewer_frame.pbjson
these are the canonical bootstrap artifacts for the first static viewer and for fixture-driven contract tests.
contract shape
WorldSpec and SetSpec round-trip into authored protobuf artifacts without hidden fields.PortBinding, not ad hoc handler glue.semantic law
FieldBinding and resolved authority.viewer + replay
required property tests when code lands compile(authored) is deterministic lane_key(route, bind_result) is deterministic bind_or_birth obeys precedence and explicit birth policy port_binding(face, source_material) is contract-compatible or compile fails activation.credit.create is the only credit birth route discharge only occurs on declared receipts observation updates require explicit field binding + authority replay(records) -> viewer_frame is deterministic for deterministic overlays