Workflow YAML reference
The Compiler reads workflow.yaml from the package root. Workflow and Stage source objects are strict; unknown fields and duplicate YAML keys are rejected.
Workflow document
Stage document
A Code Step contains type: code, code: <reference>, and on routes.
An Agent Step contains type: agent, agent: <reference>, llm, outputSchema: <reference>, and on routes. Optional skills and tools arrays default to empty. Runtime model roles are reasoning, coding, and review.
For either Step type, each on.<outcome> is { target: <step-key> } or { end: true }. A Stage end forwards that outcome to its Workflow-level route. Do not put both target and end in one route.
Names must be nonempty, have no surrounding whitespace, and avoid reserved object keys __proto__, prototype, and constructor. Entries and targets must resolve within their respective topology.
Resource references
TypeScript resources accept a :exportName selector; without it they use the default export. Stage, Agent, and Skill references have no export selector. Nested resource directories are supported. References must stay within their resource directory and cannot use traversal, backslashes, or .d.ts source files.
These @... values are Compiler source references, not TypeScript import aliases. Relative TypeScript source imports use .ts; output imports are rewritten to .js.
Markdown metadata
Agent and Skill Markdown starts with YAML frontmatter containing name and description; the body contains instructions. Step YAML binds the Agent to its model role, Tools, Skills, and final output Schema.
Package metadata and exports
This fragment supplements a full package manifest, including name, version, and runtime dependencies. Compiler validates the source package's generated-entry layout. It emits named blueprint, codes, and agentSpecs exports; it does not publish an internal wrapper or instantiate Agents at build time.
See Create a Workflow for a complete package and Compiler for build behavior.