---
name: coo-pulse
description: Generates Hermes-COO pulse — AM (5:45 AM), EOD (6:30 PM), or weekly (Sun 7 PM) modes. Comeback-protocol format for EOD/weekly.
agent: hermes-coo
triggers:
  - "/pulse"
  - "pulse"
  - "/coo-pulse"
  - "where are we today"
delivery: telegram:7377499346
mode_arg: am | eod | weekly  (default: eod)
context_files:
  - HQ-Vault/_System/COO/goals.md
  - HQ-Vault/_System/COO/state.json
  - HQ-Vault/_System/COO/Inbox.md
  - HQ-Vault/_System/COO/Outbox.md
  - HQ-Vault/_System/HQQueue.md
---

# coo-pulse skill

## Behaviour

Render the appropriate pulse format and deliver it to Telegram + (for EOD/weekly) append to vault.

### Step 1 — boot check

1. Read `goals.md`. If missing OR status != `live`:
   - Send Telegram: "Goals not live. Cannot pulse. Need `_System/COO/goals.md` with status `live`."
   - Update `state.json`: `boot_blocked: true`, `goals_status: "missing"` or `"draft"`.
   - Exit. Do not fabricate.

### Step 2 — measure current values

For each goal in `goals.md`:
1. Read `measurement_source`.
2. Execute (Supabase query / Airtable list / manual prompt).
3. Compare to value in last `state.json` history entry for that goal.
4. Compute Δ vs yesterday (AM) or vs this morning (EOD) or vs last Sunday (weekly).
5. Append measurement to `state.json` → `goal_history[{goal_id}][]` (append-only).

If a measurement source is unreachable, value = `"unknown"`, Δ = `"no data"`. Do NOT guess.

### Step 3 — render by mode

#### AM mode (≤6 lines, Telegram only)

```
GM Rocky. {weekday} {DD-MMM}.
🎯 {goal1_name}: {current} / {target} ({±Δ})
🎯 {goal2_name}: ...
🎯 {goal3_name}: ...
🔴 ONE move today: {≤15 words}
⚠️ Watch: {only if any goal red — else omit line entirely}
```

`ONE move today` is computed from the highest-priority goal's `next_move` (set on prior EOD pulse). If goals.md doesn't have `next_move` populated, infer from blocker.

#### EOD mode (≤12 lines, Telegram + vault `Pulse-{YYYY-MM-DD}.md`)

```
EOD Rocky. {DD-MMM} pulse.
🎯 Scoreboard: {goal1}: {cur}/{tgt} | {goal2}: ... | {goal3}: ...

1. Stalled
- {bullet — what's been static and shouldn't be}
- {bullet}
2. Hot
- {bullet — what moved and needs attention}
3. Promised, not done
- {bullet — quote verbatim promise + date promised}
4. Autonomous activity
- {what hermes-coo / -opsman / -rr did today, summarised}
5. Pick up first
- {single highest-priority item for tomorrow}

🔥 Escalations: {Outbox.md items needing Rocky decision tonight — else "none"}
```

Section 3 ("Promised, not done") reads from grep across last 30 days of dailies + `_Log.md` files for patterns like "TODO Rocky", "I'll", "by next week", etc. Match with strikethrough or [DONE] markers to filter completed ones.

Section 4 ("Autonomous activity") reads `dispatch-log.ndjson` for today + `_AgentLog/hermes-coo-{today}.md` + other `hermes-*-{today}.md` files.

#### Weekly mode (full vault `Pulse-{YYYY-MM-DD}-weekly.md` + Telegram heads-up)

```
WEEKLY Rocky. {DD-MMM} pulse.

🎯 Goals — 7-day trend
{goal1}: {Mon|Tue|Wed|Thu|Fri|Sat|Sun} {sparkline-text or numbers}
{goal2}: ...
{goal3}: ...

Stalled >7d (recommend re-baseline or kill):
- {bullet}

Hot this week:
- {bullet}

Promises landed:
- {bullet}

Promises still open:
- {bullet}

Autonomous activity week:
- COO: {N dispatches, M classifications, K escalations}
- opsman: {summary}
- rr: {summary}

One strategic question for this week's Window:
- {question}

Goal-set proposed changes:
- {if any — else "no changes proposed"}
```

Vault file: `_System/COO/Pulse-{YYYY-MM-DD}-weekly.md`
Telegram: 4-line summary linking to vault file via Obsidian URI.

### Step 4 — write

- **Always** write the pulse to vault: `_System/COO/Pulse-{YYYY-MM-DD}.md` (EOD overwrites AM same-day; weekly is separate file).
- **Always** append a line to `_AgentLog/hermes-coo-{today}.md`.
- **Always** append to `dispatch-log.ndjson`: `{"ts":..., "agent":"hermes-coo", "action":"skill_run", "target":"coo-pulse", "result":"ok", "notes":"mode={am|eod|weekly}"}`.
- **Always** update `state.json` → `last_pulse_{am|eod|weekly}: <iso8601>`.
- Deliver Telegram per `delivery:` field.

### Step 5 — escalation check

After rendering, check failure modes from `CLAUDE.md` § "Failure modes to watch". If any tripped:
- Add `🔥 Escalations:` line to the pulse (or extend it).
- Append to `Outbox.md` under `## Surfaced findings`.
- Send second Telegram if priority is "decide tonight".

## Failure modes

- `goals.md` missing/draft → block, surface, exit (Step 1).
- Measurement source unreachable → "unknown — {what would unblock}", do not guess.
- Telegram delivery fails → still write to vault, retry Telegram once, then escalate via `Outbox.md`.
- Vault write fails → log to dispatch-log with `result: fail`, do not silently skip.

## What good looks like

A pulse Rocky reads in <60 seconds, where every line tells him something he didn't already know, and the "ONE move" or "Pick up first" is small enough he can actually do it before the next pulse.
