⚠️
This feature is planned but not yet available. The information below describes the intended design.
Chatting with Claude
Writan will integrate with Claude (Anthropic’s AI) to provide intelligent assistance throughout the writing process.
Planned Capabilities
- Brainstorming — Explore ideas, develop characters, work through plot problems
- Story development — Expand beats, develop scenes, explore “what if” scenarios
- Craft feedback — Get analysis grounded in the writing rules engine
- Generation — Produce prose drafts based on your beat notes and data layers
What Exists Today
An API endpoint for prose generation exists at app/api/generate/route.ts, but it is not yet connected to the UI. The endpoint accepts beat notes and story context and returns AI-generated prose using Claude Sonnet.
A context composition system (lib/context/inheritedContext.ts) walks the node tree and collects:
- Ancestor data — characters, locations, objects, freeform blocks from parent nodes
- Sibling context — prior beats’ notes and prose for narrative continuity (configurable depth, cross-scene bridging)
- Structured output — formatted text ordered from Book → Beat
This context system is functional but not yet wired into the generation UI.
Planned Context Composition
When fully connected, the AI will receive a composite of:
- The current node’s data blocks (characters, locations, freeform data)
- Parent node context (scene purpose, chapter arc, act themes)
- Preceding sibling beats (notes and prose, for narrative continuity)
- Beat notes and existing prose
- Writing rules for the task at hand
See How AI Generation Works for the technical details of what exists so far.