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§
fn id(&self) -> &str
Sourcefn 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,
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§
fn description(&self) -> &str
Sourcefn applies(&self, _ctx: &InvestigationContext) -> bool
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.