Build a fiction-writing assistant centered on a structured story bible, not a generic AI chat wrapper. Use Next.js/TypeScript with a model key read from ANTHROPIC_API_KEY or OPENAI_API_KEY. Let the user maintain a story bible: named entries for characters (with a short description and voice notes), locations, and plot points, stored in SQLite. In the main writing view, as the user writes or requests a continuation, do simple keyword matching between the current scene text and story-bible entry names, and automatically include the matched entries' details in the generation prompt — so mentioning a character by name pulls in their established traits without the user re-typing them. Support two generation modes: 'continue' (extend the current scene) and 'describe' (generate a sensory description of a selected object or place, informed by the story bible's tone notes). Keep full manuscript version history locally so a generation the user doesn't like can always be reverted. Do not build a writing community, story-sharing, or multi-user collaboration — those are out of scope; this is a private, single-user tool. Requires an Anthropic or OpenAI API key.