/** * Proposal triage — keeps the review queue from becoming homework. * * Scores every pending proposal 0–1 from cheap, local signals: * + machine-checkable evidence attached (falsifiable on arrival) * + trusted source (human-stated context > knowledge docs > miners) * + concrete scope (paths/symbols) * − similarity to previously REJECTED claims (the correction loop: * what you drop teaches the queue what not to surface first) * − similarity to existing ACTIVE memory (likely duplicate knowledge) * * `dim review` walks the queue best-first and shows the score; * `dim review approve all --min-score ` batch-approves above a bar. */ import type { MemoryStore } from "../db/store.js"; import type { Proposal } from "../types.js"; export interface TriagedProposal { proposal: Proposal; score: number; reasons: string[]; } export declare function tokenize(text: string): Set; /** Jaccard similarity over content tokens — cheap, offline, good enough for triage. */ export declare function claimSimilarity(a: string, b: string): number; export declare function scoreProposal(p: Proposal, rejectedClaims: string[], activeClaims: string[]): { score: number; reasons: string[]; }; /** Pending proposals, best-first, each with its score and the reasons behind it. */ export declare function triagePending(store: MemoryStore, limit?: number): TriagedProposal[];