Skip to content

feat(skills): policy-gated skills foundation with Agent Framework adapter - #229

Open
IanFrelinger wants to merge 5 commits into
masterfrom
cursor/skills-foundation-4a18
Open

feat(skills): policy-gated skills foundation with Agent Framework adapter#229
IanFrelinger wants to merge 5 commits into
masterfrom
cursor/skills-foundation-4a18

Conversation

@IanFrelinger

Copy link
Copy Markdown
Owner

Summary

Implements Nexo's policy-gated capability-extension layer using the Microsoft Agent Skills SKILL.md format, with Nexo-owned ports as the public contract and Microsoft.Agents.AI isolated to a single adapter project.

Architecture

  • Nexo-owned ports (Nexo.Core.Application.Skills): INexoSkillCatalog, INexoSkillPolicyEvaluator, INexoScriptRunner, INexoSkillApprovalResolver, INexoSkillAuditLog, INexoSkillCacheController
  • Infrastructure (Nexo.Infrastructure.Skills): policy evaluator, local sandbox runner, approval resolver, audit emitter, content-hash cache controller
  • Adapter (Nexo.Skills.AgentFramework): wraps AgentSkillsProvider / file + class skills; only project referencing Microsoft.Agents.AI 1.13.0

Policy & trust

  • Extended TrustPolicyPack with optional skillRules (visibility by tier, script allow-list, auto-approve tuples, script limits)
  • Sample rules added to internal-only.json and strict-enterprise.json
  • Visibility resolved from policy pack × trust tier × barrier identity

Script execution

  • NexoScriptRunner routes through ICapabilityRouter seam (local-only this phase) with INexoScriptSandbox swappable implementation
  • Enforces timeout, output cap, working-directory isolation, and policy script allow-list
  • Script approval via policy auto-approve or IApprovalGate bridge (ApprovalGateSkillApprovalBridge)

Audit contract

Stable NexoSkillAuditEvent schema with six event types:
SKILL_ADVERTISED, SKILL_LOADED, SKILL_RESOURCE_READ, SKILL_SCRIPT_APPROVAL_REQUESTED, SKILL_SCRIPT_APPROVAL_RESOLVED, SKILL_SCRIPT_EXECUTED

Events fan out to IBarrierAuditLog and IDataDecisionAuditLog.LogSkillDisclosure.

Dogfood skills

Skill Type Purpose
nexo-trust-inspector File (SKILL.md + scripts/list-packs.sh) Lists trust policy packs
nexo-active-policy-pack Class (AgentClassSkill<T>) Returns active pack id/version

Tests

15 tests covering policy filter mapping, approval paths, runner enforcement (allow-list, output cap, timeout passthrough), audit emission per stage, and end-to-end disclosure flow integration.

Test plan

  • dotnet test src/Nexo.Tests.Infrastructure/Nexo.Tests.Infrastructure.csproj -f net8.0 --filter "FullyQualifiedName~Nexo.Tests.Infrastructure.Tests.Skills"
  • dotnet build src/Nexo.Hosting/Nexo.Hosting.csproj
Open in Web Open in Cursor 

cursoragent and others added 5 commits July 13, 2026 18:51
Co-authored-by: IanFrelinger <IanFrelinger@users.noreply.github.com>
Co-authored-by: IanFrelinger <IanFrelinger@users.noreply.github.com>
Co-authored-by: IanFrelinger <IanFrelinger@users.noreply.github.com>
…mples

Co-authored-by: IanFrelinger <IanFrelinger@users.noreply.github.com>
Make skill script approval human-in-the-loop via waitable store + CLI/API.
Wire skill advertisements into self-extend agent snapshots, register
AgentSkillsProvider for hosts, and invalidate skill cache after skill rewrites.

Co-authored-by: IanFrelinger <IanFrelinger@users.noreply.github.com>
@IanFrelinger
IanFrelinger marked this pull request as ready for review July 14, 2026 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants