@euconform/core
Core engine for EU AI Act compliance, risk classification, and fairness metrics.

Installation
npm install @euconform/core
pnpm add @euconform/core
Features
- 🎯 Risk Classification – Implements EU AI Act Article 5 (prohibited), Article 6 + Annex III (high-risk)
- 📊 Bias Detection – CrowS-Pairs methodology (CC BY-SA 4.0) with log-probability analysis
- 📄 Report Generation – Annex IV-compliant technical documentation
- 🔒 Privacy-First – All processing happens client-side
Usage
Risk Classification
import { RiskEngine, type RiskClassification } from "@euconform/core";
const engine = new RiskEngine();
const result: RiskClassification = engine.classify({
useCase: "hiring-automation",
dataTypes: ["biometric", "personal"],
autonomyLevel: "high",
});
console.log(result.riskLevel);
console.log(result.articles);
Bias Testing (CrowS-Pairs)
import { calculateCrowsPairsBias } from "@euconform/core";
const result = await calculateCrowsPairsBias({
dataset: crowsPairsData,
engine: inferenceEngine,
onProgress: (progress) => console.log(`${progress}% complete`),
});
console.log(result.overallBias);
console.log(result.categoryResults);
Annex IV Report Generation
import { generateAnnexIVReport } from "@euconform/core";
const report = generateAnnexIVReport({
systemName: "My AI System",
provider: "My Company",
riskClassification: riskResult,
biasResults: biasResult,
version: "1.0.0",
});
API Reference
Risk Engine
classify(input) | Classify AI system risk level |
getApplicableArticles(input) | Get relevant EU AI Act articles |
generateCompliance(input) | Generate compliance checklist |
Fairness Metrics
calculateCrowsPairsBias() | CrowS-Pairs bias calculation |
calculateLogProbBias() | Log-probability bias measurement |
validateCrowsPairsDataset() | Validate dataset format |
Report Generation
generateAnnexIVReport() | Generate Annex IV documentation |
Legal Disclaimer
⚠️ Important: This package provides technical guidance only. It does not constitute legal advice and does not replace legally binding conformity assessments. Always consult qualified legal professionals for compliance decisions.
License
Dual-licensed under MIT and EUPL-1.2.
Links