-
Notifications
You must be signed in to change notification settings - Fork 0
Real Examples
The spec from Authoring Workflows — two nodes, one edge. Run it on any repository:
/dag-flow run the dependency-audit workflow
What you should see in dag.open:
-
inventorygoesqueued → running → completedin a few seconds; its output is a list of manifests. -
reportadmits onceinventorycompletes, reads{{inventory}}in its prompt, and returns the flagged dependencies with an upgrade order. - The workflow completes and the parent is woken with the report.
This is the smallest honest graph: an edge that exists because the report actually consumes the inventory.
A user reported that resuming a session made it unresponsive: messages were sent, nothing happened, and restarting revealed they had arrived. The whole investigation ran as one workflow. Abbreviated transcript:
reproduce-defect RED tests: id ordering across a timestamp wrap boundary
deep-impact-audit every lexicographic id comparison in the codebase, classified
repair-defect raw-millisecond generator + time-based comparisons
verify-repair mutation proof: revert the fix → tests go red; restore → green
review-repair REJECT — one hardening commit lacked a falsifiable probe
(H1 probe added, scratch-workspace revert turns it red)
review (re-run) ACCEPT
Things worth noticing in that transcript:
- The REJECT was correct. The review found a commit whose revert left the suite green — a barrier that cannot fail also cannot protect. The fix loop added the missing probe and re-ran. This is the system working, not the system failing.
-
The revision view earned its keep. The rejected round and its retry do not clutter the final graph; the workflow reports
completedon the version that actually passed. - The verify node ran a mutation proof: revert the fix in a scratch workspace, watch the regression tests fail, restore byte-identical, watch them pass. Evidence, not assurance.
A synthesis node ends with:
Write the final report to /path/to/repo/.opencode/workflow-reports/fix-report.md
and reply with exactly that absolute path.
The runtime captures {content_ref, size, sha256, summary}; workflow(action="result") returns the pointer with a short summary. The parent reads the file when it needs the detail. The transcript stays small, and the hash recorded at capture time proves the file was not edited afterwards.
The builtin workflow library (workflow(action="list")) ships reference topologies — design deep-dive, parallel delivery, deep review, compact change review — each a readable spec you can copy and bend.