feat(learning): graduated gate — panel-consensus style lessons auto-flow to writer (P0) #341

Merged
chaim merged 1 commits from worktree-graduated-gate into main 2026-06-28 21:46:30 +00:00
Owner

הפער שנסגר

פאנל-הסגנון ייצר 81 לקחי-סגנון מאומתים — כולם proposed, 0 approved — והכותב (שקורא רק approved) קיבל אפס. המערכת לכדה למידה אך לא נתנה לה לזרום.

ההכרעה (חיים, 2026-06-28) — שער מדורג לפי סיכון

  • סגנון (קטגוריות style/structure/lexicon/tabular) שעבר קונצנזוס 2/2 → נוצר כ-approvedזורם מיד לכותב, הפיך (veto-יו"ר ב-/training). פאנל ה-deepseek+gemini פולט רק style_method ורק על 2/2 — בדיוק קריטריון-השער; מהות מסוננת ומדולגת ועוברת בשער-ההלכות הקשיח.
  • מהות (הלכה/תקדים/עובדה) → שער-יו"ר קשיח, ללא שינוי.

המימוש

style_lesson_panel.py: _review_status_for(category) קובע את השער במפורש; לולאת-ה-apply מעבירה אותו ל-db.add_decision_lesson (שכבר מקבל review_status — אפס שינוי-DB). הספ: INV-LRN1 נכתב מחדש כשער-מדורג (קשיח למהות; auto-flow הפיך לסגנון-בקונצנזוס — עדיין "תחת בקרת-משתמש" דרך veto, לפי NCSC/CEPEJ); §0.6 הותאם.

נותר נפרד

backfill חד-פעמי של 81 הלקחים הקיימים ל-approved (DB, אחרי merge).

Invariants

  • INV-LRN1 — תוקן לשער-מדורג.
  • INV-LRN5 — סגנון בלבד; מהות לעולם לא zורמת-אוטומטית.
  • G10 — בקרה אנושית נשמרת כ-veto הפיך.

🤖 Generated with Claude Code

## הפער שנסגר פאנל-הסגנון ייצר **81 לקחי-סגנון מאומתים — כולם `proposed`, 0 `approved`** — והכותב (שקורא רק `approved`) קיבל **אפס**. המערכת לכדה למידה אך לא נתנה לה לזרום. ## ההכרעה (חיים, 2026-06-28) — שער מדורג לפי סיכון - **סגנון** (קטגוריות style/structure/lexicon/tabular) שעבר **קונצנזוס 2/2** → נוצר כ-`approved` → **זורם מיד לכותב**, הפיך (veto-יו"ר ב-/training). פאנל ה-deepseek+gemini פולט רק style_method ורק על 2/2 — בדיוק קריטריון-השער; מהות מסוננת ומדולגת ועוברת בשער-ההלכות הקשיח. - **מהות** (הלכה/תקדים/עובדה) → **שער-יו"ר קשיח**, ללא שינוי. ## המימוש `style_lesson_panel.py`: `_review_status_for(category)` קובע את השער במפורש; לולאת-ה-apply מעבירה אותו ל-`db.add_decision_lesson` (שכבר מקבל `review_status` — אפס שינוי-DB). הספ: **INV-LRN1 נכתב מחדש כשער-מדורג** (קשיח למהות; auto-flow הפיך לסגנון-בקונצנזוס — עדיין "תחת בקרת-משתמש" דרך veto, לפי NCSC/CEPEJ); §0.6 הותאם. ## נותר נפרד backfill חד-פעמי של 81 הלקחים הקיימים ל-`approved` (DB, אחרי merge). ## Invariants - **INV-LRN1** — תוקן לשער-מדורג. - **INV-LRN5** — סגנון בלבד; מהות לעולם לא zורמת-אוטומטית. - **G10** — בקרה אנושית נשמרת כ-veto הפיך. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
chaim added 1 commit 2026-06-28 21:46:23 +00:00
feat(learning): graduated gate — panel-consensus style lessons auto-flow to writer (P0)
All checks were successful
G12 Leak-Guard / leak-guard (pull_request) Successful in 4s
Lint — undefined names / undefined-names (pull_request) Successful in 10s
044de2c0f0
The voice-learning panel produced 81 vetted style lessons — all stuck at
review_status='proposed' with 0 ever approved — so the writer (which reads only
'approved') received NONE of them. The system captured learning but never let it
flow. Chair decision (2026-06-28): a GRADUATED gate by content risk.

- STYLE lessons (categories style/structure/lexicon/tabular) the 2/2 panel kept →
  created as review_status='approved' → flow to the writer immediately, reversibly
  (chair vetoes in /training). The deepseek+gemini panel only emits style_method
  and only on 2/2 consensus, so this is exactly the gate's criterion; substance is
  already filtered out and skipped, and routes through the strict halacha gate.
- SUBSTANCE (halacha/precedent/fact) stays a HARD chair gate — unchanged.

style_lesson_panel.py: _review_status_for(category) sets the gate explicitly
(approved for _STYLE_CATEGORIES, else proposed); the apply loop passes it to
db.add_decision_lesson (which already accepts review_status — no DB change).

Spec: INV-LRN1 rewritten as the graduated gate (hard for substance; reversible
auto-flow for consensus style — still "under user control" via veto, per
NCSC/CEPEJ); §0.6 updated to match.

A one-time backfill of the 81 existing panel style lessons to 'approved' runs
separately (DB, post-merge).

Invariants: INV-LRN1 (amended — graduated), INV-LRN5 (style-only, substance never
auto-flows), G10 (human control preserved as reversible veto).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
chaim merged commit 07bd8bee48 into main 2026-06-28 21:46:30 +00:00
chaim deleted branch worktree-graduated-gate 2026-06-28 21:46:30 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ezer-mishpati/legal-ai#341