Declart Grammar Principles
These principles govern every declaration file format in Declart, across all diagram kinds and all implementations.
-
Design exclusion. Declaration files contain no visual information: no colors, coordinates, fonts, sizes, margins, or layout hints. These are the engine's domain.
-
Semantics only. Fields express meaning, not appearance.
emphasis: primaryis allowed;color: redis not. The engine decides how emphasis looks. -
LLM-predictable. Field names are single English words. Structure is flat or exactly one level deep (
[[items]]). A language model must be able to generate a correct declaration without examples. -
Minimal and concise. Each kind defines only its required fields. Optional fields are added only when proven necessary across multiple use cases. When in doubt, leave it out.
-
One representation per diagram. Each
kind + viewpair has exactly one valid schema. No aliases, structural variants, or flags that change interpretation. Two declarations expressing the same diagram are byte-for-byte identical except for whitespace.