Skip to content

Stack Overview

The whole personal infrastructure stack at a glance. Each box links to its detailed page.

High-level diagram

                           ┌─────────────────────────────────────┐
                           │          Casey (one user)           │
                           └─────────────────────────────────────┘
              ┌───────────────────────────┼─────────────────────────┐
              │                           │                         │
              ▼                           ▼                         ▼
       ┌─────────────┐            ┌─────────────┐          ┌─────────────────┐
       │   Telegram  │            │   Browser   │          │  Local terminal │
       │  otq_moonbot│            │             │          │                 │
       └──────┬──────┘            └──────┬──────┘          └────────┬────────┘
              │                          │                          │
              │ webhook                  │ HTTPS via                │ uv run / git
              │                          │ Cloudflare Tunnel        │ rclone / wrangler
              ▼                          │ + Access PIN             │
   ┌──────────────────┐                  ▼                          │
   │  Cloudflare      │           ┌──────────────┐                  │
   │  Worker          │           │  warehouse.  │                  │
   │  otq-checkin     │           │  caseymanos. │                  │
   │  (DO + R2 + cron)│           │  com         │                  │
   └────┬─────────┬───┘           │ → uvicorn    │                  │
        │         │               │   localhost  │                  │
        │         │               │   :8765      │                  │
        │         │               └──────┬───────┘                  │
        │         │                      │                          │
        │         │                      ▼                          ▼
        │         │              ┌────────────────────────────────────────┐
        │         └──── R2 ─────►│  ~/garmin-warehouse/                   │
        │                        │  ┌──────────────────────────────────┐  │
        │                        │  │ ingest → digests → findings → kb │  │
        │                        │  │ (8 layers, see ARCHITECTURE.md)  │  │
        │                        │  └──────────────────────────────────┘  │
        │                        │  ┌──────────────────────────────────┐  │
        │                        │  │ training data: GarminDB SQLite,  │  │
        │                        │  │ icu_activities.csv, completion_  │  │
        │                        │  │ log.jsonl, corrections.jsonl     │  │
        │                        │  └──────────────────────────────────┘  │
        │                        └────────────────┬───────────────────────┘
        │                                         │
        │                                         │ podcast feeds
        │                                         ▼
        │                        ┌──────────────────────────────────┐
        │                        │  ~/data-ingestion/               │
        │                        │  triage → Modal A10G transcribe  │
        │                        │  → Parallel API extract → kb     │
        │                        └──────────────────────────────────┘
   ┌──────────────┐    Telegram     ┌──────────────────┐    Resend     ┌──────────────────┐
   │  Notifications│  ◄───────────  │  daily_sync.sh   │  ──────────►  │ updates.         │
   │  (Telegram +  │                │  podcast-sync.sh │               │ caseymanos.com   │
   │   Resend)     │                │  ...             │               │ (email)          │
   └──────────────┘                └──────────────────┘               └──────────────────┘

Systems at a glance

System Lives at What it does
garmin-warehouse ~/garmin-warehouse/ Local pipeline: GarminDB → DuckDB + intervals.icu cache + kb. Training analytics + research corpus + UI + findings.
data-ingestion ~/data-ingestion/ Podcast pipeline: feed → triage → Modal transcribe → Parallel API claim extract → swap.py → digest. Feeds the kb.
otq-checkin-worker ~/garmin-warehouse/cloudflare/otq-checkin/ Cloudflare Worker. Two crons (8pm + 8:30am PDT) → Telegram messages. Webhook handles replies (check-in / corrections / Q&A / chat).
cloudflare-stack Cloudflare account a20a70bee90d635ffad79328f3edcd5f R2 bucket (warehouse backup), Tunnel (UI exposure), Access (PIN gate), 9 Workers, MCPs.
findash separate repo Personal finance dashboard. Convex + Next.js + YNAB. Out of scope here; see feedback_findash_deployment.

Data flow at a glance

Training side: 1. Garmin watch → Garmin Connect → GarminDB CLI → ~/HealthData/DBs/*.db 2. intervals.icu syncs from Garmin Connect → cached at ~/HealthData/icu_*.{csv,json} 3. daily_sync.sh (7am PDT, launchd) refreshes both, plus pulls Worker completion-log entries from R2, plus writes the Worker's R2 cache for tomorrow's morning summary 4. Casey's actions on top: completion log (strength/strides/sauna), corrections (interpretive overlay), watches/applied/dismissed (kb triage)

Research side: 1. Podcast RSS → data-ingestion ingests new eps → triage filters by relevance → Modal A10G transcribes → Parallel API extracts claims + resolves studies → episode raw.json → swap.py compiles digests → kb/load.py ingests into DuckDB → kb/embed.py adds Voyage embeddings 2. Casey's curation: findings/*.md (manual synthesis), kb/triage.py walks the application queue, watches.yaml drives auto-discovery

Bot side: 1. 8pm PDT: Worker checks intervals.icu for today's scheduled events, sends Telegram check-in for any not yet logged 2. 8:30am PDT: Worker reads R2 cache (yesterday.json + query_cache.json) built by 7am sync, sends training summary 3. Reply lands → webhook → Worker classifies (check-in answer / correction / question / chat) → routes appropriately

Where things break

See runbooks/. The big ones:

  • daily_sync GarminDB session expired → re-auth
  • intervals.icu API key 401 → regenerate
  • Voyage embedding quota → wait or upgrade
  • Cloudflare Worker deploy failed → wrangler login expired
  • R2 multipart upload SSL errors → rclone, not aws s3
  • Modal job stuck → check modal run output / quota

What's NOT here

  • Findings = training-knowledge synthesis. Lives in ~/garmin-warehouse/findings/. ~20 files; bloodwork, fueling, threshold productivity, etc.
  • Active workstream state = ~/garmin-warehouse/findings/_active.md, read by training-data-coach subagent on every session.
  • Training todos = ~/garmin-warehouse/findings/_todo.md, surfaced in the UI at /active.
  • Subagent definitions = ~/.claude/agents/{coach,librarian,conductor}.md. This repo has summaries in agents/ but the live files are the source of truth.