delegate("planner") // no task, no handoff
delegate("implementer", "implement the plan") // task hint only
delegate("reviewer", undefined, needs({ diff: "string" })) // + handoff check
The optional 3rd argument carries the step's input needs (built by
needs(...)). When present, the whole-harness registry asserts that the
PREVIOUS success-track step's result().ok SUPPLIES it — a cross-file
handoff that doesn't line up is a tsc error naming the offending field.
Omitting it (the historical 1-/2-arg call) keeps the exact string-path
behavior — fully backwards-compatible.
Build a railway step that dispatches
agent.delegate("planner") // no task, no handoff delegate("implementer", "implement the plan") // task hint only delegate("reviewer", undefined, needs({ diff: "string" })) // + handoff check
The optional 3rd argument carries the step's input
needs(built byneeds(...)). When present, the whole-harness registry asserts that the PREVIOUS success-track step'sresult().okSUPPLIES it — a cross-file handoff that doesn't line up is atscerror naming the offending field. Omitting it (the historical 1-/2-arg call) keeps the exact string-path behavior — fully backwards-compatible.