/** * Fact-Checking Agent * * Validates documentation accuracy against the actual codebase. * Uses AI to identify outdated information, incorrect references, * and missing dependencies. * * @version 3.1.0 */ import { OpenRouterClient } from '../embeddings/openrouter.js'; /** * A fact-check result for a single claim */ export interface FactCheckClaim { /** The claim being checked */ claim: string; /** Whether the claim is factual */ factual: boolean; /** Correction if not factual */ correction?: string; /** Confidence score (0-1) */ confidence: number; /** Line number where claim appears */ line?: number; } /** * Result of fact-checking a file */ export interface FactCheckResult { /** The file that was checked */ file: string; /** All claims checked */ claims: FactCheckClaim[]; /** Summary statistics */ summary: { total: number; factual: number; notFactual: number; lowConfidence: number; }; } /** * Configuration for the fact-check agent */ export interface FactCheckAgentConfig { /** OpenRouter client for AI analysis */ openRouter: OpenRouterClient; /** Model override (not recommended) */ model?: string; /** Project root directory */ projectRoot: string; } /** * Fact-Checking Agent * * Analyzes documentation files to identify claims that may be: * - Outdated (referencing deprecated APIs, old versions) * - Inaccurate (wrong file paths, incorrect API signatures) * - Missing dependencies (referencing non-existent files) */ export declare class FactCheckAgent { private openRouter; private model; private projectRoot; constructor(config: FactCheckAgentConfig); /** * Fact-check a specific file */ factCheck(filePath: string): Promise; /** * Fact-check multiple files */ factCheckMultiple(filePaths: string[]): Promise; /** * Get the fact-check system prompt */ private getFactCheckSystemPrompt; /** * Build the fact-check prompt for a specific file */ private buildFactCheckPrompt; /** * Parse the fact-check response */ private parseFactCheckResponse; /** * Discover source files in the project */ private discoverSourceFiles; /** * Get all documentation files to check */ getDocumentationFiles(): Promise; /** * Close the agent and clean up resources */ close(): void; } /** * Create a fact-check agent */ export declare function createFactCheckAgent(config: Omit): FactCheckAgent; //# sourceMappingURL=fact-check-agent.d.ts.map