Class: Pikuri::Skill::Promoted
- Inherits:
-
Data
- Object
- Data
- Pikuri::Skill::Promoted
- Defined in:
- lib/pikuri/skill/promoted.rb
Overview
Emitted when a touched file brings +paths:+-gated skills into play, so a UI can say why a skill it never listed suddenly exists:
Promoted.new(skills: [rdoc], path: 'lib/pikuri/agent.rb').to_s
# => "skills available: writing-rdoc (matched lib/pikuri/agent.rb)"
path is load-bearing rather than decoration: activation deliberately
over-fires (a coarse glob costs a few hundred bytes, a missed one costs
the skill), so a human will see a skill appear for no visible reason,
and without the trigger, diagnosing it means guessing which glob matched.
This fires before the tool result the touch produced: the listener
decides at before_tool_call, while the injection itself waits for the
tool batch to be answered. "We decided" and "the model saw it" are
genuinely different moments; Agent::Event::SystemInjected marks
the second one.
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#skills ⇒ Object
readonly
Returns the value of attribute skills.
Instance Method Summary collapse
-
#to_s ⇒ String
One line, for a renderer with no case arm of its own.
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path
21 22 23 |
# File 'lib/pikuri/skill/promoted.rb', line 21 def path @path end |
#skills ⇒ Object (readonly)
Returns the value of attribute skills
21 22 23 |
# File 'lib/pikuri/skill/promoted.rb', line 21 def skills @skills end |
Instance Method Details
#to_s ⇒ String
Returns one line, for a renderer with no case arm of its own.
23 |
# File 'lib/pikuri/skill/promoted.rb', line 23 def to_s = "skills available: #{skills.map(&:name).join(', ')} (matched #{path})" |