Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdherenceLevel ¶
type AdherenceLevel string
AdherenceLevel represents a skill's compliance level.
const ( AdherenceInvalid AdherenceLevel = "Invalid" AdherenceLow AdherenceLevel = "Low" AdherenceMedium AdherenceLevel = "Medium" AdherenceMediumHigh AdherenceLevel = "Medium-High" AdherenceHigh AdherenceLevel = "High" TokenSoftLimit = 500 TokenHardLimit = 5000 )
func ParseAdherenceLevel ¶
func ParseAdherenceLevel(s string) (AdherenceLevel, error)
ParseAdherenceLevel converts a string flag value to an AdherenceLevel.
func (AdherenceLevel) AtLeast ¶
func (a AdherenceLevel) AtLeast(target AdherenceLevel) bool
AtLeast returns true if a is at or above the target level.
func (AdherenceLevel) String ¶
func (a AdherenceLevel) String() string
type HeuristicScorer ¶
type HeuristicScorer struct {
// TokenSoftLimit overrides the default warning threshold when > 0.
TokenSoftLimit int
// TokenLimit overrides the default hard limit when > 0.
TokenLimit int
// SkillCount is the total number of skills in the catalog (for context-dependent scoring).
// Optional; if 0, context-dependent checks are skipped.
// TODO: Callers should plumb the catalog skill count from workspace detection
// to enable context-dependent anti-trigger risk scaling in production runs.
SkillCount int
}
HeuristicScorer scores skills using pattern-matching heuristics.
func (HeuristicScorer) Score ¶
func (h HeuristicScorer) Score(sk *skill.Skill) *ScoreResult
type ScoreResult ¶
type ScoreResult struct {
Level AdherenceLevel
Issues []Issue
DescriptionLen int
HasTriggers bool
HasAntiTriggers bool
HasRoutingClarity bool
TriggerCount int
AntiTriggerCount int
}
ScoreResult holds the complete scoring output.
type Scorer ¶
type Scorer interface {
Score(*skill.Skill) *ScoreResult
}
Scorer evaluates a skill and returns a score.
Click to show internal directories.
Click to hide internal directories.