diff --git a/agents/iris/agent.yml b/agents/iris/agent.yml index ffa99fd..a519efc 100644 --- a/agents/iris/agent.yml +++ b/agents/iris/agent.yml @@ -22,6 +22,7 @@ manages: [] department: creative supported_templates: - book_chapter + - drafting - chapter_polish - ai_article_write - blog_write diff --git a/templates/drafting.yml b/templates/drafting.yml new file mode 100644 index 0000000..2842e77 --- /dev/null +++ b/templates/drafting.yml @@ -0,0 +1,111 @@ +name: drafting +description: "Write one chapter in draft-only mode — continuity check, draft prompt, draft, then stop." +debug: true +system: agent_prompt + +requires: + - genre_name + - genre_audience + - prose_style + - chapter_target_words + - chapter_ref + +skills: + - guides/YAFictionGuide.md + - guides/RomanceFictionGuide.md + - guides/SciFiFictionGuide.md + +agent_prompt: + - "= identity.md" + - "agent.rag.json" + +sections: + - agent + - project + - rag + - skills + - deliverables + - message + - instructions + +steps: + - 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 + + 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. + Extract and record: + - protagonist and supporting cast names + - world rules / constraints + - 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 + - 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 + + Stop here. Output ONLY the draft prompt. Do NOT write chapter prose yet. + + - type: think + model: power + hint: | + PASS 1 — WRITE THE DRAFT + + Use the draft prompt below as your exact writing brief: + + {steps[0].text} + + Requirements: + - Start with the FIRST LINE you planned — make it continue naturally from the previous chapter + - Follow the KEY BEATS in order, but write with full scene depth + - All character names must be consistent with the bible/outline + - Every dialogue exchange must be tight and voice-distinct + - Show, don't tell — externalize emotion through action, detail, and dialogue + - Every scene beat moves the story forward OR reveals character + - End with the CLOSING HOOK you planned + - Match the prose style guide: {prose_style} + - Target length: {chapter_target_words} words — write the FULL chapter, not a summary + + Output ONLY the draft chapter text. + Start directly with the chapter title (e.g., "Chapter N: [Title]") and opening line. + No commentary, no plan headers, no "Pass 1" label. + + - type: document + filename: "chapter-{chapter_ref}" + + - type: close + rag_update: true + +adjudication: + enabled: false diff --git a/templates/planning.yml b/templates/planning.yml index 5af63de..4725ac5 100644 --- a/templates/planning.yml +++ b/templates/planning.yml @@ -92,6 +92,8 @@ steps: chapter_review (×3 per chapter) → chapter_roundtable → chapter_polish → book_editorial → project_index - Do NOT spawn book_chapter tasks until book_outline has run and provided chapter context. - Start with ONE book_research task only. The cascade templates handle everything after that. + - If the operator or project metadata marks the project as draft-only, use `drafting` + instead of `book_chapter` for chapter tasks and stop after the draft deliverable. ARTICLE SERIES SEQUENCING RULE: - For article series: ai_article_research → ai_article_plan → ai_article_write (×N)