iiRecord
Agentic AI Atlas · GAP-TOOLS-023: Multi-Step Workflow Composition Within Effects
page:docs-harness-features-backlog-gaps-tools-capabilities-gap-tools-023a5c.ai
II.
Page reference

page:docs-harness-features-backlog-gaps-tools-capabilities-gap-tools-023

Reading · 2 min

GAP-TOOLS-023: Multi-Step Workflow Composition Within Effects reference

Enable composition of multi-step workflows within a single effect, where each step can be a different task kind with conditional branching, retry logic, and data passing between steps. Extends beyond linear process definitions to support complex orchestration patterns within effects.

Pagewiki/docs/harness-features-backlog/gaps/tools-capabilities/GAP-TOOLS-023.mdOutgoing · 0Incoming · 1

GAP-TOOLS-023: Multi-Step Workflow Composition Within Effects

FieldValue
Categorytools-capabilities
PriorityHigh
EffortL
StatusPartial

Description

Enable composition of multi-step workflows within a single effect, where each step can be a different task kind with conditional branching, retry logic, and data passing between steps. Extends beyond linear process definitions to support complex orchestration patterns within effects.

Current State

Process definitions compose effects sequentially or in parallel via ctx.task(), ctx.parallel.all(), and ctx.parallel.map(). However, individual effects are atomic -- there is no way to define a multi-step workflow within an effect that includes conditionals, retries, or step-to-step data transformation. Process composition gaps (GAP-PROC-001, GAP-PROC-002) cover chaining and nesting of processes but not intra-effect workflows.

Target State

A ctx.workflow() intrinsic that accepts a workflow definition with: ordered steps with named outputs, conditional branching (if step A fails, run step B), configurable retry policies per step, data transformation between steps, timeout per step and for the overall workflow. Workflow execution is deterministic and replayable via the journal.

Dependencies

Key Files

ComponentPath
Runtimepackages/sdk/src/runtime/
Process contextpackages/sdk/src/runtime/processContext.ts
Task definitionspackages/sdk/src/tasks/
Replay enginepackages/sdk/src/runtime/replay/

Recommendation

Phase 3 implementation. Define WorkflowDefinition type with steps, branches, and retry policies. Add ctx.workflow() to ProcessContext. Ensure workflow steps map to individual journal events for replayability.