feat(principles): retroactive cull (Phase C) + source-derived terminology (Phase D, #152)
All checks were successful
G12 Leak-Guard / leak-guard (pull_request) Successful in 4s
Lint — undefined names / undefined-names (pull_request) Successful in 11s

Phase C — scripts/cull_principles.py: re-adjudicates every existing 'original'
principle with the SAME panel regime (panel_keep_score → classify → apply_cap),
reversible (CSV backup + rejected canonical recoverable), usage-throttled.
panel_extraction.panel_keep_score + apply_cap (shared, G2). Dry-run on 3
decisions: 37→15 survive.

Phase D — services/principles.py: source-derived label הלכה (binding court) /
כלל פרשני (committee) / עיקרון (persuasive); umbrella עקרונות משפטיים. Wired into
canonical_halacha_get/list (principle_class+principle_label). UI string changes
deferred to the Claude Design gate. spec INV-LRN7; SCRIPTS.md; 7 new tests; 428 green.

Phase E needs no new code — synthesis already targets pending_synthesis, which the
cull leaves only on survivors (rejected canonicals → 'rejected').

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-19 11:14:59 +00:00
parent 6b2fd562ae
commit 4ca907b97f
9 changed files with 426 additions and 14 deletions

View File

@@ -228,6 +228,27 @@ Dimensions for Data Quality* (2013) · ISO 8000 (Data quality) | סטטוס: ver
(`/precedents`, PR#300) לאישור-יו"ר; CSV-audit ב-`data/audit/canonical-synthesis-*.csv`.
**הפרה ידועה:** — (חדש)
### INV-LRN7: חילוץ-עקרונות מגודר-פאנל + טרמינולוגיה נכונה (#152 → G2/G10/INV-AH)
**כלל:** חילוץ עקרונות-משפטיים מפסיקה (להבא ורטרואקטיבית) עובר משטר-פאנל אחיד:
**3 מודלים עצמאיים** (Claude מקומי + DeepSeek + Gemini) מנתחים לעומק כל החלטה,
מציעים מועמדים עם ציון, המועמדים מותאמים בין-מודלית (cosine), ולכל אחד `votes`
(# מודלים) ו-`score` (ממוצע-המצביעים). **כלל-אישור:** 3 קולות→אישור · 2 וציון≥0.85→
אישור · 2 ו<0.85→`pending_review` (יו"ר, G10) · ≤1→נדחה. **תקרה:** עד
`HALACHA_PANEL_MAX_NEW`=5 עקרונות חדשים לכל החלטה (לפי ציון); עיקרון מוכר מקושר
ל-canonical קיים (cosine, V41) ואינו נספר בתקרה. **טרמינולוגיה (מהות, לא קוסמטיקה):**
ועדת-ערר **מיישמת** דין ואינה יוצרת הלכה — עיקרון מפס"ד מחוזי/עליון מחייב = **הלכה**,
מהחלטת ועדת-ערר = **כלל פרשני**, מפסיקה משכנעת = **עיקרון**; המטרייה = **עקרונות
משפטיים**. הסיווג נגזר מ-`first_established_in` (source_kind/is_binding), ללא עמודה חדשה.
**מקור-יחיד (G2):** extractor (`_extract_via_panel`), סינון רטרואקטיבי (`cull_principles.py`),
ושני הם דרך `services/panel_extraction` + `panel_judges` — אין נתיב-פאנל מקביל.
**מקורות:** gold-set tri-model consensus (AC1=0.92, [[project_goldset_tri_model_consensus]]) ·
LegalBench (gemini-2.5-flash) · Trust-or-Escalate (ICLR 2025) | סטטוס: verified
**אכיפה:** `services/panel_extraction.py` (panel_extract/panel_keep_score/classify/apply_cap),
`services/panel_judges.py`, `halacha_extractor._extract_via_panel`, `db.store_panel_principles`,
`scripts/cull_principles.py`, `services/principles.py` (תווית). config `HALACHA_PANEL_*`.
החלטת-יו"ר 2026-06-19; מקור-אמת: [`../legal-principles-redesign.md`](../legal-principles-redesign.md).
**הפרה ידועה:** — (חדש)
---
## 4. הג'ובים המתוזמנים (תמיכת-תשתית ללולאה)