Rules Library
Suvra ships a built-in Rules Library — a set of curated, reusable rules that control-plane policies reference by rule_id rather than inlining rule logic (see Policy Model for how references hydrate at evaluation time).
Scope
The library ships 17 category YAML files with 60+ reusable rules:
filesystem · http · shell · secrets · email · database · api · pii · document · transaction · notification · compliance · crm · storage · calendar · workflow · code
Library files live under suvra/resources/rules/ and ship inside the installed wheel. Browse the merged catalog from the dashboard at /dashboard/rules, filterable by category.
Rule shape
Every library rule has:
id— stable identifier referenced from policiestype— the action type it applies to (fs.write_file,http.request,shell.exec, etc.)effect—allow | deny | needs_approvalconstraints— optional constraint map (full reference: Policy Model → Constraints)description— human-readable summary
Browsing from the dashboard
/dashboard/rules shows the full library with:
- Category tabs and search
- Per-rule detail (type, effect, constraints, description)
- Membership — which policies currently reference each rule
Building on the library
For most control-plane deployments:
- Start with the shipped library.
- Enable the rules appropriate to each category you use.
- Write per-agent policies for agent-specific overrides.
- Add custom rules only when a library rule doesn't cover your need.
See Policy Model for authoring custom rules and the Policy dashboard for reviewing the effective merged policy for any agent.
Related
- Policy Model — the two-tier engine these rules compose into
- Policy dashboard — add rules to a policy, effective view, rule builder