① Data Sources
🏃
Strava
2,796 activities since 2009
GPS, pace, HR, power, streams
OAuth 2.0
Garmin Connect
5,192 daily records (2019–now)
HRV, stress, steps, sleep, RHR
Email + Password
⚖️
Withings
1,054 body measurements
Weight, fat%, SpO2, sleep stages
OAuth 2.0 1h token
💳
QuickBooks Personal
Personal P&L, balance sheet
Monthly + annual history
OAuth 2.0
QuickBooks Church
EEC P&L, 13 years history
Expenses, payroll, donations
OAuth 2.0
👥
ChurchSuite
Events, contacts, groups
Giving, attendance, rotas
JWT Bearer Auto-reauth
📅
Apple Calendar
Home, Family, Steve, Work
4-week horizon, reminders
CalDAV
🏫
School Portal
MVPA + MRA term dates
Communications, events
Portal Scrape
❤️
Apple Health
Steps, HRV, workouts
Exported from iPhone XML
Manual Export
② Pull & Auth
run_all_pulls.command
Master orchestrator
Runs all 8 pull scripts sequentially
Soft-fails on auth errors
launchd 8×/day
Auth Layer
tokens.json per source
OAuth refresh tokens
App-specific passwords
Auto-reauth via Chrome
(ChurchSuite AppleScript)
Isolated per source
Resilience Rules
Cache <24h → skip pull
Withings 1h token → refresh
ChurchSuite JWT → auto-click
QB expired → log & continue
Garmin SSO → re-login
Soft-fail safe
config.json
Per-source credentials
Shared Anthropic API key
Email passwords (SMTP)
Athlete profile + race info
🔒 Sensitive
③ Raw Data Cache
sources/strava/data/
strava_activities.csv
streams/ (per-activity)
streams_analysis.json
2,796 activities
sources/garmin/data/
garmin_daily.csv
garmin_activities.csv
daily_detail/*.json (raw)
5,192 days
sources/withings/data/
withings_body.csv
withings_sleep.csv
1,054 body rows
sources/quickbooks/
accounts/personal/data/
accounts/church/data/
quickbooks.json, historical.json
pl-multiyear.json
2 accounts
sources/churchsuite/data/
churchsuite.json
churchsuite-events.json
churchsuite-contacts.json
Events + contacts
sources/apple/data/
apple-calendar.json
apple-reminders.json
4 calendars
sources/school/data/
term-dates.json
school-comms-cache.json
MVPA + MRA
④ Context Generation
generate_context.py
Main ETL script
Reads all source caches
Transforms to clean markdown
+ summary CSVs per domain
5 domains
context/finance/
Personal P&L, balance sheet
Monthly + annual history
finance-monthly.md (25 months)
context/health/
health-summary.md
garmin-daily.csv mirror
Withings body + sleep
context/running/
Activity history CSVs
Strava + Garmin merged
3,542+ total runs (2010–now)
context/church/
Events + contacts
finance-monthly.md
finance-pl-history.md (2013+)
context/life/
Calendar events
School term dates
Reminders + tasks
sync_claude_projects.py
Uploads context/ to
Claude.ai projects
via browser auth cookie
Claude.ai
⑤ Intelligence
🏃
Running Coach Agent
Weekly RAG status (Red/Amber/Green)
vs Nice 100M targets (Sept 2026)
AI analysis of each new run
Strava + Garmin merged view
Mon 7am claude-sonnet-4-6
🏠
Family Briefing
Calendar + school term analysis
Weekly family briefing
4-week horizon + nudges
Sun 7pm claude-sonnet-4-6
📱
iMessage Monitor
Polls iMessages every 15 min
Reads context files for answers
Replies via iMessage (SMS-friendly)
Every 15m Claude Sessions
🔧
Auto-fix Agent
Monitors job_history.json
Auto-patches Python bugs
Reports auth failures
Post each run Claude Sessions
📖
Preaching Insights
Change detection on sermon files
AI coaching on latest sermon
Only triggers on new sermon
On change claude-haiku-4-5
HTML Dashboards
generate_vitals_dashboard.py
generate_running_dashboard.py
generate_family_dashboard.py
generate_architecture.py
Chart.js 4.4.1 (CDN)
reports/
⑥ Outputs
☁️
Cloudflare Workers
sc-dashboards.pages.dev
east-end-church.pages.dev
wrangler deploy · auto at end
of each pipeline run
Auto-deploy 8× daily
📧
Running Coach Email
Weekly RAG training digest
KM, elevation, zone splits
AI coaching commentary
Steve only Mon 7am
📧
Family Briefing Email
Weekly Sunday briefing
Saved to logs/archive/
(last 12 briefings)
Steve only Sun 7pm
📊
Interactive Dashboards
vitals-dashboard.html
running-dashboard.html
family/index.html
system-architecture.html
Cloudflare live
🤖
Claude.ai Projects
context/ synced to projects
Always-fresh data in
Claude conversations
5 projects
📋
Pipeline Report
check_context.py validates
job_history.json (30 runs)
sync-report.pdf (5 runs)
auth_status.txt flags
Auto-verify
pull cache ETL AI deploy

🔄 Pipeline Flow Diagram

Left-to-right data journey — from raw sources through to live Cloudflare-deployed dashboards.
Highlighting all intelligence touchpoints: Claude.ai project sync, Anthropic API agents, and Claude scheduled sessions.

① Data Sources
🏃 Strava
2,796 activities
GPS + streams
OAuth 2.0
⌚ Garmin
5,192 daily records
HRV, sleep, steps
Email/Pass
⚖️ Withings
1,054 body rows
2,126 sleep records
OAuth 2.0
💳 QuickBooks ×2
Personal + Church
P&L, balance sheet
OAuth 2.0
👥 ChurchSuite
Events, contacts
Groups, giving
JWT Bearer
📅 Apple Calendar
4 calendars
4-week horizon
CalDAV
🏫 School Portal
MVPA + MRA
Term dates
Scrape
② Auth Layer
OAuth 2.0
Strava, Withings,
QuickBooks (×2)
Auto-refresh token
tokens.json
JWT Bearer
ChurchSuite
Hourly expiry
AppleScript reauth
Auto-click
Email + Password
Garmin Connect
Full SSO each run
garminconnect lib
Re-login
CalDAV
Apple Calendar
App-specific password
Stable session
Cached
Resilience
Cache <24h → skip
Auth fail → log + continue
Soft-fail on all sources
No crashes
③ Pull Scripts
run_all_pulls.command
Orchestrator
8× daily via launchd
Sequential
strava_pull.py
Incremental
New activities only
garmin_pull.py
Last 30 days
+ raw JSON detail
withings_pull.py
Last 365 days
Date-keyed merge
quickbooks_pull.py
Personal + Church
P&L + balance
churchsuite_pull.py
Events, contacts
Groups + giving
apple_pull.py
Calendar + Reminders
4-week window
④ Raw Layer
sources/*/data/
Per-source CSV + JSON
Date-keyed, append-only
Never deleted
Persistent
garmin_daily.csv
5,192 rows
HRV, sleep, steps, stress
Hill/endurance scores
strava-activities.csv
2,796 rows
GPS, pace, HR, power
withings_body.csv
1,054 rows
Weight, fat%, SpO2, BMI
withings_sleep.csv
2,126 rows
Stages, score, duration
QuickBooks JSON
quickbooks.json
historical.json
pl-multiyear.json
⑤ Enrichment
generate_context.py
Main ETL
5 domain pipelines
Markdown summaries
Core ETL
context/health/
health-summary.md
Trends, averages
Sleep, HRV, weight
context/running/
running-summary.md
Weekly/monthly stats
Race target tracking
context/church/
church-summary.md
Events, giving
Finance history
context/life/
calendar-upcoming.md
school.md
reminders.md
context/finance/
finance-monthly.md
25-month P&L history
⑥A Claude.ai Projects
sync_claude_projects.py
Uploads context/ to
5 Claude.ai projects
via browser cookie
Browser auth
Chat Intelligence
Always-fresh context
for Claude conversations
Health · Running · Church
Manual use
⑥B Anthropic API
🏃 Running Coach
claude-sonnet-4-6
Mon 7am · Weekly email
Direct API
🏠 Family Briefing
claude-sonnet-4-6
Sun 7pm · Weekly email
Direct API
📖 Preaching Insights
claude-haiku-4-5
On sermon change
Direct API
⑥C Claude Sessions
📱 iMessage Monitor
Every 15 min
Reads context files
Replies via iMessage
Scheduled
🔧 Auto-fix Agent
Post each pipeline run
Patches Python bugs
Reports auth failures
Post-run
⑦ HTML Generation
run_and_export.command
Calls all generators
Sequential pipeline
Orchestrator
generate_vitals_dashboard.py
Health + body metrics
Chart.js 4.4.1
~1MB self-contained
generate_running_dashboard.py
Training dashboard
Race target tracking
generate_family_dashboard.py
Family Life HQ
Calendar + school
generate_architecture.py
This page
Live stats embedded
Self-updating
⑧ Cloudflare Deploy
wrangler deploy
Auto at end of
every pipeline run
8× daily
Auto
sc-dashboards
Health, Running
Family, Architecture
Pages
east-end-church
Church dashboard
Finance + events
Pages
Live URLs
sc-dashboards.pages.dev
east-end-church.pages.dev
HTTPS

