9ae7304d445edabebada17778edafe5b36f2279f
Switches the scanned-PDF fallback from Google Cloud Vision to Mistral OCR (mistral-ocr-latest) for better Hebrew accuracy and robustness against broken embedded OCR layers (e.g. case 1044-03-26 which returned English garbage through Vision). Routing strategy (document-level, not per-page): - PyMuPDF extracts all pages; pages that pass _text_quality_ok() use PyMuPDF output directly (free, ~50ms). - If ANY page fails quality → Mistral OCR called once for the whole PDF, returning per-page Markdown for all pages (consistent format, no plain-text/Markdown mix within a document). Markdown output preserved: Mistral returns ## headers and |tables|; chunker updated to recognise ATX Markdown headers (##/###) as section boundaries in _split_into_sections(). Config: GOOGLE_CLOUD_VISION_API_KEY → MISTRAL_API_KEY; allowlist updated vision.googleapis.com → api.mistral.ai. MISTRAL_API_KEY added to Coolify container env. Invariants: G1 (single OCR fallback path, not parallel), G2 (no duplicate extractor route), INV-AH (Mistral handles gershayim natively; quote-fix only on PyMuPDF path). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
docs(principles): move research into docs/precedent-corpus-redesign/ (README + research-full) (#153)
Merge pull request 'feat(corpus): עיצוב-מחדש קורפוס-הפסיקה — ביטול תור-ההלכות, שכבת-מאומת-מאזכורים, דירוג-בזמן-אחזור (#153)' (#315) from worktree-canonical-synthesis into main
Description
AI Legal Decision Drafting System — MCP server, web upload, RAG search
Languages
Python
65.8%
TypeScript
32.2%
JavaScript
1%
Shell
0.7%
CSS
0.2%