From fd36fe95d15fcdc8e9faae5b232758aa3150fd4b Mon Sep 17 00:00:00 2001 From: Nova_2761 Date: Fri, 1 May 2026 13:45:30 +0000 Subject: [PATCH] feat(marketing): add product gate guard to campaign_review Skip review if project description has no ASIN (book not yet published). CLM projects created by kdp_publish always include ASIN in the goal. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- templates/campaign_review.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/templates/campaign_review.yml b/templates/campaign_review.yml index b965ad7..6ae957e 100644 --- a/templates/campaign_review.yml +++ b/templates/campaign_review.yml @@ -13,6 +13,22 @@ sections: - message - instructions steps: + # Guard: only run campaign reviews for projects with a live published book. + # CLM projects created by kdp_publish always have "ASIN:" in the project goal. + # Projects created prematurely (no published book yet) will not have an ASIN. + - type: think + max_tokens: 30 + output_key: product_gate + hint: | + Read this project description: {project.description} + + If it contains the text "ASIN:" followed by any value, output exactly: PUBLISHED + Otherwise output exactly: NO_PRODUCT + + - type: branch + condition: "{product_gate} == NO_PRODUCT" + target: skip_no_product + - type: tool capability: Tool_WebSearcher optional: true @@ -102,6 +118,13 @@ steps: - type: close rag_update: true + - type: label + name: skip_no_product + + - type: close + rag_update: false + + adjudication: enabled: true pass_threshold: 60