Files
crimson_leaf_publishing/templates/title_conflict_check.yml
David Baity a7371104c2 fix(sprint83b): title_conflict_check agent delegation bug
- title_conflict_check.yml: replace identity.md agent_prompt with explicit
  anti-delegation directive; remove rag section that injected book production context
- project_review.yml: add agent_name: atlas to title_conflict_check dispatch
  so task routes to Atlas instead of the chapter writer agent

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-29 13:07:37 -04:00

152 lines
5.5 KiB
YAML

name: title_conflict_check
description: "Atlas checks whether a CLP book title conflicts with existing published works on Amazon and Goodreads before production begins."
debug: true
model: power
system: agent_prompt
agent_prompt: |
You are Atlas, Director of Research & Content Strategy at Crimson Leaf Publishing.
NON-NEGOTIABLE RULES FOR THIS TASK:
1. YOU ARE THE RESEARCHER. Do this task yourself right now. Do NOT write delegation
memos. Do NOT say "I am assigning this to Atlas." You ARE Atlas.
2. WRITE THE DOCUMENT. Produce the conflict_assessment document in full.
Do NOT ask for clarification. The book title and genre are in the task message.
3. USE REAL URLS ONLY. Cite only real URLs found in the search results provided.
Do NOT invent placeholder citations like "(project.rag)" or "[Source](search_engine)".
4. COMPLETE THE FORMAT. Use the exact CLEAR / CAUTION / CONFLICT verdict format.
sections:
- project
- message
- instructions
steps:
- type: think
max_tokens: 200
output_key: search_query_amazon
hint: |
The book title and genre to check are described in the task message above.
Extract the book title and formulate ONE precise search query to find
whether this exact title exists as a published book:
Format: "[book title] novel" site:amazon.com OR site:goodreads.com
Output ONLY the search query. Nothing else.
- type: tool
capability: Tool_WebSearcher
input_from: search_query_amazon
mode: research
max_results: 5
fetch_pages: 2
optional: true
output_key: amazon_results
- type: think
max_tokens: 200
output_key: search_query_variants
hint: |
The book title and genre are in the task message above.
The first search checked for exact title matches.
Now formulate ONE query to find close-title variants in the SAME genre.
Look for: similar titles, same first word, rhyming titles, or near-identical phrasing
that could cause reader confusion.
Example: if title is "Crimson Vows", search for "crimson romance novel" or
"paranormal romance vows book"
Output ONLY the search query. Nothing else.
- type: tool
capability: Tool_WebSearcher
input_from: search_query_variants
mode: research
max_results: 5
fetch_pages: 2
optional: true
output_key: variant_results
- type: think
max_tokens: 2000
output_key: conflict_assessment
hint: |
You are Atlas, Director of Research & Content Strategy at Crimson Leaf Publishing.
The book to check is described in the task message.
=== AMAZON / GOODREADS SEARCH RESULTS ===
{amazon_results}
=== END AMAZON RESULTS ===
=== CLOSE-TITLE VARIANT SEARCH RESULTS ===
{variant_results}
=== END VARIANT RESULTS ===
Assess title conflicts. Cite specific search findings with [Title](URL) where found.
If search results are empty, note it and base assessment on structural analysis only.
Structure the document as:
# Title Conflict Check: [book title from task message]
Genre: [genre from task message]
---
## Exact Match Check
[Is there a published book with this EXACT title? Name it with [Title](URL) if found.
If not found: "No exact match found in search results."]
## Close Conflict Check
[Are there books with similar titles in the same genre that could cause reader confusion?
List any found with [Title](URL). If none: "No close conflicts found."]
## Positioning Risk Assessment
[Could readers reasonably confuse CL's book with any existing work?
Consider: title similarity, same genre, similar cover/premise potential.
Rate: LOW / MEDIUM / HIGH with a one-sentence reason.]
## Verdict
CLEAR -- No conflicts found. Safe to proceed with this title.
CAUTION -- Minor risk. Proceeding is acceptable but consider alternatives.
CONFLICT -- Significant conflict found. Recommend renaming before production.
## Alternative Title Suggestions
[Required if Verdict is CAUTION or CONFLICT. Suggest 2-3 alternatives that:
- Fit the same genre and tone
- Are unlikely to conflict with existing works
- Would work for the intended audience]
[If Verdict is CLEAR: "No alternatives needed."]
- type: document
source_step: conflict_assessment
dest_path: "deliverables/title-conflict/title-conflict-{project.slug}.md"
commit_msg: "research: title conflict check for {project.slug}"
- type: reply
target: channel
channel_name: "crimson_leaf_publishing:live-feed"
hint: |
Write ONE line summarizing the title conflict check result.
Format: "Title check [{project.name}]: CLEAR|CAUTION|CONFLICT -- [one sentence reason]."
Example: "Title check [Cypress Bend]: CLEAR -- No exact or close matches found on Amazon or Goodreads."
Example: "Title check [Crimson Vows]: CAUTION -- Found 'Crimson Promise' (paranormal romance, 2024) with similar branding."
adjudication:
enabled: true
pass_threshold: 65
deliverable_type: analysis
criteria:
coverage:
weight: 50
description: "Searched both exact title and close variants, checked Amazon and Goodreads -- verdict is based on search results not assumptions"
accuracy:
weight: 30
description: "Verdict (CLEAR/CAUTION/CONFLICT) is supported by actual search findings -- not over- or under-stated"
utility:
weight: 20
description: "If CAUTION or CONFLICT, at least 2 alternative titles are provided with brief rationale"