DraftStage
One step in a Draft dataflow graph.
Every stage carries an opId — the symbolic name of the operation it references — and a coordinationKind that tags whether the step is safe to apply without coordination (CoordinationKind.Free) or requires a consensus round (CoordinationKind.Coordinated).
The sealed hierarchy encodes the structural rules of CALM:
Source, Map, and Filter are always CoordinationKind.Free: monotone transformations commute, so they need no agreement.
Embroider is always CoordinationKind.Coordinated: the single terminal step that requires consensus (the "embroidery" in the warp metaphor).
No op is ever invoked here. Stages store only symbolic references; execution is the responsibility of the E-5 runtime.
See also
Inheritors
Types
Two or more independent Embroider stages at the same dependency level fused into a single consensus round by the G3 consolidateEmbroideries rewrite (in :kuilt-warp-planning).
The terminal coordination stage — the single "embroidery" step that requires global agreement.
A monotone filter stage — retains elements satisfying a predicate.
Two or more adjacent Filter stages fused into a single pipeline unit by the E-2 optimizer.
A monotone transform stage — maps each element to a new value.
A source stage — the entry point of a Draft pipeline.