fix: pulse_check dispatches project_review directly -- remove management project dependency

This commit is contained in:
David Baity
2026-04-28 13:28:09 -04:00
parent 9b6ab5446f
commit 3b932ac67f

View File

@@ -1,5 +1,5 @@
name: pulse_check
description: "Crimson Leaf holding company health scan -- Edgar checks all DB companies every 3 hours."
description: "Crimson Leaf holding company health scan -- Edgar checks all DB projects every 3 hours."
debug: true
model: power
system: agent_prompt
@@ -25,47 +25,50 @@ steps:
action: get_portfolio_report
output_key: portfolio_data
# Step 1: identify subsidiary company slugs (exclude crimson_leaf -- that is us)
# Step 1: extract flat list of active projects across all subsidiaries
- type: think
max_tokens: 600
hint: |
You are Edgar, CEO of Crimson Leaf Holdings.
The portfolio report above lists every company registered in the system database.
Extract the slug of every company EXCEPT "crimson_leaf" (that is the holding company -- us).
The portfolio report above lists every company and project registered in the system.
Extract every ACTIVE project from every subsidiary company (exclude "crimson_leaf" itself).
Exclude any project with status "completed" or "archived".
Output ONLY a JSON array of slug strings on a single line. No explanation. No markdown.
Example: ["crimson_leaf_publishing","crimson_leaf_marketing","crimson_leaf_research"]
Output ONLY a JSON array on a single line. Each element must be an object with exactly
two keys: "company" (the company slug) and "project" (the project slug).
Example:
[{"company":"crimson_leaf_publishing","project":"cypress-bend"},{"company":"crimson_leaf_marketing","project":"book-marketing-agency"}]
If there are no subsidiary companies, output: []
If there are no active projects, output: []
# Step 2: package the array so foreach can source it
- type: package
schema: '{"company_slugs": "array"}'
schema: '{"projects": "array"}'
hint: |
The previous step produced a JSON array of company slugs.
Package it as: {"company_slugs": [...array of slug strings...]}
The previous step produced a JSON array of project objects.
Package it as: {"projects": [...array of objects...]}
# Step 3: dispatch a company_review task to the management project of each subsidiary
# Step 3: dispatch a project_review task to each active project
- type: foreach
source: company_slugs
source: projects
step:
type: tool
action: enqueue_strategy
optional: true
params:
company_slug: "{loop.item}"
project_slug: "management"
task_type: "company_review"
content: "Pulse-check: Edgar requesting company review for all active projects."
company_slug: "{loop.item.company}"
project_slug: "{loop.item.project}"
task_type: "project_review"
content: "Pulse-check: Edgar requesting project review."
# Step 4: brief health summary to Discord
- type: think
max_tokens: 150
hint: |
Write a 2-line status update for the Discord #general channel.
Line 1: "Pulse [HEALTHY/ATTENTION/IDLE] -- <N> subsidiaries reviewed"
Line 2: one sentence noting anything flagged (failures, idle companies, workers down) or "All systems nominal."
Write a 2-line status update for Discord.
Line 1: "Pulse [HEALTHY/ATTENTION/IDLE] -- <N> projects reviewed"
Line 2: one sentence noting anything flagged (failures, idle projects, workers down) or "All systems nominal."
Use data from the portfolio report. 2 lines max. No extra commentary.
- type: reply