Files
crimson_leaf_publishing/templates/ai_article_write.yml
David Baity 4c9222960d fix: template prompt bloat and variable substitution failures
- chapter_polish: remove sections:deliverables — chapter text already in
  {chapter_text}; this caused 150KB+ prompts for late chapters (40MB logs)
- chapter_roundtable: require structured CONSENSUS REACHED block so
  key_changes is always formatted as an extractable string; change
  key_changes schema from list to string to match
- book_chapter: remove sections:history to reduce context; restructure
  Pass 0 to plan-only (no prose output) so the chapter is only written
  once in Pass 1 instead of twice; add explicit instruction in package
  hint to copy full chapter_text into spawn context
- short_story: remove sections:history and sections:deliverables (standalone
  task, needs neither); restructure Pass 0 to plan-only, Pass 1 to write;
  add note to handle literal {genre_name} placeholders gracefully
- recipe_develop, ai_article_write, blog_write: remove sections:history
  (these standalone tasks do not need full project conversation history;
  deliverables kept so they can read the research/plan file)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-12 09:05:45 -04:00

74 lines
2.0 KiB
YAML

name: ai_article_write
description: "Write one standalone article from a brief — draft, polish, deliver."
debug: true
system: agent_prompt
agent_prompt:
- "= identity.md"
- "agent.rag.json"
sections:
- agent
- project
- rag
- deliverables
- message
- rejection_feedback
- instructions
steps:
- type: think
max_tokens: 4000
hint: |
Your task message contains the article brief. Follow it exactly.
Before writing, confirm: title, target reader, hook, promise, key points, call to action.
Write the full article:
- # Title as H1
- One-line subhead
- Opening hook: first sentence drops reader into a real scenario
- 3-4 body sections with bold subheadings, short paragraphs
- At least one concrete number (dollars, time, percentage) per section
- "Try This Week" section: one specific, free or low-cost action
- Memorable closing line
Peer-to-peer tone. Not a pitch. Not a lecture.
Word count: 800-1000 words.
- type: think
max_tokens: 4000
model: power
hint: |
Read your draft as the target reader would on their phone.
Cut warmup. Cut vague generalities. Cut brochure-speak.
Every paragraph earns its place or it goes.
Call to action must be doable this week.
Word count 800-1000.
Output ONLY the polished final article starting with # [Title]. No commentary.
- type: document
filename: "{{task_name_slug}}"
- type: close
rag_update: true
adjudication:
enabled: true
pass_threshold: 80
deliverable_type: consumer
criteria:
hook_strength:
weight: 30
description: "Opening immediately engages the target reader"
prose_quality:
weight: 25
description: "Writing is clear, direct, and human — no brochure-speak"
substance:
weight: 25
description: "Content is specific, accurate, and backed by real examples"
structure:
weight: 20
description: "Logical flow with clear sections and strong closing"