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

Copy Markdown View Source

Deterministic rule-based strategy for CouncilEx.AutoCouncil.

Walks the catalog in order and returns the first entry whose :match field matches the prompt. :match may be:

  • a Regex.t() — applied to the prompt string with Regex.match?/2.
  • a 1-arity function — fun.(prompt_string) :: boolean().
  • nil — entry is skipped (not eligible for rule routing).

Returns {:error, :no_match} if nothing hits.

Cost

No LLM calls. Pure pattern matching. Use as a first-line strategy or as the cheap step inside a :cascade.