From 3d29870a22dd8ec5e0acfdd4393954dffd8a79a8 Mon Sep 17 00:00:00 2001 From: David Baity <158404677+MazakTheDwarf@users.noreply.github.com> Date: Tue, 28 Apr 2026 08:47:55 -0400 Subject: [PATCH] fix: chapter_production -> channel, add project_index dispatch on book completion --- templates/chapter_production.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/templates/chapter_production.yml b/templates/chapter_production.yml index defaee3d..866d63ef 100644 --- a/templates/chapter_production.yml +++ b/templates/chapter_production.yml @@ -82,6 +82,7 @@ steps: Output ONLY the dispatch message. No preamble. + # Dispatch the next chapter if NEEDS_CHAPTER - type: tool action: enqueue_strategy optional: true @@ -91,8 +92,28 @@ steps: task_type: "book_chapter" content: "{chapter_dispatch_message}" + # If COMPLETE, dispatch project_index to compile the manuscript and signal book done + - type: think + max_tokens: 50 + output_key: index_dispatch_message + hint: | + Read production_status above. + If production_status is COMPLETE, output exactly: + Compile the manuscript index for {project.name}. All chapters are polished and complete. + If production_status is NEEDS_CHAPTER, output exactly: none + + - type: tool + action: enqueue_strategy + optional: true + params: + company_slug: "crimson_leaf_publishing" + project_slug: "{project.slug}" + task_type: "project_index" + content: "{index_dispatch_message}" + - type: reply - target: discussion + target: channel + channel_id: "1473516041249493104" adjudication: enabled: false \ No newline at end of file