governance-policy
Skill2 starsChanged 4 months agoApache-2.0View on GitHub
Add or modify AI Governance Control Plane governance policies, policy rules, evidence, decision reasoning, explanations, audit records, policy lifecycle behaviour, or decision APIs. Use when a change affects deterministic evaluation, explainability, evidence lineage, decision persistence, or replayable governance outcomes.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- console/AGENTS.mdAGENTS.md
- keycloak-postgres/AGENTS.mdAGENTS.md
- api-changeSkill
- domain-featureSkill
- keycloak-service-identitySkill
- model-runtime-capability-profileSkill
- tenant-isolationSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Read root AGENTS.md, src/ai_governance/domain/AGENTS.md, and src/ai_governance/services/AGENTS.md.
- Distinctive: line 19
Ensure the evidence builder produces the exact fields used by the policy.
- Distinctive: line 25
Test the approved, rejected or blocked, missing-evidence, lifecycle, and repeated-request paths that apply to the change.
- Distinctive: line 30
Use the existing policy builder so an evaluator trace can name the rule, condition, effect, reason, and priority that produced its result.
- Distinctive: line 52
Do not make outcome meaning depend on an unordered dictionary, current time, or a provider response that is not captured as evidence.
- Distinctive: line 76
Run the closest persistence or tenant-isolation test when the change alters stored decision evidence or an externally visible decision …
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Governance Policy
Build a deterministic decision from versioned policy and inspectable evidence.
Workflow
- Read root
AGENTS.md,src/ai_governance/domain/AGENTS.md, andsrc/ai_governance/services/AGENTS.md. Read API, repository, tenancy, and MCP instructions if the change reaches those boundaries. - Define the target type, evidence fields, condition operators, rule priority, effect, and human-readable reason before changing the evaluator.
- Model policy rules as structured, versioned data. Do not embed an untestable policy decision in a route, database adapter, or provider call.
- Ensure the evidence builder produces the exact fields used by the policy. Preserve the evaluation outcome and explanation needed to reconstruct why the decision was made.
- Persist final committed outcomes with policy outcomes, explanation, audit context, and tenant scope. Maintain idempotency for repeated decision requests.
- Test the approved, rejected or blocked, missing-evidence, lifecycle, and repeated-request paths that apply to the change.
Rule pattern
Use the existing policy builder so an evaluator trace can name the rule, condition, effect, reason, and priority that produced its result.
rule = build_policy_rule(
rule_id="rule-1",
name="Groundedness gate",
conditions=(
{
"field_path": "metrics.groundedness.score",
"operator": PolicyConditionOperator.GREATER_THAN.value,
"expected_value": 0.8,
},
),
effect=PolicyEffect.APPROVE.value,
reason_template="Groundedness passed.",
priority=10,
severity="HIGH",
metadata={"source": "unit-test"},
)Do not make outcome meaning depend on an unordered dictionary, current time, or a provider response that is not captured as evidence.
Decision integrity checklist
- Version the policy and enforce its lifecycle; do not silently change an active definition.
- Make missing or invalid evidence explicit instead of inventing a result.
- Persist the explanation and audit record with the committed decision.
- Scope decision retrieval, evidence, explanation, and lineage by tenant context.
- Return a stable conflict for a reused request ID with different input.
Verify
These commands cover the current policy lifecycle, evaluation, explanation, audit, idempotency, and API contract paths:
uv run ruff check src/ai_governance/decisions src/ai_governance/services
uv run pytest tests/unit/test_policy_administration_service.py
uv run pytest tests/api/test_policy_administration_api.py tests/api/test_decision_api.pyRun the closest persistence or tenant-isolation test when the change alters stored decision evidence or an externally visible decision query.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

