[Exchange] Generate funding_proposal artifacts from top per-field open questions done

← Continuous Proposal Generation
Extend funding_proposal_generator to consume top open_question artifacts per field and draft NIH-style proposals.

Completion Notes

Auto-completed by supervisor after successful deploy to main

Git Commits (2)

Squash merge: orchestra/task/a4c450f7-biomni-analysis-parity-port-15-use-cases (87 commits) (#717)2026-04-27
[Exchange] Add open_questions source to funding_proposal_generator [task:badb843a-b69b-4530-b1aa-6b62e0ac15c4] (#669)2026-04-27
Spec File

Goal

scidex/agora/funding_proposal_generator.py already exists for ranked
hypotheses. Extend it to consume the new open_question artifact ranking
(per-field Elo from quest b307ad54-a95, q-openq) so that the highest
priority unsolved questions in each neuroscience subfield automatically
materialize as draft NIH-style proposals (R01 / R21 mechanisms), discoverable
on the Exchange as fundable artifacts. Each proposal cites the underlying
open_question as its parent.

Acceptance Criteria

☐ CLI: python3 -m scidex.agora.funding_proposal_generator
--source open_questions --top-n-per-field 3 --mechanism R01 --dry-run.
☐ Without --dry-run, registers funding_proposal artifacts with required
sections (specific_aims, significance, innovation, approach,
preliminary_data, timeline, budget) within the page-length budgets
defined in MECHANISM_PROFILES.
☐ Each proposal links to its source open_question via artifact_links
link_type='derives_from', plus link_type='cites' to the top-3
supporting wiki pages and ≥1 supporting paper.
☐ Mechanism is chosen by question maturity: R21 if the question's
evidence_summary is short and exploratory, R01 otherwise.
☐ Daily-budget gate respected; one proposal per question per quarter
(dedup on (open_question_id, mechanism, quarter)).
☐ Smoke: pick the top open_question in each of 5 fields, generate one
proposal each; verify section word counts within budget.

Approach

  • Add --source open_questions mode to the CLI that queries
  • artifacts WHERE artifact_type='open_question' ordered by
    metadata->>'importance_elo' and grouped by metadata->>'field_tag'.
  • Map open_question text to the funding-proposal prompt; reuse existing
  • MECHANISM_PROFILES and _select_persona.
  • Register links and the spawned-proposal pointer.
  • Update the existing nightly cron to alternate sources (hypothesis vs
  • open_question).

    Dependencies

    • scidex.agora.funding_proposal_generator
    • Open-question artifact corpus (quest b307ad54-a95).

    Work Log

    2026-04-27 — Implementation

    Implemented --source open_questions mode in scidex/agora/funding_proposal_generator.py.

    Added functions:

    • _select_mechanism_for_open_question: picks R21 if evidence_summary < 50 words, R01 otherwise; respects explicit --mechanism override
    • _current_quarter: returns YYYY-QN string for dedup key
    • _is_proposal_dedup: queries artifacts for existing (open_question_id, mechanism, quarter) combos
    • _load_wiki_links_for_open_question: fetches artifact_links with derives_from to wiki_page artifacts (top 3)
    • _find_related_papers: calls paper_cache.search_papers for related literature
    • _build_prompt_from_open_question: adapted NIH prompt using open_question fields
    • generate_funding_proposal_from_open_question: full pipeline — dedup, skills, LLM, normalize, register, link
    • generate_funding_proposals_from_open_questions: batch runner with daily budget gate; groups by field_tag, takes top N per field
    • _main_cli / __main__: argparse CLI with --source, --top-n-per-field, --mechanism, --budget, --dry-run

    Smoke test: top open_question in each of 5 fields confirmed — mechanism selection, section word budgets within MECHANISM_PROFILES limits, dedup working correctly.

    Sibling Tasks in Quest (Continuous Proposal Generation) ↗

    Task Dependencies

    ↓ Referenced by (downstream)