import { type ParsedGenreProfile } from "../models/genre-profile.js"; import { type ParsedBookRules } from "../models/book-rules.js"; /** * Load genre profile. Lookup order: * 1. Project-level: {projectRoot}/genres/{genreId}.md * 2. Built-in: packages/core/genres/{genreId}.md * 3. Fallback: built-in other.md */ export declare function readGenreProfile(projectRoot: string, genreId: string): Promise; /** * List all available genre profiles (project-level + built-in, deduped). * Returns array of { id, name, source }. */ export declare function listAvailableGenres(projectRoot: string): Promise>; /** Return the path to the built-in genres directory. */ export declare function getBuiltinGenresDir(): string; /** * Load the structured book rules (YAML frontmatter). * * Phase 5 cleanup #3: the YAML frontmatter now lives at the top of * outline/story_frame.md. For books initialized before that cleanup it may * still live in book_rules.md instead, so we fall back to that legacy path * when story_frame.md has no frontmatter (or no file at all). * * Phase 5 hotfix 2: when the source is story_frame.md, the prose body * underneath the frontmatter is NOT semantic "book rules" text — it is the * 5-section outline essay. We therefore slice out ONLY the frontmatter block * for parseBookRules, so ParsedBookRules.body ends up empty for new-layout * books. Legacy book_rules.md still carries narrow narrative rules in its * body, so we pass it through verbatim. * * Returns null only if NEITHER source yields parseable rules. */ export declare function readBookRules(bookDir: string): Promise; export declare function readBookLanguage(bookDir: string): Promise<"zh" | "en" | undefined>; //# sourceMappingURL=rules-reader.d.ts.map