Policy-as-code

Governance policy expressed in an executable policy language (OPA/Rego, Cedar) that evaluates in CI/CD and at admission; the narrower, pipeline subset of governance-as-code.

Developed in
ch. 06, Policy-as-code and gates
Chapters
ch. 04, The Stack · ch. 05, Patterns · ch. 06, The Role
Contrast with
Governance-as-code
Source
Defined by this Body of Knowledge: the section it is developed in is the source

Where it is used

15 chapters of the Body of Knowledge use the term. Each link opens the first section that does.

Mentions per chapter How often each chapter names the term, with the chapters the glossary cross-references drawn solid. The longest bar is where to read the term in use; bars spread across many chapters mark a term that runs through the discipline.
Mentions as a table
Mentions of Policy-as-code per chapter
ChapterMentionsCross-referenced
00 Preface2No
01 Definition2No
02 Why Now1No
03 Values & Principles0No
04 The Stack1Yes
05 Patterns1Yes
06 The Role8Yes
07 Maturity Model2No
08 Regulatory Map8No
10 Reading List1No
11 AI Defined0No
12 Governance Program0No
13 Risk Management1No
14 Development1No
15 Deployment0No
16 Fairness & XAI1No
17 Incidents0No
18 EU AI Act0No
19 Privacy & AI0No
20 Existing Law1No
21 AI Laws Worldwide1No
22 Principles & Standards3No
23 AI Agents0No

Patterns that use this term

One pattern page uses the term.

Policy-as-code: related terms and patternsThe term at the centre; related terms on solid edges, the terms it is contrasted with on dashed edges, and the patterns that use it most in the colour of their layer.RelatedContrastColour: stack layer of the pattern01 Govern-as-CodePolicy-as-codeRelated terms (2)Cedar · RelatedCedarOPA/Rego · RelatedOPA/RegoContrast with (1)Governance-as-code · ContrastGovernance-as-codePatterns using it (1)Dataset Admission Gate, 2 mentions · Uses the termDataset Admission Gate
Policy-as-code: related terms and patternsThe term at the centre; related terms on solid edges, the terms it is contrasted with on dashed edges, and the patterns that use it most in the colour of their layer.RelatedContrastColour: stack layer of the pattern01 Govern-as-CodeRelated terms (2)Cedar · RelatedCedarOPA/Rego · RelatedOPA/RegoContrast with (1)Governance-as-code · ContrastGovernance-as-codePatterns using it (1)Dataset Admission Gate, 2 mentions · Uses the termDataset Admission GatePolicy-as-code
The term's neighbourhood Terms related to this one on solid edges, terms it is often confused with on dashed edges, and the patterns that use it most in the colour of their layer. Follow a dashed edge to check the distinction before you use either term.
Neighbourhood as a table
Neighbourhood of Policy-as-code
FamilyItemRelation
Related termsCedarRelated
Related termsOPA/RegoRelated
Contrast withGovernance-as-codeContrast
Patterns using itDataset Admission Gate, 2 mentionsUses the term

Sources

No external source: the term is coined or used in a specific sense by this Body of Knowledge, and the section linked under "Developed in" is its source.

Definitions of legal terms paraphrase the cited text, which governs. Dated statements are as of .

Cite this term

García Aibar, J. (2026). Policy-as-code. In AI Governance Engineering: The Thesis & Body of Knowledge (v0.5.0), Glossary. https://doi.org/10.5281/zenodo.22956197. https://aigovernanceengineer.com/glossary/policy-as-code. CC BY 4.0

BibTeX

@misc{aige2026policyascode,
  author  = {Jorge García Aibar},
  title   = {{Policy-as-code}},
  note    = {Glossary, AI Governance Engineering: The Thesis \& Body of Knowledge, version 0.5.0},
  year    = {2026},
  doi     = {10.5281/zenodo.22956197},
  url     = {https://aigovernanceengineer.com/glossary/policy-as-code}
}