diff --git a/workshop/28-orchestrate-workflows.md b/workshop/28-orchestrate-workflows.md index c25eebb8..9cdceddc 100644 --- a/workshop/28-orchestrate-workflows.md +++ b/workshop/28-orchestrate-workflows.md @@ -32,6 +32,12 @@ When a repository needs different kinds of AI work — status reports, PR review The key primitive is `dispatch-workflow` in [`safe-outputs`](https://github.github.com/gh-aw/reference/safe-outputs/). It lets your orchestrator trigger another workflow in the same repository and optionally pass inputs to it. + + + + Diagram: an orchestrator workflow reads repository signals and dispatches exactly one specialist workflow, or logs a summary and exits when no condition matches. + + > :thinking: **Predict:** Look at your existing workflows. Which one handles the broadest task? Which handles the narrowest? The broadest is a natural orchestration candidate; the narrowest is a natural specialist. ## Steps diff --git a/workshop/images/28-orchestrator-routing-dark.svg b/workshop/images/28-orchestrator-routing-dark.svg new file mode 100644 index 00000000..48ae6a3c --- /dev/null +++ b/workshop/images/28-orchestrator-routing-dark.svg @@ -0,0 +1,49 @@ + + +Orchestrator routing: one specialist per run + + +Schedule +Daily on weekdays + +1 + + +repo-orchestrator +Reads open PR age and +status-issue history + +2 + +dispatch-workflow +(max: 1) + + + + + +Dispatch pr-reviewer +Condition: stale open PRs exist + +In progress + +3 + + +Dispatch daily-status +Condition: no status issue today + +In progress + +4 + + +Log summary and exit +Condition: neither matched + +Skipped + +5 +The orchestrator dispatches at most one specialist workflow per run, or logs a summary when no condition matches. + + \ No newline at end of file diff --git a/workshop/images/28-orchestrator-routing-light.svg b/workshop/images/28-orchestrator-routing-light.svg new file mode 100644 index 00000000..1c07f1fb --- /dev/null +++ b/workshop/images/28-orchestrator-routing-light.svg @@ -0,0 +1,49 @@ + + +Orchestrator routing: one specialist per run + + +Schedule +Daily on weekdays + +1 + + +repo-orchestrator +Reads open PR age and +status-issue history + +2 + +dispatch-workflow +(max: 1) + + + + + +Dispatch pr-reviewer +Condition: stale open PRs exist + +In progress + +3 + + +Dispatch daily-status +Condition: no status issue today + +In progress + +4 + + +Log summary and exit +Condition: neither matched + +Skipped + +5 +The orchestrator dispatches at most one specialist workflow per run, or logs a summary when no condition matches. + + \ No newline at end of file