domjanbaric/eu-ai-act

AI-first EU AI Act (Regulation (EU) 2024/1689) advisor, codebase & CI/CD compliance auditor, gap analyzer, documentation generator, and engineering toolkit integrator. Use when the user asks to understand the EU AI Act, assess an AI software repository for compliance gaps, trace code/CI/CD findings to exact EU AI Act Articles, draft Annex IV / Risk Register / FRIA docs, or implement engineering controls for logging (Art. 12), model/prompt versioning, transparency (Art. 50), or human oversight (Art. 14).

Qu'est-ce que eu-ai-act ?

eu-ai-act is a Claude Code agent skill that aI-first EU AI Act (Regulation (EU) 2024/1689) advisor, codebase & CI/CD compliance auditor, gap analyzer, documentation generator, and engineering toolkit integrator. Use when the user asks to understand the EU AI Act, assess an AI software repository for compliance gaps, trace code/CI/CD findings to exact EU AI Act Articles, draft Annex IV / Risk Register / FRIA docs, or implement engineering controls for logging (Art. 12), model/prompt versioning, transparency (Art. 50), or human oversight (Art. 14).

Compatible avec✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/domjanbaric/eu-ai-act-assessment/tree/HEAD/skills/eu-ai-act

Installed? Explore more Recherche et analyse de données skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

EU AI Act AI-First Compliance & Engineering Skill

Help engineers understand Regulation (EU) 2024/1689 (EU AI Act), inspect real codebases and CI/CD pipelines without manual checklists or static manifests, surface article-traceable gaps, generate evidence-backed compliance documentation, and wire in engineering toolkits.

Mandatory Framing: Every assessment, gap report, or generated document is engineering readiness support—not legal advice or formal conformity certification. Explicitly flag items that require legal counsel review.


Progressive Disclosure Map

Load only the reference files needed for the user's request and the codebase you inspect:

Compliance document templates (populate with real codebase evidence, never leave boilerplate placeholders unflagged):

Modern-stack integrations & engineering toolkits (relative to repo root):

  • Standards-first modern-stack integrations (check first!): ../../integrations/README.md (OpenTelemetry GenAI, C2PA, OpenFeature, LangGraph/Temporal, Promptfoo, Next.js/Vercel AI SDK, FastAPI, Langfuse)
  • Fallback language-agnostic specs (any language): ../../toolkits/specs/
  • Fallback zero-dependency Python package: ../../toolkits/python/eu_ai_act_kit/
  • Fallback zero-dependency TypeScript package: ../../toolkits/typescript/src/

Choose the Active Mode

Determine which mode(s) match the user's request (you may combine them in a single workflow):

Mode 1: Explain & Orient

When the user asks how the EU AI Act works or whether a concept applies:

  1. Load the relevant reference file(s) from ./references/.
  2. Translate legal Articles into concrete software engineering impacts (architecture, data, logging, UI, CI/CD, governance).
  3. Always cite exact Articles/Annexes (e.g., Art. 12(1), Annex III §4(a)).

Mode 2: AI-First Codebase & CI/CD Audit (Core Workflow)

When asked to assess a repository, find compliance gaps, or review an AI system:

Step 1 — Automated Codebase & CI/CD Discovery

Inspect the repository directly before asking questions. Look for concrete evidence across:

  1. AI/ML Surface Area:
    • Dependencies (pyproject.toml, requirements*.txt, package.json, Cargo.toml, go.mod, pom.xml) for LLM/ML SDKs (openai, anthropic, google-genai, langchain, llamaindex, transformers, torch, scikit-learn, onnxruntime, vllm, litellm, face_recognition, mediapipe, etc.).
    • Model inference calls, system prompts, agent loops, tool/function calling, RAG pipelines, fine-tuning/training scripts, and weight files.
  2. Domain & Use-Case Signals:
    • Endpoints, database schemas, UI labels, READMEs, and prompt instructions revealing domain (HR/recruiting, credit/scoring, healthcare, biometrics, education, content moderation, customer chatbot, image/audio/video generation, autonomous actions).
  3. Engineering Controls Already Present:
    • Logging & auditability (Art. 12): Structured logs, immutable/hash-chained storage, retention configs, PII redaction, trace IDs.
    • Versioning & lineage (Art. 11 / Annex IV): Pinned model IDs (not floating aliases like latest), prompt versioning, dataset cards/hashes, eval benchmark results.
    • Transparency (Art. 50): User-facing AI disclosures in UI/APIs, synthetic media metadata/watermarking (C2PA, headers, labels).
    • Human oversight (Art. 14): Confidence thresholds, human approval workflows, override hooks, feature flags / kill switches.
    • Robustness & security (Art. 15): Input validation, prompt-injection guards, rate limits, fallback handling, adversarial/red-team tests.
    • Data governance (Art. 10): Training/eval dataset lineage, bias/fairness checks, consent/PII handling.
  4. CI/CD & Release Governance:
    • Inspect .github/workflows/, .gitlab-ci.yml, Jenkinsfile, Dockerfile, Makefile, pre-commit hooks, and evaluation scripts.
    • Check whether model/prompt changes trigger automated evaluations, safety/regression tests, dependency security scans, and versioned artifact publishing.

Step 2 — Targeted Context Questions (Only What Code Cannot Answer)

Ask only concise questions that cannot be inferred from the repo (group into 3–5 bullets max):

  • Will the system or its outputs be used in the EU? (Art. 2(1))
  • Are you releasing this as a commercial product/service, internal tool, or open-source project? (Art. 2(12), Art. 3)
  • Are you modifying/fine-tuning a third-party model or building on a third-party API? (Art. 25 role-shift check)
  • Who makes final decisions—fully automated, or human-reviewed? (Art. 6(3), Art. 14)

