/** * Deterministic pool_discovery question synthesis (IND-418). * * A mined discriminator already carries everything a question needs: a label, * a question seed, 2–3 sides, and verified per-candidate assignments. This * module turns the top discriminator into a `Question` payload + server-side * pool snapshot with ZERO generation-time LLM calls — the phrasing was * produced (and evidence-verified) at mining time, so synthesis is pure, * auditable, and cheap to re-run for interview-mode chaining. */ import type { Question, QuestionPoolDiscriminator, QuestionPoolSnapshot } from "../../questions/domain/question.schema.js"; import type { ScoredDiscriminator } from "./discriminator.types.js"; /** Fixed option appended to every pool question — the no-preference escape. */ export declare const BOTH_MATTER_LABEL = "Both matter"; /** * Converts a scored discriminator into the compact snapshot form stored on * the question row (verified assignments only; unknowns dropped). */ export declare function toQuestionDiscriminator(d: ScoredDiscriminator): QuestionPoolDiscriminator; /** * Filters a mining pass down to question-eligible discriminators: * VoI ≥ {@link POOL_QUESTION_MIN_VOI}, evidenceRate ≥ * {@link POOL_QUESTION_MIN_EVIDENCE_RATE}, capped at * {@link POOL_QUESTION_MAX_DISCRIMINATORS}. Input is already VoI-sorted. */ export declare function selectQuestionDiscriminators(discriminators: ScoredDiscriminator[]): ScoredDiscriminator[]; /** Input for one question synthesis. */ export interface SynthesizePoolQuestionInput { /** The discriminator to ask about (already eligibility-filtered). */ discriminator: QuestionPoolDiscriminator; /** Remaining ranked eligible discriminators (interview-mode chain stash). */ alternates: QuestionPoolDiscriminator[]; poolSize: number; /** Exact bounded candidate opportunity IDs supplied to this synthesis pass. */ opportunityIds: string[]; /** ISO-8601 timestamp of the mining pass. */ minedAt: string; /** Discovery run id, when known. */ runId?: string; /** * Intent payload snippet — folded into the evidence chip so the question * self-identifies on any surface ("based on 16 people matching ‘…’"). */ intentText?: string; /** Stable hash of the full normalized intent payload + summary. */ intentFingerprint?: string; } /** Synthesized question: client payload + server-side snapshot. */ export interface SynthesizedPoolQuestion { payload: Question; pool: QuestionPoolSnapshot; } /** * Builds the pool_discovery question. Returns null when the pool is below * the k-anonymity floor or the discriminator shape is unusable (guards are * duplicated here so no caller can bypass them). */ export declare function synthesizePoolQuestion(input: SynthesizePoolQuestionInput): SynthesizedPoolQuestion | null;