# `Mobus.Stepwise.Pipeline.Stepwise`
[🔗](https://github.com/fosferon/mobus_stepwise/blob/main/lib/mobus/stepwise/pipeline/stepwise.ex#L1)

Static ALF pipeline for stepwise workflows.

This pipeline interprets the compiled spec (IR) in-band; we do not generate
dynamic pipeline modules for disk-loaded workflows.

The stage order is defined in `Mobus.Stepwise.SpecHelpers.pipeline_stage_modules/0`
— both the foundation and workflow_stem pipelines reference the same list.

# `alf_components`

# `call`

```elixir
@spec call(any(), Keyword.t()) :: any() | [any()] | nil
@spec call(any(), Keyword.t()) :: reference()
```

# `cast`

# `components`

```elixir
@spec components() :: [map()]
```

# `ensure_started`

```elixir
@spec ensure_started(keyword()) :: :ok | {:error, term()}
```

Ensures the ALF pipeline process is running, starting it if necessary.

Checks if the pipeline process is registered. If not, starts it with the
given options. Supports `sync: true` for deterministic test execution.

## Parameters

  * `opts` — keyword list passed to the pipeline's `start/1` callback (injected by `use ALF.DSL`). Common options:
    * `:sync` — when `true`, pipeline runs synchronously (useful for tests)

## Returns

  * `:ok` — pipeline is running
  * `{:error, reason}` — pipeline failed to start

## Examples

    :ok = Stepwise.ensure_started(sync: true)

# `flow`

```elixir
@spec flow(map(), list(), Keyword.t()) :: Enumerable.t()
```

# `start`

```elixir
@spec start() :: :ok
```

# `start`

```elixir
@spec start(list()) :: :ok
```

# `started?`

```elixir
@spec started?() :: true | false
```

# `stop`

```elixir
@spec stop() :: :ok | {:exit, {atom(), any()}}
```

# `stream`

```elixir
@spec stream(Enumerable.t(), Keyword.t()) :: Enumerable.t()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
