# `Chimeway.DeliveryPlanning`
[🔗](https://github.com/jonlunsford/chimeway/blob/v1.0.0/lib/chimeway/delivery_planning.ex#L1)

Shared fanout planner used by all dispatch strategies.

Dispatch modules must plan through this module and must not call
`Chimeway.Deliveries.plan_delivery/3` directly.

# `plan_next_step_delivery`

```elixir
@spec plan_next_step_delivery(
  Chimeway.Notifications.Notification.t(),
  atom() | binary(),
  keyword()
) ::
  {:ok, Chimeway.Delivery.t()} | {:error, term()}
```

Plans exactly one canonical delivery for the given `channel` on the supplied
notification using the current active-step workflow linkage.

Used by `Chimeway.Workflows.Progression` after the engine advances the run
cursor to the next step — the planner reuses the same idempotent
`Deliveries.plan_delivery/3` path and the same `resolve_workflow_linkage/3`
helper so progression-emitted next-step rows go through one canonical
planning seam (D-10).

# `plan_notification`

```elixir
@spec plan_notification(
  Chimeway.Notifications.Notification.t(),
  keyword()
) :: {:ok, [Chimeway.Delivery.t()]} | {:error, term()}
```

# `plan_notifications`

```elixir
@spec plan_notifications(
  [Chimeway.Notifications.Notification.t()],
  keyword()
) :: {:ok, [Chimeway.Delivery.t()]} | {:error, term()}
```

---

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