Skip to content

Compliance by Design

Compliance by Design extends to AI the ex-ante, built-in approach that Privacy by Design (GDPR Art. 25) introduced for personal data and that Security by Design (ENISA, NIST SSDF) standardised for cybersecurity. Policy is the input contract of the training run, not a post-hoc checklist.

Compliance by Design is the design philosophy. Compliance-as-Code is the technique that delivers it (executable OSCAL policy, decorators, deterministic enforcement). AI Assurance is the deliverable the regulator audits (Assessment Results, Annex IV technical documentation, evidence bundle).

Compliance by Design (the why)
↓ enabled by
Compliance-as-Code (the how)
↓ producing
AI Assurance (the deliverable)

vl.enforce(metrics, policy=…) runs inside the training script, not as a downstream audit. A control violation with severity=block halts the run before the model is registered:

import venturalitica as vl
with vl.monitor(name="Loan Default Audit"):
metrics = pipeline.run(X_train, y_train)
vl.enforce(metrics, policy="assessment_plan.oscal.yaml", strict=True)

Compliance is a function call, not a JIRA ticket.

vl pull retrieves the assessment_plan.oscal.yaml before training starts. The policy is the input contract of the run — the training script reads its compliance obligations the same way it reads its hyperparameter file:

Terminal window
vl pull # fetches assessment-plan
python train.py # reads it as input

This inverts the traditional “model first, audit later” workflow.

vl.monitor() collects evidence (CycloneDX BOM, hardware fingerprint, file integrity, AST trace, carbon footprint) as the pipeline runs. On completion, the SDK materialises an OSCAL Assessment Results document, no separate audit pass needed. vl export-annex-iv derives the Art. 11 narrative from the same evidence:

Terminal window
vl export-annex-iv --agentic # narrative for §1/2/3/5/8/9

The same run produces the model, the assurance evidence, and the regulator-facing documentation.

FrameworkClauseWhat it asks forHow CbD answers
GDPRArt. 25Data protection by design and by defaultDirect precedent — same ex-ante built-in approach
EU AI ActArt. 9Risk management throughout the lifecycleDecorator-driven enforcement at training time
EU AI ActArt. 15Accuracy, robustness, cybersecurity by designenforce() blocks deployment if thresholds fail
EU AI ActAnnex IV §3Monitoring, functioning and controlvl.monitor() + Assessment Results
ISO/IEC 42001A.6.2.4AI impact assessmentOSCAL Assessment Plan before training
ISO/IEC 42001A.8.2Data qualityProbes + policy controls in the assessment-plan
ISO/IEC 42001A.8.3System lifecycleEvidence collected per run, attached to model registry
NIST AI RMFGovern 1.7AI risks integrated into risk managementCompliance contract is the training input

v0.6.0 unifies all OSCAL emission into a single assessment-plan envelope (see Migrating to v0.6 and the normative contract). That single envelope is what makes Compliance by Design tractable: one document in, one document out — both in the same OSCAL dialect, both auditable by vl-fairness-gate (Rust) and any other NIST OSCAL parser.