router/semantic: coarse-route contract, interface, and legacy mapping (slice 12)
Defines the six-class SemanticRoute type (conversation, knowledge, action, memory_write, system, uncertain), the SemanticRouteDecision output, the SemanticRouter interface, and the deterministic Intent→SemanticRoute mapping from the current seven-intent cascade.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package semantic
|
||||
|
||||
import "context"
|
||||
|
||||
// SemanticRouter — the interface behind which experiment models run. The
|
||||
// implementation decides whether to consume MatchText; the contract here is
|
||||
// that Route returns a coarse decision without touching the authoritative
|
||||
// router's Intent, slots, capability, or source.
|
||||
//
|
||||
// A nil implementation is a valid floor — the shadow harness records
|
||||
// "no model" and continues.
|
||||
type SemanticRouter interface {
|
||||
Route(ctx context.Context, text string) (SemanticRouteDecision, error)
|
||||
}
|
||||
Reference in New Issue
Block a user