Step B needs the output of step A. Which pattern fits?
Why A is the answer
Sequential orchestration, with a clear handoff
A dependency means order matters. A defined handoff passes the output along.
In detail
- A dependency means order matters.
- Sequential orchestration with a clear handoff passes the output along.
- Define what each handoff contains.
Use case
An illustrative scenario, not a real incident.
A design step produces a spec, and a coding step needs it. Sequential orchestration passes the spec as a clear handoff.
See it in different ways
flowchart TD
A{"Does step B need the result of step A?"} -->|Yes| B["Sequential"]
A -->|No| C{"Do they touch the same files?"}
C -->|No| D["Parallel"]
C -->|Yes| BstateDiagram-v2 [*] --> CheckDependencies CheckDependencies --> Sequential: one step needs another CheckDependencies --> Parallel: work is independent Sequential --> Handoff: clear artifact Parallel --> Isolated: own branch or workspace Handoff --> [*] Isolated --> [*]
sequenceDiagram participant P0 as Step A participant P1 as Handoff artifact participant P2 as Step B P0->>P1: Write the spec P1->>P2: Read the spec P2->>P2: Build from it
Key point: Dependencies call for sequential steps.
Why the other options are wrong
- B. Parallel execution with no connection between the agents
- Disconnected agents cannot pass results.
- C. Running both agents on the same files at the same time
- Working on the same files together causes conflicts.
- D. Letting each agent decide alone whether the other has finished
- Leaving it to each agent risks starting too early.

