/** * DevelopmentalAnalyzer — PROC-04 Developmental Revision Tools * * Provides scene purpose audits, subplot balance checks, and plot-hole * detection by querying the MCP SQLite database. */ import type { MCPClient } from '../core/database.js'; /** * Result item for a single scene in a scene-purpose audit. * `hasPurpose` is true when the scene's `purpose` field is non-null and * non-empty; false otherwise. */ export interface ScenePurposeAudit { chapterId: number; chapterTitle: string; sceneId: number; sceneTitle: string; purpose?: string; hasPurpose: boolean; } /** * Result item for a single plot thread in a subplot balance check. * `flag` is true when the thread has fewer than 3 beats, indicating it may be * underdeveloped. */ export interface SubplotBalance { plotThreadId: string; title: string; sceneCount: number; flag: boolean; } /** * Result item for a plot-hole detection scan. * Threads that are still open but have had no new beats in the last 3 chapters * (relative to the maximum chapter number in the project) are returned. */ export interface PlotHole { threadId: string; title: string; /** Chapter number of the most recent beat, if any. */ lastChapter?: number; /** ISO timestamp of when the thread was opened / created. */ openSince?: string; } /** * Runs developmental-revision queries against the project database. * * All methods accept `projectId` as a string because the MCP layer stores * project IDs as either integer or string depending on the query context — * we coerce to the correct type in each query binding. */ export declare class DevelopmentalAnalyzer { private readonly client; constructor(client: MCPClient); /** * Return every scene in the project together with its `purpose` field. * Scenes that have a null or empty-string purpose are flagged with * `hasPurpose: false`. * * @param projectId - The numeric project ID (as string or number). */ auditScenePurposes(projectId: string): Promise; /** * Count the number of plot beats per plot thread and flag threads with fewer * than 3 beats as potentially underdeveloped. * * @param projectId - The numeric project ID (as string or number). */ analyzeSubplotBalance(projectId: string): Promise; /** * Find open plot threads that have had no new beats in the last 3 chapters. * * A thread qualifies as a potential plot hole when: * - Its `status` is still open (not 'resolved' / 'closed'). * - Its most recent beat belongs to a chapter whose `chapter_number` is at * least 3 less than the maximum chapter number in the project, OR it has * no beats at all. * * @param projectId - The numeric project ID (as string or number). */ findPlotHoles(projectId: string): Promise; } //# sourceMappingURL=developmental-analyzer.d.ts.map