feat(reconcile): B — Cross-Doc-Reconciliation (Pflicht in anderem Doc erfüllt)

Ein 'X fehlt'/'zu prüfen'-Finding wird unterdrückt, wenn die Pflicht in einem
ANDEREN Snapshot-Dokument erfüllt ist (z.B. § 36 VSBG / OS-Link stehen bei BMW
in AGB/'Rechtlicher Hinweis', nicht im Impressum → war False Positive).
Konservative Allowlist (impressum: verbraucher_streitbeilegung, odr_link) gegen
False-Reconciliation. Verdrahtet in _run_doc_agent (alle Doc-Checks). Frontend:
'In anderem Dokument abgedeckt'-Sektion. Greift voll nach Scan + Legal-Capture.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-06-11 15:42:16 +02:00
parent 9dfdaae8e4
commit ba7d98be36
4 changed files with 190 additions and 1 deletions
@@ -25,8 +25,11 @@ const SEV_ORDER: Record<Severity, number> = {
const INITIAL_VISIBLE = 12
type Reconciled = { title?: string; field_id?: string; norm?: string; reconciled_in_label?: string; reconciled_in?: string }
export function AgentResultView({ output }: { output: SlotOutput }) {
const [showAll, setShowAll] = useState(false)
const reconciled = (output as { reconciled?: Reconciled[] }).reconciled || []
const sortedFindings = [...output.findings].sort(
(a, b) => SEV_ORDER[a.severity] - SEV_ORDER[b.severity],
)
@@ -92,6 +95,22 @@ export function AgentResultView({ output }: { output: SlotOutput }) {
</div>
)}
{reconciled.length > 0 && (
<div className="space-y-1">
<div className="text-xs font-semibold uppercase text-green-700">
In anderem Dokument abgedeckt ({reconciled.length})
</div>
{reconciled.map((f, i) => (
<div key={i} className="text-xs text-gray-600 bg-green-50 border border-green-100 px-2 py-1 rounded">
{f.title || f.field_id}
<span className="text-gray-400"> gefunden in </span>
<strong>{f.reconciled_in_label || f.reconciled_in}</strong>
{f.norm && <span className="text-gray-400"> · {f.norm}</span>}
</div>
))}
</div>
)}
{output.recommendations.length > 0 && (
<div className="space-y-2">
<div className="text-xs font-semibold uppercase text-gray-700">