feat(calibration): style-clean recommend_effort (anti-primary) + confidence + --rerank (#213) #377
Reference in New Issue
Block a user
Delete Branch "worktree-agent-ae80f93f2f0f100cb"
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?
מה ולמה
יעד-העל הוא רכישת-הסגנון של דפנה (לכתוב כמוה). עד היום
recommend_effortב-scripts/calibrate_effort.pyדירג efforts לפי המפתח המרוכב(distance, anti_pattern_total, change_percent)— כש-distanceראשי. אבלdistanceבולע אתchange_percent, ש(לפי 07-learning §0.7 וההערה בדוח עצמו) "מערבב סגנון עם שלמות-תוכן" — נשלט על-ידי אי-התאמת-תוכן (המודל לא יכול לדעת עובדות-תיק) → רעש לסגנון. הסיגנל הנקי-לסגנון הואanti_pattern_total(ספירת הפרות-כללי-סגנון של דפנה). היו"ר אישר את ה-re-weighting.מה משתנה (#213):
recommend_effortמדרג לפיanti_pattern_totalראשי (↑ פחות הפרות = טוב יותר) →golden_ratio_deviation_ppמשני (סגנון-מבני;None=הגרוע) →distancetiebreak קלוש בלבד.change_percentהוצא מהדירוג — נשאר בדוח כהקשר בלבד."clear"/"weak"): בחירה שההובלה-ב-antiשלה מעל הרץ-המשני קטנה מ-epsilon =max(0.5, 0.20·spread)מסומנת ⚠️ weak (within-noise) — כך שבחירה בתוך-הרעש (כמו ה-"low" הוודאי-בטעות של block-zayin) לעולם לא מוצגת כוודאית. מוצג כעמודת-confidence בטבלת-ההמלצה.--rerank <report.json>: מדרג-מחדש דוח-כיול שמור תחת המפתח החדש — ללא LLM, ללא DB — מדפיס טבלה + כותב*-reranked.md. מאפשר לדרג-מחדש את ריצת-8-הסופיים של היום בלי לייצר מחדש.recommend_effortנשאר פונקציה-טהורה משותפת אחת, בשימוש-חוזר ע"יscripts/calibrate_block_yod.py(G2). שני ה---self-testעוברים.scripts/SCRIPTS.mdעודכנו.תוצאת re-rank לריצת-8-הסופיים (offline)
lowו-clear (anti 1.57 מוביל ב-0.72 ≥ ε=0.6).xhighאך מסומן weak.Invariants — הצהרה (חובה)
recommend_effortיחידה משותפת, שימוש-חוזר ע"י harness בלוק-י — אין מסלול-מדד מקביל) · INV-LRN5 (סיגנל-סגנון-בלבד; change% מדווח-לא-מדורג).צ'קליסט — פרוטוקול כתיבת-קוד
docs/spec/00-constitution.md(G8/G2) +docs/spec/07-learning.md§0.7 לפני הכתיבהrecommend_effort/style_distance) ולא מתקן תסמין בקריאה (G1)--rerankמחזיר 2 ל-file-not-foundgap-audit.md— לא נגעתי ב-GAP/FU ממופה--self-testשל שני הסקריפטים = ALL PASSאימות
🤖 Generated with Claude Code
Make the effort-calibration recommendation style-clean (style acquisition is the goal — write like chair Dafna Tamir): - recommend_effort ranks by anti_pattern_total (PRIMARY, the clean style-rule violation count) → golden_ratio_deviation_pp (SECONDARY, structural-style, None=worst) → distance (faint final tiebreak). change_percent is EXCLUDED from the ranking (it mixes style with content-completeness per 07-learning §0.7 — noise for STYLE) and kept in the report as context only. - Add a confidence flag ("clear"/"weak"): a pick whose anti-pattern lead over the runner-up is within noise (margin < epsilon = max(0.5, 0.20·spread)) is flagged ⚠️ weak, so an over-claimed pick (the old confident block-zayin "low") is never shown as confident. Rendered as a confidence column in the report. - Add --rerank <report.json>: re-apply the new key to a saved calibration JSON offline (NO LLM, NO DB), print + write *-reranked.md. Re-ranks today's 8-final run without regenerating. - recommend_effort stays a single shared pure function reused by scripts/calibrate_block_yod.py (G2); both --self-test suites pass. - Spec note added (07-learning §0.7) + SCRIPTS.md updated. Invariants: G8 (style-clean empirical ranking), G2 (single shared recommend_effort, reused by the block-yod harness — no parallel metric path), INV-LRN5 (style-only signal; change% reported-not-ranked). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>