From 79a2e8ab7c5b71f418f7c8566bd0f46f4d7588ee Mon Sep 17 00:00:00 2001 From: David Baity <158404677+MazakTheDwarf@users.noreply.github.com> Date: Mon, 23 Mar 2026 23:46:13 -0400 Subject: [PATCH] Sprint 56h: fix spawn_list bug + add iris character_sheet support + voice sig auto-import --- agents/iris/agent.yml | 6 ++ steps/chapter_pass0_bible.yml | 5 ++ steps/cozy_chapter_pass1_draft.yml | 23 +++++++ steps/fiction_editorial_spawn.yml | 4 ++ steps/romance_chapter_pass1_draft.yml | 23 +++++++ steps/scifi_chapter_pass1_draft.yml | 23 +++++++ steps/ya_chapter_pass1_draft.yml | 23 +++++++ templates/book_chapter.yml | 12 +++- templates/book_outline.yml | 40 +++++++++++ templates/chapter_polish.yml | 9 ++- templates/chapter_review.yml | 12 ++-- templates/chapter_roundtable.yml | 1 + templates/character_sheet.yml | 96 +++++++++++++++++++++++++++ 13 files changed, 268 insertions(+), 9 deletions(-) create mode 100644 templates/character_sheet.yml diff --git a/agents/iris/agent.yml b/agents/iris/agent.yml index a519efc..2f086a0 100644 --- a/agents/iris/agent.yml +++ b/agents/iris/agent.yml @@ -22,8 +22,14 @@ manages: [] department: creative supported_templates: - book_chapter + - ya_chapter + - romance_chapter + - scifi_chapter + - cozy_mystery_chapter - drafting - chapter_polish + - character_sheet + - character_update - ai_article_write - blog_write - short_story diff --git a/steps/chapter_pass0_bible.yml b/steps/chapter_pass0_bible.yml index 7cd117d..5da1df8 100644 --- a/steps/chapter_pass0_bible.yml +++ b/steps/chapter_pass0_bible.yml @@ -47,6 +47,11 @@ hint: | - 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:", diff --git a/steps/cozy_chapter_pass1_draft.yml b/steps/cozy_chapter_pass1_draft.yml index 5663a3f..ea471f1 100644 --- a/steps/cozy_chapter_pass1_draft.yml +++ b/steps/cozy_chapter_pass1_draft.yml @@ -1,5 +1,6 @@ type: think model: power +max_tokens: 32000 hint: | PASS 1 — WRITE THE COZY MYSTERY CHAPTER DRAFT @@ -57,6 +58,28 @@ hint: | - PACING: Cozy chapters move through scenes naturally, never rushed. A chapter might include an investigation beat, a community scene, and a personal moment. Balance all three. + VOICE ANTI-PATTERNS — THESE ARE FORBIDDEN ON EVERY PAGE: + - Do NOT open any chapter with the "didn't just X; it Y" sentence construction. + Every chapter must have a structurally distinct opener. Vary: in medias res, + quiet beat, dialogue cold open, environmental sweep, interiority. + No two consecutive chapters may use the same opener structure. + - The book's thematic contrast (whatever it is — body/mind, memory/possibility, etc.) + may appear ONCE per scene as a metaphor. Not in every paragraph. Trust the reader. + If you have used the contrast in the last two paragraphs, you may not use it again + for at least three more paragraphs. + - Do NOT label an emotion that you have already shown through action or dialogue. + If the character's hands are shaking, do not also write "she was afraid." + If the dialogue already conveys anger, do not add "his voice was furious." + - Do NOT count or reference chapter numbers in the prose. + "Five chapters of..." is an AI fingerprint. Never. + - Each character must have at least ONE verbal imperfection per scene they appear in: + a sentence they don't finish, a word they use wrong, a line that doesn't land, + a moment of fumbling before the right words come. Perfect dialogue is dead dialogue. + - Check the CHARACTER VOICE PROFILE in the outline/bible (if present) — if each + speaking character's dialogue cannot be identified as THEIRS without a speaker tag, + rewrite until it can. Verbal tics, pet phrases, and characteristic patterns are + non-negotiable signatures. + 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. diff --git a/steps/fiction_editorial_spawn.yml b/steps/fiction_editorial_spawn.yml index 04680ed..a574371 100644 --- a/steps/fiction_editorial_spawn.yml +++ b/steps/fiction_editorial_spawn.yml @@ -23,6 +23,7 @@ spawn: genre_name: "{genre_name}" genre_audience: "{genre_audience}" chapter_ref: "{chapter_ref}" + character_profiles: "{character_profiles}" - task_type: chapter_review task_name: "Review (Lane): {chapter_ref}" agent_name: Lane @@ -33,6 +34,7 @@ spawn: genre_name: "{genre_name}" genre_audience: "{genre_audience}" chapter_ref: "{chapter_ref}" + character_profiles: "{character_profiles}" - task_type: chapter_review task_name: "Review (Cora): {chapter_ref}" agent_name: Cora @@ -43,6 +45,7 @@ spawn: genre_name: "{genre_name}" genre_audience: "{genre_audience}" chapter_ref: "{chapter_ref}" + character_profiles: "{character_profiles}" - task_type: chapter_roundtable task_name: "Roundtable: {chapter_ref}" agents: @@ -56,6 +59,7 @@ spawn: genre_audience: "{genre_audience}" chapter_ref: "{chapter_ref}" chapter_target_words: "{chapter_target_words}" + character_profiles: "{character_profiles}" depends_on: - "Review (Devon): {chapter_ref}" - "Review (Lane): {chapter_ref}" diff --git a/steps/romance_chapter_pass1_draft.yml b/steps/romance_chapter_pass1_draft.yml index 20644e8..c48738b 100644 --- a/steps/romance_chapter_pass1_draft.yml +++ b/steps/romance_chapter_pass1_draft.yml @@ -1,5 +1,6 @@ type: think model: power +max_tokens: 32000 hint: | PASS 1 — WRITE THE ROMANCE CHAPTER DRAFT @@ -52,6 +53,28 @@ hint: | - PACING: Slow build. Do NOT resolve the primary romantic tension early. Push through to the black moment before the earned resolution. + VOICE ANTI-PATTERNS — THESE ARE FORBIDDEN ON EVERY PAGE: + - Do NOT open any chapter with the "didn't just X; it Y" sentence construction. + Every chapter must have a structurally distinct opener. Vary: in medias res, + quiet beat, dialogue cold open, environmental sweep, interiority. + No two consecutive chapters may use the same opener structure. + - The book's thematic contrast (whatever it is — body/mind, memory/possibility, etc.) + may appear ONCE per scene as a metaphor. Not in every paragraph. Trust the reader. + If you have used the contrast in the last two paragraphs, you may not use it again + for at least three more paragraphs. + - Do NOT label an emotion that you have already shown through action or dialogue. + If the character's hands are shaking, do not also write "she was afraid." + If the dialogue already conveys anger, do not add "his voice was furious." + - Do NOT count or reference chapter numbers in the prose. + "Five chapters of..." is an AI fingerprint. Never. + - Each character must have at least ONE verbal imperfection per scene they appear in: + a sentence they don't finish, a word they use wrong, a line that doesn't land, + a moment of fumbling before the right words come. Perfect dialogue is dead dialogue. + - Check the CHARACTER VOICE PROFILE in the outline/bible (if present) — if each + speaking character's dialogue cannot be identified as THEIRS without a speaker tag, + rewrite until it can. Verbal tics, pet phrases, and characteristic patterns are + non-negotiable signatures. + 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. diff --git a/steps/scifi_chapter_pass1_draft.yml b/steps/scifi_chapter_pass1_draft.yml index 34135ec..04ba714 100644 --- a/steps/scifi_chapter_pass1_draft.yml +++ b/steps/scifi_chapter_pass1_draft.yml @@ -1,5 +1,6 @@ type: think model: power +max_tokens: 32000 hint: | PASS 1 — WRITE THE SCIENCE FICTION CHAPTER DRAFT @@ -55,6 +56,28 @@ hint: | - PACING: Alternate tension with revelation. Each chapter should push the external plot forward AND deliver one new piece of world or character understanding. + VOICE ANTI-PATTERNS — THESE ARE FORBIDDEN ON EVERY PAGE: + - Do NOT open any chapter with the "didn't just X; it Y" sentence construction. + Every chapter must have a structurally distinct opener. Vary: in medias res, + quiet beat, dialogue cold open, environmental sweep, interiority. + No two consecutive chapters may use the same opener structure. + - The book's thematic contrast (whatever it is — body/mind, memory/possibility, etc.) + may appear ONCE per scene as a metaphor. Not in every paragraph. Trust the reader. + If you have used the contrast in the last two paragraphs, you may not use it again + for at least three more paragraphs. + - Do NOT label an emotion that you have already shown through action or dialogue. + If the character's hands are shaking, do not also write "she was afraid." + If the dialogue already conveys anger, do not add "his voice was furious." + - Do NOT count or reference chapter numbers in the prose. + "Five chapters of..." is an AI fingerprint. Never. + - Each character must have at least ONE verbal imperfection per scene they appear in: + a sentence they don't finish, a word they use wrong, a line that doesn't land, + a moment of fumbling before the right words come. Perfect dialogue is dead dialogue. + - Check the CHARACTER VOICE PROFILE in the outline/bible (if present) — if each + speaking character's dialogue cannot be identified as THEIRS without a speaker tag, + rewrite until it can. Verbal tics, pet phrases, and characteristic patterns are + non-negotiable signatures. + 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. diff --git a/steps/ya_chapter_pass1_draft.yml b/steps/ya_chapter_pass1_draft.yml index e6bf97e..0cff434 100644 --- a/steps/ya_chapter_pass1_draft.yml +++ b/steps/ya_chapter_pass1_draft.yml @@ -1,5 +1,6 @@ type: think model: power +max_tokens: 32000 hint: | PASS 1 — WRITE THE YA CHAPTER DRAFT @@ -48,6 +49,28 @@ hint: | - PACING: YA chapters end on hooks. Momentum over description. No scene lasts longer than it earns. Get out of scenes early. + VOICE ANTI-PATTERNS — THESE ARE FORBIDDEN ON EVERY PAGE: + - Do NOT open any chapter with the "didn't just X; it Y" sentence construction. + Every chapter must have a structurally distinct opener. Vary: in medias res, + quiet beat, dialogue cold open, environmental sweep, interiority. + No two consecutive chapters may use the same opener structure. + - The book's thematic contrast (whatever it is — body/mind, memory/possibility, etc.) + may appear ONCE per scene as a metaphor. Not in every paragraph. Trust the reader. + If you have used the contrast in the last two paragraphs, you may not use it again + for at least three more paragraphs. + - Do NOT label an emotion that you have already shown through action or dialogue. + If the character's hands are shaking, do not also write "she was afraid." + If the dialogue already conveys anger, do not add "his voice was furious." + - Do NOT count or reference chapter numbers in the prose. + "Five chapters of..." is an AI fingerprint. Never. + - Each character must have at least ONE verbal imperfection per scene they appear in: + a sentence they don't finish, a word they use wrong, a line that doesn't land, + a moment of fumbling before the right words come. Perfect dialogue is dead dialogue. + - Check the CHARACTER VOICE PROFILE in the outline/bible (if present) — if each + speaking character's dialogue cannot be identified as THEIRS without a speaker tag, + rewrite until it can. Verbal tics, pet phrases, and characteristic patterns are + non-negotiable signatures. + 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. diff --git a/templates/book_chapter.yml b/templates/book_chapter.yml index 91634c5..172bd79 100644 --- a/templates/book_chapter.yml +++ b/templates/book_chapter.yml @@ -94,9 +94,11 @@ steps: - 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: Copy the "## Voice Signatures" section from the - Character Bible here verbatim. PASS 1 must write every character to their profile. - If no Voice Signatures section exists, omit this block. + - 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 — CHECK LIVE CHARACTER STATE (if available): Look in your RAG context for an asset called [character-state]. @@ -329,6 +331,7 @@ steps: chapter_ref: "{chapter_ref}" chapter_number: "{chapter_number}" review_letter: "a" + character_profiles: "{character_profiles}" - task_type: chapter_review task_name: "Review (Lane): {chapter_ref}" @@ -343,6 +346,7 @@ steps: chapter_ref: "{chapter_ref}" chapter_number: "{chapter_number}" review_letter: "b" + character_profiles: "{character_profiles}" - task_type: chapter_review task_name: "Review (Cora): {chapter_ref}" @@ -357,6 +361,7 @@ steps: chapter_ref: "{chapter_ref}" chapter_number: "{chapter_number}" review_letter: "c" + character_profiles: "{character_profiles}" - task_type: chapter_roundtable task_name: "Roundtable: {chapter_ref}" @@ -372,6 +377,7 @@ steps: genre_audience: "{genre_audience}" chapter_ref: "{chapter_ref}" chapter_target_words: "{chapter_target_words}" + character_profiles: "{character_profiles}" depends_on: - "Review (Devon): {chapter_ref}" - "Review (Lane): {chapter_ref}" diff --git a/templates/book_outline.yml b/templates/book_outline.yml index 3ae8d98..1d93369 100644 --- a/templates/book_outline.yml +++ b/templates/book_outline.yml @@ -244,6 +244,10 @@ steps: - 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" + - character_profiles: copy the COMPLETE "## Voice Signatures" section from PART 1 of + the outline verbatim. Include every named character's Voice Signature entry. + If no Voice Signatures section exists, copy the full character entries (## Name blocks) + from the Character Bible in Part 1. If this is a non-fiction project, leave empty. Rules: - EXACTLY one action per chapter from PART 2 of the outline — no more, no less @@ -281,6 +285,42 @@ steps: prose_style: "string" chapter_target_words: "string" chapter_ref: "string" + character_profiles: "string" + + - type: package + packet_type: IntakeResponse + hint: | + SPAWN CHARACTER SHEET TASKS + + From the "## Character Bible" section of PART 1 (or the Voice Signatures section), + identify every NAMED character who has a speaking role or significant story function. + + For EACH named character, emit one create_task action: + - task_name: "Character Sheet: [character full name]" + - task_type: character_sheet + - agent_name: Iris + - context.character_name: exact canonical name as used in the outline + - context.character_name_slug: lowercase, spaces-to-hyphens, remove non-alphanumeric + + Example for a character named "Emmeline Voss": + task_name: "Character Sheet: Emmeline Voss" + task_type: character_sheet + agent_name: Iris + context.character_name: "Emmeline Voss" + context.character_name_slug: "emmeline-voss" + + Do NOT include unnamed background characters or characters mentioned only in passing. + Include at minimum: protagonist(s), love interest(s), antagonist(s), and any character + with more than one scene. + schema: + actions: + - type: create_task + task_name: "string" + agent_name: Iris + task_type: character_sheet + context: + character_name: "string" + character_name_slug: "string" - type: close rag_update: true diff --git a/templates/chapter_polish.yml b/templates/chapter_polish.yml index 2309c07..ae7f94d 100644 --- a/templates/chapter_polish.yml +++ b/templates/chapter_polish.yml @@ -65,15 +65,20 @@ steps: - "Wrong" word choices that feel authentic to a character's way of thinking VOICE DEFENDER PASS (do this BEFORE applying any changes): - If a Character Bible or Voice Signatures section exists in the project context: + CHARACTER VOICE PROFILES: + {character_profiles} + + If the above block is non-empty: 1. For each named character: read one page of their dialogue with speaker tags removed. Can you identify the character from voice alone? If NO — note it. 2. Is there at least ONE moment per scene where a character's voice is imperfect? (A sentence that trails off. A wrong word. Something that doesn't quite land.) If EVERY dialogue line is quotable and polished — that is a problem. Flag it. 3. If a character's voice signature is MISSING from a scene, you may add ONE instance - of an established signature item (from the Character Bible). Do NOT invent new ones. + of an established signature item (from the Character Profiles above). Do NOT invent new ones. Do NOT add signatures that are not already established. + If the block is empty, fall back to checking RAG/project context for a + "## Voice Signatures" section before performing the same checks. This voice check is SECONDARY to MUST APPLY items, but it is never skipped. EXPLICITLY FORBIDDEN: diff --git a/templates/chapter_review.yml b/templates/chapter_review.yml index f327210..75ee59d 100644 --- a/templates/chapter_review.yml +++ b/templates/chapter_review.yml @@ -36,10 +36,14 @@ steps: List elements that are working well and must survive the editorial process unchanged. Be specific: quote or paraphrase the passage. Vague praise ("the writing is good") is not useful here. - ALSO CHECK: If a Character Bible or Voice Signatures section exists in the project - context, verify each named character's voice signature is present and distinct. - Can you identify each character's dialogue without speaker tags? Note whether - YES or NO for each main character. + ALSO CHECK VOICE SIGNATURES: + CHARACTER VOICE PROFILES: + {character_profiles} + If the above block is non-empty: verify each named character in this chapter + speaks to their profile. Can you identify each character's dialogue without + speaker tags? Note YES or NO for each main character. + If the block is empty: check RAG/project context for "## Voice Signatures" + and note whether voice differentiation is present. 2. MUST-FIX — CONTINUITY List factual errors, POV breaks, timeline inconsistencies, or world-rule violations. diff --git a/templates/chapter_roundtable.yml b/templates/chapter_roundtable.yml index 6ecc780..44b36d2 100644 --- a/templates/chapter_roundtable.yml +++ b/templates/chapter_roundtable.yml @@ -112,6 +112,7 @@ steps: chapter_ref: "{chapter_ref}" chapter_number: "{chapter_number}" chapter_target_words: "{chapter_target_words}" + character_profiles: "{character_profiles}" adjudication: enabled: true diff --git a/templates/character_sheet.yml b/templates/character_sheet.yml new file mode 100644 index 0000000..75d8339 --- /dev/null +++ b/templates/character_sheet.yml @@ -0,0 +1,96 @@ +name: character_sheet +description: "Extract and build a structured character sheet from outline or description. Produces a voice-signature-ready profile for pipeline injection." +debug: true +system: agent_prompt + +agent_prompt: + - "= identity.md" + - "agent.rag.json" + +sections: + - agent + - project + - rag + - deliverables + - message + - instructions + +steps: + - type: think + hint: | + Build a structured character sheet for {character_name} based on available project + context (outline, prior chapters, project description, RAG). + + Output the COMPLETE character sheet in this exact format: + + # Character Sheet: {character_name} + + ## Identity + - Full name: [exact canonical name] + - Age: [if known] + - Role: [protagonist / love_interest / antagonist / supporting] + - Faction/School: [magic school, faction, or group alignment — if applicable] + + ## Voice Signature + (REQUIRED — this section is injected into every chapter to enforce consistent voice.) + - Stress expression scale: [mild phrase] = minor | [mid] = upset | [strong] = furious + - Verbal tic: [what they say in a specific context, e.g., "says 'obviously' sarcastically when meaning the opposite"] + - Sentence length pattern: [e.g., "short declaratives when focused, run-ons when arguing"] + - What they REACH FOR: [tactile / visual / analytical / emotional — how they sense the world] + - What they NEVER say: [phrase or construction they would never use] + - Imperfection signature: [what breaks in their speech when emotional — trailing off, wrong word, etc.] + - One example line of their dialogue that could not belong to any other character: + "[example line]" + + ## Magic / Power / Special Ability + (Complete this section only if the project involves paranormal / fantasy / speculative elements.) + - School/Discipline: [name of power type or magic system] + - Core principle: [the underlying philosophy of their power] + - Signature move or approach: [how they typically use it] + - Limitation: [what they can't do; the cost or restriction] + - Shared uncertainty: [the epistemological question their power raises] + + ## Arc + - Want: [what they think they need — the surface goal] + - Need: [what they actually need to grow — the deeper truth] + - Fatal flaw: [the trait that creates conflict and prevents getting what they need] + - Wound: [backstory that created the flaw — the originating event] + - Transformation: [where they need to end up — the arc endpoint] + + ## Relationships + For each major character in the project: + - [Character 2 name]: [relationship type + dynamic in one sentence] + - [Character 3 name]: [relationship type + dynamic in one sentence] + (Include at minimum: protagonist ↔ love_interest, protagonist ↔ antagonist) + + ## Notes for Writers + 5 bullet points a chapter writer MUST know that are NOT captured in the sections above. + Focus on the most easily-missed or frequently-wrong details — the things that make this + character feel real versus generic. Include: + - At least one physical habit or tell + - At least one speech quirk specific to this character + - At least one thing readers must NEVER see this character do or say + + - type: document + filename: "character-{character_name_slug}" + + - type: close + rag_update: true + +adjudication: + enabled: true + pass_threshold: 75 + deliverable_type: reference + criteria: + voice_signature_completeness: + weight: 35 + description: "Voice Signature section is fully populated with specific, usable identifiers — not vague descriptions" + arc_clarity: + weight: 25 + description: "Want vs Need are distinct; Fatal Flaw and Wound are specific and connected" + writer_notes_specificity: + weight: 25 + description: "Notes for Writers contains actionable, non-obvious details — not generic craft advice" + grounding_in_source: + weight: 15 + description: "Character details are consistent with the project outline and prior deliverables"