CodyCody

Authoring workflows

Validation

What publish checks, and what it does not — the runtime failures an author has to prevent by hand.

Publishing fails unless all of these hold:

  1. Exactly one start step exists and has an outgoing transition.
  2. At least one end step exists.
  3. Every transition's sourceStepId and targetStepId reference an existing step.
  4. No orphans: every non-start step is the target of at least one transition.
  5. Every instruction step has a non-empty prompt.
  6. Every shell step has a non-empty command.
  7. Every decision step has at least one branch.
  8. Every review step has a non-empty prompt and outgoing transitions labelled APPROVED and REVISE.
  9. Every sub_workflow and execute_task_list target exists and is published — publish children before parents.
  10. No sub_workflow recursion cycles.

Not validated — enforced at runtime

These fail the instance when reached, not the publish. Check them yourself:

  • get_next_task has both HAS_TASK and EMPTY labelled transitions.
  • Decision branch transitionIds point at real outgoing transitions.
  • Step names are unique and contain no dots.
  • Template paths match the producing step's name exactly.

Pre-publish checklist

  • Every step reachable; every step except decision, get_next_task and review has exactly one outgoing transition.
  • Every decision: branches map to real transitions, one isDefault, allowSummaryFallback: false, the prompt lists the allowed labels.
  • Every prompt ends with an explicit output contract.
  • Every loop terminates.
  • Children published before parents.