From 80767032b074b02db2cd353032f804f54d54b356 Mon Sep 17 00:00:00 2001 From: Nova_2761 Date: Fri, 1 May 2026 13:45:19 +0000 Subject: [PATCH] feat(marketing): add CLM project handoff to kdp_publish After successful KDP upload, create a CLM marketing project with ASIN in goal so campaign_review can gate on a live published product. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- templates/kdp_publish.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/templates/kdp_publish.yml b/templates/kdp_publish.yml index dd5d2bd2..4ccfb0ce 100644 --- a/templates/kdp_publish.yml +++ b/templates/kdp_publish.yml @@ -321,6 +321,34 @@ steps: dest_path: "publishing/submissions" commit_msg: "kdp: submission record {task.id} -- ASIN {upload_result.asin}" + + # ========================================================================= + # STAGE 8: Hand off to Crimson Leaf Marketing + # Create a CLM project for this published book so marketing can run campaigns. + # Idempotent -- re-running kdp_publish on the same book finds the existing + # CLM project and updates its goal rather than creating a duplicate. + # ========================================================================= + - type: think + max_tokens: 300 + output_key: marketing_brief + hint: | + A book has just been published to Amazon KDP. Write a one-line marketing + project brief for the Crimson Leaf Marketing team. + + Output this format exactly (all on one line, no line breaks inside the value): + "Book: {project.name} | Genre: {genre_name} | Audience: {genre_audience} | ASIN: {upload_result.asin} | URL: {upload_result.sales_page_url} | Description: [2-sentence back-cover summary from the project goal]" + + Output ONLY the brief. No preamble. No backticks. + + - type: tool + action: create_project + optional: true + output_key: clm_project_result + params: + company_slug: "crimson_leaf_marketing" + name: "{project.name} Marketing" + goal: "{marketing_brief}" + - type: reply target: channel channel_name: "crimson_leaf_publishing:live-feed"