     end
   end
 
+  docp """
+  The StepFlow guides the step, allowing it to react to the received event.
+
+  Step handling of events is made through Steppable's `handle_event/3`, refer to
+  its documentation for more information.
+
+  Once the event is handled by the step, the returned action is handled by
+  StepFlow. It may be one of `:complete | :fail | :noop`. See doc on
+  `handle_action/2`.
+  """
   defp step_flow(step) do
     flowing do
       with \

      end
    end
  end
  defp handle_action(:fail, step),
    do: Steppable.fail(step)
  defp handle_action(:noop, _),
    do: :noop

  @spec update_next(Step.t(struct), Step.step_name) ::
    term
  defp update_next(prev_step = %{entity_id: entity_id}, next_step_name) do
    next_step = Step.fetch(next_step_name, entity_id, %{})


defmodule Helix.Story.Event.Handler.Story do
  @moduledoc """
  The StoryEventHandler is centralized, in the sense that all events that should
  be handled by Steps must get handled by it.

  Once an event is received, we figure out the entity responsible for that event
  and verify whether the StepFlow should be followed. The StepFlow guides the
  Step through the Steppable protocol, allow it to react to the event, either
  by ignoring it, completing the step or failing it.
  """

  import HELF.Flow
  import HELL.MacroHelpers
