638dbf9b9fcdaf94a49478b209873e2dacc80580
Golden ratios were measured from the corpus (style_distance.measure_corpus_ratios) but never reached the writer — it used only the hardcoded STRUCTURE_GUIDANCE text. So the structural target was frozen, and drafts kept deviating (e.g. discussion block 10% vs a 40-47% target) with no corrective signal. _structure_guidance_with_corpus(outcome, practice_area) now appends the corpus-measured section ratios for the block's outcome to the structure guidance, at both writer entry points (write_block + get_block_context) via one shared helper (G2). Because measure_corpus_ratios reads style_corpus — which grows with every enrolled final (see exemplar-growth, #343) — the writer's structural target now reflects Dafna's ACTUAL current distribution and improves as the corpus grows. Deterministic (no LLM); best-effort. This is the STRUCTURAL half of the voice-profile-refresh (#7). The remaining half — LLM-regenerating the abstract voice-fingerprint PROSE from the corpus (chair-gated) — is a distinct larger initiative, deliberately deferred rather than rushed. Invariants: G1 (the writer gets the live measured target, not a frozen constant), G2 (one structure-guidance builder shared by both entry points; reuses the existing measure_corpus_ratios — no parallel measurement), INV-LRN4 (the corpus the loop grows now feeds the writer's structural target). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Merge pull request 'feat(learning): graduated gate — panel-consensus style lessons auto-flow to writer (P0)' (#341) from worktree-graduated-gate 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%