# TOOLS.md - Local Notes

## TTS / Voice
- **Chat TTS:** Edge TTS (FREE, no API key) — en-AU-WilliamNeural (Australian male)
- **Phone Calls:** ElevenLabs (voice-call plugin) — Charlie voice @ 1.2x speed
- **ElevenLabs key:** `/root/.clawdbot/secrets.json` (Creator tier, 110k chars/month — reserved for calls)
- **⚠️ TEXT REPLIES PREFERRED** (confirmed Feb 15). Voice only when Michael sends voice first. Edge TTS is free, no limits. [updated:2026-02-18]

## API Keys
All keys stored securely in `/root/.clawdbot/` — NOT in this repo.
- **Google API:** `/root/.clawdbot/google-api-key.json` (Maps, Places, Contacts, Tasks)
- **Gemini:** `/root/.clawdbot/google-gemini.json`
- **ElevenLabs:** `/root/.clawdbot/secrets.json`
- **Moonshot/Kimi:** In Clawdbot config
- **DeepSeek:** In Clawdbot config
- **Anthropic:** OAuth in Clawdbot auth profiles
- **OpenAI:** In Clawdbot skill config
- **Brave Search:** In Clawdbot config
- **Notion:** In Clawdbot config
- **Supabase Access Token:** `/root/.clawdbot/secrets.json` (for CLI/Management API — runs migrations without Michael)
- **Supabase:** In .env files (not in this repo)
  - rateright-v2: `.env.local` → `SUPABASE_SERVICE_KEY` (admin/RLS bypass)
  - the-50-dollar-app: `.env.local` → `SUPABASE_SERVICE_ROLE_KEY` + `SUPABASE_SERVICE_KEY` (both set, code uses `SERVICE_KEY`)
  - rateright-growth: `.env` → `SUPABASE_SERVICE_ROLE_KEY`
  - **All projects have the service key. Full DB access available — can run migrations, bypass RLS.**
- **VAPI:** In phone-ai repo .env

## Email Addresses (rateright.com.au)
All hosted on Google Workspace. MX records confirmed active.

| Address | Owner | Purpose |
|---------|-------|---------|
| michael@rateright.com.au | Michael | Founder, official correspondence, grant applications |
| support@rateright.com.au | Dedicated account | Customer support, public-facing |
| finance@rateright.com.au | Harper (alias) | Grants, invoicing, compliance, legal |
| sales@rateright.com.au | Susan (alias) | Outreach, lead comms, partnerships |
| hello@rateright.com.au | General (alias) | Website contact form, general enquiries |
| noreply@rateright.com.au | System (alias) | Automated notifications, system emails |

*Aliases route to Michael's inbox. support@ is a separate account. [added:2026-02-17]*

## Phone Lines
- Michael's number: +61 426 246 472
- Business line: +61 485 011 656
- Rivet voice line: +61 238 205 443 (Twilio)
- Voice calls: Clawdbot voice-call plugin (Twilio + ElevenLabs Charlie @ 1.2x speed)
- VAPI assistant backup: ID 63ac4ff9-e562-4c8e-9c19-c1f1c87ed034 (GPT-4o + Rivet personality)
- Use `voice_call` tool for calls — native Clawdbot integration

## Builder — The Coding Agent
- **Separate Clawdbot instance** on port 18790, workspace `/home/ccuser/the-50-dollar-app`
- **Model:** MiMo-V2-Pro (Max subscription)
- **Auth token:** `builder-api-2026`
- **Capabilities:** Full codebase context, Agent Teams, git push permissions

### Communication (Updated 2026-03-10)
**Primary control path: Gateway-to-gateway WebSocket bridge**
```bash
# Send task directly into Builder's live session
node scripts/builder-bridge.js send "agent:main:main" "TASK"

# Wake Builder with system event
node scripts/builder-bridge.js wake "message"

# Check Builder status
node scripts/builder-bridge.js status

# List Builder sessions
node scripts/builder-bridge.js sessions

# Fleet-wide agent bridge (for all agents)
node scripts/agent-bridge.js <agent> wake "message"
node scripts/agent-bridge.js <agent> status
```

