feat: skill system and per-agent behavior filtering #109

Merged
jasoncouture merged 9 commits from feat/skills into main 2026-05-24 18:12:10 -04:00
jasoncouture commented 2026-05-24 18:09:41 -04:00 (Migrated from github.com)

Summary

  • Adds a host-loaded skill system: SKILL.md files discovered across global / app / per-agent workspace roots, parsed and validated (1-64 char name matching parent dir, lowercase alphanumeric + hyphens; 1-1024 char description), surfaced to the agent via the prompt-context skill catalog.
  • Exposes two MCP tools on SkillTools: skill_get (load a skill by name) and skill_test (validate a SKILL.md on disk without registering it).
  • Renders the catalog in the default system template; IToolFilter gates MCP tool discovery and ISkillFilter gates the skill catalog, both driven by a new AgentConfig.Security block (AgentBehaviorOptions with FilterOptions for Skills / Tools / Sources, policies: Default / Allow / Deny / Disable).

Test plan

  • dotnet build clean across the solution
  • dotnet test — 566 / 566 passing locally (one interrupt-timing test flapped on cold run, passed on rerun; pre-existing race unrelated to this PR — flagged separately)
  • Spot-check that a SKILL.md installed under ~/.llama-shears/skills/<name>/ shows up in the per-turn catalog
  • Spot-check skill_test against the bundled create-skill SKILL.md
  • Spot-check filter policies (Allow / Deny / Disable) restrict the agent's tool / skill view as expected
