ViewSpec Demo

The Invariants

The Invariants

Three compiler guarantees rendered side by side: exactly-once provenance, semantic grouping, and strict ordering.

Three compiler guarantees rendered side by side: exactly-once provenance, semantic grouping, and strict ordering.
compiler = reference
valid states = ViewSpecBuilder + compile()
violations = copied IR + diagnostics

Invariant 1

Exactly-Once Provenance

Exactly-Once Provenance

Every binding must route to one rendered IR node: nothing dropped, nothing duplicated.

Every binding must route to one rendered IR node: nothing dropped, nothing duplicated.
VALID: 4/4 bindings routed exactly once.
North Region
$420K
South Region
$365K
West Region
$288K
Partner
$96K
VIOLATION: row_2_value is routed twice while keeping the same binding and semantic address.
DUPLICATE_ROUTING
Binding 'row_2_value' routed to multiple IR nodes
North Region
$420K
South Region
$365K
West Region
$288K
$365K
Partner
$96K

Invariant 2

Semantic Grouping

Semantic Grouping

Bindings from one semantic node stay inside the same visual group.

Bindings from one semantic node stay inside the same visual group.
VALID: Each dashboard card contains only sibling bindings from the same semantic node.
Revenue
$2.4M
Pipeline
$8.1M
Retention
94%
VIOLATION: card_1_label is grouped with card_2_value, crossing semantic boundaries.
GROUP_VIOLATION
Binding 'card_1_label' grouped with non-sibling 'card_2_value'
Revenue
$8.1M
$2.4M
Pipeline
Retention
94%

Invariant 3

Strict Ordering

Strict Ordering

Rendered order must follow the substrate and ordered group declaration.

Rendered order must follow the substrate and ordered group declaration.
VALID: Rows render in declared order: row_1, row_2, row_3, row_4.
Step 1
Discover
Step 2
Design
Step 3
Build
Step 4
Ship
VIOLATION: row_3 renders before row_2 even though it was declared after it.
ORDER_VIOLATION
Binding 'row_3_label' precedes 'row_2_label' but was declared after it in the substrate
Step 1
Discover
Step 3
Build
Step 2
Design
Step 4
Ship