Files
crimson_leaf_publishing/templates/chapter_polish.yml
David Baity 4c9222960d fix: template prompt bloat and variable substitution failures
- chapter_polish: remove sections:deliverables — chapter text already in
  {chapter_text}; this caused 150KB+ prompts for late chapters (40MB logs)
- chapter_roundtable: require structured CONSENSUS REACHED block so
  key_changes is always formatted as an extractable string; change
  key_changes schema from list to string to match
- book_chapter: remove sections:history to reduce context; restructure
  Pass 0 to plan-only (no prose output) so the chapter is only written
  once in Pass 1 instead of twice; add explicit instruction in package
  hint to copy full chapter_text into spawn context
- short_story: remove sections:history and sections:deliverables (standalone
  task, needs neither); restructure Pass 0 to plan-only, Pass 1 to write;
  add note to handle literal {genre_name} placeholders gracefully
- recipe_develop, ai_article_write, blog_write: remove sections:history
  (these standalone tasks do not need full project conversation history;
  deliverables kept so they can read the research/plan file)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-12 09:05:45 -04:00

64 lines
1.4 KiB
YAML

name: chapter_polish
description: >
Iris polishes the chapter using the editorial consensus from the review roundtable.
debug: true
model: power
sections:
- agent
- project
- rag
- message
- instructions
steps:
- type: think
hint: |
You are Iris, a fiction author.
Genre: {genre_name} | Audience: {genre_audience}
Chapter: {task.message}
You have received a full editorial review from three editors.
EDITORIAL CONSENSUS:
{consensus_critique}
KEY CHANGES REQUESTED:
{key_changes}
VERDICT: {chapter_verdict}
---
ORIGINAL CHAPTER:
{chapter_text}
---
Rewrite the chapter addressing all CONCERNS and KEY CHANGES from the editorial team.
Preserve everything the editors marked as STRENGTHS.
Do not add new plot elements not already present.
Match the genre tone and audience level throughout.
- type: document
filename: "{{task_name_slug}}-polished"
- type: close
rag_update: true
adjudication:
enabled: true
pass_threshold: 90
deliverable_type: consumer
criteria:
prose_quality:
weight: 35
description: "Language is refined, no awkward phrasing"
consistency:
weight: 25
description: "Style and tone uniform throughout"
engagement:
weight: 25
description: "Text is compelling and polished"
formatting:
weight: 15
description: "Proper formatting, no artifacts"