feat(agent): 4-Status-Modell (NOT_APPLICABLE/INSUFFICIENT_EVIDENCE/POSSIBLY_APPLICABLE) für Impressum

Kanonisches Compliance-Datenmodell, Impressum-Agent als Referenz:
- CheckStatus-Enum + Finding.status GETRENNT von severity (Verdikt ≠ Risiko)
- Unbestimmte Rechtsform (weder Text noch Wizard) → INSUFFICIENT_EVIDENCE (INFO)
  statt hartem HIGH-FAIL; legal_form_dependent-Gate + detect_legal_form_present
- §18-MStV-Graubereich (Corporate-Blog via has_editorial_content) →
  POSSIBLY_APPLICABLE (LOW Prüf-Hinweis); 3-stufig via scope_disposition
- Recommendations nur aus echten FAILs; mc_insufficient/mc_possibly-Aggregate
- Frontend: Verdikt-Pill + Coverage-Vokabular
- 19 neue Tests (test_four_status.py, AgentFindingCard); CI-Suite 204 grün,
  v3 25 / GT 13 unverändert

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-06-10 22:38:11 +02:00
parent 005a2ed711
commit 97575cc9c0
10 changed files with 473 additions and 12 deletions
@@ -25,6 +25,8 @@ import {
METHODIK_SHORT,
SEVERITY_BG,
SEVERITY_COLOR,
STATUS_LABEL,
STATUS_STYLE,
} from './_agentTypes'
export function AgentFindingCard({ f }: { f: Finding }) {
@@ -32,6 +34,10 @@ export function AgentFindingCard({ f }: { f: Finding }) {
const color = SEVERITY_COLOR[sev]
const bg = SEVERITY_BG[sev]
const sources = f.sources || []
// Verdikt-Pill nur für Nicht-FAIL-Status (Applicability/Unknown) —
// macht klar: kein Verstoß, sondern Hinweis/unbestimmt.
const statusLabel = f.status ? STATUS_LABEL[f.status] : undefined
const statusStyle = f.status ? STATUS_STYLE[f.status] : undefined
return (
<div
className="rounded border-l-4 p-3 space-y-2"
@@ -44,6 +50,14 @@ export function AgentFindingCard({ f }: { f: Finding }) {
>
{sev}
</span>
{statusLabel && statusStyle && (
<span
className="text-[10px] font-semibold px-1.5 py-0.5 rounded"
style={{ background: statusStyle.bg, color: statusStyle.fg }}
>
{statusLabel}
</span>
)}
<code className="text-[11px] text-gray-500">{f.check_id}</code>
{sources.map((s, i) => (
<MethodikBadge key={i} src={s.source_type} sourceId={s.source_id} />
@@ -78,9 +92,12 @@ export function AgentFindingCard({ f }: { f: Finding }) {
s.source_type === 'llm_cloud'
)
? 'Empfehlung (LLM-Vorschlag)'
: sev === 'HIGH'
? 'Pflicht-Maßnahme'
: 'Best-Practice-Empfehlung'
: f.status === 'insufficient_evidence' ||
f.status === 'possibly_applicable'
? 'Prüf-Hinweis'
: sev === 'HIGH'
? 'Pflicht-Maßnahme'
: 'Best-Practice-Empfehlung'
}
tone="green"
>