Module: LittleGhost::Agent::Skills::ClassMethods

Defined in:
lib/little_ghost/agent/skills.rb

Overview

Exposes skill discovery declarations on agent classes. These methods become inheritable DSL entries when the capability is included.

Instance Method Summary collapse

Instance Method Details

#skills(*values, **options) ⇒ Object

:call-seq:

skills(*paths, **options) -> configuration
skills(paths: paths_or_resolver, **options) -> configuration

Enables skill discovery for this agent. paths may be paths or a callable resolved for each run. When omitted, the runtime's configured skill paths are used.



64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/little_ghost/agent/skills.rb', line 64

def skills(*values, **options)
  configured_paths = if options.key?(:paths)
    options.delete(:paths)
  elsif values.empty?
    nil
  else
    values.flatten
  end
  self.skills_configuration_value = options.merge(paths: configured_paths)
  tools CatalogTools
  before_invocation :include_skills_prompt
end

#skills_configurationObject

:nodoc:



77
# File 'lib/little_ghost/agent/skills.rb', line 77

def skills_configuration = skills_configuration_value # :nodoc: