Spectre.Router.Plugs.Regex (Spectre v0.3.0)

Copy Markdown View Source

Deterministic regex evidence provider for the router pipeline.

Regex rules are treated as hard evidence because they are explicit agent declarations. The plug records a candidate instead of immediately returning a route so the arbitrator can still compare regex evidence with global interrupts, semantic cache hits, classifier results, or custom providers.

Example DSL:

flow :support do
  on :cancel, regex: ~r/^cancel$/i do
    run :cancel_current
  end
end