Add Document Discrepancy Finder tool

8-step NDJSON-streaming pipeline that compares two Barnevernet documents:
classifies each doc, extracts parties and timelines, cross-references both
for contradictions/deletions/additions, retrieves corpus legal context, and
synthesises a full discrepancy report with tabbed UI.

New files: DiscrepancyAgent.php, api/discrepancy.php, discrepancy.php,
discrepancy.js. Modified: FreeTier.php (cost=4), i18n.php (all 4 langs),
tool-svgs.php (DC icon), tools.css (dc-* component styles).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-18 19:30:38 +02:00
parent 1246b7a804
commit e977bbb6b3
8 changed files with 2809 additions and 7 deletions
+1
View File
@@ -25,6 +25,7 @@ final class FreeTier
'advocate' => 3,
'deep-research' => 5,
'transcribe' => 2, // flat rate; actual duration unknown upfront
'discrepancy' => 4, // 2 docs × 4 extraction steps + cross-ref + synthesis
];
/** Credit cost for a given tool slug. Returns 1 for unknown tools. */