SOTER
Projection Layout Strategies Specification
Purpose
This specification defines layout as a distinct concern of projection products. VGM describes visual graph data. The projection pipeline creates products. Layout chooses coordinates, dimensions, spacing, routing, and text measurement for products that need visual geometry.
Scope
This document covers:
- layout strategy boundaries;
- meet-in-the-middle layout;
- text metrology;
- deterministic and external layout engines;
- product-specific layout constraints.
Non-Goals
- This document does not define semantic graph construction; see LogosSvoSemanticsSpec.md.
- This document does not define VGM schema fields; see ProjectionVgmSpecification.md.
- This document does not define BPMN notation behavior; see ProjectionBpmn.md.
Terminology
| Term | Meaning |
|---|---|
| Layout strategy | Algorithm or engine that assigns positions, sizes, and routes. |
| Text metrology | Measurement of rendered text dimensions before final geometry. |
| Meet-in-the-middle layout | Separation between semantic model, measured text boxes, and final renderer coordinates. |
| Visual product | Pipeline product that requires stable geometry, such as SVG, BPMN DI, Mermaid, D2, or UI canvas. |
Model or Contract
Layout consumes target-aware projection data and produces geometry:
render plan
-> text measurement
-> node sizing
-> node placement
-> edge routing
-> target geometry
The layout stage may use:
- built-in deterministic algorithms;
- Graphviz;
- ELK or other graph layout engines;
- target-native layout where the target owns layout;
- manual coordinates supplied by a
.viewprofile.
Rules
- Layout must not infer domain semantics.
- Text measurement must happen before final node sizing when labels affect geometry.
- The same semantic graph may have several valid layouts.
- Layout diagnostics must distinguish impossible geometry from unsupported renderer capability.
- Product-specific layout constraints belong near the target specification.
Examples
Meet-in-the-Middle Layout
semantic graph
-> render plan with labels
-> measured text boxes
-> coordinate solver
-> target renderer
This keeps the semantic model independent from concrete SVG, BPMN DI, or canvas coordinates while still allowing accurate text-aware layout.
BPMN Layout
BPMN layout must respect pool/lane containment, sequence-flow legality, message flow across pool boundaries, and data object association placement. These rules are target constraints layered on top of general layout strategy.
Validation
Layout validation should verify:
- no node has missing dimensions;
- label text fits within the computed node box;
- edge routing does not require impossible target constructs;
- target-specific containment rules are respected;
- fallback layout produces deterministic output when an external engine is unavailable.
Compatibility
This document replaces the earlier "meet-in-the-middle" document as the home for layout strategy. Meet-in-the-middle remains one strategy, not the name of the whole layout concern.
Open Questions
- Which visual products require SOTER-owned deterministic layout?
- Which products should delegate layout to native target tooling?
Related Documents
- ProjectionPipelineSpec.md - pipeline products and stages.
- ProjectionVgmSpecification.md - visual graph data contract.
- ProjectionBpmn.md - BPMN-specific layout constraints.
- ProjectionConfigurationCascadeSpec.md configuration rules affecting layout engines.
- DocumentationStyleGuide.md - writing profile and document-type rules.
- TechnicalSpecTemplate.md - technical document template.