# Variable WorkflowDefinitionSchema`Const`

WorkflowDefinitionSchema: ZodPipe<
ZodObject<
{
name: ZodString;
version: ZodString;
description: ZodOptional<ZodString>;
inputs: ZodDefault<
ZodArray<
ZodObject<
{
name: ZodString;
type: ZodEnum<
{
string: "string";
number: "number";
boolean: "boolean";
object: "object";
array: "array";
},
>;
description: ZodOptional<ZodString>;
required: ZodDefault<ZodOptional<ZodBoolean>>;
default: ZodOptional<ZodUnknown>;
},
$strip,
>,
>,
>;
steps: ZodArray<
ZodObject<
{
id: ZodString;
agent: ZodEnum<
{
custom: "custom";
orchestrator: "orchestrator";
code_expert: "code_expert";
architecture_expert: "architecture_expert";
security_expert: "security_expert";
documentation_expert: "documentation_expert";
testing_expert: "testing_expert";
devops_expert: "devops_expert";
research_expert: "research_expert";
infrastructure_expert: "infrastructure_expert";
thinker: "thinker";
worker: "worker";
verifier: "verifier";
},
>;
action: ZodString;
description: ZodOptional<ZodString>;
inputs: ZodDefault<ZodRecord<ZodString, ZodUnknown>>;
dependsOn: ZodOptional<ZodArray<ZodString>>;
parallel: ZodDefault<ZodOptional<ZodBoolean>>;
retries: ZodOptional<ZodNumber>;
timeout: ZodOptional<ZodNumber>;
condition: ZodOptional<ZodString>;
},
$strip,
>,
>;
timeout: ZodOptional<ZodNumber>;
},
$strip,
>,
ZodTransform<
{
name: string;
version: string;
description: string
| undefined;
inputs: {
name: string;
type: "string" | "number" | "boolean" | "object" | "array";
description: string | undefined;
required: boolean;
default: unknown;
}[];
steps: {
id: string;
agent: | "custom"
| "orchestrator"
| "code_expert"
| "architecture_expert"
| "security_expert"
| "documentation_expert"
| "testing_expert"
| "devops_expert"
| "research_expert"
| "infrastructure_expert"
| "thinker"
| "worker"
| "verifier";
action: string;
inputs: Record<string, unknown>;
dependsOn: string[] | undefined;
parallel: boolean;
retries: number | undefined;
timeout: number | undefined;
condition: string | undefined;
}[];
timeout: number
| undefined;
},
{
name: string;
version: string;
description?: string;
inputs: {
name: string;
type: "string"
| "number"
| "boolean"
| "object"
| "array";
description?: string;
required: boolean;
default?: unknown;
}[];
steps: {
id: string;
agent: | "custom"
| "orchestrator"
| "code_expert"
| "architecture_expert"
| "security_expert"
| "documentation_expert"
| "testing_expert"
| "devops_expert"
| "research_expert"
| "infrastructure_expert"
| "thinker"
| "worker"
| "verifier";
action: string;
description?: string;
inputs: Record<string, unknown>;
dependsOn?: string[];
parallel: boolean;
retries?: number;
timeout?: number;
condition?: string;
}[];
timeout?: number;
},
>,
> = ...

Workflow definition schema for YAML parsing. Validates and transforms YAML content into WorkflowDefinition.

- Defined in packages/nexus-agents/src/workflows/template-types.ts:148