feat(style-acq T7): מדד מרחק-סגנון — האם הטיוטות מתכנסות לדפנה

סוגר את ה-MVP (T0+T4+T5+T7): מטא-אות על בריאות-הלמידה (INV-LRN4),
דטרמיניסטי וללא LLM.

- lessons.ANTI_PATTERNS — אנטי-דפוסים נמדדים (מ-voice-fingerprint §3 המתוקן):
  מספרים-ידניים, רשימת-מיני (1)..(2), כותרות markdown, תבליטים.
- services/style_distance.py — 3 רכיבים: golden_ratio_adherence (סטיית
  אחוזי-סעיפים מ-GOLDEN_RATIOS), anti_pattern_hits, draft_to_final_diff
  (change_percent מפנקס-ההתאמה). מקור-אמת אחד עם lessons.py.
- MCP tool style_distance(case_number).

INV-LRN4. G9.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-06 17:33:00 +00:00
parent 7a2865339c
commit a3451775fa
3 changed files with 155 additions and 0 deletions

View File

@@ -528,6 +528,16 @@ async def get_style_guide() -> str:
return await drafting.get_style_guide()
@mcp.tool()
async def style_distance(case_number: str) -> str:
"""מדד מרחק-סגנון (T7) — האם הטיוטה מתכנסת לסגנון דפנה: סטיית יחסי-זהב,
ספירת אנטי-דפוסים, ושיעור-השינוי draft→final מפנקס-ההתאמה. ללא LLM."""
import json as _json
from legal_mcp.services import style_distance as _sd
result = await _sd.style_distance(case_number)
return _json.dumps(result, ensure_ascii=False, indent=2)
@mcp.tool()
async def draft_section(
case_number: str,