Skip to content

Governance Packs

Governance packs are data-driven rule definitions — no executable code.

  • eu-ai-act-v1 — EU AI Act Article 12 compliance (7 rules)
  • minimal — Basic logging for testing
import { verify } from '@brivora/verify';
// List available packs
const packs = verify.listPacks(); // ['eu-ai-act-v1', 'minimal']
// Load a pack
const pack = verify.loadPack('eu-ai-act-v1');
const customPack = verify.createPack({
name: 'my-governance',
version: '1.0.0',
description: 'Custom governance rules',
rules: [
{
id: 'model-allowlist',
name: 'Approved models only',
description: 'Only allow approved AI models',
phase: 'pre',
severity: 'critical',
evaluate: { type: 'model_allowlist', models: ['claude-sonnet-4-5-20250929', 'gpt-4'] },
},
],
scoring: {
dimensions: [{ name: 'compliance', rules: ['model-allowlist'] }],
threshold: 1.0,
weights: { compliance: 1.0 },
},
});
const result = await verify.govern(fn, { governance: customPack });
TypeDescription
requiredCheck required fields are present
containsCheck field contains specific values
regexMatch field against a regex pattern
lengthValidate field length (min/max)
model_allowlistOnly allow specific models
model_blocklistBlock specific models
token_limitEnforce input/output token limits
pii_detectionDetect PII (SSN, email, phone, credit card)
toxicity_thresholdBasic toxicity keyword scoring
bias_detectionFlag protected attribute mentions
customNamed function from registry

The eu-ai-act-v1 pack maps to Article 12 requirements for high-risk AI systems:

RuleArticleSeverity
Automatic event loggingArt. 12(1)Critical
Event traceabilityArt. 12(2)Critical
Monitoring capabilityArt. 12(3)High
Human oversight dataArt. 14High
Model identificationArt. 13High
Content safety baselineMedium
PII detectionMedium

Scoring dimensions: transparency (30%), traceability (30%), safety (25%), privacy (15%). Passing threshold: 0.7.