Fix duplicate chapter bug: strengthen synthesis/package step to prevent multi-variant chapter inflation

- Synthesis step: explicit rule against presenting alternatives or 'Option A/B' variants
- Package step: explicit deduplication — count only '- Chapter N:' entries in PART 2 only
- Clear warning: producing more actions than chapters = error, recount

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
David Baity
2026-03-12 03:13:01 -04:00
parent fad201d73c
commit ccffc65443

View File

@@ -68,8 +68,15 @@ steps:
- type: think - type: think
agent: first_available agent: first_available
hint: | hint: |
The boardroom has selected a concept. Synthesize all rounds above into a The boardroom has selected ONE concept. Your job is to write the SINGLE CANONICAL outline.
COMPLETE BOOK OUTLINE document.
⚠️ CRITICAL RULES:
- Do NOT present multiple options, alternatives, or "Option A / Option B" variants.
- Do NOT include chapter ideas from the deliberation rounds that were NOT selected.
- Write ONE definitive chapter list. If the project calls for 10 chapters, write EXACTLY 10.
- Every chapter entry must follow the exact format: "- Chapter N: [Title]" (sequential, no gaps).
Synthesize the agreed concept into a COMPLETE BOOK OUTLINE document.
═══════════════════════════════════════════════ ═══════════════════════════════════════════════
PART 1: CHARACTER BIBLE (fiction only — omit entirely for non-fiction) PART 1: CHARACTER BIBLE (fiction only — omit entirely for non-fiction)
@@ -143,10 +150,18 @@ steps:
- type: package - type: package
packet_type: IntakeResponse packet_type: IntakeResponse
hint: | hint: |
You are the Project Manager. The outline above describes a multi-chapter book. You are the Project Manager serializing the FINAL OUTLINE DOCUMENT above into chapter tasks.
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: ⚠️ STRICT DEDUPLICATION RULES:
- Use ONLY the chapters listed in PART 2: CHAPTER OUTLINE of the document above.
- IGNORE all chapter suggestions from the boardroom deliberation rounds.
- Count ONLY entries formatted as "- Chapter N:" in PART 2. That count = your action count.
- A 10-chapter outline = exactly 10 actions. A 12-chapter outline = exactly 12 actions.
- If you produce more actions than chapter entries in PART 2, you have made an error — recount.
For each chapter in PART 2 (and ONLY those chapters), create one create_task action:
CRITICAL — Fill in these values from the outline document:
- genre_name: the exact genre (e.g., "YA Romance", "Science Fiction", "Literary Fiction") - 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") - 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 - prose_style: copy the 3-sentence Voice & Tone Guide from the outline exactly
@@ -154,8 +169,7 @@ steps:
- chapter_ref: zero-padded two-digit chapter number, e.g. "ch-01", "ch-02", ... "ch-18" - chapter_ref: zero-padded two-digit chapter number, e.g. "ch-01", "ch-02", ... "ch-18"
Rules: Rules:
- EXACTLY one action per chapter from the outline above — no more, no less - EXACTLY one action per chapter from PART 2 of the outline — no more, no less
- Count the chapters in the outline document. Create that exact number of actions.
- task_name format: "Write Chapter N: [Chapter Title]" (N is a plain number, 1, 2, 3...) - task_name format: "Write Chapter N: [Chapter Title]" (N is a plain number, 1, 2, 3...)
- agent_name: always "Iris" - agent_name: always "Iris"
- task_type: always "book_chapter" - task_type: always "book_chapter"