Files
crimson_leaf_publishing/templates/book_outline.yml
David Baity df62a19c3f fix(book-pipeline): inference hints + LLM-filled context vars + roster roundtable
- book_research.yml: add inference hint when genre_name/genre_audience/research_focus are empty
- book_outline.yml: add inference hint for genre/audience; change package schema to ask LLM
  to FILL genre_name/genre_audience/prose_style/chapter_target_words from the outline text
  (was using {template_vars} which stay empty unless planning sets them)
- devon/agent.yml: add chapter_roundtable to supported_templates
- lane/agent.yml: add chapter_roundtable to supported_templates
  (all three editors now participate in roundtable — roster-driven, not hardcoded)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-12 02:16:18 -04:00

198 lines
7.9 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: book_outline
description: "Boardroom debate to lock the book concept, produce a character bible (for fiction) + full chapter outline, then spawn chapter writing tasks."
debug: true
system: agent_prompt
context_builders:
- markov_names
participant_prompt:
- "= identity.md"
agent_prompt:
- "= identity.md"
sections:
- agent
- project
- history
- rag
- deliverables
- participants
- participants_prompt
- message
- instructions
steps:
- type: think
rotate_participants: true
loop:
max_iterations: 4
hint: |
You are {agent.name}. This is round {task.iteration} of the creative boardroom.
GENRE: {genre_name|[infer from project description if blank]}
AUDIENCE: {genre_audience|[infer from project description if blank]}
STRUCTURE GUIDE: {outline_structure|[use standard 3-act structure with chapter hooks if blank]}
The room is deciding on ONE book concept to write. The trend research
is in the DELIVERABLES and RAG above — everyone has read it.
═══════════════════════════════════════════════
PRE-ASSIGNED CHARACTER NAMES (fiction projects — use these exactly)
═══════════════════════════════════════════════
These names were generated for this project. Do NOT substitute generic defaults
like Jax, Elara, Ryder, Quinn, Lyra, Knox, or Zane.
Protagonist: {protagonist_name}
Love interest: {love_interest_name}
Antagonist: {antagonist_name}
Supporting: {supporting_1}, {supporting_2}, {supporting_3}
Setting/Town: {place_name}
(Non-fiction projects: ignore the character names above — they are not applicable.)
═══════════════════════════════════════════════
From YOUR area of expertise, argue for (or against) a specific concept:
- Which of the research concepts has the strongest hook for this audience?
- What protagonist archetype will readers obsess over?
- What central conflict creates the best chapter-to-chapter tension?
- What's the opening chapter hook that makes a reader continue?
- What should the chapter length and structure be?
React to what prior speakers argued. Push back on weak ideas. Build on strong ones.
Be specific — no vague enthusiasm. Name the concept, argue WHY.
When the group has agreed on ONE specific concept (title, hook, protagonist, conflict, structure):
"consensus_reached: true"
- type: think
agent: first_available
hint: |
The boardroom has selected a concept. Synthesize all rounds above into a
COMPLETE BOOK OUTLINE document.
═══════════════════════════════════════════════
PART 1: CHARACTER BIBLE (fiction only — omit entirely for non-fiction)
═══════════════════════════════════════════════
If this is a fiction project, write a Character Bible FIRST:
# [Book Title] — Character Bible
## {protagonist_name}
- Age:
- Voice: [describe the internal narrative voice — e.g., "sardonic, first-person, teen"]
- Background: [2 sentences]
- Want: [what they think they want]
- Need: [what they actually need to grow]
- Fatal flaw: [the trait that creates conflict]
- Speech pattern: [how they talk — with examples]
## {love_interest_name}
- Age:
- Role in story:
- Why readers root for them:
- Dynamic with protagonist:
- Secret or wound they carry:
## {antagonist_name}
- Type: [person / institution / supernatural / internal]
- Motivation:
- How they challenge the protagonist:
## Supporting Characters
- {supporting_1}: [role and relationship to protagonist]
- {supporting_2}: [role and relationship to protagonist]
- {supporting_3}: [role and relationship to protagonist]
## World Rules (if paranormal/fantasy/speculative)
- [Powers, systems, constraints — be precise]
- [What limits them? What are the costs?]
═══════════════════════════════════════════════
PART 2: CHAPTER OUTLINE (all projects)
═══════════════════════════════════════════════
# [Book Title]
## Concept Summary
- Hook: one sentence that sells the book
- Genre: {genre_name}
- Protagonist: name, age, background, flaw, want vs need
- Antagonist / Central Conflict: what stands in their way
- Setting: world, time, atmosphere
- Format: target chapter length ~{chapter_target_words} words, POV (1st/3rd)
- Target audience: {genre_audience}
## Chapter Outline
For each chapter (target {chapter_count} chapters):
- Chapter N: [Title]
- Summary: 23 sentences of what happens
- Emotional beat: what the reader feels
- Hook / cliffhanger: how this chapter ends
## Voice & Tone Guide
Three sentences describing the narrative voice per the style guide below.
PROSE STYLE: {prose_style}
One example opening sentence.
## Publishing Notes
Why this book fits the genre and target audience.
- type: document
filename: "{{task_name_slug}}"
- type: package
packet_type: IntakeResponse
hint: |
You are the Project Manager. The outline above describes a multi-chapter book.
Convert EVERY chapter in the outline into a sequential create_task action for Iris.
CRITICAL — Fill in these values from the outline document you just wrote:
- genre_name: the exact genre (e.g., "YA Romance", "Science Fiction", "Literary Fiction")
- genre_audience: the target audience (e.g., "Young adults 1418", "Adult romance readers")
- prose_style: copy the 3-sentence Voice & Tone Guide from the outline exactly
- chapter_target_words: the target word count per chapter as a number string (e.g., "3500")
- chapter_ref: zero-padded two-digit chapter number, e.g. "ch-01", "ch-02", ... "ch-18"
Rules:
- One action per chapter (minimum {chapter_count|10} chapters)
- task_name format: "Write Chapter N: [Chapter Title]"
- agent_name: always "Iris"
- task_type: always "book_chapter"
- description: Include the chapter summary, POV character, emotional beat, and cliffhanger from the outline.
Start with: "You are writing Chapter N of [Book Title]. [chapter summary]. POV: [character name]."
- depends_on: the exact task_name of the PREVIOUS chapter (empty string for Chapter 1)
The depends_on chain creates sequential writing — each chapter waits for the previous to be committed.
schema:
actions:
- type: create_task
task_name: "string"
agent_name: "string"
task_type: "string"
description: "string"
depends_on: "string"
context:
genre_name: "string"
genre_audience: "string"
prose_style: "string"
chapter_target_words: "string"
chapter_ref: "string"
- type: close
rag_update: true
adjudication:
enabled: true
pass_threshold: 60
deliverable_type: coordination
criteria:
completeness:
weight: 40
description: "All required sections and elements present"
structure:
weight: 35
description: "Logical organization and hierarchy"
actionability:
weight: 25
description: "Clear enough for execution without guessing"