🤖 Intelligence Layer — Three Modes

☁️ Mode A — Claude.ai Projects
Conversational Intelligence
Context files synced to Claude.ai via browser cookie auth. Always-fresh data available in any manual conversation. 5 projects: Health, Running, Church, Finance, Life.
sync_claude_projects.py Browser session required
⚡ Mode B — Anthropic API (Direct)
Scheduled AI Agents
Direct API calls using config.json key. Three active agents: Running Coach (claude-sonnet-4-6, Mon 7am), Family Briefing (claude-sonnet-4-6, Sun 7pm), Preaching Insights (claude-haiku-4-5, on change).
claude-sonnet-4-6 claude-haiku-4-5
🔄 Mode C — Claude Sessions
Autonomous Scheduled Tasks
Claude desktop app scheduled tasks. iMessage Monitor reads iMessages, checks context files, replies via iMessage (every 15 min). Auto-fix Agent monitors pipeline health and patches code bugs (post each run).
SKILL.md driven launchd/cron scheduled

☁️ Cloudflare Deployment

sc-dashboards
sc-dashboards.pages.dev
Personal dashboards. Health/vitals, running, family life, system architecture. Deployed from reports/sc-dashboards/
8× Daily Auto-deploy
east-end-church
east-end-church.pages.dev
Church dashboard. Finance, events, contacts. Deployed from reports/east-end-church/
8× Daily Auto-deploy
Deploy Process
wrangler pages deploy
Called at end of run_and_export.command. Uses wrangler CLI with Cloudflare API token. Zero-downtime atomic deploys.
Auto

