Have the beat prompt read all proposal attributes
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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XDfaEsTgcn61n3wgP62DFF
This commit is contained in:
@@ -177,8 +177,12 @@ using the [Mistral](https://mistral.ai/) chat API.
|
|||||||
`mistral-large-latest`) and the **Base URL** (default `https://api.mistral.ai`,
|
`mistral-large-latest`) and the **Base URL** (default `https://api.mistral.ai`,
|
||||||
handy if you route through a proxy). The settings are remembered.
|
handy if you route through a proxy). The settings are remembered.
|
||||||
2. Choose **Tools ▸ Generate plot beats…** and pick a markdown (or text) file
|
2. Choose **Tools ▸ Generate plot beats…** and pick a markdown (or text) file
|
||||||
describing the novel — its **characters** and a **loose plot summary**. The
|
describing the novel. Anything the file states is read and honoured — the
|
||||||
request runs in the background, so the editor stays responsive.
|
**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
|
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
|
*Act I — Setup*, *Act II — Confrontation*, and *Act III — Resolution*, each a
|
||||||
numbered list. You can **edit** the text in place, then:
|
numbered list. You can **edit** the text in place, then:
|
||||||
|
|||||||
+16
-5
@@ -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.
|
/// numbered beat list per act) so the result drops straight into a manuscript.
|
||||||
const SYSTEM_PROMPT: &str = "\
|
const SYSTEM_PROMPT: &str = "\
|
||||||
You are a developmental fiction editor who structures novels using the classic \
|
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 \
|
three-act structure. You will be given a novel proposal and must lay the story \
|
||||||
loose plot summary — and must lay the story out as a sequence of concrete plot \
|
out as a sequence of concrete plot beats.
|
||||||
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:
|
Output requirements:
|
||||||
- Return GitHub-flavoured Markdown only. No preamble, commentary, or closing \
|
- 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
|
// Frame the proposal so the model reads it as source material, not as new
|
||||||
// instructions.
|
// instructions.
|
||||||
let user = format!(
|
let user = format!(
|
||||||
"Here is the novel proposal (characters and a loose plot summary). \
|
"Here is the novel proposal. It may state the title, setting, genre, \
|
||||||
Produce the plot beats.\n\n---\n\n{}",
|
tone, characters, target age, and a loose plot summary. Read all of it \
|
||||||
|
and produce the plot beats.\n\n---\n\n{}",
|
||||||
proposal.trim()
|
proposal.trim()
|
||||||
);
|
);
|
||||||
let request = ChatRequest {
|
let request = ChatRequest {
|
||||||
|
|||||||
Reference in New Issue
Block a user