Skip to content
rbsolutions.works
methodology / how it works

The pipeline is the product.

Workflows describe intent. Tools execute. Agents make judgment calls. Every run writes a trace you can query.

architecture.txt WAT framework · rbsolutions

  ┌──────────────────────────────────────────────────────────────────┐
  │  SOURCES                                                         │
  │   Apollo · Google Maps · Shopify · Amazon · Lazada/Shopee · web  │
  └───────────────────────────┬──────────────────────────────────────┘
                              │  Playwright (tools/scrape_*.py)
                              ▼
  ┌──────────────────────────────────────────────────────────────────┐
  │  ENRICH                                                          │
  │   Hunter (pattern) → MillionVerifier (SMTP)  →  Postgres         │
  └───────────────────────────┬──────────────────────────────────────┘
                              │
                              ▼
  ┌──────────────────────────────────────────────────────────────────┐
  │  AI LAYER                                                        │
  │   Haiku 4.5  →  personalized openers                             │
  │   Sonnet 4.6 →  research reports, proposals, case studies        │
  └───────────────────────────┬──────────────────────────────────────┘
                              │
                              ▼
  ┌──────────────────────────────────────────────────────────────────┐
  │  DELIVERY                                                        │
  │   Gmail (≤40/inbox/day)  ·  R2 signed URLs  ·  Google Sheets     │
  │   Reply classifier  →  Calendly sweeper  →  Morning digest       │
  └───────────────────────────┬──────────────────────────────────────┘
                              │
                              ▼
  ┌──────────────────────────────────────────────────────────────────┐
  │  OBSERVABILITY                                                   │
  │   Healthchecks.io  ·  Loguru → logs table  ·  Telegram alerts    │
  └──────────────────────────────────────────────────────────────────┘

  orchestration: APScheduler (Docker)
  ops console:   Streamlit (11 pages) · Metabase · pgAdmin
  tunnel:        Cloudflared → rbsolutions.works
framework

WAT — Workflows, Agents, Tools.

LLM accuracy compounds downward on multi-step tasks. If each step is 90% right, a 5-step pipeline is 59% right. The fix is to put probabilistic reasoning on Agents only, and ship every execution step as deterministic Python.

  • 01 · Workflows
    Markdown SOPs with objective, inputs, tools, outputs, edge cases. Plain language.
  • 02 · Agents
    Claude reads the workflow, runs the tools in order, handles failures, asks for clarification.
  • 03 · Tools
    Python scripts with CLIs. Consistent. Testable. Fast. API keys in .env.
tree · text
.
├── workflows/              # Plain-language SOPs
│   ├── 01_master_pipeline.md
│   ├── 09_deliver_scrape_job.md
│   ├── 13_product_research.md
│   └── ...
├── tools/                  # Deterministic Python scripts
│   ├── scrape_apollo.py
│   ├── enrich_email.py
│   ├── personalize_opener.py
│   ├── send_gmail.py
│   ├── classify_reply.py
│   └── ...
├── db/                     # Postgres schema + migrations
├── infra/                  # docker-compose + cloudflared + pgadmin
└── ops_console/            # Streamlit (11 pages) for manual runs
observability

Every run has a trace.

Loguru routes every log line to Postgres with a bound trace_id. Any failure is reconstructable down to the step. Healthchecks.io watches cron heartbeats; Telegram alerts on incidents.

  • Postgres logs table with trace IDs
  • Healthchecks.io heartbeats per cron
  • Telegram + email incident alerts
  • Metabase dashboards for ops review
rb@ops ~ /generate_income
$ python -m tools.scrape_apollo --icp saas_ops --trace $(uuidgen)
· → trace_id=3fb2c1... — 487 rows written
$ psql -c "select ts, msg from logs where trace_id='3fb2c1...' order by ts;"
· 2026-04-19 02:14:01 scrape_apollo.start icp=saas_ops
· 2026-04-19 02:14:28 scrape_apollo.page page=1 rows=25
· 2026-04-19 02:19:50 scrape_apollo.done total=487 dedupe=312
· ✓ every run reconstructable from trace_id
ai layer

Claude 4 models, scoped by task.

Haiku 4.5

Fast, grounded writing

Personalized openers, reply categorization, short drafts. Every output is cross-checked against the source signal — no hallucinated facts about the prospect.

Sonnet 4.6

Longer reasoning + drafting

Research report structure, proposal writing, case-study drafts, reply classification with reasoning. All outputs are human-reviewed before send or delivery.

boundaries

What the pipeline does not do.