Documentation
¶
Overview ¶
Package scaffold provides workflow starter templates used by `workflow_create` MCP op + UI "New workflow" form. Each Scaffold produces a valid workflow that passes parse.Validate so the operator can iterate from a working baseline.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyTopDownLayout ¶
ApplyTopDownLayout assigns Canvas.positions for every node + every trigger phantom so the editor renders the graph stacked vertically (top → bottom). Without this the canvas falls back to Drawflow's default left → right which feels unnatural for newly-scaffolded workflows.
Called from scaffold.Workflow on every newly-created workflow so the first render is correct regardless of which surface (UI form, MCP workflow_create, CLI) kicked off the create.
The trigger canvas IDs follow the same convention as `internal/tools/agents/workflows_codec.go:triggerNodeID` — "trigger-<type>" for the first trigger of a type, "trigger-<type>-N" for subsequent duplicates — so the canvas wires the phantoms back to the same node id the layout placed.
func Workflow ¶
Workflow returns a starter workflow for a template name. Supported templates: empty (default), support-triage, incident-response, daily-digest.
`name` is the display title (Workflow.Name); when non-empty it overrides whatever default the template would have set. `id` is the stable folder identifier — UUID for canvas-created workflows, kebab for legacy hand-edited ones.
Types ¶
This section is empty.