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