Files
crimson_leaf/templates/pulse_check.yml

104 lines
3.6 KiB
YAML

name: pulse_check
description: "Crimson Leaf holding company health scan -- Edgar checks all subsidiaries every 3 hours."
debug: true
model: power
system: agent_prompt
agent_prompt:
- "= identity.md"
sections:
- agent
- project
- rag
- message
- instructions
builders:
message: |
*** PORTFOLIO REPORT ***
{steps[0].text}
steps:
- type: tool
action: get_portfolio_report
output_key: portfolio_data
- type: think
max_tokens: 4000
hint: |
You are Edgar, CEO of Crimson Leaf Holdings. You just received the portfolio report above.
Analyze it as a systems operator would:
1. Which companies are active? Which are idle (no recent activity)?
2. Are any tasks stuck (in_progress but old)? Any unusually high failure rates?
3. Are adjudication pass rates healthy (>65%) or concerning?
4. Is the system healthy (workers online, queue depth reasonable)?
Be concise and data-driven. Flag only what needs human attention.
For each issue, format as: "David, [action needed]: [details]"
If everything looks healthy, say so briefly -- don't invent problems.
Also assess Crimson Leaf Publishing (CLP) production status:
- Look for projects under crimson_leaf_publishing: cypress-bend, crimson-vows, binding-thread
- For each, note: tasks_in_progress count, total tasks, last task date
- Identify which project is MOST IDLE (least active, most overdue for a chapter)
- type: think
max_tokens: 100
output_key: dispatch_project_slug
hint: |
Based on Edgar's portfolio analysis above, which single CLP project is most idle
and needs a chapter dispatched right now?
Output EXACTLY one of these values, nothing else:
- cypress-bend
- crimson-vows
- binding-thread
- none
Output only the value. No explanation. No punctuation. No newlines.
If all projects are actively producing, output: none
- type: think
max_tokens: 500
output_key: dispatch_message
hint: |
Write a dispatch message for the project slug stored in context (dispatch_project_slug).
If dispatch_project_slug is "none", output exactly: none
Otherwise, write a clear chapter dispatch for the writing team. Include:
- Book context: title, genre, lead characters, core conflict, setting
- Task: "Write the next unwritten chapter. Check existing deliverables to find the
last written chapter and continue from there. If no chapters exist, start with ch-01."
- Word count target: approximately 3500 words per chapter
- Reminder: use the book outline in Gitea (pae/{company_slug}/projects/{project_slug}/)
for chapter titles and plot beats
Book reference:
- cypress-bend: "Cypress Bend" - contemporary romance, Louisiana bayou. Elena Vargas
(painter) and Jax Harlan (reclusive novelist). 12 chapters.
- crimson-vows: "Crimson Vows" - paranormal romance, blood pact. Lila Voss and vampire
heir Damian Voss. 10 chapters.
- binding-thread: "The Binding Thread" - fantasy romance, fate-weavers. Lira and
rebel leader Thorne. Kingdom of Eldoria. 12 chapters.
Output ONLY the dispatch message text. No labels. No metadata. No preamble.
- type: tool
action: enqueue_strategy
optional: true
params:
company_slug: "crimson_leaf_publishing"
project_slug: "{dispatch_project_slug}"
task_type: "book_chapter"
content: "{dispatch_message}"
- type: reply
target: discussion
adjudication:
enabled: false