# CONTEXT.md - Current State

*Auto-updated. The live picture of what's happening.*

---

## RateRight

**What:** Construction marketplace connecting contractors with workers
**Pitch:** Workers keep as much as possible. Contractors get value and reliability. Fee as low as it can go while staying sustainable.
**Platform:** https://app.rateright.com.au

**Trades:** Electrical, plumbing, carpentry, painting, landscaping, roofing, tiling, plastering, concreting, formwork, steelfixing

---

## Current Priorities (Feb 2026)

1. **Contractor acquisition** — Primary customer focus
2. **Worker recruitment** — Irish/British backpackers with White Cards
3. **Cost optimization** — Keep AI spend low, use smart models
4. **Growth Engine** — Sales automation improvements

---

## Systems

| System | Purpose | Status |
|--------|---------|--------|
| Growth Engine CRM | Sales automation | 🟢 |
| RateRight Platform | Marketplace | 🟢 |
| Rivet (this) | COO system | 🟢 |
| Notion | Ops hub | 🟢 |
| Supabase | Database | 🟢 |

*Last health check: [auto-update]*

---

## Notion Databases

| Database | ID | Purpose |
|----------|-----|---------|
| Work Tracker | `6ede5973-7f70-4814-bdaa-711934c18194` | Tasks, bugs, features |
| System State | `df695bc0-af61-4eba-86fc-cf7325d1ddfb` | Health indicators |
| Lessons Learned | `019465a8-9ca5-457e-80ff-273919caa477` | Patterns, mistakes |
| Deploy Log | `4d8db967-80dd-4a56-b3c9-2a0816f39063` | Deployments |
| Hot Leads | `2f863e0c-a7d5-8188-bf56-000b1f165013` | Sales pipeline |
| Business State | `2f563e0c-a7d5-8106-9ddb-000b516a9eb9` | Metrics |

Build Plan: https://www.notion.so/2f863e0ca7d58118bf1bc6c51198aaa3

---

## Credentials

All secrets in **Doppler** (not plaintext).
- 68 credentials stored
- Backup in Bitwarden (66 credentials)
- Never commit secrets to git

---

## Recent Decisions

| Date | Decision | Why |
|------|----------|-----|
| 2026-02-01 | Simplify Rivet config | Over-engineered, too many files |
| 2026-02-01 | DeepSeek as primary | 107x cheaper than Opus |
| 2026-01-31 | GitHub secrets cleanup | Security incident |

---

## Lessons Learned

1. **Supabase returns empty on bad columns** — No error, just empty. Always verify column names.
2. **Short messages when on site** — He's in gloves, using voice.
3. **Draft but don't send** — External comms need explicit "yes".
4. **Position-based scroll detection** — getBoundingClientRect() for mobile touch issues.
5. **Simple over clever** — Every layer of complexity is a layer that can break.

---

## VPS

- **IP:** 134.199.153.159
- **Provider:** DigitalOcean
- **Location:** Sydney
- **User:** root (Rivet runs here)

---

## GitHub Coordination

The repo is the coordination layer for agents.

**Structure:**
```
.claude/
├── INBOX.md      # Tasks for agents to pick up
├── OUTBOX.md     # Completed work, findings, results
├── STATUS.md     # Who's working on what
└── agents/       # Agent-specific logs and state
```

**How it works:**
- Agents read INBOX for work
- Agents write findings to OUTBOX
- Agents update STATUS when starting/finishing
- Everything is logged, everything is traceable

**Use it for:**
- Assigning research tasks
- Recording decisions
- Tracking what got done
- Maintaining continuity across sessions

---

## What's Blocked

*Items waiting on Michael:*

- [ ] (none currently)

---

## What's In Progress

*Active work:*

- [ ] Rivet config simplification
- [ ] Growth Engine improvements

---

*Last updated: 2026-02-02*
*This file should be updated by Rivet as state changes.*

---

## Repo Structure

This is the actual structure of rateright-growth:

```
rateright-growth/
├── .claude/           # CC coordination
│   ├── INBOX.md       # Tasks for CC
│   ├── OUTBOX.md      # Results from CC
│   └── STATUS.md      # CC status
├── rivet/             # Rivet brain (this system)
│   ├── SOUL.md
│   ├── IDENTITY.md
│   ├── USER.md
│   ├── CONTEXT.md
│   ├── MEMORY.md
│   ├── HEARTBEAT.md
│   ├── scripts/rivet.sh
│   └── knowledge/
├── src/               # Growth Engine API
├── admin/             # Admin dashboard
├── docs/              # Documentation
├── clawd-scripts/     # Legacy scripts (deprecated)
├── CLAUDE.md          # CC instructions
└── package.json
```

If asked about files you cannot see, say "I dont have file system access - I can only read my context files."

