pulse_check: remove hardcoded project slugs/names, dispatch chapter_production instead of book_chapter

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
David Baity
2026-04-28 10:52:30 -04:00
parent af385463c5
commit 1e61b3bfa9

View File

@@ -40,69 +40,54 @@ steps:
If everything looks healthy, say so briefly -- don't invent problems.
Also assess Crimson Leaf Publishing (CLP) production status:
Also assess Crimson Leaf Publishing 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,
- Each project entry has: name, slug, company_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.
- Identify which 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
max_tokens: 200
output_key: dispatch_target
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?
Read the portfolio report data above.
CHAPTER LIMITS -- do NOT dispatch to a book that has reached its chapter target:
- cypress-bend: 12 chapters. If 12 or more polished chapters exist, do NOT dispatch.
- crimson-vows: 10 chapters. If 10 or more polished chapters exist, do NOT dispatch.
- binding-thread: 12 chapters. If 12 or more polished chapters exist, do NOT dispatch.
Find the single project with is_idle=true and the highest hours_since_activity.
If no projects are idle, output exactly: none
Check deliverables or portfolio report for polished chapter counts before deciding.
A book at or over its chapter limit should be treated as if is_idle=false.
If a project is found, output two lines -- nothing else:
COMPANY: <company_slug from the portfolio data>
PROJECT: <project slug from the portfolio data>
Valid output values (pick exactly one): cypress-bend, crimson-vows, binding-thread, none
Rules: 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
Rules: use the exact slug values from the data. No explanation. No punctuation.
If ALL projects have is_idle=false (tasks currently in progress), output: none
- type: think
max_tokens: 500
output_key: dispatch_message
max_tokens: 50
output_key: dispatch_company_slug
hint: |
The project selected for dispatch is: {dispatch_project_slug}
Read dispatch_target above.
If dispatch_target is "none", output exactly: none
Otherwise, output ONLY the value after "COMPANY:" -- one word, no spaces, no newline.
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: think
max_tokens: 50
output_key: dispatch_project_slug
hint: |
Read dispatch_target above.
If dispatch_target is "none", output exactly: none
Otherwise, output ONLY the value after "PROJECT:" -- one word, no spaces, no newline.
- type: tool
action: enqueue_strategy
optional: true
params:
company_slug: "crimson_leaf_publishing"
company_slug: "{dispatch_company_slug}"
project_slug: "{dispatch_project_slug}"
task_type: "book_chapter"
content: "{dispatch_message}"
task_type: "chapter_production"
content: "Pulse-check trigger: resume chapter production for this project."
- type: think
max_tokens: 200
@@ -115,16 +100,7 @@ steps:
Line 1: "Pulse check -- [time context] -- [one word health: HEALTHY / ATTENTION / IDLE]"
Line 2: "[What action was taken or what was observed. Dispatch fired? All idle? Issue flagged?]"
Examples:
"Pulse check -- 3h cycle -- HEALTHY"
"Dispatched ch-06 to Cypress Bend. CLP queue active on all 3 projects."
"Pulse check -- 3h cycle -- ATTENTION"
"David, Crimson Vows has been idle 18h. Dispatch fired. Adj pass rate dropped to 42%."
"Pulse check -- 3h cycle -- IDLE"
"All CLP projects active. No dispatches needed. System nominal."
Use project and company names from the portfolio data -- do not invent names.
Keep it to 2 lines maximum. No extra commentary.
- type: reply