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