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:
@@ -42,6 +42,25 @@ GOLDEN_RATIOS: dict[str, dict[str, tuple[int, int]]] = {
|
||||
"partial_acceptance": {"background": (25, 35), "claims": (25, 30), "discussion": (40, 47), "summary": (2, 3)},
|
||||
}
|
||||
|
||||
# ── Anti-patterns (what Dafna avoids) — detectable signals for style-distance (T7) ──
|
||||
# Derived from daphna-voice-fingerprint.md §3 (corrected 2026-06-06: sequential
|
||||
# paragraph numbering is REQUIRED — applied as Word auto-numbering at export — so the
|
||||
# anti-pattern is MANUAL numbers typed as text, not numbering itself).
|
||||
ANTI_PATTERNS: list[dict] = [
|
||||
{"name": "manual_paragraph_numbers",
|
||||
"regex": r"(?m)^\s*\d{1,3}\.\s",
|
||||
"note": "מספרים ידניים כטקסט בראש פסקה — אמורים להיות auto-numbering בייצוא"},
|
||||
{"name": "inline_numbered_fragments",
|
||||
"regex": r"\([0-9]\)[^\n]{0,200}\([0-9]\)",
|
||||
"note": "פיצול טיעון לרשימת-מיני (1)...(2) בתוך פסקת-אנליזה"},
|
||||
{"name": "markdown_headers",
|
||||
"regex": r"(?m)^#{1,6}\s",
|
||||
"note": "כותרות markdown — אינן בהחלטה הסופית"},
|
||||
{"name": "bullet_lists",
|
||||
"regex": r"(?m)^\s*[-*•]\s",
|
||||
"note": "רשימות תבליטים באנליזה — דפנה כותבת נרטיב רציף"},
|
||||
]
|
||||
|
||||
# ── Paragraph length guidance (word counts) ────────────────────────
|
||||
|
||||
PARAGRAPH_LENGTHS = {
|
||||
|
||||
Reference in New Issue
Block a user