Skip to content

[Skills Router] Local Cache + Guardrails #86

@fentz26

Description

@fentz26

Summary

Implement local guardrails for the Skills Router including L1/L2 caching and local policy enforcement.

Parent Epic

Note

Distributed cache (L3) and cloud guardrails are handled in Neona-Cloud.

Components

Local Cache System

  • L1 Cache: In-memory LRU cache (fast, limited size)
  • L2 Cache: Persistent cache (SQLite)

Local Guardrails

  • Safety Checks: Block dangerous skills locally
  • Permission Checks: User-based skill access control
  • Policy Checks: Integration with local policy engine
  • Rate Limiting: Local rate limits

Implementation

Files to Create/Modify

  • internal/registry/skill/router/cache.go
  • internal/registry/skill/router/guardrails.go

Configuration

skills_router:
  cache:
    l1_size: 1000
    l1_ttl: 5m
    l2_ttl: 1h
  guardrails:
    enable_safety_checks: true
    enable_rate_limiting: true
    enable_policy_checks: true
    max_results: 10

Acceptance Criteria

  • L1 in-memory cache works
  • L2 SQLite cache works
  • Cache cascading (L1 → L2)
  • Cache expiration works
  • Safety guard blocks inappropriate skills
  • Local rate limiting works
  • Policy engine integration

Related Issues

  • Neona-Cloud#20 - Distributed Cache (L3)
  • Neona-Cloud#21 - Cloud Guardrails

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions