import type { Check } from '../types.js'; import type { ExtractProfile } from '../../distill/prompts/extract.js'; /** * "Built, wired, never invoked" canary for the entity-to-entity relation * pipeline (FEAT-481/SLICE-435: AtomRelationSchema in the extraction prompt * -> filterAtomRelations (05-extract.ts) -> stage 8's write into * `entity_relations`). Doctor is the only place that can catch "the code * compiles and unit tests pass, but distilling a real transcript never * actually produces a row" — see the design doc's own framing of this exact * failure mode for this repo. * * `relations[]` guidance was added to the ENGINEERING prompt only * (src/distill/prompts/extract.ts's SLICE-435 update comment — the * conversational profile, SLICE-434, was deliberately not extended to * cover it). So a zero row count under `extractProfile: 'conversational'` * is not evidence of anything broken — this check stays informational in * that case regardless of activity, rather than false-alarming on a profile * that was never asked to produce relations in the first place. * * Under the engineering profile (the default), gated on the same * MEANINGFUL_USAGE_THRESHOLD floor `checkAutoCapture`/ * `checkUsefulnessFeedbackLoop` use — a brand-new or low-activity install * legitimately has zero relations and must not warn. Once that floor is * crossed with zero `entity_relations` rows, `relation_guard_drops` (029, * see src/storage/relation-guard-log.ts) is the tie-breaker: drops > 0 means * the model IS emitting relations and the guard is dropping every one * (predicate/hallucination/shape issue, or a model-capability gap); * drops == 0 too means the model itself never emits a `relations[]` entry * at all — both are folded into one WARN message (the fix guidance covers * both causes) since the operator-facing remedy — check the extraction * model / look at debug logs — is the same either way. */ export declare function checkEntityRelations(dataDir: string, extractProfile: ExtractProfile, encryptionEnabled: boolean): Check;