Validation Rules

DSP enforces 40+ validation rules across four categories: scene identity, scene references, operation validation, and content limits.

For recommended agent behavior when validation fails, see How AI Agents Should Use Zindex.

Layout-time and render-time advisory diagnostics (e.g. TEXT_OVERFLOW, CANVAS_AUTO_EXTENDED, LABEL_DUPLICATION_DETECTED) are documented separately in Rendering reference - Render diagnostics. Those are non-blocking warnings or info messages emitted alongside successful layouts; the rules below are blocking validation errors that prevent invalid scenes from rendering at all.

Scene identity rules (S-001)

CodeRuleSeverity
S-001Duplicate element IDserror

Scene reference rules (S-010 - S-014)

CodeRuleSeverity
S-010Group/frame references nonexistent childerror
S-011Edge references nonexistent endpointerror
S-012Edge endpoint is not a nodeerror
S-013Edge references nonexistent porterror
S-014EDGE_COLUMN_NOT_FOUND - edge endpoint.column references a column not declared in the entity’s extensions.columnswarning

Containment rules (S-020 - S-023)

CodeRuleSeverity
S-020Element contains itselferror
S-021Containment cycle detectederror
S-022Element belongs to multiple groupserror
S-023Invalid child kind (edges can’t be group children)error
S-033Inside target is not a containererror

Layout rules (S-030 - S-034)

CodeRuleSeverity
S-030Relative layout references nonexistent targeterror
S-031Relative layout references itselferror
S-032Relative layout cycle detectederror
S-034Element missing required dimensionswarning

Port and asset rules (S-040 - S-062)

CodeRuleSeverity
S-040Duplicate port IDs on a nodeerror
S-041Port on non-node elementerror
S-043Edge is a self-loopwarning
S-050Element references nonexistent asseterror
S-051Asset kind mismatcherror
S-060Element references nonexistent styleerror
S-062Remote URI not allowed by policywarning

Operation target rules (O-010 - O-011)

CodeRuleSeverity
O-010Operation target element not founderror
O-011Create operation ID collisionerror

Operation kind rules (O-020 - O-024)

CodeRuleSeverity
O-020updateNode targets non-nodeerror
O-021updateEdge targets non-edgeerror
O-022setText targets element without texterror
O-023resizeElement targets non-resizableerror
O-024moveElement targets relative-layout elementwarning

Batch rules (O-040 - O-041)

CodeRuleSeverity
O-040Batch creates then targets same IDerror
O-041Batch deletes then references same IDerror

Post-mutation rules (P-001)

CodeRuleSeverity
P-001Dangling reference after mutationerror

Constraint rules (C-001 - C-004)

CodeRuleSeverity
C-001Constraint references nonexistent elementerror
C-003Constraint has fewer than 2 elementserror
C-004Duplicate elements in constraintwarning

Content limits (L-001 - L-004)

CodeRuleSeverity
L-001Scene exceeds maximum element count (1000)error
L-002Nesting depth exceeds maximum (10)error
L-003Text content exceeds maximum length (10000)warning
L-004Scene exceeds maximum constraint count (500)error