feat(learning): סינתזת-לקחים — מיזוג לקחים חופפים ללקח-על עשיר (#158 / INV-LRN8) #347
Reference in New Issue
Block a user
Delete Branch "worktree-lesson-synthesis"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
רקע
ערוץ-הלמידה צובר
decision_lessonsחופפים. הכותב מקבל רק 15 מאושרים לכל practice_area (חיתוך-שקט, #157), ועם לכידה על כל סופי (#159) הערימה תגדל. הפתרון (רעיון-היו"ר): למזג לקחים דומים ללקח-על אחד עשיר ומוכלל — הסט שזורם לכותב קטֵן ומשתבח (Authorial Style Profiling, ספ §0.1). מחקה את סינתזת-הקנוני (V41/INV-LRN6) על אותה טבלה (G2).מנגנון (
services/lesson_synthesis.py, מסלול-יחיד)LESSON_SYNTH_CLUSTER_THRESHOLD) בתוך shardpractice_area+category.claude_sessionמעוגן-מקור (INV-AH; סגנון-בלבד INV-LRN5; abstain) + שער-drift (cosine מול centroid ≥LESSON_SYNTH_DRIFT_FLOOR).source='synthesis'+synthesized_from; המקורות →review_status='superseded'.approved(זורם), ו-veto-יו"ר ב-/training משחזר את המקורות (db.revert_lesson_synthesis, מחובר ל-PATCH /api/training/lessons).נגזרות
embedding vector(1024)+synthesized_from UUID[]+ ivfflat על decision_lessons.lesson_synthesize_pending(practice_area, category, apply)+ סקריפטbackfill_lesson_synthesis.py(--dry-run/--apply, audit CSV, throttle). שניהם דרך השירות (G2).config LESSON_SYNTH_*· spec INV-LRN8 ·SCRIPTS.md.get_recent_decision_lessonsללא שינוי — superseded יוצא (מסנן approved), synthesis נכנס; התקרה מפסיקה לחתוך כי הסט קטֵן.נדחה
synthesis/supersededב-lessons-tab— דרך שער-העיצוב (Claude Design). כרגע מוגנים ב-fallback (ללא קריסה, תווית לא-מדויקת בלבד). אין שינוי web-ui ב-PR זה.Invariants
G2 (מסלול-יחיד, אותה טבלה — אין מאגר-מקביל) · INV-AH (עיגון + drift) · INV-LRN1/G10 (שער מדורג-הפיך) · INV-LRN5 (סגנון-בלבד) · INV-LRN8 (חדש).
בדיקות
py_compile✓ ·leak-guardG12 ✓ · smoke-test טהור (אשכול/cosine/centroid, singletons+no-embedding מוחרגים) ✓. אימות functional מלא (--dry-runמול DB+voyage+claude CLI) — בהוסט אחרי-deploy, כמו V41.פוסט-מיזוג
--dry-runלבדיקת אשכולות/ניסוחים, ואז--applyכשמרוצים (השירות רץ בהוסט — claude_session).git pullבעץ-הראשי.depends-on #157/#159 · merged-after #341/#342
🤖 Generated with Claude Code