Skip to content

feat(core): wire SpeculationEngine try_dispatch into PASTE pattern skill activation path #3642

@bug-ops

Description

@bug-ops

Description

SpeculationEngine is now wired into the agent loop (#3636, PR #3640). The Pattern/PASTE mode (mode = "pattern") requires calling try_dispatch at skill activation time — when PatternStore::predict() returns top-K tool candidates for a matched skill.

Scope

  • File: skill activation path in crates/zeph-core/src/agent/ (where skills are matched and dispatched)
  • At skill activation: call PatternStore::predict(skill_id) to get candidates, then engine.try_dispatch(prediction, trust_level) for each above the confidence threshold
  • Wire trust_level from the skill's configured trust level

Expected Behavior

With [tools.speculative] mode = "pattern", after 5+ observations of a skill invoking the same tool sequence, the engine should pre-execute the predicted tools during skill activation latency.

Depends on

#3636 (merged in PR #3640)

Related

Metadata

Metadata

Assignees

Labels

P2High value, medium complexityenhancementNew feature or requestskillszeph-skills crate

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions