User GuidesChatting with Claude
⚠️

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) can walk the node tree and collect ancestor data blocks into a structured prompt — but this is not yet wired into the generation endpoint.

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)
  • 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.