Skip to main content

Skill

Trait Skill 

Source
pub trait Skill: Send + Sync {
    // Required methods
    fn id(&self) -> &str;
    fn execute<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        ctx: &'life1 mut InvestigationContext,
        tools: &'life2 ToolRegistry,
    ) -> Pin<Box<dyn Future<Output = Result<SkillOutcome, KernelError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;

    // Provided methods
    fn description(&self) -> &str { ... }
    fn applies(&self, _ctx: &InvestigationContext) -> bool { ... }
}
Expand description

A composable, stateless reasoning unit.

Implementations MUST be safe to share across agents: no mutable state in the skill itself. Per-investigation state lives in InvestigationContext.

Required Methods§

Source

fn id(&self) -> &str

Source

fn execute<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 mut InvestigationContext, tools: &'life2 ToolRegistry, ) -> Pin<Box<dyn Future<Output = Result<SkillOutcome, KernelError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Execute the skill. Implementations may inspect and mutate ctx directly (appending evidence/signals) and/or return non-evidence adjustments via SkillOutcome.

Provided Methods§

Source

fn description(&self) -> &str

Source

fn applies(&self, _ctx: &InvestigationContext) -> bool

Whether this skill is willing to run given the current context. Default: always applicable. Specialist skills typically gate on signal presence or evidence already collected.

Implementors§