# Cron Job: rateright-weekly

**Job ID:** f481ba22c69c
**Run Time:** 2026-06-20 08:04:31
**Schedule:** 0 8 * * 6

## Prompt

[IMPORTANT: The user has invoked the "rateright-operations" skill, indicating they want you to follow its instructions. The full skill content is loaded below.]

---
name: rateright-operations
description: "RateRight platform — operational auditing, strategic planning, PM2 hunt fleet management, and vault triage. Use when Rocky asks about the state of RateRight, wants a strategic plan, or needs to know what's working/broken."
version: 1.0.0
author: hermes
metadata:
  project: RateRight
  vault_path: /home/ccuser/rateright-growth/HQ-Vault/10_RateRight
  vps_app_path: /home/ccuser/the-50-dollar-app
  crm_project: memscjotxrzqnhrvnnkc
  related_skills: [hermes-agent]
---

# RateRight Operations

## Vault anatomy

```
HQ-Vault/10_RateRight/
├── _Brain/
│   ├── CLAUDE.md         ← start here: what RateRight is, strategy, hard rules
│   ├── _Log.md           ← append-only one-liners, chronological
│   ├── Open-Threads.md   ← dormant decisions Rocky's call
│   ├── Decision-Log.md
│   └── README.md
├── Business/
│   └── Marketing/        ← hostel campaign, cold email, facebook strategy
├── Skills/
│   ├── hunt/             ← hunt infrastructure (aggregator, outreach, matchmaker)
│   ├── matchmaker/      ← conversion engine design
│   └── pulse/            ← telemetry / monitoring
├── ROADMAP.md            ← historical baseline (stale, see Active.md)
└── Operations/           ← deliverability fixes, technical ops docs
```

## PM2 fleet reference (updated 2026-05-26)

```
hunt-aggregator   — stopped (scrapers down — selector breakage, not just key exhaustion)
hunt-contractors — stopped (scrapers down)
hunt-matchmaker  — stopped (not built)
hunt-monitor     — online but idle
hunt-outreach    — online but starving (no queue)
hunt-workers     — stopped (scrapers down)
growth-engine    — online
rateright-app    — systemctl (not PM2)
```

**Critical new facts (Graphify proof, 2026-05-26):**
- Gumtree scrapers: 0 contacts extracted since 2026-04-28. Root cause: HTML structure change broke selectors. ScrapingBee fallback wired but `SCRAPINGBEE_API_KEY` not provisioned. Running the scrape produces nothing actionable until selectors are remapped AND key is provisioned.
- Hunt → Marketplace: ZERO connecting edges. Hunt writes to `growth-engine` Supabase (`memscjotxrzqnhrvnnkc`), marketplace reads from `marketplace` Supabase (`eciepjpcyfurbkfzekok`). No shared module, no API call, no DB reference. Hunt is a parallel pipeline producing nothing for marketplace supply.
- Marketplace Supabase: auto-paused 2026-05-26 after 7 days idle on free tier. Restoration in progress. Data preserved.

**Fix path before any hunt scrape:**
1. Remap Gumtree selectors (HTML change broke them)
2. Provision `SCRAPINGBEE_API_KEY`
3. Restore marketplace Supabase
4. Re-architect hunt→marketplace pipeline (structural, not a bug fix)

## Audit methodology (this session's pattern)

When Rocky asks for a full audit or strategic plan, use this sequence:

1. **PM2 status** — `pm2 list` to see what's alive
2. **Version check** — ALWAYS run `hermes update --check` AND `hermes --version` first. Never report "you're up to date" or "here's what's new" without verifying. False version claims waste Rocky's time and erode trust. Check `git tag | sort -V | tail -5` to find actual latest release tag.
3. **Vault files** — read `_Log.md`, `_Brain/CLAUDE.md`, `Open-Threads.md`, `ROADMAP.md`
4. **Direct vault reads** — faster than spawning a sub-agent, avoids billing issues
5. **Synthesise** — what's working / broken / stalled, ranked by worker supply impact
6. **Top 5 actions** — one specific action first, no hedging. If you can't answer, say "no opinion — need X to form one."

**Q1 pattern (calibrate usefulness baseline):** When Rocky asks what's worth focusing on, give ONE specific action. No multiple options, no hedging. This calibrates whether Hermes is a useful daily agent or a passive notebook.

**Q5 pattern (bug awareness self-report):** If you've been logging recurring errors (file not found, etc.) and haven't flagged them, say so. Current Hermes has no self-audit loop — that's known and the fix is planned. Don't hide failures.

**When NOT to spawn a sub-agent for vault work:**
- Profile has billing issues (check HTTP 402 history first)
- tmux non-interactive constraint makes model picker unusable
- Default profile has same vault access — no benefit to delegation

**When spawning a sub-agent IS appropriate:**
- Long-running independent work (hours)
- Requires different model/provider than default
- Needs to run unattended while default continues other work

**IMPORTANT — browser-based research:**
If Rocky mentions a list of pages/URLs to scrape (e.g. 237 Facebook pages), use `browser_navigate` to access them directly from the VPS. The VPS browser is already configured (stealth mode active, no residential proxies — warn Rocky if proxy upgrade is needed). Screenshot → vision AI extracts the text → parse → upsert to CRM.

**Facebook/Meta warning:** Groups API killed April 2024. Auto-messaging from Rocky's account is banned by Facebook TOS and risks account ban. Scrape public posts only; Rocky sends the first message manually.

## Current known state (as of 2026-05-09)

| System | Status | Note |
|--------|--------|------|
| Site (rateright.com.au) | ✅ Live | Fixed 2026-05-03 |
| Stripe | ⚠️ Untested end-to-end | Key valid, no browser checkout confirmed |
| Supabase | ✅ Working | Service-role key valid |
| Gumtree scraper | 🔴 Stopped | ScrapingBee exhausted until 2026-05-13 |
| Hunt queue | ⚠️ Stalled | 359 leads, 1 approved/sent |
| Matchmaker | 🔴 Not built | Design exists, implementation needed |
| rr profile | 🔴 Dead | DeepSeek 402, k2.6 model never started |
| Pawel (AWX Labour) | 🟡 Cold | 80 days since contact |
| Susan's 17 leads | 🟡 Stale | ~75 days old, too cold to send as-is |

## Hunt — Marketplace Lead Scraper

> Absorbed from `hunt` skill (absorbed_into=rateright-operations). facebook-pages.md reference material also absorbed.

### Invocation

| Command | Script |
|---|---|
| `/hunt` | Run all: job-aggregator.js + worker-hunter.js + contractor-hunter.js |
| `/hunt workers` | Run worker-hunter.js only |
| `/hunt contractors` | Run contractor-hunter.js only |
| `/hunt workers sydney` | Run worker-hunter.js --city sydney |
| `/hunt contractors melbourne` | Run contractor-hunter.js --city melbourne |
| `/hunt jobs` | Run job-aggregator.js only |
| `/hunt --dry-run` | Add --dry-run flag to all scripts |
| `/hunt --status` | Run notion-summary.js for today's stats |
| `/hunt facebook-workers` | Scrape Facebook construction worker pages (Australia-wide) |
| `/hunt facebook-jobs` | Scrape Facebook job posting pages (Australia-wide) |

### Script paths

- **VPS:** `/home/ccuser/rateright-growth/scripts`
- **Laptop deploy:** `C:\Users\mclou\rateright-growth-deploy`
- **Vault mirror:** `HQ-Vault/10_RateRight/Skills/hunt/`

### Facebook hunt (Wave 2.2 — 237 pages)

**Browser approach (VPS):**
```
browser_navigate(url="https://www.facebook.com/[page-slug]")
# screenshot → vision AI extract → parse → upsert CRM → digest
```

