ADR-006: Proto as Single Source of Truth

Date: 2026-02-01 Updated: 2026-09-18 Status: Done

Every shape the node and the browser both speak is declared in a .proto and generated from there. The Context below describes the state this replaced.

One thing it turned out proto has no honest home for, because it is not a wire shape and is held to its Go source by a test instead:

web/ts/sym.ts is the UI's own, not a copy of Go: the symbol, the one place a segment is mapped to a glyph.

Context

We currently maintain type definitions in multiple places:

Decision

Use Protocol Buffers (.proto files) as the single source of truth for shared type definitions.

Consequences

Positive

Negative

Language-Specific

Rust: Uses proto-generated types from qntx-proto crate (prost)

TypeScript: Uses proto-generated interfaces only (see ADR-007)