42 lines
1.2 KiB
Go
42 lines
1.2 KiB
Go
package capability
|
|
|
|
type IntelligencePath string
|
|
|
|
const (
|
|
PathRule IntelligencePath = "RULE"
|
|
PathReflex IntelligencePath = "REFLEX"
|
|
PathSkill IntelligencePath = "SKILL"
|
|
PathSmallLocal IntelligencePath = "SMALL_LOCAL"
|
|
PathStrongLocal IntelligencePath = "STRONG_LOCAL"
|
|
PathExternal IntelligencePath = "EXTERNAL"
|
|
PathResearch IntelligencePath = "RESEARCH"
|
|
PathTeam IntelligencePath = "TEAM"
|
|
)
|
|
|
|
type StrategyRequest struct {
|
|
RequiredQuality int64
|
|
PreferLowLatency bool
|
|
CostBudgetMicros int64
|
|
RiskClass string
|
|
FreshnessRequired bool
|
|
CostOfError int64
|
|
}
|
|
type StrategyDecision struct {
|
|
Path IntelligencePath
|
|
Reason string
|
|
Escalate bool
|
|
}
|
|
|
|
func (r StrategyRequest) Select() StrategyDecision {
|
|
if r.RiskClass == "HIGH" || r.CostOfError >= 800 {
|
|
return StrategyDecision{Path: PathStrongLocal, Reason: "high consequence requires deeper reasoning", Escalate: true}
|
|
}
|
|
if r.RequiredQuality <= 500 && r.CostBudgetMicros > 0 {
|
|
return StrategyDecision{Path: PathRule, Reason: "bounded low-risk path"}
|
|
}
|
|
if r.PreferLowLatency {
|
|
return StrategyDecision{Path: PathReflex, Reason: "latency preference with later escalation"}
|
|
}
|
|
return StrategyDecision{Path: PathSkill, Reason: "validated reusable strategy"}
|
|
}
|