Class: Chorus::Router
- Inherits:
-
Object
- Object
- Chorus::Router
- Defined in:
- lib/chorus/router.rb
Overview
Decides which agent should handle a given user message.
v0.1.0 uses simple keyword matching (no LLM call). The public interface
is a single method, route, so this class can be swapped for an
LLM-based router later without touching Orchestrator.
Constant Summary collapse
- CODER_KEYWORDS =
Words that, when present in a message, indicate a coding task.
%w[code bug function error debug script class method variable exception refactor].freeze
- DEFAULT_AGENT =
:research
Instance Method Summary collapse
-
#route(message) ⇒ Symbol
The agent name that should handle this message (:coder or :research).
Instance Method Details
#route(message) ⇒ Symbol
Returns the agent name that should handle this message (:coder or :research).
18 19 20 |
# File 'lib/chorus/router.rb', line 18 def route() coding_task?() ? :coder : DEFAULT_AGENT end |