# System Status — Current State vs Target State

## Current State (Feb 18, 2026)

### What's Running

```
PRODUCTION
├── rivet.rateright.com.au     Next.js 15 app        ✅ Live (port 3000)
├── rateright.com.au           Flask landing page     ✅ Live (Fly.io) — to be replaced
├── Growth Engine API          Node.js/Express        ✅ Live (Railway)
├── Phone AI                   VAPI + GPT-4o          ✅ Live
└── nginx                      Reverse proxy + SSL    ✅ Live

AGENT FLEET (8 Clawdbot gateways)
├── Rivet     :18789  Opus 4.6    Chief of Staff       ✅ Running
├── Builder   :18790  Opus 4.6    Development          ✅ Running
├── Susan     :18792  DeepSeek    Sales/Marketing      ✅ Running (flaky)
├── Harper    :18796  DeepSeek    Finance/Legal        ✅ Running
├── Sentinel  :18800  DeepSeek    DevSecOps            ✅ Running
├── Radar     :18804  DeepSeek    Intelligence         ✅ Running (flaky)
├── Herald    :18808  Opus 4.6    Communications       ✅ Running
└── Cog       :18812  DeepSeek    Operations           ✅ Running (flaky)

AUTOMATION (12 cron jobs)
├── crash-loop-guard    */2 min    ✅
├── stall-detector      */5 min    ✅
├── health-check        */5 min    ✅
├── context-monitor     */10 min   ✅
├── buddy-check         */30 min   ✅
├── inbox-curator       */30 min   ✅
├── git-sync            */30 min   ✅
├── work-generator      every 2h   ⚠️ (low output)
├── curate-agent        */3h       ✅
├── session-archiver    3 AM       ✅
├── scrub-logs          4 AM       ✅
└── health-check (app)  */5 min    ✅

DATABASE
├── Supabase (App)         PostgreSQL + Auth + RLS     ✅ Connected
└── Supabase (Growth)      PostgreSQL                  ✅ Connected

PAYMENTS
└── Stripe                 $50 AUD product configured  ⚠️ Not end-to-end tested
```

### What's Working Well
- **Infrastructure is solid (95%)** — VPS healthy, all services up, SSL valid, builds passing
- **App is feature-complete for MVP** — all 16 QA bugs fixed, core flows working
- **Growth Engine API functional** — 15+ endpoints, lead management, AI analysis working
- **Phone AI qualifying leads** — VAPI handling inbound calls
- **All 8 agents alive** — services running, HTTP responsive

### What's Broken or Weak
- **Task lifecycle (35%)** — agents have task queues but never claim or complete tasks
- **Cross-agent communication (45%)** — infrastructure exists, nobody uses it meaningfully
- **Agent memory (40%)** — 4 agents are amnesiac (Sentinel, Radar, Cog, Herald: 1-3 files each)
- **Model providers** — MiniMax completely broken (crashes Clawdbot), Moonshot/Kimi suspended ($300 top-up not reflected). Only Anthropic + DeepSeek working reliably.
- **Agent stability** — crash loops from stale session model overrides. Recurring issue (3 incidents in 48h)
- **Payments** — Stripe configured but not tested end-to-end in production
- **Domain** — still on rivet.rateright.com.au, not rateright.com.au

---

## Target State — What We're Building Toward

### Near Term (Next 2-4 Weeks)

**Product:**
- Stripe payments working end-to-end (contractor hires → pays $50 → done)
- Domain migration to rateright.com.au
- First real users on platform
- Growth Engine powering Susan's real sales outreach

**System:**
- Agent fleet at 80%+ health (from current 62%)
- Task lifecycle working: create → claim → execute → complete → report
- Cross-agent communication flowing (Radar finds intel → Susan uses it, Harper flags risk → Rivet escalates)
- All agents maintaining memory (no more amnesiac agents)
- Model providers stable (resolve MiniMax/Moonshot or replace)
- Zero crash loops for 7 consecutive days

### Medium Term (1-3 Months)

**Product:**
- 50+ workers on platform
- 10+ active contractors
- First revenue ($50 per hire × volume)
- Growth Engine multi-tenant (contractor instances)
- OpsMan MVP — 1-2 pilot contractors using simplified agent fleet

**System:**
- Agent fleet self-managing (Rivet coordinates, agents autonomous)
- Work generator producing meaningful tasks aligned to business goals
- Monitoring accurate and real-time (not 3h stale)
- Automated recovery from any single-agent failure
- Budget tracking: $100/month agent costs, no waste

### Long Term (3-12 Months)

**Product:**
- RateRight established in Sydney market
- OpsMan product live with paying contractor customers
- Growth Engine standalone product option
- Phone AI handling significant inbound volume
- The flywheel spinning: $50 hire → OpsMan subscription → Growth Engine expansion

**System:**
```
TARGET ARCHITECTURE
├── rateright.com.au              Next.js app (marketplace)
├── app.opsman.com.au             OpsMan dashboard (contractor-facing)
├── api.rateright.com.au          Unified API layer
├── Growth Engine                  Multi-tenant CRM
├── Phone AI                       Multi-line, per-contractor routing
│
├── Per-Contractor Agent Fleet     (OpsMan product)
│   ├── Hiring Agent              → Uses RateRight API
│   ├── Operations Agent          → Scheduling, crews, sites
│   ├── Finance Agent             → Invoicing, BAS, cash flow
│   ├── Safety Agent              → Compliance, White Cards, incidents
│   └── Growth Agent              → Uses Growth Engine API
│
└── RateRight Internal Fleet       (Our operations)
    ├── Rivet                     → Chief of Staff
    ├── Builder                   → Development
    ├── Susan                     → Sales
    ├── Harper                    → Finance/Legal
    ├── Sentinel                  → DevOps
    ├── Radar                     → Intelligence
    ├── Herald                    → Communications
    └── Cog                       → Operations
```

---

## Key Technical Decisions Made

| Decision | Rationale |
|----------|-----------|
| $50 flat fee (not percentage) | Simple, fair, easy to understand |
| Supabase (not custom backend) | Fast development, built-in auth + RLS |
| Next.js App Router | Modern React, SSR, good DX |
| Client-side PDF generation | Zero sensitive data storage for onboarding packs |
| 8 separate agents (not one monolith) | Specialization, fault isolation, OpsMan demo |
| DeepSeek for most agents | Cost-effective, Opus reserved for judgment calls |
| JSONL inboxes (not real-time) | Simple, reliable, debuggable |
| Clawdbot gateways | Proven agent framework, Telegram integration, tool ecosystem |
| VPS (not serverless) | Persistent agents need persistent processes |
| Stripe (not custom payments) | PCI compliance, trusted, $50 flat fee is simple |

## Key Technical Debt

| Issue | Impact | Priority |
|-------|--------|----------|
| Flask landing page on Fly.io | Separate system to maintain, confusing domain setup | HIGH — replace with Next.js |
| Agent session model overrides | Causes crash loops when model providers fail | HIGH — need architectural fix |
| Work generator low output | Agents idle most of the time | MEDIUM — needs business-aligned task generation |
| Rivet memory bloat (389 files) | Slow context loading, token waste | MEDIUM — needs pruning |
| No automated testing | Manual QA only | MEDIUM — need CI/CD pipeline |
| Single VPS | Single point of failure | LOW (for now) — fine at current scale |

---

*Built by prompting AI to prompt AI to code. The system that builds itself.*
