Context Overview

Context is the structured data that templates consume during code generation.

What is Context?

Context provides deterministic, type-safe data to templates through a hierarchical object structure.

Root Objects

  • entity - Current entity being processed (names, fields, relations)
  • field - Field data when inside field loops
  • relation - Relation data when inside relation loops
  • global - System-wide data and configuration

Deterministic Structure

Context is predictable and unambiguous:

No runtime ambiguity - context paths are validated before generation.

Simplified Context Tree

How Templates Consume Context

Templates access context through dot notation:

Context drives every aspect of generation - names, types, conditions, and structure.