# Clawdbot System Map

*Complete architecture reference for the COO system*

---

## Architecture Overview

```
┌─────────────────────────────────────────────────────────────────┐
│                      CLAWDBOT (VPS)                              │
│                   134.199.153.159                                │
│                                                                  │
│  ┌───────────────────────────────────────────────────────────┐  │
│  │                 COORDINATOR (DeepSeek)                     │  │
│  └─────────────────────────┬─────────────────────────────────┘  │
│                            │                                     │
│  ┌─────┐┌─────┐┌─────┐┌────────┐┌─────┐┌─────┐┌──────┐        │
│  │ OPS ││GROWTH││ DEV ││SECURITY││STRAT││SYSTEM││CODER │        │
│  │ DS  ││ DS  ││ DS  ││  DS    ││OPUS ││ DS   ││ DS   │        │
│  └─────┘└─────┘└─────┘└────────┘└─────┘└─────┘└──────┘        │
└─────────────────────────────────────────────────────────────────┘
         │
         ▼
┌─────────────────┐  ┌─────────────────┐  ┌─────────────────┐
│    TELEGRAM     │  │     GITHUB      │  │     NOTION      │
│   (Interface)   │  │   (Comms Hub)   │  │   (Dashboard)   │
└─────────────────┘  └─────────────────┘  └─────────────────┘
```

---

## Agents

| Agent | Model | Purpose | Triggers |
|-------|-------|---------|----------|
| Coordinator | DeepSeek | Routes requests | All incoming |
| Ops | DeepSeek | Briefs, monitoring | brief, status, health |
| Growth | DeepSeek | Leads, content | lead, outreach, competitor |
| Dev | DeepSeek | Specs, tracking | bug, feature, spec |
| Security | DeepSeek | Code scanning | security, audit, scan |
| Strategy | Opus | Decisions | prioritize, should we, ROI |
| System | DeepSeek | Self-healing | system, broken, diagnose |
| Coder | DeepSeek | Executes code | Spawned by Dev |

---

## File Paths

### Clawdbot VPS
```
/root/.clawdbot/
├── clawdbot.json         # Main config
├── logs/                 # Gateway logs
└── .env                  # Don't use - use Doppler

/root/clawd/              # Workspace
├── SOUL.md               # Coordinator identity
├── AGENTS.md             # Routing rules
├── USER.md               # Michael profile
├── IDENTITY.md           # Rivet identity
├── HEARTBEAT.md          # Proactive checks
├── MEMORY.md             # Shared context
├── COMMS.md              # GitHub protocol
├── COMPLETE-KNOWLEDGE.md # Business context
├── agents/               # Subagent specs
└── memory/               # Agent memories
```

---

## Connections

| Service | Purpose | MCP |
|---------|---------|-----|
| Telegram | User interface | Yes |
| GitHub | Code, agent comms | Yes |
| Notion | Dashboard, tasks | Yes |
| Slack | Team comms | Yes |
| Gmail | Email | Yes |
| Doppler | Secrets | Via CLI |
| Apollo | Lead enrichment | API |
| Supabase | Database | API |

---

## Cron Schedule (AEST)

| Time | Agent | Task |
|------|-------|------|
| 4:30 AM | Ops | Morning brief |
| 6:00 AM | Security | Daily audit |
| Hourly | System | Health check |
| 12:00 PM | Ops | Midday check |
| 6:00 PM | Ops | Evening brief |
| 10:00 PM | Growth | Lead research |
| Monday 7AM | Strategy | Weekly priorities |

---

## Quick Commands

```bash
# Check gateway
systemctl status clawdbot

# View logs
tail -f /tmp/clawdbot/clawdbot-$(date +%Y-%m-%d).log

# Restart gateway
systemctl restart clawdbot

# Check disk
df -h

# Check memory
free -m

# Check processes
ps aux | grep clawd
```

---

*Last updated: 2026-02-01*
