feat(tools): reposition as Do Better Legal two-track Norwegian-law MCP

De-family-ify shared JSON tools (persona-aware routing + neutral base
prompt), make the verification review pick its engine per track
(family/child-welfare -> dbn-legal-agent-v3, others -> gpt-4o interim),
and route product-name strings through dbnToolsProductName(). Rebrand the
MCP/tools surface (mcp.php + i18n mcp_* strings) to Do Better Legal.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-06-02 07:45:17 +02:00
parent d156f8cf6b
commit 7fcd317205
12 changed files with 158 additions and 72 deletions
+4 -3
View File
@@ -282,7 +282,7 @@ PROMPT;
if ($emit) { $emit('progress', ['detail' => self::L('legal_check', $userLang)]); }
$legalCheck = [];
try {
$legalCheck = dbnToolsRunLegalCheck($checked['draft'], $body);
$legalCheck = dbnToolsRunLegalCheck($checked['draft'], $body, null, $persona);
} catch (Throwable $e) { /* silent — non-critical */ }
// ── Translate to user language (if not Norwegian) ───────────────────────
@@ -777,7 +777,8 @@ EOT,
array $classify,
string $originalDraftNo,
string $jurisdiction,
?callable $emit = null
?callable $emit = null,
?string $persona = null
): array {
$body = $intake['recipient_body'] ?? 'other';
$outputType = $intake['output_type'] ?? 'email';
@@ -808,7 +809,7 @@ EOT,
if ($emit) { $emit('progress', ['detail' => self::L('legal_check', $userLang)]); }
$legalCheckRefine = [];
try {
$legalCheckRefine = dbnToolsRunLegalCheck($checked['draft'], $body);
$legalCheckRefine = dbnToolsRunLegalCheck($checked['draft'], $body, null, $persona);
} catch (Throwable $e) { /* silent — non-critical */ }
$draftUser = $checked['draft'];