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 -2
View File
@@ -64,7 +64,8 @@ try {
$personaResolved = dbnToolsResolvePersona((int)$client['id'], $personaSlug);
$agent = (new DbnLegalAnalysisAgent())
->withPersonaPrompt($personaResolved['system_prompt'] ?? null);
->withPersonaPrompt($personaResolved['system_prompt'] ?? null)
->withPersonaSlug($personaResolved['slug'] ?? $personaSlug);
// Pass 1 — extract issues (Azure, fast); deduct credit AFTER this succeeds
$emit('progress', ['step' => 'extracting_issues', 'detail' => 'Identifying distinct legal issues…']);
@@ -132,7 +133,8 @@ try {
$legalCheck = dbnToolsRunLegalCheck(
mb_strimwidth((string)($synth['overall_assessment'] ?? ''), 0, 800),
$docType,
$personaResolved['system_prompt'] ?? null
$personaResolved['system_prompt'] ?? null,
$personaResolved['slug'] ?? $personaSlug
);
} catch (Throwable) {}