/** * Consistency Checking System * Scans manuscript for contradictions and continuity errors */ import type { MCPClient } from '../core/database.js'; import type { ConsistencyIssue } from '../types/novel.js'; export interface ConsistencyCheckResult { issues: Partial[]; errors: number; warnings: number; info: number; } export declare class ConsistencyChecker { private mcpClient; private projectId; private claudeClient; constructor(mcpClient: MCPClient, projectId: number); /** * Run all consistency checks */ checkAll(): Promise; /** * Check for character attribute contradictions * Example: "blue eyes" in Ch 3, "brown eyes" in Ch 15 */ private checkCharacterAttributes; /** * Check for timeline contradictions * Example: Event A happens after Event B, but character references B before A */ private checkTimelineConsistency; /** * Check for world rule violations using AI analysis of chapter text. * * Loads all hard world rules and all chapters (using summary as content), * then batches the rules into Claude prompts (max {@link WORLD_RULE_BATCH_SIZE} * per batch) and parses the response for violations. * * Can be called privately as part of {@link checkAll}, or publicly for a * targeted world-rule scan. * * @param projectId Optional override; defaults to the instance's projectId. */ checkWorldRuleViolations(projectId?: string | number): Promise; /** * Parse Claude's violation response into structured objects. * Handles numbered lists like "1. Rule 2 violated\n- passage: "...\n- explanation: ..." */ private parseViolationResponse; /** * Insert a world rule violation into consistency_issues, deduplicating by * description. Returns the newly inserted issue, or null if already exists. */ private insertWorldRuleIssue; /** * Check for unresolved plot threads */ private checkUnresolvedPlotThreads; /** * Insert a consistency issue into the database */ private insertIssue; /** * Acknowledge an issue (mark as acknowledged by author) */ acknowledgeIssue(issueId: number, notes?: string): Promise; /** * Resolve an issue (mark as fixed) */ resolveIssue(issueId: number, notes?: string): Promise; /** * Mark issue as false positive */ markFalsePositive(issueId: number, notes?: string): Promise; /** * Get all open issues */ getOpenIssues(severity?: 'info' | 'warning' | 'error'): Promise; } //# sourceMappingURL=checker.d.ts.map