/** * Quality Auditor (FR-N03) * * Core logic for knowledge entry quality assessment and LLM-based rewriting. * * AC coverage: * AC1: Three-dimension evaluation (specificity / actionability / contextualization) * AC2: LLM quality scoring 1-5 * AC3: Score ≤ threshold → mark as failing, generate rewrite suggestion * AC7: All quality assessment via LLM, zero keyword/regex */ export interface QualityScore { /** Overall score 1-5 */ overall: number; /** Specificity: how specific and precise is the knowledge? */ specificity: number; /** Actionability: can someone act on this knowledge directly? */ actionability: number; /** Contextualization: is the scenario/context clearly defined? */ contextualization: number; /** LLM-generated explanation of the scores */ rationale: string; /** LLM-generated rewrite suggestion (only for low-scoring entries) */ rewriteSuggestion?: string; } export interface QualityAssessment { entryId: string; title: string; type: string; domain: string | null; score: QualityScore; passing: boolean; } export interface QualityReport { totalEntries: number; assessed: number; passing: number; failing: number; passRate: number; scoreDistribution: Record; top10Worst: QualityAssessment[]; threshold: number; } export interface EntryForAudit { id: string; type: string; title: string; content: string; domain: string | null; } /** * Assess quality of knowledge entries using LLM. * Processes in batches to stay within token limits. */ export declare function assessQuality(entries: EntryForAudit[], threshold?: number): Promise; /** * Rewrite a single entry using LLM based on quality assessment suggestion. */ export declare function rewriteEntry(entry: EntryForAudit, suggestion: string): Promise<{ title: string; content: string; summary: string; } | null>; /** * Build a quality report from assessment results. */ export declare function buildQualityReport(assessments: QualityAssessment[], totalEntries: number, threshold: number): QualityReport; /** * Format a quality report as human-readable text. */ export declare function formatQualityReport(report: QualityReport): string; //# sourceMappingURL=quality-auditor.d.ts.map