type: think
hint: |
  PASS 0 — BIBLE, CONTINUITY, AND DRAFT PROMPT

  GENRE: {genre_name}  |  AUDIENCE: {genre_audience}
  PROSE STYLE GUIDE: {prose_style}
  TARGET CHAPTER LENGTH: ~{chapter_target_words} words

  GENRE GUIDE: Your skills section contains exactly the guide for {genre_name}. Apply it fully.

  CONTINUITY GUARDRAILS:
    - Use ONLY the outline / character bible and the immediately previous chapter for continuity.
    - Ignore future chapters, editorial reviews, roundtables, polish drafts, and any non-chapter artifacts.
    - Never pull facts from a deliverable whose filename indicates a later chapter than {chapter_ref}.

  ⚠️ CRITICAL: Your task name tells you EXACTLY which chapter to write.
  Look at the CURRENT MESSAGE — write THAT chapter and ONLY that chapter.
  Do NOT write Chapter 1 unless the message explicitly says "Chapter 1".

  STEP 1 — READ THE OUTLINE / CHARACTER BIBLE:
    Look at PROJECT DELIVERABLES for the outline file (it contains the Character Bible
    if this is a fiction project, and the Chapter Outline for all projects).
    Extract and record:
      - Protagonist: exact name, voice description, age (if fiction)
      - Love interest and supporting characters: exact names and roles (if fiction)
      - World rules / constraints (if paranormal or speculative)
      - This chapter's summary, emotional beat, and closing hook from the outline
    If no outline/bible is available, use the character names and project details
    from the task description above — be CONSISTENT throughout the book.

  STEP 2 — FIND THE PREVIOUS CHAPTER:
    Look at PROJECT DELIVERABLES for the chapter that comes BEFORE this one.
    If no previous chapter exists (this IS Chapter 1), skip to STEP 4.

  STEP 3 — QUOTE THE ENDING:
    Copy the LAST 2–3 sentences of the previous chapter here, word for word.
    Label them: "PREVIOUS CHAPTER ENDED WITH: ..."
    Your new chapter MUST pick up from this exact moment.

  STEP 4 — BUILD THE DRAFT PROMPT:
    Write the exact drafting prompt for the next pass. That prompt must include:
      - CHAPTER: Exact chapter number and title (from the task message)
      - POV CHARACTER: Whose perspective are we in?
      - FIRST LINE: The exact opening sentence, continuing from the previous ending
      - EMOTIONAL ARC: What does the protagonist feel at start vs end?
      - CHAPTER GOAL: What plot event MUST happen here?
      - KEY BEATS: 3–5 numbered scene beats that will form the chapter
      - CLOSING HOOK: Exact last image or line that makes readers continue
      - Reminders about continuity, prose style, and target length
      - CHARACTER VOICE PROFILES (pre-extracted):
        {character_profiles}
        If this block is empty, fall back to searching PROJECT DELIVERABLES for a file
        containing "## Voice Signatures" and copy it here. PASS 1 must write every
        character to their profile.

  STEP 5 — PREVIOUS CHAPTER CHARACTER STATE (if available):
    If context contains a block starting with "PREVIOUS CHAPTER CHARACTER STATE:",
    include it verbatim in the prompt under the heading:
      "CHARACTER CONTINUITY: The previous chapter ended with these character states:
       {prev_character_state}"
    These states override any outline prediction that conflicts with them — the character
    is ALREADY in this emotional/physical state at the start of this chapter.
    If no character state was provided, skip this block entirely.

  Stop here. Output ONLY the draft prompt. Do NOT write chapter prose yet.
