Skip to content

feat(skills): implement M10 advanced skills#96

Merged
bug-ops merged 2 commits intomainfrom
feat/m10/advanced-skills
Feb 8, 2026
Merged

feat(skills): implement M10 advanced skills#96
bug-ops merged 2 commits intomainfrom
feat/m10/advanced-skills

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Feb 8, 2026

Summary

  • Embedding-based skill matcher with cosine similarity selects top-K relevant skills per user query instead of injecting all skills into system prompt
  • Filesystem watcher (notify + debouncer) detects SKILL.md changes and hot-reloads without restart
  • Skill priority: earlier paths in config take precedence for same-name skills
  • SQLite skill_usage table tracks invocation counts; /skills command displays statistics
  • Three new bundled skills: git, docker, api-request

Changes

New files:

  • crates/zeph-skills/src/matcher.rs -- SkillMatcher, cosine similarity, EmbedFuture callback type
  • crates/zeph-skills/src/watcher.rs -- SkillWatcher with notify-debouncer-mini (500ms debounce)
  • crates/zeph-memory/migrations/004_skill_usage.sql -- skill_usage table
  • skills/{git,docker,api-request}/SKILL.md -- bundled skills

Modified:

  • agent.rs -- dynamic per-query skill selection, reload handling, /skills command
  • config.rs -- max_active_skills field + ZEPH_SKILLS_MAX_ACTIVE env override
  • registry.rs -- priority dedup (HashSet), reload(), into_skills()
  • prompt.rs -- generic Borrow for both &[Skill] and &[&Skill]
  • sqlite.rs -- record_skill_usage (UPSERT), load_skill_usage
  • main.rs -- matcher/watcher initialization, embed_fn closure wiring

Dependencies: notify 8, notify-debouncer-mini 0.7

Test plan

  • 234 workspace tests pass (0 failures, 6 skipped)
  • clippy clean (-D warnings)
  • cargo +nightly fmt --check clean
  • Security audit: no critical/high issues
  • Code review: approved, no blocking issues
  • Manual test: verify skill matching with Ollama embedding model
  • Manual test: add SKILL.md while running, verify hot-reload
  • Manual test: run /skills command

Closes #74, closes #75, closes #76, closes #77

Add embedding-based skill matcher with cosine similarity for dynamic
per-query skill selection, replacing static inject-all behavior.
Implement filesystem watcher for hot-reload of SKILL.md files with
500ms debounce. Add skill priority system where earlier config paths
take precedence. Track skill usage in SQLite with /skills command.
Include three new bundled skills: git, docker, api-request.

Closes #75, closes #76, closes #77
@github-actions github-actions bot added documentation Improvements or additions to documentation skills zeph-skills crate memory zeph-memory crate (SQLite) rust Rust code changes core zeph-core crate tests Test-related changes dependencies Dependency updates config Configuration file changes enhancement New feature or request size/XL Extra large PR (500+ lines) labels Feb 8, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 8, 2026

Codecov Report

❌ Patch coverage is 67.20930% with 141 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/zeph-core/src/agent.rs 33.33% 66 Missing ⚠️
src/main.rs 0.00% 34 Missing ⚠️
crates/zeph-skills/src/watcher.rs 0.00% 32 Missing ⚠️
crates/zeph-skills/src/matcher.rs 95.86% 6 Missing ⚠️
crates/zeph-core/src/config.rs 62.50% 3 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #96      +/-   ##
==========================================
- Coverage   77.06%   76.18%   -0.88%     
==========================================
  Files          20       22       +2     
  Lines        3662     4078     +416     
==========================================
+ Hits         2822     3107     +285     
- Misses        840      971     +131     
Files with missing lines Coverage Δ
crates/zeph-memory/src/sqlite.rs 99.63% <100.00%> (+0.03%) ⬆️
crates/zeph-skills/src/loader.rs 98.64% <ø> (ø)
crates/zeph-skills/src/prompt.rs 100.00% <100.00%> (ø)
crates/zeph-skills/src/registry.rs 99.08% <100.00%> (+0.93%) ⬆️
crates/zeph-core/src/config.rs 96.46% <62.50%> (-0.82%) ⬇️
crates/zeph-skills/src/matcher.rs 95.86% <95.86%> (ø)
crates/zeph-skills/src/watcher.rs 0.00% <0.00%> (ø)
src/main.rs 0.00% <0.00%> (ø)
crates/zeph-core/src/agent.rs 49.45% <33.33%> (-9.44%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Release M10 Advanced Skills as v0.5.0. Update CHANGELOG, README
with embedding-based skill matching, hot-reload, usage tracking.
@bug-ops bug-ops enabled auto-merge (squash) February 8, 2026 15:40
@bug-ops bug-ops merged commit b358b55 into main Feb 8, 2026
17 checks passed
@bug-ops bug-ops deleted the feat/m10/advanced-skills branch February 8, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config Configuration file changes core zeph-core crate dependencies Dependency updates documentation Improvements or additions to documentation enhancement New feature or request memory zeph-memory crate (SQLite) rust Rust code changes size/XL Extra large PR (500+ lines) skills zeph-skills crate tests Test-related changes

Projects

None yet

2 participants