**Proof path: JSONL inbox**
```bash
node /home/ccuser/shared/scripts/inbox.js send --from rivet --to builder --subject "Proof/Blocker" --body "..."
```
Use this for concise proof, blockers, and durable handoff tracking.

**Artifact/history path: markdown inboxes**
- `BUILDER-INBOX.md` (Rivet's workspace)
- `/home/ccuser/the-50-dollar-app/RIVET-INBOX.md`
Use these for changelogs, long-form notes, and history — **not** as the only urgent delivery path.

**Fallback: Direct Claude Code**
```bash
su - ccuser -c 'cd /home/ccuser/the-50-dollar-app && claude --dangerously-skip-permissions -p "TASK"'
```
Use `exec` with `pty:true` and `background:true`, monitor with `process` tool.

**Legacy files archived:** CC-VPS-INBOX.md, RIVET-TO-CCVPS.md, CC-WORKFLOW.md → `archive/legacy-workflows/`

### Rules
- **ALL code changes go through Builder.** Kimi agents for research/planning ONLY.
- Builder has full Supabase DB access, git push perms, Agent Teams
- Commits automatically, pushes when done

## Infrastructure
- VPS: DigitalOcean syd1, 4 vCPU, 8GB RAM (134.199.153.159)
- Growth Engine: https://rateright-growth-production.up.railway.app
- $50 App (v2): https://rivet.rateright.com.au (systemd: rateright-app, port 3000)
- Main Site (v1): https://rateright.com.au (Fly.io: rateright-au, Flask)
- Redeploy v2: `cd /home/ccuser/the-50-dollar-app && npm run build && systemctl restart rateright-app`

## Fleet Bulletin System
- **Read bulletins:** `cat /home/ccuser/shared/fleet-bulletins.jsonl`
- **Post bulletin:** `node /home/ccuser/rateright-growth/rivet/scripts/fleet-broadcast.js post --from <agent> --category <cat> --priority <info|urgent> --targets <all|agents> --summary "..."`
- **Correction shortcut:** `node /home/ccuser/rateright-growth/rivet/scripts/fleet-broadcast.js correction "message"`
- **Categories:** fix (7d), correction (30d), strategy (14d), status (3d), alert (2d), decision (14d)
- **Priority:** `info` = agents read on next session (free). `urgent` = wakes targeted agents immediately (costs tokens).

## Current Reliability Notes (Mar 2026)
- **Wake path can degrade** (tool unavailable / fallback to inbox). Always verify live delivery, not just reported success.
- **Duplicate-reply risk exists under retry/backlog conditions** until dedupe patch is fully verified.
- **Web search incident (Brave 422) occurred and was restored via Sonar route**; if search degrades, use `web_fetch` + direct URLs as fallback.
- **Builder token expired** - Claude OAuth needs manual refresh via browser. Blocks all code changes.
- **Cost control** - Fleet snapshot disabled (was 2/min to Supabase). Restoration report changing to 2-hourly.
- **Council system** - Agents responding in Growth Strategy topic. Council_respond function missing (needs Builder).

---

*Keep this file updated as tools and services change. NEVER put API keys in this file.*

## Rocky & Rivet Group Topics
Chat: -1003505625266

| Topic | ID | Link |
|-------|-----|------|
| General | 1 | t.me/c/3505625266/1 |
| RateRight | 2 | t.me/c/3505625266/2 |
| Sales | 4 | t.me/c/3505625626/4 |
| Research | 5 | t.me/c/3505625266/5 |
| Construction | 6 | t.me/c/3505625266/6 |
| System | 7 | t.me/c/3505625266/7 |
| Personal | 8 | t.me/c/3505625266/8 |
| Ideas | 10 | t.me/c/3505625266/10 |
| Content | 11 | t.me/c/3505625266/11 |
| Legal | 388 | t.me/c/3505625266/388 |
| Financial | 391 | t.me/c/3505625266/391 |
| Siteops | 6 | t.me/c/3505625266/6 (Site Ops Agent — USE THIS ONE, not 1937) |