From 0972148e1aa613fb04bf3ebb8e486472321343c0 Mon Sep 17 00:00:00 2001 From: landon Date: Thu, 20 Aug 2026 14:44:14 -0500 Subject: [PATCH] Have the beat prompt read all proposal attributes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Broaden the plot-beat system prompt beyond characters + plot: instruct the model to read and honour every attribute the proposal states — title, setting, genre, tone, characters, target age (adult / YA / middle grade / …), and the loose plot summary. The beats now follow the stated genre's conventions, keep the tone, and stay appropriate to the target age; missing attributes are inferred rather than contradicted. Updates the user-message framing and the README to match. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01XDfaEsTgcn61n3wgP62DFF --- README.md | 8 ++++++-- src/mistral.rs | 21 ++++++++++++++++----- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 8b6f589..73f1b14 100644 --- a/README.md +++ b/README.md @@ -177,8 +177,12 @@ using the [Mistral](https://mistral.ai/) chat API. `mistral-large-latest`) and the **Base URL** (default `https://api.mistral.ai`, handy if you route through a proxy). The settings are remembered. 2. Choose **Tools ▸ Generate plot beats…** and pick a markdown (or text) file - describing the novel — its **characters** and a **loose plot summary**. The - request runs in the background, so the editor stays responsive. + describing the novel. Anything the file states is read and honoured — the + **title**, **setting**, **genre**, **tone**, **characters**, **target age** + (adult, young adult, …), and a **loose plot summary**; the beats follow the + genre's conventions, keep the tone, and stay age-appropriate. Missing + attributes are inferred from the rest. The request runs in the background, so + the editor stays responsive. 3. The result opens in a **floating window** with the beats grouped under *Act I — Setup*, *Act II — Confrontation*, and *Act III — Resolution*, each a numbered list. You can **edit** the text in place, then: diff --git a/src/mistral.rs b/src/mistral.rs index 14f24ce..998581b 100644 --- a/src/mistral.rs +++ b/src/mistral.rs @@ -23,9 +23,19 @@ pub const DEFAULT_MODEL: &str = "mistral-large-latest"; /// numbered beat list per act) so the result drops straight into a manuscript. const SYSTEM_PROMPT: &str = "\ You are a developmental fiction editor who structures novels using the classic \ -three-act structure. You will be given a novel proposal — its characters and a \ -loose plot summary — and must lay the story out as a sequence of concrete plot \ -beats. +three-act structure. You will be given a novel proposal and must lay the story \ +out as a sequence of concrete plot beats. + +First, read the whole proposal and note every attribute it provides. These may \ +include, but are not limited to: the title, setting, genre, tone, characters, \ +target age (e.g. adult, new adult, young adult, middle grade), and a loose plot \ +summary. Honour all of them: +- Follow the conventions and expected structure of the stated genre. +- Keep the emotional register consistent with the stated tone. +- Make the content, stakes, and complexity appropriate to the stated target age. +- Ground the setting, and use the named characters, throughout the beats. +If an attribute is absent, infer a sensible choice from the rest of the proposal \ +rather than contradicting what is given. Output requirements: - Return GitHub-flavoured Markdown only. No preamble, commentary, or closing \ @@ -102,8 +112,9 @@ pub fn generate_beats( // Frame the proposal so the model reads it as source material, not as new // instructions. let user = format!( - "Here is the novel proposal (characters and a loose plot summary). \ - Produce the plot beats.\n\n---\n\n{}", + "Here is the novel proposal. It may state the title, setting, genre, \ + tone, characters, target age, and a loose plot summary. Read all of it \ + and produce the plot beats.\n\n---\n\n{}", proposal.trim() ); let request = ChatRequest {