**Problem:** SciDEX has 3,545 knowledge gaps, of which 3,153 are still "open". Only 12 have ever been marked "resolved" (0.34% resolution rate). With 1,873 hypotheses, 835 debate sessions, and 29,503 papers in the system, vast amounts of evidence have accumulated that directly address many of these gaps — but no pipeline exists to match evidence to gaps and close them.
**Goal:** Build and run a gap closure pipeline that systematically resolves 500+ gaps by matching them against accumulated hypotheses, debates, and papers.
**Implementation:**
1. Pull all 3,153 open gaps: `SELECT id, title, description, domain FROM knowledge_gaps WHERE status = 'open' LIMIT 3153`
2. For each gap, use LLM embedding similarity or keyword matching to find:
- Hypotheses that address the gap (JOIN on gap_id or semantic similarity)
- Debate sessions whose question text overlaps with gap description
- Papers (via search_vector) whose abstracts address the gap topic
3. Scoring: a gap is "resolvable" if: hypothesis_matches >= 1 AND (debate_matches >= 1 OR paper_matches >= 2)
4. For resolvable gaps: UPDATE knowledge_gaps SET status = 'resolved', resolution_summary = , resolved_at = NOW() WHERE id =
5. For partially addressed: UPDATE status = 'partially_addressed' where hypothesis_matches >= 1 but debate coverage thin
6. Target: resolve 500+ gaps (from 12 resolved to 512+)
7. Log: which gaps resolved, which hypotheses resolved them, resolution distribution by domain
**Use `scidex.core.database.get_db()`. Use `llm.py` for LLM-based similarity scoring.**
**Expected outcome:** 500+ gaps moved from 'open' to 'resolved' or 'partially_addressed'. Resolution rate rises from 0.34% to ~15%+. Gap list becomes actionable signal instead of noise.
Completion Notes
Auto-release: non-recurring task produced no commits this iteration; requeuing for next cycle