AI features

The AI surface is an editor-integrated critic, not a chat sidebar. Three model tiers cover different passes:

  • Haiku — always-on analytics (adverb density, sentence variance, filter words)
  • Sonnet — line edits, copy edits, rewrite passes
  • Opus — developmental and continuity passes that compare prose to your reference material

All text calls go through OpenRouter (BYOK). Add a key in Preferences - AI.

Selection AI actions (right-click menu)

Right-click anywhere in the editor to access native commands, or hover over/click the nested AI… menu to trigger inline AI assistants.

When you have selected text:

  • Critique — the model reads the selection and generates a structured inline critique card in the editor’s right margin.
  • Research — the model searches the broader project index (using embeddings) to retrieve relevant narrative threads, analyze context, and call out continuity issues or connections. Displays as a margin card.
  • Rewrite… — opens an inline text box directly within the context menu. Enter custom instructions for a tailored rewrite, or leave it blank to execute a premium style and flow improvement pass. Streams the suggested replacement inline in the editor (which you can Apply or Dismiss).
  • Ask… — opens an inline prompt box directly in the menu to ask a specific question about the selected passage. Streams the answer into an inline margin card.
  • Chat — captures the active selection as a context pill in the chat composer, opens the AI panel’s Chat tab, and automatically focuses your keyboard cursor.
  • Revision — opens the AI panel’s Revision tab to run a full book-wide developmental or structural revision.

When the caret is active with no selection (cursor only):

  • Continue from cursor — fans out multiple paragraphs continuing from your cursor in the Sandbox.
  • Chat — opens the chat panel pre-loaded with a context pill for the active document.
  • Revision — opens the AI panel’s Revision tab.

AI panel (toolbox)

Open the AI tab in the right panel. The panel is a four-tab toolbox: chat, suggestions, reviews, scripts. The active tab does not persist across reloads — chat is always default. Switch tabs with Cmd+K and pick AI panel: <Tab> tab, or click the header.

Chat tab

A chat-shaped editorial surface that always knows about the active chapter.

  • Review runs a full-pass on the current chapter (engagement, clarity, voice, scene structure). The reply streams into the chat AND lands as an entry in the reviews tab.
  • Revision runs the same axes but framed against the whole book; the manuscript is the cached prompt prefix so repeat calls are cheap.
  • Slash commands — type / as the first character of the input to open a picker over built-in commands and scripts. Arrow keys navigate, Enter or Tab commits, Escape dismisses. Cmd+. opens the picker directly.
  • Smart suggestion chips — the panel generates short prompt ideas for the active chapter. You can hide the chips from the composer; generation continues in the background and refreshes after new chat turns.
  • Free-form chat — ask anything about the chapter. The active document body, frontmatter, and inline %%notes%% are folded into every call. Editing requests also start a companion Edit Mode pass, so concrete replacements appear as inline marks in the editor instead of being buried in the chat transcript.

Suggestions tab

The active chapter’s M9 line-edit queue, surfaced as actionable rows: Apply writes the rewrite into the editor, Revise focuses the suggestion in the margin (where the original M9 surface handles the revise flow), Dismiss drops the row. Empty until you run a sentence-level command from the chat tab.

Reviews tab

Wiki-style entry list of every Review / Revision artifact captured this session. Click an entry to read the full article (verdict pull-quote + streamed body); click ↩ back to return. Reviews are session-only in slice 2 — they reset when you close the project. Disk persistence under .novelty/reviews/<chapter-slug>/<timestamp>.md lands in slice 3, alongside Preview / Apply.

Scripts tab

Browse built-in scripts, run them against the active chapter, or copy one into your own editable script. Scripts also appear in the chat slash command picker.

Critique (margin cards)

Select a passage in the editor, right-click, and run Critique from the AI… submenu. The model writes a margin note anchored to that span.

Continue (sandbox)

Open the Sandbox tab. The model fans out multiple variants of the next paragraph at different temperatures. Pick the one you want, or thread two together. Variants do not touch your manuscript until you ask.

Character chat

In Studio mode (Cmd+5) or the Chat tab, talk in-character with anyone in your reference material. Threads are stored per-character under .novelty/chats/. The AI gets the manuscript prefix as cached context, so it knows everything that has happened up to now.

Image generation

Preferences - Image uses Google Imagen (BYOK Google API key) to generate covers, character portraits, and location stills from your reference frontmatter. Templates are editable per purpose.

Embeddings and retrieval

Voyage AI handles embeddings for the on-save retrieval index. The line-edit and continue passes pull related scenes, characters, and locations into the context window automatically.

Cost

Every call is logged to .novelty/db.sqlite. Preferences - Usage rolls up totals by feature, model, session, and day, with cost folding via OpenRouter pricing.

If you have not added an API key, every AI feature is gracefully disabled — the editor still works, snapshots still work, exports still work. AI is an add-on, not a dependency.