Skip to content

examples: add task dependency chain example (06-task-dependencies)#375

Closed
axon-agent[bot] wants to merge 1 commit intomainfrom
axon-fake-strategist-20260218-0000
Closed

examples: add task dependency chain example (06-task-dependencies)#375
axon-agent[bot] wants to merge 1 commit intomainfrom
axon-fake-strategist-20260218-0000

Conversation

@axon-agent
Copy link

@axon-agent axon-agent bot commented Feb 18, 2026

🤖 Axon Agent @gjkim42

Summary

  • Adds examples/06-task-dependencies/ with a three-stage pipeline: implement → write-tests → review
  • Demonstrates dependsOn for task chaining and Go template syntax for referencing upstream outputs/results
  • Updates examples/README.md to include the new example in the table

Motivation

The dependsOn feature is fully implemented, tested, and documented in the README ("Chain tasks with dependencies") and reference docs, but there are zero working example manifests in the examples/ directory. Users encountering dependsOn in the docs have no ready-to-use YAML to learn from.

This fills that gap with a realistic pipeline pattern and thorough documentation covering:

  • How Waiting phase works
  • How dependency failure propagates
  • Template syntax for Outputs, Results, and Name
  • CLI equivalent with --depends-on
  • Interaction between dependsOn and branch mutex

Files

File Purpose
examples/06-task-dependencies/README.md Explains the pipeline, template syntax, and usage steps
examples/06-task-dependencies/tasks.yaml Three chained Tasks (implement → write-tests → review)
examples/06-task-dependencies/workspace.yaml Standard workspace (matches other examples)
examples/06-task-dependencies/credentials-secret.yaml Credential placeholder
examples/06-task-dependencies/github-token-secret.yaml GitHub token placeholder
examples/README.md Updated table with new example

Related

  • Orchestrator pattern #328 — Orchestrator pattern (this provides concrete manifests for the dependency-based orchestration pattern)
  • README section "Chain tasks with dependencies" (lines 280-327)

Test plan

  • Verify YAML is valid and matches the CRD schema
  • Verify the examples/README.md table renders correctly
  • Verify template expressions match the integration test patterns in test/integration/task_test.go

🤖 Generated with Claude Code


Summary by cubic

Adds a new example that demonstrates chaining tasks with dependsOn in a three-stage pipeline (implement → write-tests → review). Updates the examples index to include it.

  • New Features
    • Added examples/06-task-dependencies/ with tasks.yaml (3 chained tasks), workspace.yaml, and placeholder secrets.
    • README covers dependsOn behavior (Waiting and failure propagation) and Go template usage to reference upstream Outputs/Results; includes CLI equivalent and usage steps.
    • Updated examples/README.md to list the new example.

Written for commit 9b28937. Summary will update on new commits.

Add a new example directory demonstrating how to chain tasks with
dependsOn into an implement -> test -> review pipeline. Includes
documentation on prompt templating with dependency outputs and results.

Addresses the gap that dependsOn is documented in the README and
reference docs but has no working example manifests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 6 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:129">
P2: Inaccurate failure propagation description. Since `review` depends on `write-tests` (not directly on `implement`), when `implement` fails the message on `review` would be *"Dependency 'write-tests' failed"*, not *"Dependency 'implement' failed"*. The failure also isn't truly "immediate" for `review` — it propagates through `write-tests` first.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

even without `dependsOn`. The `dependsOn` field adds the additional
guarantee that a task only starts after its dependencies **succeed**
(not just finish).
- If `implement` fails, both `write-tests` and `review` fail immediately
Copy link

@cubic-dev-ai cubic-dev-ai bot Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Inaccurate failure propagation description. Since review depends on write-tests (not directly on implement), when implement fails the message on review would be "Dependency 'write-tests' failed", not "Dependency 'implement' failed". The failure also isn't truly "immediate" for review — it propagates through write-tests first.

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 129:

<comment>Inaccurate failure propagation description. Since `review` depends on `write-tests` (not directly on `implement`), when `implement` fails the message on `review` would be *"Dependency 'write-tests' failed"*, not *"Dependency 'implement' failed"*. The failure also isn't truly "immediate" for `review` — it propagates through `write-tests` first.</comment>

<file context>
@@ -0,0 +1,133 @@
+  even without `dependsOn`. The `dependsOn` field adds the additional
+  guarantee that a task only starts after its dependencies **succeed**
+  (not just finish).
+- If `implement` fails, both `write-tests` and `review` fail immediately
+  with the message "Dependency 'implement' failed".
+- Prompt templates are resolved once, right before the Job is created.
</file context>
Fix with Cubic

@gjkim42 gjkim42 closed this Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant