Architecture Decision Record

ADR-0037: Envelope Metadata Is System-Level; Fact Body Is Domain-Level

Status: Accepted · Date: 2026-03-06

Status: Accepted

Date: 2026-03-06

Context

Messaging systems classically distinguish header from body: the header carries meta-information such as origin and destination, while the body carries the transmitted application data. :contentReference[oaicite:0]{index=0}

BSFG already adopted:

message = envelope + fact
fact    = (subject, predicate, object_json)

The remaining architectural question is not whether both parts exist, but whether teams are allowed to blur them by placing policy, routing, or lineage semantics into the fact body, or by placing domain meaning into envelope metadata.

Options Considered

Option Description Benefits Drawbacks
Loose mixed model Allow envelope and fact body to carry whichever metadata is convenient for each producer.

|

| | Everything in the body | Treat the envelope as minimal transport glue and move most metadata into the fact body. |

|

| | Everything in the envelope | Push semantic meaning upward into metadata and keep the body opaque. |

|

| | Strict separation of system metadata and domain fact content (Selected) | Envelope carries system-level metadata; fact body carries domain-level assertions only. |

|

|

Decision

BSFG enforces a strict semantic separation:

envelope = system-level metadata
fact     = domain-level assertion

Therefore:

This matches the classic message-header/body split in messaging systems, where headers carry meta-information used by the messaging system and the body carries the actual application data. :contentReference[oaicite:1]{index=1}

Consequences

Benefits:

Tradeoffs: