> ## Continuous-process anchor
>
> This spec describes an instance of one of the retired-script themes
> documented in docs/design/retired_scripts_patterns.md. Before
> implementing, read:
>
> 1. The "Design principles for continuous processes" section of that
> atlas — every principle is load-bearing. In particular:
> - LLMs for semantic judgment; rules for syntactic validation.
> - Gap-predicate driven, not calendar-driven.
> - Idempotent + version-stamped + observable.
> - No hardcoded entity lists, keyword lists, or canonical-name tables.
> - Three surfaces: FastAPI + orchestra + MCP.
> - Progressive improvement via outcome-feedback loop.
> 2. The theme entry in the atlas matching this task's capability:
> F1 (pick the closest from Atlas A1–A7, Agora AG1–AG5,
> Exchange EX1–EX4, Forge F1–F2, Senate S1–S8, Cross-cutting X1–X2).
> 3. If the theme is not yet rebuilt as a continuous process, follow
> docs/planning/specs/rebuild_theme_template_spec.md to scaffold it
> BEFORE doing the per-instance work.
>
> **Specific scripts named below in this spec are retired and must not
> be rebuilt as one-offs.** Implement (or extend) the corresponding
> continuous process instead.
ID: 1290fb13-d11 Priority: 88 Type: one_shot Status: complete
Enrich the top 5 hypotheses (by composite score) with real clinical trials data fetched from the ClinicalTrials.gov v2 API. Each hypothesis gets structured trial data (NCT ID, title, status, phase, conditions, interventions, sponsor, enrollment, dates, description, URL) stored in the clinical_trials JSON column.
composite_score all have structured clinical_trials data with required fields populated./hypothesis/{id} was shadowed by an older lightweight route that did not include the clinical trials tab, while the richer clinical-trials-aware route was registered later on the same path./hypothesis-lite/{id} so canonical hypothesis pages render the Exchange clinical trials section.{
"requirements": {
"analysis": 7,
"reasoning": 6,
"safety": 9
},
"completion_shas": [
"ec0ffccaa4015713a09618906ae525ffb1cf2cfa"
],
"completion_shas_checked_at": "2026-04-21T04:00:22.923216+00:00",
"_reset_note": "This task was reset after a database incident on 2026-04-17.\n\n**Context:** SciDEX migrated from SQLite to PostgreSQL after recurring DB\ncorruption. Some work done during Apr 16-17 may have been lost.\n\n**Before starting work:**\n1. Check if the task's goal is ALREADY satisfied (run the relevant checks)\n2. Check `git log --all --grep=task:YOUR_TASK_ID` for prior commits\n3. If complete, verify and mark done. If partial, continue. If not done, proceed.\n\n**DB change:** SciDEX now uses PostgreSQL. `get_db()` auto-detects via\nSCIDEX_DB_BACKEND=postgres env var.",
"_reset_at": "2026-04-18T06:29:22.046013+00:00",
"_reset_from_status": "done"
}