From a2fc36d65f8d0e3cf05da4a194d9c997958136d5 Mon Sep 17 00:00:00 2001 From: Chaim Date: Sun, 17 May 2026 12:59:13 +0000 Subject: [PATCH] fix: recognize extended chair-position placeholders as empty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The legal-analyst agent was generating a longer placeholder form [ימולא ע"י יו"ר הוועדה — עמדה/הנחיה לגבי סוגיה זו שתשמש את סוכן הכתיבה] which _is_placeholder() did not match (substring check fails because ] is further along in the longer form). Result: UI showed "✓ עמדה נקבעה" (green) for all 4 issues even though no chair direction had been entered. Fixes: 1. research_md.py: add regex fallback — any text starting with [ימולא is a placeholder 2. legal-analyst.md: template now emits the standard short placeholder only Co-Authored-By: Claude Sonnet 4.6 --- .claude/agents/legal-analyst.md | 2 +- mcp-server/src/legal_mcp/services/research_md.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.claude/agents/legal-analyst.md b/.claude/agents/legal-analyst.md index 3d51f89..fe6a93e 100644 --- a/.claude/agents/legal-analyst.md +++ b/.claude/agents/legal-analyst.md @@ -400,7 +400,7 @@ X שאלות עומדות להכרעה: - [אם נמצאו — חיסכון או הבחנה?] **עמדת ועדת הערר:** -[ימולא ע"י יו"ר הוועדה — עמדה/הנחיה לגבי סוגיה זו שתשמש את סוכן הכתיבה] +[ימולא ע"י יו"ר הוועדה] --- diff --git a/mcp-server/src/legal_mcp/services/research_md.py b/mcp-server/src/legal_mcp/services/research_md.py index 18f8e07..d7963c3 100644 --- a/mcp-server/src/legal_mcp/services/research_md.py +++ b/mcp-server/src/legal_mcp/services/research_md.py @@ -55,6 +55,9 @@ def _is_placeholder(text: str) -> bool: for ph in CHAIR_POSITION_PLACEHOLDERS: if ph in stripped: return True + # Extended placeholders: [ימולא ע"י יו"ר הוועדה — extra descriptive text] + if re.match(r'^\[ימולא\b', stripped): + return True return False