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 card holds one rule, so a rule change is one reviewable diff. The templates come from the Policy Card pattern and the AI policy template; every value that ends up in code is checked here, and nothing leaves this page.

1. The rule

Six curated rules, or one condition of your own on one field of the input.

2. Rule parameters

Each rule's parameters, with their defaults. With JavaScript on, only the chosen rule's are shown.

No unregistered agent in production

The value of the environment field in the input, for example production.

Eval score at or above a threshold before deploy

The suite_id of the eval results, as in the eval-result schema.

On the suite's own scale, higher is better; at most four decimal places (for example 0.90).

No personal data sent to an external model

Comma-separated labels your data classifier puts on a request, for example personal, special_category.

Human approval required for a named tool

The tool name as the agent registry and the gateway know it.

Comma-separated. Leave empty to hold every operation of the tool.

Model card present before release

Comma-separated section keys your model card template uses.

Expired exception blocks the build

The AI policy template sets 90.

Write your own rule

The value of the action field in the input, for example deploy, merge or tool_call.

A dot path in snake_case, for example system.risk_tier.

Comparison operators never match a missing field; use "is missing" for that.

A word, a number or true/false. For "is one of", a comma-separated list.

The rule in one sentence, as the card states it.

Start from a named failure mode or harm, not from a clause.

Effect when the condition holds
Enforced at
3. The card

Write roles, not personal names. The card id names the files and the Rego package.

Lower case, for example pc-eval-score-gate.

A rule change is a new version.

What the card governs.

Versioned; every verdict carries it.

The policy owner: a role or a team.

The card shows the approval as pending until it is recorded.

Registry ids or selectors, comma-separated (for example agent:*, tier:high).

The clause of your AI policy the card implements.

The date this version applies from.

Defaults to six months after the effective date.

How an exception is requested, approved and time-limited.

4. Obligations answered

Stable ids from the obligation register; the rule's defaults are ticked. A rule helps evidence an obligation; it does not discharge it.

EU AI Act
GPAI Code of Practice
GDPR
NIS2
DORA
Cyber Resilience Act
EU Product Liability Directive
DSM Directive
Digital Services Act
UCPD
Platform Work Directive
Consumer Credit Directive
ISO/IEC 42001
ISO/IEC 42006
ISO/IEC 23894
ISO/IEC 42005
ISO/IEC 22989
NIST AI RMF
NIST (agent, cyber and misuse work)
CSA AICM / STAR for AI
OWASP GenAI Security Project
US frontier-developer laws
US state AI laws
US state privacy and sector laws
US federal law
US federal audit and oversight
Other jurisdictions
South Korea AI Basic Act
China
Treaty and international soft law
CEN-CENELEC JTC 21

Internal clauses or controls the rule also answers, comma-separated (at most eight).

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)
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)
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)
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)
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)
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)
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 (if on every rule with a body, contains for multi-value rules) [7], with the rule's parameters at the top, a decision, a blocks rule the CI hook fails on and the verdict the pattern asks for.
  • Its unit tests. opa test runs every rule prefixed with test_ and mocks the input with with; 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, a permit) with the rule id in an @id annotation, and cases for cedar 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

  1. Commit the card and the modules under policies/, next to the system they govern, and review every change as a diff.
  2. Run opa check --strict and opa test on the module and its tests [5][6], then add the cases your own inputs need.
  3. Write the step that builds the input (from the registry, the eval store or the change itself) and wire the workflow: opa eval --fail-defined on the blocks rule fails the job when the decision is deny [5].
  4. 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>/verdict and the request as input [8], and act on its decision.
  5. 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. [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. [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. [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. [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. [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. [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. [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. [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. [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. [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. [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. [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. [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. [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. [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. [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)