These workflow examples turn the best parts of Claude Code's orchestration model into explicit Relay implementation campaigns.
-
workflow-claude-task-runtime.tsBuilds a first-class task runtime with task handles, pending messages, result payloads, and manager-owned completion. -
workflow-claude-capability-isolation.tsAdds per-worker capability scopes, inherited spawn policy, and ergonomic worktree isolation. -
workflow-claude-structured-control.tsAdds typed control messages, plan checkpoints, and phase-aware channel management.
Relay already beats Claude Code on explicit DAGs, verification gates, heterogeneous CLIs, and repeatability. These workflows focus on the areas where Claude Code is stronger:
- task-centric worker lifecycle
- per-worker capability scoping
- structured continuation / approval semantics
The intent is not to copy Claude's implicit orchestration style. The intent is to absorb the useful worker ergonomics while keeping Relay's explicit and observable workflow model.
npx tsx packages/sdk/src/examples/workflow-claude-task-runtime.ts
npx tsx packages/sdk/src/examples/workflow-claude-capability-isolation.ts
npx tsx packages/sdk/src/examples/workflow-claude-structured-control.ts