diff --git a/admin-compliance/app/sdk/agent/_components/ArchitekturView.tsx b/admin-compliance/app/sdk/agent/_components/ArchitekturView.tsx
new file mode 100644
index 00000000..7e505c80
--- /dev/null
+++ b/admin-compliance/app/sdk/agent/_components/ArchitekturView.tsx
@@ -0,0 +1,302 @@
+'use client'
+
+// Erklärendes Architekturschema des Compliance-Check-Tools — Muster aus dem
+// CE-Modul (/sdk/iace/.../architektur) übernommen: hand-kurierte Boxen/Pfeile +
+// Schritt-Akkordeon. Inhalt spiegelt den Code-Pfad (api/agent_check/_orchestrator
+// + services/specialist_agents). Bewusst statisch (der Doc-Check ist Python, hat
+// keinen Architektur-Endpoint wie das Go-IACE-Modul) — bei Bedarf später aus einem
+// Backend-Handler speisbar.
+
+import { useState, type ReactNode } from 'react'
+
+function Box({ title, sub, accent }: { title: string; sub?: string; accent?: 'purple' | 'amber' | 'green' | 'gray' }) {
+ const c =
+ accent === 'purple'
+ ? 'border-purple-300 bg-purple-50/60 dark:border-purple-700 dark:bg-purple-900/20'
+ : accent === 'amber'
+ ? 'border-amber-300 bg-amber-50/60 dark:border-amber-700 dark:bg-amber-900/20'
+ : accent === 'green'
+ ? 'border-green-300 bg-green-50/60 dark:border-green-700 dark:bg-green-900/20'
+ : 'border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-800'
+ return (
+
+
{title}
+ {sub &&
{sub}
}
+
+ )
+}
+
+function Lane({ label, children }: { label: string; children: ReactNode }) {
+ return (
+
+ )
+}
+
+function Arrow() {
+ return (
+
+ →
+ ↓
+
+ )
+}
+
+type Stage = {
+ id: string
+ title: string
+ summary: string
+ input: string
+ logic: string
+ source: string
+ example: string
+}
+
+// Spiegelt run_compliance_check (Phasen A–F) + die Spezialagenten-Schicht.
+const STAGES: Stage[] = [
+ {
+ id: 'a',
+ title: 'Phase A — Auflösen & Crawl',
+ summary: 'URLs + hochgeladene Dokumente einsammeln, fehlende Pflichtseiten automatisch finden.',
+ input: 'Start-URL, Dokument-Uploads, 8 Wizard-Felder (scan_context)',
+ logic: 'Discovery (Sitemap/Heuristik) + Fetch je Seite, Text-Extraktion pro Doc-Typ',
+ source: 'consent-tester /dsi-discovery, Playwright',
+ example: 'Findet /impressum, /datenschutz, /agb ohne manuelle Eingabe',
+ },
+ {
+ id: 'b',
+ title: 'Phase B — Profil & Dokument-Checks',
+ summary: 'Geschäftsprofil erkennen, jedes Dokument gegen seine Controls prüfen.',
+ input: 'Doc-Texte je Typ + Business-Scope',
+ logic: 'Regex-Runner + MC-Keyword + BGE-M3-Embedding + LLM-Verify (nur unscharf)',
+ source: 'doc_check_controls (DB), mc_classification.db (Embeddings)',
+ example: 'DSE: 267 Text-MCs, Keyword + semantischer Recall',
+ },
+ {
+ id: 'agents',
+ title: 'Spezialagenten (nebenläufig)',
+ summary: 'Pro Dokumenttyp ein typisierter Agent → eigener Ergebnis-Tab, gefüllt per SSE.',
+ input: 'Doc-Text, Scope, scan_context',
+ logic: 'Impressum + AGB + DSE laufen parallel (asyncio.gather), je ein AgentOutput',
+ source: 'api/agent_check/_agent_outputs._TOPIC_AGENTS',
+ example: 'AGB-Tab + DSE-Tab erscheinen, sobald ihr Agent fertig ist',
+ },
+ {
+ id: 'c',
+ title: 'Phase C — Cookie-Banner',
+ summary: 'Consent-Banner + gesetzte Cookies vor/nach Einwilligung live prüfen.',
+ input: 'Live-Seite im Browser',
+ logic: 'Consent-Tester-Scan: Banner, Vendors, Enforcement, Browser-Matrix',
+ source: 'consent-tester /scan',
+ example: 'Cookie vor Einwilligung gesetzt → Verstoß-Kandidat',
+ },
+ {
+ id: 'd',
+ title: 'Phase D — Vendors & Plausibilität',
+ summary: 'Dritt-Dienste extrahieren + Findings auf Plausibilität prüfen.',
+ input: 'Banner-/Seiten-Daten, Findings',
+ logic: 'Vendor-Extraktion (+OCR-Fallback), Plausibilitäts-Check je FAIL',
+ source: 'Cookie-/Vendor-Kataloge, LLM-Kaskade',
+ example: 'Analytics ohne Rechtsgrundlage → bestätigtes Finding',
+ },
+ {
+ id: 'reconcile',
+ title: 'Cross-Finding-Abgleich',
+ summary: 'Findings über Dokumente hinweg abgleichen — Doppel & Scheinverstöße auflösen.',
+ input: 'Alle Modul-Findings',
+ logic: 'Deckt ein anderes Dokument die Pflicht ab, wird das Cross-Finding unterdrückt',
+ source: 'cross_doc_reconcile (B-Wirings)',
+ example: '§36 VSBG im Impressum statt DSE → kein Doppel-Finding',
+ },
+ {
+ id: 'f',
+ title: 'Phase E/F — Bericht & Snapshot',
+ summary: 'Ergebnis persistieren, Snapshot für die Historie speichern.',
+ input: 'Konsolidiertes Ergebnis',
+ logic: 'Mail-Render + DB-Persist + Snapshot (Tab-Ansicht ohne Re-Crawl)',
+ source: 'compliance_check_snapshots',
+ example: 'Historie erneut öffnen, ohne die Seite neu zu crawlen',
+ },
+]
+
+type ModuleEngine = { name: string; mechanism: string }
+const MODULES: ModuleEngine[] = [
+ { name: 'Impressum', mechanism: 'Scope-Gate + Feld-Matcher (§5 DDG / §18 MStV)' },
+ { name: 'AGB', mechanism: 'decision_method-Routing: Keyword → Geschäftsmodell-Gate → Embedding/Reference/LLM' },
+ { name: 'DSE', mechanism: '4-Layer: Regex-Boost → Keyword → BGE-M3-Recall (0.65) → Semantic-Validator' },
+ { name: 'Cookie-Banner', mechanism: 'Consent-Tester: Banner, Vendors, Enforcement, Browser-Matrix' },
+]
+
+type Pruefer = { method: string; mechanism: string; deterministic: string; example: string }
+// Meta-Modell: jede Pflicht → ein Prüfertyp (decision_method). Wenige
+// wiederverwendbare Prüfer statt Logik pro Control.
+const PRUEFER: Pruefer[] = [
+ { method: 'REGEX', mechanism: 'Kuratierte Muster / Keyword', deterministic: 'ja', example: 'Pflicht-Stichwort im Text' },
+ { method: 'EMBEDDING', mechanism: 'BGE-M3 Kosinus ≥ Schwelle', deterministic: 'ja (feste Funktion)', example: '„Recht auf Berichtigung" ≈ Umschreibung' },
+ { method: 'REFERENCE', mechanism: 'Link-/Verweis-Auflösung', deterministic: 'ja', example: 'Verweis auf die Datenschutzerklärung' },
+ { method: 'LLM', mechanism: 'Kaskade Qwen→OVH→Claude, nur unscharfe Fälle', deterministic: 'nein (eskaliert)', example: 'Speicherdauer inhaltlich erfüllt?' },
+ { method: 'BEHAVIOR', mechanism: 'Playwright: Live-Verhalten', deterministic: 'ja', example: 'Cookies vor Einwilligung gesetzt?' },
+ { method: 'SCANNER', mechanism: 'Repo-/Netzwerk-/Prozess-Scan', deterministic: 'ja', example: 'Geplant: technische Nachweise' },
+]
+
+function Field({ label, value, mono }: { label: string; value: string; mono?: boolean }) {
+ return (
+
+
{label}
+ {value}
+
+ )
+}
+
+function StageRow({ stage, last, open, onToggle }: { stage: Stage; last: boolean; open: boolean; onToggle: () => void }) {
+ return (
+
+
+
+
+
{stage.title}
+
{stage.summary}
+
+
{open ? '▲' : '▼'}
+
+ {open && (
+
+
+
+
+
+
+ )}
+
+ {!last &&
↓
}
+
+ )
+}
+
+export function ArchitekturView() {
+ const [open, setOpen] = useState('b')
+
+ return (
+
+
+
Architektur & Datenfluss
+
+ Nachvollziehbar: woher jedes Finding stammt und wie es geprüft wird .
+ Die Engine ist überwiegend deterministisch (Regex + Embedding); ein LLM entscheidet nur
+ die unscharfen Fälle. Ergebnisse erscheinen pro Modul progressiv und werden am Ende per
+ Cross-Finding-Abgleich bereinigt.
+
+
+
+
+ Datenfluss (Überblick)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {STAGES.map((s) => (
+
+ {s.title}
+
+ ))}
+
+
+
+
+
+
+
+
+
+
+ Links→rechts reproduzierbar. Embedding ist semantisch UND deterministisch (feste Funktion: gleicher
+ Text → gleicher Vektor). Das LLM läuft nur für unscharfe Fälle und eskaliert mit Selbstkonfidenz.
+
+
+
+
+
+ Pipeline (Schritt für Schritt)
+
+ {STAGES.map((s, i) => (
+ setOpen(open === s.id ? null : s.id)}
+ />
+ ))}
+
+
+
+
+ Modul-Engines (live)
+
+ {MODULES.map((m) => (
+
+
+ {m.name}
+
+ live
+
+
+
{m.mechanism}
+
+ ))}
+
+
+
+
+ Prüfer-Matrix (Meta-Modell)
+
+ Jede Pflicht wird einem Prüfertyp zugeordnet — so braucht es nicht pro Control eigene
+ Logik, sondern wenige wiederverwendbare Prüfer.
+
+
+
+
+
+ Prüfer
+ Mechanismus
+ Deterministisch
+ Beispiel
+
+
+
+ {PRUEFER.map((p) => (
+
+
+ {p.method}
+
+ {p.mechanism}
+ {p.deterministic}
+ {p.example}
+
+ ))}
+
+
+
+
+
+ )
+}
diff --git a/admin-compliance/app/sdk/agent/page.tsx b/admin-compliance/app/sdk/agent/page.tsx
index 14d337c0..efd90bbf 100644
--- a/admin-compliance/app/sdk/agent/page.tsx
+++ b/admin-compliance/app/sdk/agent/page.tsx
@@ -4,10 +4,12 @@ import React, { useState } from 'react'
import { ComplianceCheckTab } from './_components/ComplianceCheckTab'
import { ComplianceFAQ } from './_components/ComplianceFAQ'
import { SnapshotHistoryList } from './_components/SnapshotHistoryList'
+import { ArchitekturView } from './_components/ArchitekturView'
export default function AgentPage() {
// Nach einem abgeschlossenen Check die Historie unten neu laden.
const [historyKey, setHistoryKey] = useState(0)
+ const [tab, setTab] = useState<'check' | 'architektur'>('check')
return (
@@ -16,11 +18,31 @@ export default function AgentPage() {
Webseiten + Dokumente auf DSGVO-Konformität prüfen.
- setHistoryKey(k => k + 1)} />
+
+ {([['check', 'Check'], ['architektur', 'Architektur']] as const).map(([id, label]) => (
+ setTab(id)}
+ className={`px-3 py-2 text-sm font-medium -mb-px border-b-2 transition-colors ${
+ tab === id
+ ? 'border-purple-500 text-purple-600 dark:text-purple-400'
+ : 'border-transparent text-gray-500 hover:text-gray-700 dark:hover:text-gray-300'
+ }`}
+ >
+ {label}
+
+ ))}
+
-
-
-
+ {tab === 'check' ? (
+ <>
+ setHistoryKey(k => k + 1)} />
+
+
+ >
+ ) : (
+
+ )}
)
}