Index of every page on this site: llms.txt
All skills
semantica-agi avatar

/policy

@63eabcc
by Semanticasemantica-agi/semantica15k stars
1,750
Run it yourself

Define and enforce decision policies, compliance rules, and exceptions over Semantica graphs. Uses ContextGraph.check_decision_rules/enforce_decision_policy and context.PolicyEngine.

Requires /semantica
Use this Skill: https://skilld.dev/gh/semantica-agi/semantica/policy

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈48 tokens for metadata: the name and description. ≈487 when used: this file.

Description uses 2.4% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈191 characters, or 2.4%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

/semantica:policy

Policy governance over recorded decisions. Usage: /semantica:policy <task> [args]

PolicyEngine lives in semantica.context. For most cases the two policy methods on ContextGraph itself are enough.


check <decision> — the simple path

No policy store needed; rules default to a built-in policy set.

from semantica.context import ContextGraph

graph = ContextGraph()
result = graph.check_decision_rules({
    "category": "vendor_selection",
    "outcome": "approved",
    "confidence": 0.93,
    "decision_maker": "gyro",
})
# {'compliant': bool, 'violations': [...], 'warnings': [...], 'policy_rules': {...}}

Default rules: min_confidence=0.7, required_outcomes=['approved','rejected','flagged'], required_metadata=['decision_maker'], max_reasoning_length=1000. Override by passing your own rules= dict.

enforce <decision> [--rules <dict>]

verdict = graph.enforce_decision_policy(decision_data, policy_rules=None)

Managed policies — the full path

PolicyEngine requires a graph store and versioned Policy objects.

from semantica.context import PolicyEngine
from semantica.context.decision_models import Policy

engine = PolicyEngine(graph_store)

policy_id = engine.add_policy(Policy(...))
policies  = engine.get_applicable_policies(category="vendor_selection", entities=[...])
ok        = engine.check_compliance(decision, policy_id)
history   = engine.get_policy_history(policy_id)

engine.update_policy(policy_id, rules={...}, change_reason="tightened threshold")
engine.record_exception(decision_id, policy_id, reason="...", approver="...")
impact    = engine.analyze_policy_impact(policy_id, proposed_rules={...})
affected  = engine.get_affected_decisions(policy_id, from_version, to_version)

Note check_compliance takes a Decision object, not a dict — fetch it from the graph rather than constructing one by hand.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    The skill provides an interface for defining and enforcing decision policies and compliance rules within the Semantica ecosystem. No security issues or malicious patterns were detected.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at 63eabcc. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 3 months ago

README badge

README badge for semantica-agi/semantica/policy