feat(tools): add letter length + summary depth controls; harden korrespond §-discipline
- Summarize: new depth param (brief/standard/detailed) with depth-aware prompt instructions and coverage mandate; wired through API + JS - Korrespond: new letter length param (concise/standard/detailed) injected as Lengde: instruction in draft pass; wired through API + JS - Korrespond draft prompt: add §-discipline rule (cite only directly relevant §§) plus Opphevet guard (aligned with dobetterlegal-tools) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+3
-1
@@ -171,6 +171,8 @@ try {
|
||||
if (in_array($inputEngine, ['azure_mini', 'claude_sonnet'], true)) {
|
||||
$engine = $inputEngine;
|
||||
}
|
||||
$length = in_array($input['length'] ?? '', ['concise', 'standard', 'detailed'], true)
|
||||
? (string)$input['length'] : 'standard';
|
||||
$ftRemaining = dbnToolsFreeTierDeduct($ftUid, 'korrespond');
|
||||
$creditDeducted = true;
|
||||
|
||||
@@ -179,7 +181,7 @@ try {
|
||||
: null;
|
||||
|
||||
// ── Pass 2: retrieve law → draft → self-check → translate ──────────────────
|
||||
$result = $agent->generate($intake, $classify, $emit, $engine, $personaSlug);
|
||||
$result = $agent->generate($intake, $classify, $emit, $engine, $personaSlug, $length);
|
||||
$result['ok'] = true;
|
||||
$result['latency_ms'] = (int)round((microtime(true) - $startTime) * 1000);
|
||||
if ($ftRemaining >= 0) {
|
||||
|
||||
Reference in New Issue
Block a user