Files
Maven/internal/router/semantic/legacy.go
T
claude b6a21c17eb 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.
2026-09-07 01:42:17 +04:00

39 lines
976 B
Go

package semantic
import "github.com/kami/maven/internal/router"
// IntentToRoute maps the current seven-intent Decision.Intent to a coarse
// semantic route. The mapping is deterministic and exists only for
// baseline/evaluation — it does not change current routing behaviour.
//
// Mapping:
//
// chat → conversation
// query → knowledge
// act → action
// reminder → action
// fact → memory_write
// note → memory_write
// system → system
// unknown → uncertain
func IntentToRoute(intent router.Intent) SemanticRoute {
switch intent {
case router.IntentChat:
return RouteConversation
case router.IntentQuery:
return RouteKnowledge
case router.IntentAct:
return RouteAction
case router.IntentReminder:
return RouteAction
case router.IntentFact:
return RouteMemoryWrite
case router.IntentNote:
return RouteMemoryWrite
case router.IntentSystem:
return RouteSystem
default:
return RouteUncertain
}
}