(If the user asks for an immediate best-effort audit without back-and-forth, proceed with explicitly labeled [ASSUMPTION] tags.)

Step 3 — Classify Role, Scope & Risk Tier

Load roles-and-scope.md, prohibited-art5.md, and whichever tier references apply (high-risk-classification.md, gpai-obligations.md, transparency-art50.md, deployer-and-literacy.md). Determine:

  1. Territorial & Material Scope (and whether any Art. 2 exclusion applies).
  2. Operator Role(s): Provider, Deployer, Importer, Distributor, or Art. 25 Role-Shifted Provider.
  3. Risk Tier(s): Prohibited red flags (check first!), High-Risk (Annex I / Annex III + Art. 6(3) derogation check), GPAI model, Limited/Transparency (Art. 50), or Minimal Risk (+ Art. 4 AI literacy).

Step 4 — Article-Traceable Gap Analysis

For every applicable obligation, compare against actual codebase & CI/CD evidence. Produce a structured report following resources/gap-assessment-report.md with:

  • Status: Compliant (Code Evidence) | Partial | Gap | Needs Legal/Process Review
  • Legal Basis: Exact Article, paragraph, and Annex citation.
  • Codebase / CI Evidence: Exact file paths and line ranges inspected (never guess or fabricate).
  • Concrete Remediation: Specific code, doc, or CI/CD change—referencing the matching toolkit or spec in toolkits/.
  • Priority: P0 Blocker (Art. 5 red flags / hard compliance blockers) → P1 High → P2 Medium → P3 Recommended.

Mode 3: Documentation Generation

When asked to draft compliance documentation:

  1. Run Step 1 discovery first so every section is grounded in real code, models, endpoints, and CI/CD pipelines.
  2. Use the templates in ./resources/:
    • High-Risk Technical Documentation → annex-iv-technical-doc.md (Art. 11 & Annex IV)
    • Risk Management Register → risk-management-register.md (Art. 9)
    • Deployer Fundamental Rights Impact Assessment → fria-template.md (Art. 27)
  3. Clearly mark any non-code organizational fields (e.g., EU authorized representative, notified body, legal sign-off) as [TODO: Legal/Org Input Required].

Mode 4: Engineering Remediation & Stack-First Integration

When asked to fix gaps or implement compliance controls, prefer integrating with the repo's existing modern stack rather than forcing bespoke libraries:

  1. Step 1 — Check Existing Modern Stack First (../../integrations/):
    • Already using OpenTelemetry / Datadog / Arize / Grafana / Langfuse? Wire in integrations/opentelemetry-genai/ (EuAiActSpanProcessor + WORM retention) instead of replacing observability with a local file logger.
    • Generating images, audio, or video (Art. 50(2))? Use integrations/c2pa-provenance/ (C2PA Content Credentials with trainedAlgorithmicMedia) alongside visible labels.
    • Already using OpenFeature / LaunchDarkly / Flagsmith / PostHog / LangGraph / Temporal? Wire in integrations/openfeature-hitl/ (OpenFeatureKillSwitchStore + durable interrupt() / signal HITL).
    • Need Art. 9 & 15 pre-release eval gates in CI? Adapt integrations/promptfoo-eval-gate/promptfooconfig.eu-ai-act.yaml.
    • Built on Next.js + Vercel AI SDK, FastAPI, or Langfuse? Follow integrations/vercel-ai-and-fastapi/README.md.
  2. Step 2 — Fallback to Zero-Dependency Toolkits or Language-Agnostic Specs (../../toolkits/): Where the repo has no existing stack tool (or needs EU-AI-Act-specific primitives like tamper-evident hash chaining, Art. 73 statutory deadline tracking, or Annex IV changelog export), match the gap to:
    • Art. 12 / Art. 19 Logging, Retention & Traceability → toolkits/specs/logging-traceability.md
    • Art. 11 / Annex IV Model, Prompt & Dataset Versioning → toolkits/specs/versioning-lineage.md
    • Art. 50 Transparency, EU Locales & Web Middleware → toolkits/specs/transparency-disclosure.md
    • Art. 14 Human Oversight, Reversal & Kill Switch → toolkits/specs/human-oversight.md
    • Art. 73 Serious Incident Deadline Tracking → toolkits/specs/incident-reporting.md
    • Art. 9 / Art. 15 Pre-Release Eval CI Gate → toolkits/specs/eval-gate.md
    • Use toolkits/python/eu_ai_act_kit/ for Python repos, toolkits/typescript/src/ for TypeScript/JS repos, or generate an idiomatic, tested module from toolkits/specs/ for Go, Rust, Java, C#, etc.
  3. CI/CD Hardening: Where CI/CD gaps exist, propose or add workflow steps (Promptfoo/eval gates on prompt/model diffs, Annex IV freshness checks, audit-log chain verification tests, dependency security scans).
  4. Verify: Run the repo's existing test suite plus new tests verifying the added compliance controls (e.g., OTel attributes, OpenFeature fail-closed kill switch, tamper detection on audit logs, Art. 50 headers present).

Quality Rules

  • No hallucinated citations: Only cite Articles/Annexes verified against ./references/. If an edge case involves newer implementing acts or harmonized standards not covered in ./references/, state that explicitly and recommend checking official EU AI Office publications.
  • No fake evidence: Only cite file paths and line numbers you actually read.
  • Preserve developer ergonomics: Recommend the lightest compliant control that genuinely closes the risk—avoid bureaucratic boilerplate when a clean code guard or CI check solves it better.

Skills associés