**Workflow per page:**
1. Navigate to the Facebook page (public posts don't need login)
2. Screenshot the post list
3. Vision AI extracts: name, location, job type, contact, post date
4. Upsert to `hunt-leads` table with `source='facebook-workers'` or `source='facebook-jobs'`
5. After full run: output daily digest of new contacts

**Scope:** 237 pages across all Australian states/territories. Run in batches of 20-30 per session to avoid rate limiting.

**Do NOT:** try to auto-send messages as Rocky — this risks account ban and is explicitly against the Facebook strategy in the vault.

### Final step (Wave 2.2 protocol)

```bash
bash scripts/log-event.sh "<agent-id>" "skill_run" "hunt" "<ok|fail>" "<args> — <count> leads scraped"
```

### Regression fixture

See `references/facebook-pages.md` for expected output structure.

---

## Proactive disclosure (don't wait to be asked)

- **Hermes dashboard** — Rocky didn't know it existed. On every new session, if relevant to the current context, mention it unprompted:
  ```
  hermes dashboard  → http://100.108.207.15:9119
  ```
  Dashboard shows sessions, skills, tools, and live agent state. Useful when Rocky wants visual access instead of CLI.

- **SSH access** — Rocky can `ssh mclou@100.108.207.15` from any terminal on his laptop and run `hermes` directly. Worth reminding periodically.

- **Version staleness** — If Rocky asks about updates or what's new, ALWAYS verify first with `hermes update --check` and `hermes --version`. Do NOT assume the current running version is the latest.

- **Update reports — voice-first format:** When Rocky asks for an update report and specifies voice delivery, format the report as:
  - Bullets first, prose second
  - Short declarative sentences (readable at 1x speed)
  - Group by theme (Desktop, Models, Gateway, Stability)
  - End with "Want me to update now?"
  - Use `text_to_speech` then `send_message` to deliver as audio to Telegram
  - This replaces: long prose paragraphs, multi-sentence explanations per item, hedging language

## chat-bootstrap — Vault Snapshot for Chat Handoff

**Trigger:** When Rocky starts a new session and needs the RateRight operational picture quickly. "Bootstrap chat", "read the vault", " what's happening with RateRight."

**What it does:** Reads key RateRight vault files and outputs a single mobile-friendly markdown snapshot. One copy-paste = full context for the chat.

### Source files

| Data | File |
|---|---|
| Strategic priority | `HQ-Vault/10_RateRight/ROADMAP.md` |
| Open decisions | `HQ-Vault/10_RateRight/_Brain/Open-Threads.md` |
| VPS / agent state | `HQ-Vault/11_OpsMan_LFCS/_Brain/Agent-Stack-MOC.md` |
| VPS detailed state | `HQ-Vault/11_OpsMan_LFCS/_Brain/VPS-State-2026-05-01.md` |
| Recent decisions | `HQ-Vault/10_RateRight/_Brain/Decision-Log.md` |
| Today's daily notes | `HQ-Vault/01_Daily/YYYY-MM-DD.md` (current date) |
| RateRight activity log | `HQ-Vault/10_RateRight/_Brain/_Log.md` |

### Process

1. Determine today's date in `YYYY-MM-DD` format.
2. Read each source file.
3. If any file is missing or returns an error, note it inline as `<!-- FILE: path — NOT FOUND -->`.
4. Build a single fenced markdown block (triple-backtick + `markdown`).
5. Output nothing else — no preamble, no commentary, no follow-up questions.
6. End with a blank `Session intent:` line.

### Output format

```markdown
VAULT SNAPSHOT [timestamp]

## Strategic Priority
[Extract top 3 🚨 CRITICAL items from ROADMAP. If stale, prepend "(⚠️ ROADMAP stale — YYYY-MM-DD)".]

## Open Decisions — Waiting on You
[Summarise each 🔴/🟡 thread from Open-Threads. Max 2 sentences each.]

## What's Running Right Now
[Agent-Stack + VPS-State: bullet list of live services, their status. Max 1 line per service.]

## Recent Decisions
[Last 5 entries from Decision-Log or today's daily.]

## Today So Far
[Last 20 entries from today's daily note — bullets only.]

## Live Numbers
[Try to read Dashboard.md. If stale or missing:]
> ⚠️ Live numbers unavailable. Supabase service-role key is invalid (needs replacing). Dashboard is stale. Don't guess — say "unknown" until the key is fixed.

## Session intent:

```

### Key rules

- **Never invent numbers.** If the vault doesn't have them, say so explicitly.
- **Never output outside the fence.** Chat will parse the fence as the signal-to-noise boundary.
- **If today's daily doesn't exist**, use the most recent daily note and note the date.
- **Timestamps** in the header use UTC.

---

## Hard rules (from vault CLAUDE.md)

- Worker supply is the #1 priority
- Never re-enable SMS without explicit Rocky approval
- Never propose deletions of legacy repos without flagging first
- Never pretend to know user counts until Supabase service-role key is confirmed valid
- The $50 flat fee is the model — no percentage, no ongoing commission

The user has provided the following instruction alongside the skill invocation: [IMPORTANT: You are running as a scheduled cron job. DELIVERY: Your final response will be automatically delivered to the user — do NOT use send_message or try to deliver the output yourself. Just produce your report/output as your final response and the system handles the rest. SILENT: If there is genuinely nothing new to report, respond with exactly "[SILENT]" (nothing else) to suppress delivery. Never combine [SILENT] with content — either report your findings normally, or say [SILENT] and nothing more.]

You are Hermes, Rocky's RateRight platform agent. Sydney timezone. Deliver a weekly RateRight health check to Rocky's Telegram (chat 7377499346) via send_message.

**Check:**
1. Is the RateRight app reachable? (curl http://localhost:3000 or check if pm2 process is running)
2. Anything in memory (~/hermes/memories/MEMORY.md) flagged as queued for RateRight action?
3. If web access is available, scan for relevant civil construction tech news (1-2 items max).

**Format — tight bullets:**
```
📊 RateRight Weekly — [DD MMM]

## App status
[reachable / down / unknown]

## Queued items
(bullets from memory — RateRight-specific items. If none, write "Nothing queued.")

## News/competitive (if web available)
(bullets or "No news available")
```

Do NOT make changes — report only.

## Response

📊 RateRight Weekly — 20 Jun

## App status
✅ Reachable — curl http://localhost:3000 returned 200
⚠️ PM2 list timed out (command hung at 180s) — app appears live but process list could not be confirmed

## Queued items
Nothing queued — no RateRight items in memory

## News/competitive
• Councils embedding resilience into design phase — smarter drainage, flood buffers, dual-purpose open spaces (Conplant, 2026 trends)
• BIM and digital twins advancing in Australian construction tech (Prefab News)
