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: - The portfolio report includes a project_breakdown array for each company. - Look at the crimson_leaf_publishing company's project_breakdown. - Each project entry has: name, slug, tasks_in_progress, tasks_completed, last_activity_utc, hours_since_activity, and is_idle (true/false). - is_idle is true when tasks_in_progress=0 AND hours_since_activity > 4. - Identify which CLP project has is_idle=true and the highest hours_since_activity. - That is the project most overdue for a chapter dispatch. - type: think max_tokens: 100 output_key: dispatch_project_slug hint: | Based on the portfolio report's project_breakdown for crimson_leaf_publishing, which single CLP project has is_idle=true with the most hours_since_activity? Output EXACTLY one of these values, nothing else: - cypress-bend - crimson-vows - binding-thread - none Output only the slug value. No explanation. No punctuation. No newlines. If ALL three projects have is_idle=false (tasks currently in progress), 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