Skip to content

Workflow Steps

Sovereign
Sovereign tier required. Workflow steps combine Valdr actions, agents, reviews, decisions, and reusable workflows into one process.

Build workflows from actions, sessions, reviews, waits, approvals, outcome routes, and reusable workflows. Choose Valdr Tools, Git, GitHub, or Command for the action you need.

Shared fields

Every step uses the same outer fields, plus configuration for its selected kind:

FieldRequiredPurpose
keyYesUnique name used by dependencies and expressions
nameYesHuman-readable label shown in Valdr UI
kindYesSelects the step behavior
needsNoSteps that must finish before this step can run
whenNoConditions that must pass, otherwise the step is skipped
inputsDepends on kindValues supplied to a tool or child workflow
outputsNoNamed values made available to later steps
onFailureNoBlock, fail, or use a supported bounded loop

Connect steps with expressions

- key: load_task
  name: Load Task
  kind: tool
  tool:
    id: pm_task
    action: get
  inputs:
    taskKey: "${workflow.inputs.taskKey}"
  outputs:
    status: "$.normalized.task.status"

- key: route_task
  name: Route Task
  kind: condition
  needs: [load_task]
  checks:
    - kind: value_equals
      value: "${steps.load_task.outputs.status}"
      equals: ready

The producing step declares status; the consuming step names load_task in needs and reads the declared output.

Route with when

when:
  - kind: value_equals
    value: "${steps.review.outputs.outcome}"
    equals: review_approved

All when checks must pass. A false check skips the step; it does not fail the run.

Handle failure deliberately

onFailure:
  action: block
  • block stops at a recoverable point.
  • fail ends the run as failed.
  • loop_back is available only on an Outcome route and must set a maximum number of passes.

Valdr UI shows Retry step only when the current or latest attempt is failed or blocked and its error category is safe to repeat. Authored retry.maxAttempts is a reported attempt count; it neither caps manual recovery nor schedules automatic retries or backoff.

Validate before running

The Workflow Builder validates supported fields continuously and offers action-specific inputs and outputs. Diagnostics link back to the affected step or field. For YAML definitions, pm_workflow validate applies strict validation automatically:

pm_workflow { action: "validate", definitionYaml: "..." }

Next step

Start with Valdr Tools for the action-based MCP surface, use Git for repository operations, GitHub for pull-request publication, Command for a trusted shell command, or choose another step above.