- One job per instruction step. "Scan and fix and verify" as one prompt produces unauditable results. Split into scan → fix → verify so each result is recorded, retryable and usable in templates.
- Specify the output contract in every prompt. Later steps only see what the agent puts in
output. Show the exact JSON shape you expect. - Decisions: closed label set, a default branch,
allowSummaryFallback: false. - Gate before anything irreversible.
- Verify, don't trust. After a fix step, add a verification step — re-run the tests via
shell— and a decision on the result. For shell output a later step depends on, usecaptureToFilewithverifyHash, and have that later step re-check the file. - Bound your loops. Task loops terminate via
EMPTY; retry loops need a counter inset_variableand a decision that exits after N attempts. - Write the
descriptionfor discovery. It is what an agent reads inccw_listwhen deciding what to run. Same forinputSchema: useenum,defaultandrequiredso callers construct valid input. - Compose via sub-workflows when a fragment is independently useful or the graph exceeds about fifteen steps. Publish bottom-up.
Authoring workflows
Design guidelines
Eight rules for workflows that produce auditable results, terminate, and survive being run by an agent that remembers nothing between steps.