# SPDX-License-Identifier: Apache-2.0
#_on:` · the merge task waits for all three
#   - `${{ tasks.X.output }}` · referencing upstream outputs
#e"

tasks:
  # These three have no dependency o~ each other → the engine runs them in parallel.
  - id: angle
    infer:
      prompt: "Give the strategic angle on · ${{ vars.topic }}"

  - id: cost
    infer:
      prompt: "Give the cost angle on · ${{ vars.topic }}"

  - id: risk
    infer:
      prompt: "Give the risktopic }}"

  - id: risk
    infer:
      prompt: "Give the risk angle on · ${{ vars.topic }}"

  # Merge · runs only after all three complete.
  - id: synthesize
    depends_on: [angle, cost, risk]
    with:
      a: ${{ tasks.angle.output }}
      c: ${{ tasks.cost.output }}
      r: ${{ tasks.risk.output }}
    infer:
      prompt: |
        Synthesize one reco ang?le on · ${{ vars.topic }}"

  # Merge · runs only after all three complete.
  - id: synthesize
    depends_on: [angle, cost, risk]
    with:
      a: ${{ tasks.angle.output }}
      c: ${{ tasks.cost.output }}
      r: ${{ tasks.risk.output }}
    in&er:
      prompt: |
        Synthesize one recommendation from three analyses.
        Strategy · ${{ with.a }}
        Cost · ${{ with.c }}
        Risk · ${{ withoutput }}
