Files
crimson_leaf_publishing/templates/book_research.yml
David Baity df62a19c3f fix(book-pipeline): inference hints + LLM-filled context vars + roster roundtable
- book_research.yml: add inference hint when genre_name/genre_audience/research_focus are empty
- book_outline.yml: add inference hint for genre/audience; change package schema to ask LLM
  to FILL genre_name/genre_audience/prose_style/chapter_target_words from the outline text
  (was using {template_vars} which stay empty unless planning sets them)
- devon/agent.yml: add chapter_roundtable to supported_templates
- lane/agent.yml: add chapter_roundtable to supported_templates
  (all three editors now participate in roundtable — roster-driven, not hardcoded)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-12 02:16:18 -04:00

99 lines
2.9 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: book_research
description: "Research trends and context for a book — live search + synthesis + documented findings."
debug: true
system: agent_prompt
agent_prompt:
- "= identity.md"
- "agent.rag.json"
sections:
- agent
- project
- history
- rag
- prior_results
- message
- instructions
builders:
prior_results: |
*** WEB SEARCH RESULTS ***
{steps[1].text}
(If the above is empty, use your expert training knowledge to answer this question.)
steps:
- type: think
hint: |
You are researching the current fiction landscape for this book project.
GENRE: {genre_name|[infer from the project description above]}
TARGET AUDIENCE: {genre_audience|[infer from the project description above]}
RESEARCH FOCUS: {research_focus|[infer: what trends, tropes, and reader expectations matter most for this project?]}
NOTE: If GENRE, TARGET AUDIENCE, or RESEARCH FOCUS are blank above, read the
PROJECT DESCRIPTION section and infer them from the project's stated goal.
Your mission: identify the single best search query to find what's TRENDING RIGHT NOW
in this fiction genre in 20252026.
State your analysis, then on the last line write:
SEARCH QUERY: [your query here]
Query rules: 38 words. Specific.
- type: tool
capability: Tool_WebSearcher
input_from: last_text
- type: think
hint: |
You have live search results above (in PRIOR RESULTS).
If the web search results are empty or unavailable, use your expert training knowledge.
Infer the GENRE and AUDIENCE from the PROJECT DESCRIPTION if not explicitly provided above.
Synthesize the findings into an actionable publishing brief for this book:
1. TOP TRENDING — What sub-genres and themes are hot right now? Rank them.
2. AUDIENCE INSIGHTS — What does the target reader ({genre_audience}) demand?
3. STORY MECHANICS — What structural patterns are winning?
4. HOT TOPIC RECOMMENDATIONS — Give 3 distinct book concept seeds, each with:
- Working title
- Core hook (one sentence)
- Protagonist archetype
- Central conflict
- Why it will resonate now
5. COMPETITIVE GAPS — Where is the market undersupplied?
6. SOURCES — Key URLs or references.
- type: document
filename: "{{task_name_slug}}"
- type: spawn
task_type: book_outline
task_name: "Book Outline: {project.name}"
message: "{task.message}"
- type: close
rag_update: true
adjudication:
enabled: true
pass_threshold: 65
deliverable_type: coordination
criteria:
accuracy:
weight: 35
description: "Facts are correct and verifiable"
thoroughness:
weight: 30
description: "Topic covered in sufficient depth"
source_quality:
weight: 20
description: "Sources are credible and relevant"
organization:
weight: 15
description: "Findings are well-structured"