feat(learning): chair-feedback style corrections auto-flow to writer (P1 #6) #344

Merged
chaim merged 1 commits from worktree-chair-feedback-flow into main 2026-06-28 22:07:30 +00:00
Owner

הפער שנסגר

שרשרת ה-chair_feedback היתה מתה: 27 הערות נלכדו, 0 הפכו ללקח שהכותב קורא (job-הניתוח-השבועי מעולם לא היה קיים). התיקונים של היו"ר עצמה — הסיגנל הכי סמכותי, ובדיוק "לומד מכל טיוטה מוחזרת" — לא הגיעו לשום מקום.

למה לא דרך decision_lessons

decision_lessons מצומד ב-FK ל-style_corpus (סופי חתום), שאין לתיק-בכתיבה. לכן הערת-סגנון של היו"ר רוכבת על ערוץ ה-discussion_rules שכבר מגיע לכותב בכל הבלוקים — אותו מסלול של promote.

המימוש

  • db.append_global_rule — ה-append הנעול (read-modify-write), חולץ מ-_append_methodology_override למימוש יחיד משותף (G2). ה-web נשאר wrapper דק שזורע defaults; chair_feedback קורא ישירות.
  • record_chair_feedback (MCP tool): הערת-סגנון (style/wrong_tone/wrong_structure) עם lesson_extracted זורמת מיד ל-discussion_rules. היו"ר היא השער — אין אישור נפרד (INV-LRN1 שער-מדורג). מהות (missing_content/factual_error/other) = case-specific → נרשמת בלבד.

Invariants

  • INV-LRN1 — סגנון chair-authored = סמכות עליונה, זורם; מהות לא.
  • G2 — append יחיד משותף ל-promote + feedback.
  • INV-LRN5 — ערוץ-סגנון בלבד.

py_compile נקי ל-db.py / workflow.py / app.py.

🤖 Generated with Claude Code

## הפער שנסגר שרשרת ה-chair_feedback היתה **מתה**: 27 הערות נלכדו, **0 הפכו ללקח** שהכותב קורא (job-הניתוח-השבועי מעולם לא היה קיים). התיקונים של היו"ר עצמה — הסיגנל הכי סמכותי, ובדיוק "לומד מכל טיוטה מוחזרת" — לא הגיעו לשום מקום. ## למה לא דרך decision_lessons `decision_lessons` מצומד ב-FK ל-`style_corpus` (סופי חתום), שאין לתיק-בכתיבה. לכן הערת-**סגנון** של היו"ר רוכבת על ערוץ ה-`discussion_rules` שכבר מגיע לכותב בכל הבלוקים — אותו מסלול של promote. ## המימוש - **`db.append_global_rule`** — ה-append הנעול (read-modify-write), חולץ מ-`_append_methodology_override` ל**מימוש יחיד משותף** (G2). ה-web נשאר wrapper דק שזורע defaults; chair_feedback קורא ישירות. - **`record_chair_feedback`** (MCP tool): הערת-סגנון (style/wrong_tone/wrong_structure) עם `lesson_extracted` **זורמת מיד** ל-discussion_rules. **היו"ר היא השער** — אין אישור נפרד (INV-LRN1 שער-מדורג). מהות (missing_content/factual_error/other) = case-specific → נרשמת בלבד. ## Invariants - **INV-LRN1** — סגנון chair-authored = סמכות עליונה, זורם; מהות לא. - **G2** — append יחיד משותף ל-promote + feedback. - **INV-LRN5** — ערוץ-סגנון בלבד. py_compile נקי ל-db.py / workflow.py / app.py. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
chaim added 1 commit 2026-06-28 22:07:22 +00:00
feat(learning): chair-feedback style corrections auto-flow to the writer (P1 #6)
All checks were successful
G12 Leak-Guard / leak-guard (pull_request) Successful in 3s
Lint — undefined names / undefined-names (pull_request) Successful in 10s
8b23542dec
The chair-feedback chain was DEAD: 27 feedback rows captured, 0 ever became a
lesson the writer reads (no weekly-analysis job ever existed). The chair's own
corrections — the most authoritative signal of all, and exactly "learn from every
returned draft" — went nowhere.

decision_lessons can't carry them: it's FK-coupled to a style_corpus row (a signed
final), which a case-in-progress doesn't have. So chair STYLE feedback instead
rides the discussion_rules channel that already reaches the writer for all blocks —
the same path /training promote uses.

- db.append_global_rule: the locked read-modify-write append, extracted from web
  `_append_methodology_override` into one shared impl (G2). The web function is now
  a thin wrapper that seeds defaults; chair-feedback calls it directly.
- record_chair_feedback (MCP tool): a STYLE-category correction (style/wrong_tone/
  wrong_structure) with a lesson_extracted flows immediately to discussion_rules.
  The chair IS the gate — no separate approval (INV-LRN1 graduated gate). SUBSTANCE
  feedback (missing_content/factual_error/other) is case-specific → recorded only.

Invariants: INV-LRN1 (chair-authored style = highest authority, flows; substance
not auto-flowed), G2 (single append impl shared by promote + feedback), INV-LRN5
(style channel only).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
chaim merged commit 97f3f50d0b into main 2026-06-28 22:07:30 +00:00
chaim deleted branch worktree-chair-feedback-flow 2026-06-28 22:07: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#344