CouncilEx.AutoCouncil.Strategies.Cascade (CouncilEx v0.1.0)

Copy Markdown View Source

Try a chain of strategies in order; first success wins.

Pulls the chain from the parent AutoCouncil's :options keyword:

AutoCouncil.new(
  strategy: :cascade,
  catalog:  catalog,
  options:  [chain: [:rules, :embedding, :llm_classify]]
)

Each step is a strategy reference (atom or {module, opts}) — same shape accepted by AutoCouncil.new/1. The cascade itself cannot appear in its own chain (would loop).

Per-step failures emit a [:council_ex, :auto_council, :cascade_step] telemetry event with %{strategy: atom, status: :ok | :error, ...} so operators can see how often each step earns its keep.