export interface ContradictionEvidence { signal: 'negation' | 'antonym'; /** The token carrying the polarity flip — for tests and SM-5 diagnosis. */ trigger: string; } /** * Structural words carry no claim, so they must not count toward shared * context — otherwise "the spool is appended by bash" and "the reflex is not * appended by node" overlap on `the`/`is`/`by` and read as a contradiction. * This is deliberately NOT `tokenize.ts`'s `LOW_SIGNAL_TOKENS`: that set * strips `do`, `does` and `did`, which carry polarity here. */ export declare const STRUCTURAL_STOPWORDS: Set; interface Token { raw: string; stem: string; /** True when this came from splitting a compound (`no-op`, `src/a/no-op.ts`). */ fromSplit: boolean; } export interface AnalyzedNote { tokens: Token[]; all: Set; core: Set; } /** * Tokenize, stem, and partition a note. * * Exported so the write path can analyze the incoming note once and reuse it * across every candidate prior instead of re-analyzing per comparison. */ export declare function analyzeNote(text: string): AnalyzedNote; /** * Report whether `incoming` opposes `prior`. * * DETECTED: * - negation asymmetry — exactly one side negates a predicate the other * side also asserts * - antonym flip — one side says A, the other says B, over near-identical * remaining content * * NOT DETECTED (deliberate — do not "fix" these): * - divergent choices ("use postgres" / "use mysql") — no polarity marker * - refinements ("use postgres" / "use postgres, not mysql") — the negation * governs `mysql`, which the other side never mentions * - added caveats ("... at turn end" / "... at turn end, no exceptions") * - both sides negated — they agree * - a polarity flip over unrelated content — fails the shared-context gate * * KNOWN LIMIT: `TOKEN_PATTERN` is ASCII-only, so non-Latin content analyzes to * an empty core and never conflicts. A silent miss, consistent with the * conservative posture, but it is a miss. */ export declare function detectContradiction(prior: string, incoming: string): ContradictionEvidence | null; /** `detectContradiction` over pre-analyzed notes, for callers comparing many priors. */ export declare function compareAnalyzed(a: AnalyzedNote, b: AnalyzedNote): ContradictionEvidence | null; /** * No token may be both structural and polarity-bearing — the core filter and * the polarity filter would disagree about what the claim is. Exported and * asserted by a unit test rather than thrown at module load: `db/store.ts` * imports this module, so a load-time throw would fire on the capture path, * where project-context requires that a memory failure never break the turn. */ export declare function polarityStopwordOverlap(): string[]; /** Exposed for the coverage test that pins the negator list against stem collisions. */ export declare const NEGATOR_SURFACE_FORMS: readonly string[]; export {}; //# sourceMappingURL=conflict.d.ts.map