Dify's DSL import is one of its best features and its quietest footgun. A YAML file that "imports fine" can still fail at runtime, leak intent you didn't review, or silently bind to the wrong model provider. A field guide.
version: "0.7.0" # schema generation (1.16.x → 0.7.x)
kind: app
app:
mode: workflow # workflow | advanced-chat | chat | agent
workflow:
graph:
nodes: [...] # id / data.type / position
edges: [...] # source/target + handles + type metadata
source/target must reference existing node IDs. IF/ELSE branches use custom source handles (true/false/label) — normal edges use source.{{#node_id.field#}}. Typos survive visual inspection and detonate at runtime. System vars start with sys. — those aren't node references.langgenius/openai/openai, your workspace configured a different path → configure credentials for the exact referenced provider.gpt-4o-mini vs gpt-4.1-mini-era templates — swap model names in LLM nodes to what your account offers.Export before upgrades, commit YAML to git, diff reviews for prompt changes. Teams that do this iterate ten times faster than canvas-clickers, and roll back instantly when a prompt edit goes sideways.