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:
2026-09-07 01:42:17 +04:00
parent 494c719a5d
commit b6a21c17eb
3 changed files with 112 additions and 0 deletions
+14
View File
@@ -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)
}