Research Facility
The Research Facility is the auditable lane for generating research ideas before they enter the worker queue. It is intentionally separate from dispatch: a generated candidate is not work until it is admitted and recorded with an admission reason. The facility answers two questions the old ad-hoc process could not answer reliably:- Where did this idea come from?
- Why did it get queued?
Operator model
Ledgers
The Research Facility uses four dedicated ledgers in the control-plane database. None of them dispatch work by themselves.
Promotion into runtime work still happens through the existing runtime ledgers (
enoch.ideas, enoch.projects, enoch.queue_items).
Generation modes
Candidates are generated through explicit, constrained modes. Each mode has required grounding and a specific scoring emphasis:
Database checks enforce grounding for the two easiest-to-abuse modes:
fresh_grounded must include source evidence; followup_from_negative must include parent lineage.
Candidate contract
A candidate must be a testable research proposal, not a vague idea. Required fields include:hypothesismechanismbaseline_to_beatsuccess_thresholdkill_conditionexpected_artifactsrequired_evidenceestimated_runtime_classexpected_token_budgetmachine_targetlikely_failure_modesnovelty_comparison(when similar prior projects exist)
Dashboard workflow
The dashboard Research Facility panel separates concerns:- Generate smoke batch — dry-runs first, then writes only Research Facility source/candidate/admission/lineage rows.
- Generate provider batch — dry-runs a provider quota preflight first. The live action spends one provider request, then writes only Research Facility source/candidate/admission/lineage rows.
- Promote selected candidate — dry-runs first, then promotes exactly one already-admitted candidate into
enoch.ideas,enoch.projects, andenoch.queue_items. - Run bounded cycle — the first policy-gated automation layer. Requires an explicit live
enabledflag, checks provider budget, can spend one provider request, can promote up to one admitted candidate, can optionally dispatch at most one selected queued item, and can optionally draft/finalize at most one paper.
Bounded cycle endpoint
enabled: true. Dry-runs do not spend provider requests or write rows. Paper drafting/finalization is disabled by default and must be explicitly bounded.
Provider-backed generation
The provider-backed generation endpoint (POST /control/api/research/generate-provider-batch) is fail-closed:
- Query provider quota first.
- Refuse generation if remaining credit/rolling request reserve is too low.
- Dry-run without spending a provider request.
- Live-run at most the bounded candidate count.
- Score candidates through the deterministic planner.
- Persist only Research Facility ledgers with
queue_admitted = false.
Guardrails
- The Research Facility tables do not dispatch work by themselves.
- Runtime queue mutation is idempotent and refuses to overwrite in-flight queue rows.
- Dedupe uses a stable
dedupe_key; duplicate keys in the same batch are rejected. - Similar prior projects require
novelty_comparison. - Candidate lineage is recorded before queue promotion.