Auto-commit: v2.7 Series Continuity & Book Number Awareness
- story/planner.py: enrich() and plan_structure() now extract series_metadata and inject a SERIES_CONTEXT block (Book X of Y in series Z, with position-aware guidance) into prompts when is_series is true. - story/writer.py: write_chapter() builds and injects the same SERIES_CONTEXT into the chapter draft prompt; passes series_context to evaluate_chapter_quality(). - story/editor.py: evaluate_chapter_quality() accepts optional series_context parameter and injects it into METADATA so arc pacing is evaluated relative to the book's position in the series. - ai_blueprint.md: Section 11 marked complete (v2.7), summary updated. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@ from ai import models as ai_models
|
||||
from story.style_persona import get_style_guidelines
|
||||
|
||||
|
||||
def evaluate_chapter_quality(text, chapter_title, genre, model, folder):
|
||||
def evaluate_chapter_quality(text, chapter_title, genre, model, folder, series_context=""):
|
||||
guidelines = get_style_guidelines()
|
||||
ai_isms = "', '".join(guidelines['ai_isms'])
|
||||
fw_examples = ", ".join([f"'He {w}'" for w in guidelines['filter_words'][:5]])
|
||||
@@ -15,13 +15,15 @@ def evaluate_chapter_quality(text, chapter_title, genre, model, folder):
|
||||
max_sugg = min_sugg + 2
|
||||
suggestion_range = f"{min_sugg}-{max_sugg}"
|
||||
|
||||
series_line = f"\n - {series_context}" if series_context else ""
|
||||
|
||||
prompt = f"""
|
||||
ROLE: Senior Literary Editor
|
||||
TASK: Critique chapter draft. Apply STRICT scoring — do not inflate scores.
|
||||
|
||||
METADATA:
|
||||
- TITLE: {chapter_title}
|
||||
- GENRE: {genre}
|
||||
- GENRE: {genre}{series_line}
|
||||
|
||||
PROHIBITED_PATTERNS:
|
||||
- AI_ISMS: {ai_isms}
|
||||
|
||||
Reference in New Issue
Block a user