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:
landon
2026-08-20 14:44:14 -05:00
parent e5eadc08c1
commit 0972148e1a
2 changed files with 22 additions and 7 deletions
+16 -5
View File
@@ -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 {