## Summary - Adds a host-loaded skill system: SKILL.md files discovered across global / app / per-agent workspace roots, parsed and validated (1-64 char name matching parent dir, lowercase alphanumeric + hyphens; 1-1024 char description), surfaced to the agent via the prompt-context skill catalog. - Exposes two MCP tools on `SkillTools`: `skill_get` (load a skill by name) and `skill_test` (validate a SKILL.md on disk without registering it). - Renders the catalog in the default system template; `IToolFilter` gates MCP tool discovery and `ISkillFilter` gates the skill catalog, both driven by a new `AgentConfig.Security` block (`AgentBehaviorOptions` with `FilterOptions` for Skills / Tools / Sources, policies: `Default` / `Allow` / `Deny` / `Disable`). ## Test plan - [x] `dotnet build` clean across the solution - [x] `dotnet test` — 566 / 566 passing locally (one interrupt-timing test flapped on cold run, passed on rerun; pre-existing race unrelated to this PR — flagged separately) - [ ] Spot-check that a SKILL.md installed under `~/.llama-shears/skills/<name>/` shows up in the per-turn catalog - [ ] Spot-check `skill_test` against the bundled `create-skill` SKILL.md - [ ] Spot-check filter policies (Allow / Deny / Disable) restrict the agent's tool / skill view as expected
github-actions[bot] commented 2026-05-24 18:11:16 -04:00 (Migrated from github.com)
Package Line Rate Branch Rate Complexity Health
LlamaShears.Core.Eventing 91% 71% 90
LlamaShears.Core.Abstractions 57% 37% 485
LlamaShears.Api 29% 29% 494
LlamaShears.Provider.Ollama 44% 28% 188
LlamaShears.Core.Eventing.Extensions 100% 100% 1
LlamaShears.Core 47% 43% 1840
LlamaShears.Provider.Onnx.Embeddings 37% 38% 72
LlamaShears.Provider.OpenAI 66% 65% 229
LlamaShears.Api.Web 1% 1% 493
LlamaShears.Hosting 33% 21% 27
LlamaShears.Plugins 0% 100% 1
LlamaShears.Core.Eventing 85% 61% 90
LlamaShears 63% 47% 79
LlamaShears.Plugins.Host 34% 24% 36
LlamaShears.Core.Abstractions 46% 25% 485
LlamaShears.Api 6% 2% 494
LlamaShears.Provider.Ollama 3% 1% 188
LlamaShears.IntegrationTests.Fixtures 73% 57% 64
LlamaShears.Core.Eventing.Extensions 100% 100% 1
StrangeSoft.Plugins.Host 20% 21% 87
LlamaShears.Core 41% 27% 1840
LlamaShears.Provider.Onnx.Embeddings 3% 0% 72
LlamaShears.Provider.OpenAI 2% 0% 229
LlamaShears.Api.Web 18% 7% 493
LlamaShears.Hosting 26% 8% 27
LlamaShears.Plugins 0% 100% 1
LlamaShears.Core.Eventing 85% 61% 90
LlamaShears 63% 47% 79
LlamaShears.Plugins.Host 34% 24% 36
LlamaShears.Core.Abstractions 36% 22% 485
LlamaShears.Api 7% 3% 494
LlamaShears.Provider.Ollama 3% 1% 188
LlamaShears.IntegrationTests.Fixtures 70% 52% 64
LlamaShears.Core.Eventing.Extensions 100% 100% 1
StrangeSoft.Plugins.Host 20% 21% 87
LlamaShears.Core 30% 18% 1840
LlamaShears.Provider.Onnx.Embeddings 3% 0% 72
LlamaShears.Provider.OpenAI 2% 0% 229
LlamaShears.Api.Web 17% 6% 493
LlamaShears.Hosting 26% 8% 27
LlamaShears.Analyzers.CodeFixes 85% 69% 60
LlamaShears.Analyzers 88% 76% 199
Summary 46% (12571 / 37536) 36% (2831 / 11547) 12550
Package | Line Rate | Branch Rate | Complexity | Health -------- | --------- | ----------- | ---------- | ------ LlamaShears.Core.Eventing | 91% | 71% | 90 | ✔ LlamaShears.Core.Abstractions | 57% | 37% | 485 | ➖ LlamaShears.Api | 29% | 29% | 494 | ❌ LlamaShears.Provider.Ollama | 44% | 28% | 188 | ❌ LlamaShears.Core.Eventing.Extensions | 100% | 100% | 1 | ✔ LlamaShears.Core | 47% | 43% | 1840 | ❌ LlamaShears.Provider.Onnx.Embeddings | 37% | 38% | 72 | ❌ LlamaShears.Provider.OpenAI | 66% | 65% | 229 | ➖ LlamaShears.Api.Web | 1% | 1% | 493 | ❌ LlamaShears.Hosting | 33% | 21% | 27 | ❌ LlamaShears.Plugins | 0% | 100% | 1 | ❌ LlamaShears.Core.Eventing | 85% | 61% | 90 | ✔ LlamaShears | 63% | 47% | 79 | ➖ LlamaShears.Plugins.Host | 34% | 24% | 36 | ❌ LlamaShears.Core.Abstractions | 46% | 25% | 485 | ❌ LlamaShears.Api | 6% | 2% | 494 | ❌ LlamaShears.Provider.Ollama | 3% | 1% | 188 | ❌ LlamaShears.IntegrationTests.Fixtures | 73% | 57% | 64 | ➖ LlamaShears.Core.Eventing.Extensions | 100% | 100% | 1 | ✔ StrangeSoft.Plugins.Host | 20% | 21% | 87 | ❌ LlamaShears.Core | 41% | 27% | 1840 | ❌ LlamaShears.Provider.Onnx.Embeddings | 3% | 0% | 72 | ❌ LlamaShears.Provider.OpenAI | 2% | 0% | 229 | ❌ LlamaShears.Api.Web | 18% | 7% | 493 | ❌ LlamaShears.Hosting | 26% | 8% | 27 | ❌ LlamaShears.Plugins | 0% | 100% | 1 | ❌ LlamaShears.Core.Eventing | 85% | 61% | 90 | ✔ LlamaShears | 63% | 47% | 79 | ➖ LlamaShears.Plugins.Host | 34% | 24% | 36 | ❌ LlamaShears.Core.Abstractions | 36% | 22% | 485 | ❌ LlamaShears.Api | 7% | 3% | 494 | ❌ LlamaShears.Provider.Ollama | 3% | 1% | 188 | ❌ LlamaShears.IntegrationTests.Fixtures | 70% | 52% | 64 | ➖ LlamaShears.Core.Eventing.Extensions | 100% | 100% | 1 | ✔ StrangeSoft.Plugins.Host | 20% | 21% | 87 | ❌ LlamaShears.Core | 30% | 18% | 1840 | ❌ LlamaShears.Provider.Onnx.Embeddings | 3% | 0% | 72 | ❌ LlamaShears.Provider.OpenAI | 2% | 0% | 229 | ❌ LlamaShears.Api.Web | 17% | 6% | 493 | ❌ LlamaShears.Hosting | 26% | 8% | 27 | ❌ LlamaShears.Analyzers.CodeFixes | 85% | 69% | 60 | ✔ LlamaShears.Analyzers | 88% | 76% | 199 | ✔ **Summary** | **46%** (12571 / 37536) | **36%** (2831 / 11547) | **12550** | ❌ <!-- Sticky Pull Request Commentcoverage -->
Sign in to join this conversation.
No description provided.