80a5daa3e317e9ddd45709057a7826f2b3e5e1db
The writer, learning panels, and legal_mcp tools run from the HOST tree (Paperclip agents claude -p with cwd=~/legal-ai; pm2 services import from mcp-server/src) — not the container. A merge + Coolify deploy only refreshes the FastAPI container; host-side code stayed on the last manual `git pull`. On 2026-06-28 the host was 16 commits behind, so a day of learning-loop fixes sat dormant until pulled by hand. host_sync.sh (run every minute via cron, like the existing data/training pull) fast-forwards the host tree to origin/main when it falls behind. Fast-forward ONLY — never forces, so the perpetually-dirty .taskmaster/tasks/tasks.json is never clobbered (clean ff leaves it; an upstream conflict logs + bails for manual handling). Agent runs spawn fresh and pick up new code with no restart; only the long-running pm2 services that import app code (chat_service, court_fetch_service, reaper) are restarted, and only when their own files changed (precise, minimal churn). Logs to data/logs/host_sync.log. Cron entry (added on the host, flock-guarded): * * * * * flock -n /tmp/host_sync.lock bash ~/legal-ai/scripts/host_sync.sh SCRIPTS.md updated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat(learning): curator §A fires on mark-final — capture source='curator' findings on every final (#159)
feat(learning): curator §A fires on mark-final — capture source='curator' findings on every final (#159)
Merge pull request 'feat(learning): feed corpus-measured ratios to the writer (P2 #7, structural half)' (#345) from worktree-corpus-ratios-writer into main
Merge pull request 'fix(learning): כרטיס-אוצֵר כן-3-ערוצים + לכידת ממצאי-אוצֵר (source='curator')' (#339) from worktree-curator-learning-surface 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%