⏰ Automated Scheduling

8× Daily
Full Data Sync
6am · 8am · 10am · 12pm · 3pm · 8pm · 9pm · 11pm
Pulls all 9 sources → context → dashboards → Claude sync → verify → Cloudflare deploy
launchd (macOS)
Monday 7am
Running Coach Digest
Strava incremental pull → streams analysis → claude-sonnet-4-6 run analysis (new only) → weekly email digest with RAG status vs Nice 100M targets
launchd (macOS)
Sunday 7pm
Family Briefing
CalDAV pull (4 calendars) → school term scrape → claude-sonnet-4-6 briefing generation → HTML email with week ahead + 4-week horizon
cron
Every 15 min
iMessage Monitor
Polls iMessages from self → filters new instructions → reads relevant context files → sends concise reply via iMessage (SMS-friendly, <250 words)
Claude Scheduled Task

🔐 Authentication Methods

Strava OAuth 2.0 refresh token · tokens.json Auto-refresh
Garmin Email + password · new SSO each pull Re-login each time
Withings OAuth 2.0 · 1h token expiry Auto-refresh
QuickBooks (×2) Intuit OAuth · tokens.json per account Auto-refresh
ChurchSuite JWT Bearer · expires hourly AppleScript re-auth
Apple Calendar CalDAV with app-specific password Stable
Apple Health Manual XML export from iPhone Manual step
School Portal Progress Teaching credentials Cookie cache

📦 Key Dependencies & Tools

Anthropic API claude-haiku-4-5 · claude-sonnet-4-6 3 agents
Claude Sessions iMessage Monitor · Auto-fix Agent 2 tasks
Chart.js 4.4.1 cdnjs.cloudflare.com · CDN All dashboards
Cloudflare Workers wrangler CLI · Pages deploy 2 sites live
iCloud SMTP smtp.mail.me.com:587 · app password All email agents
launchd (macOS) com.stephencoster.datasync plist 8× daily trigger
Python 3.x All scripts · no venv required System Python
Chrome + AppleScript ChurchSuite token refresh · session req. Needs active session
Steve Coster Personal Intelligence System · East End Church, East London · Data sources: Strava (2,796 activities), Garmin (5,192 days), Withings (1,054 measurements), QuickBooks (×2), ChurchSuite, Apple Calendar, School Portal · AI: Anthropic Claude (API + Projects + Sessions) · Cloudflare Workers · Generated 2026-03-19 23:02 · Auto-updated 8× daily