Skip to content

sgns::neoswarm::router::RuleBasedRouter

MVP rule-based routing (PTDS §6.1). More...

#include <rule_based_router.hpp>

Inherits from sgns::neoswarm::router::IRouter

Public Classes

Name
struct Config

Public Functions

Name
RuleBasedRouter()
RuleBasedRouter(Config cfg)
virtual outcome::result< RouteDecision > Route(const Task & task) override
Route a task to the appropriate execution mode and specialist.

Additional inherited members

Public Functions inherited from sgns::neoswarm::router::IRouter

Name
virtual ~IRouter() =default

Detailed Description

class sgns::neoswarm::router::RuleBasedRouter;

MVP rule-based routing (PTDS §6.1).

Decision tree: numeric_density > threshold OR has_math_keywords → CorePlusMath has_grammar_request → CorePlusGrammar has_code_syntax → CoreOnly (future: CorePlusCode) else → CoreOnly

Public Functions Documentation

function RuleBasedRouter

RuleBasedRouter()

function RuleBasedRouter

explicit RuleBasedRouter(
    Config cfg
)

function Route

virtual outcome::result< RouteDecision > Route(
    const Task & task
) override

Route a task to the appropriate execution mode and specialist.

Parameters:

  • task Incoming task.

Return: RouteDecision on success, Error on failure.

Reimplements: sgns::neoswarm::router::IRouter::Route


Updated on 2026-07-25 at 22:56:56 +0000