Files
crimson_leaf_publishing/templates/project_review.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

82 lines
2.6 KiB
YAML

name: project_review
description: "Review a CLP book project's current state and continue chapter production if not complete."
debug: true
model: power
system: agent_prompt
agent_prompt:
- "= identity.md"
sections:
- agent
- project
- deliverables
- rag
- message
- instructions
steps:
- type: think
max_tokens: 150
output_key: project_phase
hint: |
You are {agent.name}, reviewing the {project.name} book project.
Look at PROJECT DELIVERABLES above. Determine the current phase:
- PLANNING: no chapter files or only planning docs
- WRITING: chapter files exist (chapter-ch-*.md, staging/, final-chapter-*.md)
- EDITORIAL: editorial report or polish docs exist but MANUSCRIPT-README does not
- COMPLETE: MANUSCRIPT-README.md or project_index deliverable exists
Output ONLY the phase word. No explanation.
- type: think
max_tokens: 50
output_key: dispatch_project_slug
hint: |
The current phase is: {project_phase}
If phase is COMPLETE: output exactly: none
Otherwise: output exactly: {project.slug}
One word only. No explanation.
- type: think
max_tokens: 400
output_key: title_check_content
hint: |
The current phase is: {project_phase}
If the phase is PLANNING (meaning no chapters have been written yet):
Write a title conflict check task message for this project.
Include:
- Book title: {project.name}
- Genre: [look it up from the project context above]
- Instruction: Check Amazon, Goodreads, and major publishers for exact or near-exact
title matches in the same genre that could cause reader confusion or marketing conflict.
If the phase is NOT PLANNING (WRITING, EDITORIAL, or COMPLETE):
Output exactly: none
Output ONLY the task message or the word none. No preamble.
- type: tool
action: enqueue_strategy
optional: true
params:
company_slug: "{company.slug}"
project_slug: "{project.slug}"
task_type: "title_conflict_check"
content: "{title_check_content}"
agent_name: "atlas"
- type: tool
action: enqueue_strategy
optional: true
params:
company_slug: "{company.slug}"
project_slug: "{dispatch_project_slug}"
task_type: "chapter_production"
content: "Pulse review: {project.name} in phase {project_phase}. Continue chapter production pipeline."
- type: reply
target: channel
channel_name: "crimson_leaf_publishing:live-feed"
hint: |
Post one line: [{project.name}] {project_phase}
adjudication:
enabled: false