Documentation
¶
Index ¶
- func BuildSystemPromptInjection(skills []Skill) string
- type ExecutionMode
- type ExecutionPlan
- type ExecutionStep
- type Planner
- type Registry
- func (r *Registry) All() []*Skill
- func (r *Registry) Get(name string) (*Skill, bool)
- func (r *Registry) LoadSkills(skills []Skill)
- func (r *Registry) LookupCommand(cmd string) (*Skill, bool)
- func (r *Registry) LookupKeyword(text string) (*Skill, bool)
- func (r *Registry) MatchAll(text string) []*Skill
- func (r *Registry) MatchRegex(text string) (*Skill, []string)
- func (r *Registry) Register(skill *Skill)
- type Skill
- type Trigger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildSystemPromptInjection ¶
BuildSystemPromptInjection generates the skills section for the system prompt. It follows the Lazy Load pattern: listing available skills and instructing the agent to read definition files.
Types ¶
type ExecutionMode ¶ added in v1.6.4
type ExecutionMode string
ExecutionMode defines how a group of skills should be executed
const ( ModeParallel ExecutionMode = "parallel" ModeSerial ExecutionMode = "serial" )
type ExecutionPlan ¶ added in v1.6.4
type ExecutionPlan struct {
Steps []ExecutionStep
}
ExecutionPlan represents the ordered execution of skills
type ExecutionStep ¶ added in v1.6.4
type ExecutionStep struct {
Mode ExecutionMode
Skills []*Skill
}
ExecutionStep represents a single step in an execution plan
type Planner ¶ added in v1.6.4
type Planner struct {
// contains filtered or unexported fields
}
Planner handles skill intention recognition and execution planning
func NewPlanner ¶ added in v1.6.4
NewPlanner creates a new skill planner
type Registry ¶ added in v1.6.4
type Registry struct {
// contains filtered or unexported fields
}
Registry manages the registration and lookup of skills
func NewRegistry ¶ added in v1.6.4
func NewRegistry() *Registry
NewRegistry creates a new skill registry
func (*Registry) LoadSkills ¶ added in v1.6.4
LoadSkills registers a list of skills
func (*Registry) LookupCommand ¶ added in v1.6.4
LookupCommand finds a skill by command trigger (e.g., "/help")
func (*Registry) LookupKeyword ¶ added in v1.6.4
LookupKeyword finds a skill by keyword trigger
func (*Registry) MatchAll ¶ added in v1.6.4
MatchAll finds all skills matching the input via command, keyword, or regex
func (*Registry) MatchRegex ¶ added in v1.6.4
MatchRegex finds the first skill matching a regex trigger
type Skill ¶
type Skill struct {
Name string `yaml:"name"`
Description string `yaml:"description"`
Path string `yaml:"-"` // Absolute path to the SKILL.md file
Content string `yaml:"-"` // The markdown content (instructions)
Triggers []Trigger `yaml:"triggers"`
Tags []string `yaml:"tags"`
Priority int `yaml:"priority"`
Timeout time.Duration `yaml:"timeout"`
Retries int `yaml:"retries"`
Fallback string `yaml:"fallback"`
Dependencies []string `yaml:"dependencies"`
Metadata map[string]interface{} `yaml:"metadata,omitempty"`
}
Skill represents a loaded AgentSkill