Add orchestrator pattern example (06-task-dependencies)#403
Closed
axon-agent[bot] wants to merge 1 commit intomainfrom
Closed
Add orchestrator pattern example (06-task-dependencies)#403axon-agent[bot] wants to merge 1 commit intomainfrom
axon-agent[bot] wants to merge 1 commit intomainfrom
Conversation
Add example showing how to chain Tasks using dependsOn and prompt templates. Task A implements a feature and opens a PR, then Task B automatically reviews it using the branch and PR URL from Task A's outputs. Addresses #328. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
1 issue found across 7 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="examples/06-task-dependencies/README.md">
<violation number="1" location="examples/06-task-dependencies/README.md:103">
P2: Template references wrong dependency output. `review-feature` is a code-review task and doesn't produce a `pr` output — the PR URL comes from `implement-feature`. Either add `implement-feature` to `dependsOn` and reference it directly, or reference a key that `review-feature` would actually produce.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| spec: | ||
| type: claude-code | ||
| prompt: | | ||
| The review for PR {{ index .Deps "review-feature" "Results" "pr" }} |
There was a problem hiding this comment.
P2: Template references wrong dependency output. review-feature is a code-review task and doesn't produce a pr output — the PR URL comes from implement-feature. Either add implement-feature to dependsOn and reference it directly, or reference a key that review-feature would actually produce.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At examples/06-task-dependencies/README.md, line 103:
<comment>Template references wrong dependency output. `review-feature` is a code-review task and doesn't produce a `pr` output — the PR URL comes from `implement-feature`. Either add `implement-feature` to `dependsOn` and reference it directly, or reference a key that `review-feature` would actually produce.</comment>
<file context>
@@ -0,0 +1,123 @@
+spec:
+ type: claude-code
+ prompt: |
+ The review for PR {{ index .Deps "review-feature" "Results" "pr" }}
+ has been completed. If the review approved the changes, merge the PR.
+ dependsOn:
</file context>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Axon Agent @gjkim42
Summary
Adds a new example (
examples/06-task-dependencies/) that demonstrates the orchestrator pattern — chaining multiple Tasks usingdependsOnand prompt templates so one agent's output feeds into the next.This directly addresses #328, which requested an orchestrator pattern be added to the examples.
What's included
task-a-implement.yaml— Step 1: an agent implements a feature and opens a PRtask-b-review.yaml— Step 2: a second agent reviews the PR, using Task A's captured outputs (branch name and PR URL) via Go template syntax:{{ index .Deps "implement-feature" "Results" "pr" }}README.md— Documents the pattern, explains howdependsOnworks (automatic waiting, failure propagation, cycle detection, branch locking, output forwarding), and shows how to extend to 3+ step pipelines or fan-in from multiple upstream tasksWhy this matters
The
dependsOn+ prompt template mechanism is one of Axon's most powerful features for building multi-step agent workflows, but it had no dedicated example. Users had to piece it together from the API reference and integration tests. This example makes the pattern immediately discoverable and copy-pasteable.Key behaviors documented
Waitingphase until Task A succeedskey: valueoutputs are injected into Task B's promptTest plan
kubectl apply --dry-run=client -f examples/06-task-dependencies/test/integration/task_test.goAddresses #328.
🤖 Generated with Claude Code
Summary by cubic
Adds an orchestrator pattern example that chains Tasks with dependsOn and prompt templates so one agent’s outputs feed into the next. Makes multi-step workflows easy to copy and use; addresses #328.
Written for commit 643d8b7. Summary will update on new commits.