feat(advisor): Case Workspace v2 — Evidence grouping, human names, 3-column, summary

Reworks the advisor toward a Compliance Case Workspace (review feedback):
- Rename user-facing "Quellen" -> "Evidence".
- Evidence grouped by document/regulation family (count + expandable) — no more
  unsorted DSK/DSK/DPF/... jumble.
- Human-readable regulation names via a display registry (DSK Sdm B51 -> "DSK
  Standard-Datenschutzmodell (SDM)" / Kapitel B51); generic, bridges G2.
- Evidence summary "Antwort basiert auf" with meaningful counts; Regelwerke = distinct
  FAMILIES (fixes the inflated count). NO fabricated trust score (needs a defined basis).
- Expanded mode = 3-column workspace (question+summary | answer | evidence, independent
  scroll) + history switcher; narrow mode stays stacked.
- Prompt: push aggressive markdown structure (## per aspect, numbered phases).

Deferred/coordinated on board: C8 diagrams (RAG contract), answer<->evidence coupling
[1] (needs LLM citation anchors — phase 2), G1 retrieval relevance + G2 metadata (RAG).
tsc clean, 17 vitest, check-loc 0.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-07-01 10:38:06 +02:00
parent 3884038b06
commit 591cae5ebc
12 changed files with 362 additions and 125 deletions
@@ -60,7 +60,7 @@ export function ComplianceAdvisorWidget({ currentStep = 'default' }: ComplianceA
return (
<div
className={`fixed bottom-6 right-6 z-50 flex max-h-screen flex-col rounded-2xl border border-gray-200 bg-white shadow-2xl transition-all duration-200 ${
isExpanded ? 'h-[85vh] w-[760px]' : 'h-[560px] w-[420px]'
isExpanded ? 'h-[85vh] w-[960px]' : 'h-[560px] w-[420px]'
}`}
>
{/* Header */}
@@ -122,7 +122,12 @@ export function ComplianceAdvisorWidget({ currentStep = 'default' }: ComplianceA
</div>
{/* Evidence Workspace */}
<EvidenceWorkspace turns={turns} exampleQuestions={exampleQuestions} onExample={submit} />
<EvidenceWorkspace
turns={turns}
expanded={isExpanded}
exampleQuestions={exampleQuestions}
onExample={submit}
/>
{/* Input */}
<div className="rounded-b-2xl border-t border-gray-200 bg-white p-3">