From acccb65af74dfb88e47da36342a87e87e7633b41 Mon Sep 17 00:00:00 2001 From: David Baity <158404677+MazakTheDwarf@users.noreply.github.com> Date: Thu, 12 Mar 2026 09:19:25 -0400 Subject: [PATCH] fix: roundtable early exit, iteration cap, and ghost-agent prevention MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit chapter_roundtable.yml: - Reduce max_iterations 9 → 5 (3 rounds of 3 editors is enough; 9 was burning credits in a retry loop after credit exhaustion) - Add explicit 'Once any participant outputs CONSENSUS REACHED, the debate is over' — prevents continuation into wasted rounds planning.yml: - Add ANTI-HALLUCINATION RULE FOR AGENTS block: explicitly names the known ghost agents (Worldbuilder, Prose Engine, Plot Architect, etc.) and forbids their use; maps task types to canonical CLP agents so planning LLM has unambiguous fallback assignments Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- templates/chapter_roundtable.yml | 5 ++++- templates/planning.yml | 11 +++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/templates/chapter_roundtable.yml b/templates/chapter_roundtable.yml index 3dd9269..c8ee135 100644 --- a/templates/chapter_roundtable.yml +++ b/templates/chapter_roundtable.yml @@ -24,7 +24,7 @@ steps: - type: think rotate_participants: true loop: - max_iterations: 9 + max_iterations: 5 hint: | You are {agent.name}, an editor in the editorial roundtable for this chapter. {agent.identity} @@ -61,6 +61,9 @@ steps: - [Specific change 3 if needed] VERDICT: [PASS / REVISE / REWRITE] + Once any participant outputs CONSENSUS REACHED, the debate is over. + Do NOT continue to another round after CONSENSUS REACHED has been written. + - type: package schema: consensus_critique: string diff --git a/templates/planning.yml b/templates/planning.yml index 3fff7fe..5af63de 100644 --- a/templates/planning.yml +++ b/templates/planning.yml @@ -56,6 +56,17 @@ steps: No ambiguous assignments. No placeholder names. Do NOT invent task type names. Each task_type MUST appear verbatim in the TEAM ROSTER. + ANTI-HALLUCINATION RULE FOR AGENTS: + NEVER invent agent names. Only assign tasks to agents that exist in the TEAM ROSTER above. + Invented agents like "Worldbuilder", "Prose Engine", "Plot Architect", "Voice Sculptor", + "Concept Analyst", "Logic Warden", "Heartstring Tensioner", or ANY name not in the roster + will cause routing failure — the task will run with no agent context and produce nothing. + If no existing agent perfectly fits a task, assign it to the closest match: + - Writing/prose tasks → Iris + - Planning/strategy tasks → Nova or Selene + - Research tasks → Forrest + - Editorial/review tasks → Devon, Lane, or Cora + BOARDROOM RULE: - When the request is for a strategic debate, a structured discussion, a decision-making session, or a formal deliberation WITHOUT producing new content artifacts, create ONE task: