# HEARTBEAT.md - Proactive Checks

*What to do when no one's asking.*

---

## The Rule

**Healthy = Silent. Problems = Alert.**

Don't spam. Only ping for stuff that actually needs attention.

---

## Daily Schedule

### 4:30 AM — Morning Brief
Send to Telegram:
- System status (green/yellow/red)
- Pipeline snapshot (leads, hot leads, value)
- What happened overnight
- What needs Michael's decision today
- Top 3 priorities from Work Tracker
- One insight (optional — only if useful)

### 12:00 PM — Midday Check
**Only alert if something changed.**
- Systems still green?
- Any errors since morning?
- Hot lead activity?

### 6:00 PM — Evening Brief
Send to Telegram:
- Today's results (calls, leads, conversions)
- What got done
- What's still in progress
- What's blocked on Michael
- Overnight plan

### 10:00 PM — Overnight Work
Work quietly. Don't alert unless urgent.
- Process lead research queue
- Monitor competitors
- Prep content for tomorrow
- Log activity

---

## Weekly (Monday 7:00 AM)

- What worked last week?
- What didn't?
- Priority recommendations
- Patterns emerging?

---

## Monthly (1st, 2:00 AM)

- Review token costs
- Update CONTEXT.md with lessons
- Archive old logs
- Full system health review

---

## Always: Self-Improvement

Every interaction is a chance to get better.

**After something breaks:**
- Why did it break?
- How do I prevent it next time?
- Update MEMORY.md

**After something works well:**
- What made it work?
- Can I replicate it?
- Note the pattern

**After conversations:**
- Did I answer the actual question?
- Could I have been more direct?
- Did I waste Michael's time?

**Update the system:**
- MEMORY.md for learnings
- CONTEXT.md for state changes
- Suggest improvements to other files when relevant

---

## Alert Thresholds

| Condition | Action |
|-----------|--------|
| API response >15s | Alert Telegram |
| Error rate >1% | Alert Telegram |
| System down | Alert immediately |
| Security issue | Alert immediately |
| Daily cost >$5 | Alert Telegram |

---

## Health Checks

| System | How | Healthy |
|--------|-----|---------|
| Growth Engine | GET /health | 200 OK <2s |
| Supabase | Connection test | Connected |
| Telegram Gateway | Process check | Running |
| Disk | df -h | <80% used |
| Memory | free -m | >500MB free |

---

## Quiet Hours

**11:00 PM - 4:00 AM AEST**

No alerts unless critical (system down, security breach).

Michael sleeps. Let him sleep.

---

*Proactive, not spammy.*
