/** * HookAnalyzer — deterministic opening-line "hook strength" scorer. * * Scores the opening line(s) of a chapter against signals that craft guides * associate with a strong opening, and against the throat-clearing clichés they * warn about. Pure deterministic (no LLM): every signal is a regex/word-list * test over the opening text, so the same chapter always scores the same. * * The score is advisory, not a verdict — the per-signal breakdown and the * suggestions are the useful output. "Suggest, don't dictate." * * Signals (max 100): * - Poses a question (20) — a literal "?" or an interrogative opener that * plants a question in the reader's mind. * - Introduces a character (20)— a proper noun or a stake-bearing pronoun. * - Place / atmosphere (15) — sensory words that ground the reader. * - In medias res (20) — an action verb early in the opening. * - Tension / conflict (15) — words that signal stakes or danger. * - Avoids throat-clearing (10)— no weather-only / waking-up cliché opening. */ /** A single scored signal in the hook breakdown. */ export interface HookSignal { key: string; label: string; /** Points awarded (0..max). */ points: number; /** Maximum points this signal can contribute. */ max: number; /** Human-readable note on what was (or was not) found. */ detail: string; } /** The full hook-strength result for one chapter's opening. */ export interface HookScore { /** Display name of the analyzed chapter (basename). */ chapter: string; /** The first sentence of the opening. */ openingLine: string; /** The leading slice of prose that was scored (first ~40 words). */ openingText: string; /** Total score, 0..100. */ score: number; signals: HookSignal[]; /** Concrete, advisory suggestions for the weakest signals. */ suggestions: string[]; } export declare class HookAnalyzer { private readonly projectPath; constructor(projectPath: string); /** * Score the opening of a chapter file. * * @param chapterFile Absolute path, or path relative to `projectPath/chapters/`. */ analyzeChapter(chapterFile: string): Promise; /** * Core deterministic scorer over raw chapter text. * * @param raw Full chapter contents (frontmatter/markup tolerated). * @param chapter Display name for the result. */ analyzeText(raw: string, chapter: string): HookScore; } //# sourceMappingURL=hook-analyzer.d.ts.map