Skip to content

Schema reference

FieldTypeRequiredDescription
idstringYesWorkflow identifier
inputsmap<string, JSONSchema>NoInput definitions
envmap<string, template>NoEnvironment variables
stepsarray<Step>YesNon-empty step array
FieldTypeRequiredDescription
idstringNoUnique ID
typestringYesStep type
ifexpressionNoConditional execution
envmap<string, template>NoStep-level env vars
retryinteger or objectNoRetry action or workflow steps
FieldTypeRequiredDefault
with.commandtemplateYes
with.stdout.modenone | text | jsonNotext
FieldTypeRequired
with.kindturnYes
with.prompttemplateYes
with.collaboration_modedefault | planNo
with.modelstringNo
with.effortlow | medium | high | xhighNo

kind: turn returns plain text. collaboration_mode: plan uses Codex’s built-in Plan collaboration mode. Plan collaboration turns are planning-only and must not mutate repo-tracked files.

FieldTypeRequired
with.kindreviewYes
with.modelstringNo
with.target.typeuncommitted | base | commitYes
with.target.branchtemplateif base
with.target.shatemplateif commit

Built-in result shape:

findings:
- title: string
body: string
confidence_score: number
priority: integer
code_location:
absolute_file_path: string
line_range:
start: integer
end: integer
overall_correctness: string
overall_explanation: string
overall_confidence_score: number
FieldTypeRequired
with.prompttemplateYes
with.modelstringNo
with.effortlow | medium | highNo
with.max_turnsintegerNo
with.max_thinking_tokensintegerNo
with.permission_modedefault | accept_edits | bypass_permissions | planNo

claude returns the final plain-text assistant response. Claude YAML fields are snake_case and map directly to Claude Agent SDK options in camelCase. Do not set with.kind, with.mode, or with.action on Claude steps. Use a locally installed and authenticated Claude Code CLI (claude login).

FieldTypeRequired
with.prompttemplateYes
with.modelstringNo
with.agentstringNo
with.variantstringNo
with.permission_modedefault | auto_approveNo

opencode returns the final plain-text assistant response. OpenCode uses named agents and defaults with.agent to build. with.model must use provider/model. Headless runs reject permission requests by default unless with.permission_mode is auto_approve. OpenCode steps require a local OpenCode CLI installation. Verify with opencode --version.

FieldTypeRequired
with.modeagent | ask | planNo (default: agent)
with.prompttemplateYes
with.modelstringNo

cursor communicates with Cursor Agent through ACP and returns the final plain-text assistant response. If you need structured JSON from Cursor, use a shell step to run Cursor headless instead.

FieldTypeRequired
with.pathtemplateYes
with.contenttemplateYes
FieldTypeRequired
with.workflowstringYes
with.inputsmap<string, unknown>No

with.workflow must be a static string, not a template expression. String with.inputs values are rendered as templates. Non-string YAML literals such as booleans and numbers pass through unchanged. steps.<workflow_step_id>.result is null in v1. workflow steps may set retry.

FieldTypeRequired
stepsarray<Step>Yes
exportsmap<string, template>No
FieldTypeRequired
maxintegerYes
untilexpressionNo
stepsarray<Step>Yes
exportsmap<string, template>No

Loop results are always objects with reason: "until_satisfied" | "max_reached" plus any exported fields. loop.exports.reason is reserved.

FieldTypeRequired
casesarray<Case>Yes

Each case: if or else + steps + optional exports. All cases must export the same shape or none.

FieldTypeRequired
branchesarray<Branch>Yes
exportsmap<string, template>No

Each branch: id (required) + steps.

  1. Step IDs are unique across the entire workflow.
  2. steps arrays are non-empty except branch else cases.
  3. steps.<id>.result references previous steps only.
  4. workflow only references workflows in the same .rigg project.
  5. workflow input keys must match the callee input schema.
  6. Branch exports must have matching shapes across cases.
  7. with is required for all action types.
  8. Unknown YAML keys cause errors.
  9. retry is only valid on action and workflow steps.