-
Notifications
You must be signed in to change notification settings - Fork 2
AI-Powered Writing Assistant Suite #6
Description
Storyteller should integrate AI capabilities natively into the writing experience, turning it from a powerful writing tool into an intelligent writing studio. This issue proposes three core AI feature areas that would dramatically enhance the authoring workflow while staying true to Storyteller's philosophy of being offline-first, privacy-respecting, and user-owned.
1. Inline Document Autocomplete
Context-aware text completion directly inside the TipTap editor. As the author writes, the AI analyzes the current document content - including the scene's narrative flow, established character voices, tone, and preceding paragraphs - to offer intelligent inline suggestions.
2. Selection-Based Text Transformations
Allow users to select any block of text in the editor and apply AI-powered transformations with a single click. A floating toolbar or context menu appears on text selection, offering quick actions.
- Summarize - Condense the selected passage into a shorter version
- Change Tone - Rewrite with a different tone (formal, casual, dramatic, poetic, humorous, etc.)
- Rephrase - Rewrite for clarity or style without changing meaning
- Expand - Elaborate on the selected text, adding detail and depth
- Simplify - Reduce complexity of language
- Continue - Generate a continuation from the selection
- Translate - Translate selected text to another language
- Custom Prompt - Let the user type a freeform instruction for the selected text (e.g., "make this dialogue more tense")
3. Personal AI Agent (Sidebar)
A persistent AI assistant that lives in the sidebar (or as a dockable panel via dockview-react) and serves as the author's research partner, brainstorming companion, and editorial consultant. This agent has deep awareness of the entire project.
Core capabilities:
- Research & Brainstorming - Ask questions about historical periods, cultural details, scientific concepts, or any topic relevant to the story
- Story Consultation - Discuss plot holes, character motivations, pacing issues, and narrative structure
- Planning & Outlining - Help plan chapters, story arcs, and scene sequences
- Content-Aware Q&A - The agent can read and reference all project content: chapters, scenes, character profiles, world-building entries, timelines, and notes
- Direct Writing - The agent can write or rewrite content and insert it directly into scenes or notes with user approval
- Character Voice Simulation - Ask "How would [Character X] respond to this situation?" and get answers based on the character's profile and history
- Continuity Checking - Ask the agent to verify facts, timeline consistency, or character details across the manuscript
- General Assistance - Anything the author needs help with, from naming characters to building magic systems
Implementation Notes
These points are critical for any contribution to this feature area:
Multi-Model Support (Required)
All AI features must be built with a model-agnostic architecture. Users should be able to choose their preferred provider and model. At minimum, the abstraction layer should support:
- OpenAI (GPT-4o, GPT-4.1, etc.)
- Anthropic (Claude)
- Google (Gemini)
- Local/self-hosted models via OpenAI-compatible APIs (Ollama, LM Studio, etc.)
This should be implemented through a clean provider abstraction - a unified interface where adding a new provider is straightforward. The model selection should be fully configurable in Settings.
BIOK (Bring Your Own Key) - No Cloud, No Accounts
Storyteller is and will remain a local-first, offline-first application. There is no Storyteller cloud service, no user accounts, and no server-side processing.
Fully Optional
AI features should be treated as an enhancement layer. No core writing functionality should depend on AI. Users who prefer a pure writing experience without AI should notice no difference - no nag screens, no disabled-looking buttons, no "upgrade to unlock" patterns. When no API key is configured, AI-related UI elements should either be hidden or gracefully minimized.