Architecture Decision Record

ADR-0016: Subject Identity Uses Kind With Optional Scope

Status: Accepted · Date: 2026-03-06

Status: Accepted

Date: 2026-03-06

Context

Every BSFG fact is anchored by a subject. Subject identity must be stable across replay, compact enough to live comfortably in message metadata, and flexible enough to represent both single-site and multi-site deployments.

The subject grammar must also avoid collapsing distinct concerns into one token. In particular:

Options Considered

Option Description Benefits Drawbacks
Opaque UUID only Use a globally unique identifier with no kind prefix or readable structure.

|

| | Hierarchical path with mandatory full scope | Encode full site, area, line, and object path inside the subject string. |

|

| | Kind plus opaque ID only | Always use kind:id with no scope capability. |

|

| | Kind with optional scope (Selected) | Use kind:id by default, with optional kind:scope/id where multi-site or namespace disambiguation is required. |

|

|

Decision

BSFG subject identity uses the following grammar:

kind:id
kind:scope/id

Rules:

Examples:

batch:B1042
asset:FILLER-07
batch:PlantA/B1042
asset:PlantB/FILLER-07
lot:PlantA/RM-8821
document:QMS/SOP-123.v4

Subjects must not absorb unrelated concerns such as priority, retention, network lane, or approval state. Those belong elsewhere in the model.

Consequences

Benefits:

Tradeoffs: