| Field | Type | Required | Description |
|---|
id | string | Yes | Workflow identifier |
inputs | map<string, JSONSchema> | No | Input definitions |
env | map<string, template> | No | Environment variables |
steps | array<Step> | Yes | Non-empty step array |
| Field | Type | Required | Description |
|---|
id | string | No | Unique ID |
type | string | Yes | Step type |
if | expression | No | Conditional execution |
env | map<string, template> | No | Step-level env vars |
| Field | Type | Required | Default |
|---|
with.command | template | Yes | — |
with.result | none | text | json | No | text |
| Field | Type | Required | Default |
|---|
with.action | review | Yes | — |
with.prompt | template | No | — |
with.target | uncommitted | base | commit | Yes* | — |
with.base | template | if target=base | — |
with.commit | template | if target=commit | — |
with.title | template | No | — |
with.model | string | No | — |
with.mode | default | full_auto | No | default |
with.add_dirs | array<template> | No | [] |
with.persist | bool | No | true |
*Omitting target with base present infers target: base.
Unsupported: conversation, output_schema
Built-in result shape:
absolute_file_path: string
overall_correctness: string
overall_explanation: string
overall_confidence_score: number
| Field | Type | Required | Default |
|---|
with.action | exec | Yes | — |
with.prompt | template | Yes | — |
with.mode | default | full_auto | No | default |
with.model | string | No | — |
with.add_dirs | array<template> | No | [] |
with.persist | bool | No | true |
with.conversation | Conversation | No | — |
with.output_schema | JSONSchema | No | — |
Unsupported: target, base, commit, title
| Field | Type | Required | Default |
|---|
with.action | prompt | Yes | — |
with.prompt | template | Yes | — |
with.permission_mode | default | plan | acceptEdits | dontAsk | bypassPermissions | No | default |
with.model | string | No | — |
with.add_dirs | array<template> | No | [] |
with.persist | bool | No | true |
with.conversation | Conversation | No | — |
with.output_schema | JSONSchema | No | — |
| Field | Type | Required |
|---|
with.path | template | Yes |
with.content | template | Yes |
| Field | Type | Required |
|---|
steps | array<Step> | Yes |
exports | map<string, template> | No |
| Field | Type | Required |
|---|
max | integer | Yes |
until | expression | Yes |
steps | array<Step> | Yes |
exports | map<string, template> | No |
| Field | Type | Required |
|---|
cases | array<Case> | Yes |
Each case: if or else + steps + optional exports. All cases must export the same shape or none.
| Field | Type | Required |
|---|
branches | array<Branch> | Yes |
exports | map<string, template> | No |
Each branch: id (required) + steps.
| Field | Type | Required | Default |
|---|
name | string | Yes | — |
scope | iteration | loop | workflow | No | iteration in loops, workflow outside |
- Step IDs unique across entire workflow
steps arrays non-empty (except branch else cases)
steps.<id>.result references previous steps only
- Branch exports must have matching shapes across cases
with required for all action types
- Unknown YAML keys cause errors