One rule, as code and as a card.
Pick a governance rule from six templates, or write your own, then set its owner, scope, review date and the obligations it answers. You get the Policy Card in Markdown, YAML and JSON, an OPA/Rego module with unit tests, a Cedar stub and the CI hook. Illustrative: review before use.
Indicative, not legal advice and not a conformity claim. Nothing you enter leaves your browser.
JavaScript is off or has not loaded, so the generated files and the downloads are not available. The questions, the criteria and the guide below still work as a worksheet you can read and fill in by hand.
Built from 05. Patterns: Policy Card of the Body of Knowledge. Runs entirely in this page: no account and no upload.
One task from the everyday practice of AI governance, defined and compared.
Your Policy Card
Illustrative, review before use. Test the modules against your own inputs before any of them gates a build or an action.
What a Policy Card is
A Policy Card writes one governance rule as a machine-readable artefact that travels with the system it governs: its effect, the failure mode it addresses, where it is enforced, the obligations it maps to and the engine module that implements it [1][2]. The same card is evaluated in the pipeline and, where the rule is a runtime constraint, at the point of action, and every evaluation leaves a verdict: rule id, decision, input hash and timestamp [1]. The machine version validates against the policy card schema [3]; the obligation ids are the stable ids of the register [4].
The six rule templates
Each template states the rule with its default parameters, the effect, where it is enforced, the failure mode it starts from, the obligations it helps evidence by default and the pattern it builds. Without JavaScript, use this list and the fields above as a worksheet.
No unregistered agent in production
No agent runs in production unless it has an active entry in the agent registry, with an owner and an expiry that has not passed.
- Effect
-
deny - Enforced at
deployruntime- Failure mode
- An agent that nobody owns or bounded acts in production (a shadow agent).
- Obligations (default)
-
- AIGE-OBL-EUAIA-ART49-71 (Deferred)
- AIGE-OBL-NIST-AGENTS (Draft or proposed)
- AIGE-OBL-OWASP-AGENTIC (Voluntary)
- Builds
- Agent Registry
- Sample files
- Rego, Rego tests , Cedar, card (YAML)
Eval score at or above a threshold before deploy
A version merges or deploys only if its safety-core eval result for that exact version scores at least 0.90.
- Effect
-
deny - Enforced at
pre_mergedeploy- Failure mode
- A regressed model version ships because nothing checked the eval result for that exact version.
- Obligations (default)
-
- AIGE-OBL-EUAIA-ART15 (Deferred)
- AIGE-OBL-NISTRMF-MEASURE (Voluntary)
- AIGE-OBL-ISO42001-A6 (Voluntary)
- Builds
- Eval Gate in CI
- Sample files
- Rego, Rego tests , Cedar, card (YAML)
No personal data sent to an external model
No request that carries personal, special_category data is sent to a model hosted outside the organisation; a request without a data classification is treated as carrying it.
- Effect
-
deny - Enforced at
runtime- Failure mode
- Personal data leaves the organisation in a prompt to a third-party model.
- Obligations (default)
-
- AIGE-OBL-ISO42001-A7 (Voluntary)
- AIGE-OBL-ISO42001-A10 (Voluntary)
- AIGE-OBL-OWASP-LLM (Voluntary)
- Builds
- Runtime Guardrail
- Sample files
- Rego, Rego tests , Cedar, card (YAML)
Human approval required for a named tool
An agent calls refunds-api (create_refund) only with a recorded approval by a person other than the agent.
- Effect
-
require_approval - Enforced at
runtime- Failure mode
- An agent takes a consequential action through a tool with no human in the loop.
- Obligations (default)
-
- AIGE-OBL-EUAIA-ART14 (Deferred)
- AIGE-OBL-OWASP-AGENTIC (Voluntary)
- AIGE-OBL-CSA-AICM-AGENTIC (Voluntary)
- Builds
- Human-in-the-loop Gate
- Sample files
- Rego, Rego tests , Cedar, card (YAML)
Model card present before release
A version merges or is released only if a model card for that exact version is present, with the sections intended_use, limitations, evaluation.
- Effect
-
deny - Enforced at
pre_mergedeploy- Failure mode
- A model ships without the documentation that deployers and reviewers need to use it within its limits.
- Obligations (default)
-
- AIGE-OBL-EUAIA-ART11 (Deferred)
- AIGE-OBL-EUAIA-ART13 (Deferred)
- AIGE-OBL-ISO42001-A8 (Voluntary)
- Builds
- Model Card as Control Evidence
- Sample files
- Rego, Rego tests , Cedar, card (YAML)
Expired exception blocks the build
The build fails while any policy exception it relies on has expired, has no grant or expiry date, or runs longer than 90 days.
- Effect
-
deny - Enforced at
pre_merge- Failure mode
- A temporary exception quietly becomes permanent and the rule it waived stops applying.
- Obligations (default)
-
- AIGE-OBL-ISO42001-A2 (Voluntary)
- AIGE-OBL-EUAIA-ART17 (Deferred)
- AIGE-OBL-NISTRMF-GOVERN (Voluntary)
- Builds
- Policy Card
- Sample files
- Rego, Rego tests , Cedar, card (YAML)
Write your own rule takes one condition on one field of the input (is missing, equals, does not equal, is below, is above, is one of, is not one of), for one action, with any of the four effects. Comparison operators never match a missing field; use "is missing" to catch one.
What you get
- The card, three ways. Markdown for the people who approve it; YAML and JSON
for machines, checked in this browser against
policy-card.v1.json[3]. The executable module is authoritative over the prose. - An OPA/Rego module. Rego v1 syntax, which OPA 1.x requires (
ifon every rule with a body,containsfor multi-value rules) [7], with the rule's parameters at the top, adecision, ablocksrule the CI hook fails on and theverdictthe pattern asks for. - Its unit tests.
opa testruns every rule prefixed withtest_and mocks the input withwith; a test that is undefined or not true fails [6]. The generated cases cover a compliant input, each way the rule fails and an input the rule does not govern. - A Cedar stub and its tests. For teams that authorise with Cedar: a
forbid(or, for the allow effect, apermit) with the rule id in an@idannotation, and cases forcedar run-tests[9][13]. - An example input and the CI hook. A compliant input document, and a GitHub Actions workflow that checks and tests the module, records the verdict as a build artefact and fails the job on a deny [5][11][14][15].
Use it in a repository
-
Commit the card and the modules under
policies/, next to the system they govern, and review every change as a diff. -
Run
opa check --strictandopa teston the module and its tests [5][6], then add the cases your own inputs need. -
Write the step that builds the input (from the registry, the eval store or the change
itself) and wire the workflow:
opa eval --fail-definedon theblocksrule fails the job when the decision is deny [5]. -
For runtime rules, have the gateway or guardrail ask OPA for the verdict on every call, for
example with
POST /v1/data/aige/cards/<package>/verdictand the request asinput[8], and act on its decision. - Sign each verdict and write it to the evidence store, as the AI policy template's module does [3]: the verdict left by every evaluation is the evidence the pattern produces [1].
Rego and Cedar read the same rule differently
OPA/Rego computes any decision you name, so the module returns deny,
require_approval or alert as the card says.
Cedar returns permit or deny only: it denies by default, a matching forbid overrides every
permit, and annotations do not change evaluation
[9][10]. The stub
therefore carries an @effect annotation the caller reads to route a deny, and a
baseline permit so the card can be tested on its own; drop that baseline in a real
policy set. Cedar also skips a policy whose evaluation errors
[10], so a wrongly typed request can slip past a
forbid: validate requests against a Cedar schema before you rely on it.
Samples, checked
The default card of every template is published under
/templates/policy-cards/, generated by the same
code as this page. On 2026-09-24 every sample passed opa check --strict and
opa test with OPA 1.21.0, and cedar run-tests with
cedar-policy-cli 4.13.0 [12][13]. What you generate with other
values is not checked here: run the same commands before you use it.
Where this sits
The builder is layer 1 of the stack, Govern-as-Code: it turns a policy clause into a control that can fail a build or hold an action, which is what governance-as-code means and what the narrower policy-as-code does in CI/CD. In the IAPP's AIGP Body of Knowledge (version 2.1) it supports competency I.C, creating and implementing policies across the AI life cycle, and IV.C, applying those policies when an AI system is deployed and used [16]. This site is not affiliated with or endorsed by IAPP.
What this is not
The generated files are illustrative starting points, not finished controls: review them before use. The obligation mappings are illustrative, not a claim of conformity, and a rule that runs is evidence toward an obligation, not proof that it is met. Nothing you enter leaves your browser: there is no upload and no account, and the state lives only in the link you copy.
Sources
- [1] Pattern: Policy Card. A governance rule written as a machine-readable card that the pipeline and the runtime both evaluate, leaving a verdict on every check. AI Governance Engineering Body of Knowledge, chapter 05. 2026-09-24. https://aigovernanceengineer.com/patterns/policy-card (verified: primary)
- [2] Policy Cards: machine-readable, deployment-layer governance artefacts for AI agents, linked to enforcement and audit pipelines (arXiv 2510.24383). 2025-10. https://arxiv.org/abs/2510.24383 (verified: primary)
- [3] Policy card schema v1 (draft 2020-12) and the AI policy template (ai-policy.yaml, ai-policy.rego) the rule templates cite as their source clauses. AI Governance Engineer templates and schemas library. 2026-09-24. https://aigovernanceengineer.com/resources/templates (verified: primary)
- [4] Obligation register: stable obligation ids (AIGE-OBL-<INSTRUMENT>-<CLAUSE>), one page per obligation. AI Governance Engineering Body of Knowledge, chapter 08. 2026-09-24. https://aigovernanceengineer.com/obligations (verified: primary)
- [5] CLI reference (opa check and its --strict flag, opa test, opa eval with --fail-defined, "exits with non-zero exit code on defined/non-empty result and errors", and --format raw). Open Policy Agent. Accessed 2026-09-24. https://www.openpolicyagent.org/docs/cli (verified: primary)
- [6] Policy Testing: opa test runs the rules prefixed with test_; the with keyword replaces input or data with mocks; a test that is undefined or not true fails. Open Policy Agent. Accessed 2026-09-24. https://www.openpolicyagent.org/docs/policy-testing (verified: primary)
- [7] Upgrading to v1.0: the if keyword is required for rules with a body and contains for multi-value rules. Open Policy Agent. Accessed 2026-09-24. https://www.openpolicyagent.org/docs/v0-upgrade (verified: primary)
- [8] REST API: POST /v1/data/{path} with {"input": ...} returns {"result": ...}. Open Policy Agent. Accessed 2026-09-24. https://www.openpolicyagent.org/docs/rest-api (verified: primary)
- [9] Basic Cedar syntax: permit or forbid, when and unless clauses, annotations that "have no impact on policy evaluation", and the implicit deny. Cedar Policy Language Reference Guide. Accessed 2026-09-24. https://docs.cedarpolicy.com/policies/syntax-policy.html (verified: primary)
- [10] Authorization: a forbid overrides any permit, and a policy whose evaluation returns an error is skipped and reported in the diagnostics. Cedar Policy Language Reference Guide. Accessed 2026-09-24. https://docs.cedarpolicy.com/auth/authorization.html (verified: primary)
- [11] setup-opa: the GitHub Action that installs the OPA CLI (open-policy-agent/setup-opa@v2; release v2.4.0, 2026-04-21). Open Policy Agent. 2026-04-21. https://github.com/open-policy-agent/setup-opa (verified: primary)
- [12] OPA v1.21.0, the release the committed Rego samples were checked with. Open Policy Agent. 2026-09-24. https://github.com/open-policy-agent/opa/releases/tag/v1.21.0 (verified: primary)
- [13] cedar-policy-cli v4.13.0, with the run-tests command, the release the committed Cedar samples were checked with. Cedar. 2026-09-15. https://github.com/cedar-policy/cedar/releases/tag/cedar-policy-cli-v4.13.0 (verified: primary)
- [14] actions/checkout releases: v7.0.1 is the latest (2026-07-20), the major the CI hook names. GitHub. 2026-07-20. https://github.com/actions/checkout/releases (verified: primary)
- [15] actions/upload-artifact releases: v7.0.1 is the latest (2026-04-10), the major the CI hook names. GitHub. 2026-04-10. https://github.com/actions/upload-artifact/releases (verified: primary)
- [16] AIGP Body of Knowledge and Exam Blueprint, version 2.1 (effective 2 February 2026): competencies I.C (policies and procedures across the AI life cycle) and IV.C (governing deployment and use). IAPP. 2025-09-09. https://prod.iapp.org/media/pdf/certification/AIGP_Cert_BOK_2025_FINAL_v2.1.0.pdf (verified: primary)