What Thermostat Is & What It Does
Thermostat uses a host of MCPs & Skills to help me organise my life better. It is connected to a bunch of underlying data sources including the MacBook (via MacOS MCP) giving access to calendar, notes, music, email etc, Open Wearables (that stores biometrics & nutrition), a bridge to connect with the Tuya ecosystem, Google Maps, Google AI Studio, Linear and a growing number of sources that helps the agent gather data & context.
Its primary interface is Slack, though I sometimes use it via the terminal.
- Ingests Telemetry: Continuously reads room sensors (temperature, humidity, air quality), wearable biometrics (sleep stages, resting heart rate, HRV), nutrition logs, local calendars, and system stats.
- Runs Scheduled Beats: Executes at fixed points throughout the day (07:30, 08:00, 12:30, 16:30, 19:30, 22:30) via a local cron engine.
- Reasons via Modular Skills: Evaluates data using 25+ markdown skill playbooks to formulate operational plans and exertion checks.
- Delivers Actionable Verdicts: Posts structured verdicts and daily briefs directly into Slack and updates Linear tickets without conversational fluff.
Operating Rules
The agent executes under five core operational rules:
1. Verdicts, Not Questions
GO · DRIFTED · ON-TRACK
Checkpoints end with an explicit verdict (GO, DRIFTED, ON-TRACK) and the reasoning attached. If data is missing or incomplete, it states UNVERIFIABLE. It never guesses or asks open-ended questions.
2. Delta-Only Reporting & Silence as Data
Silence Is Data
Checkpoints report only changes against the morning plan. Settled facts are not repeated. If nothing material has changed, the agent outputs "No delta — plan holds" or responds with [SILENT] to suppress notification noise.
3. Rolling Target Bands
7, 14, 30 & 180-Day TrendsEvaluates biometrics and habit consistency against multi-day rolling bands (sleep duration target envelopes, baseline RHR ranges, rolling HRV baselines) rather than overreacting to single-day variance.
4. Present, Don't Decide
Visible EvidenceThe agent presents decisions with all underlying evidence visible. The human retains final override authority.
5. Multi-Tier Freshness Verification
Tier 1 → Tier 2 → Tier 3Audits data freshness before making claims. For sleep data: checks Tier 1 (Finalized database event), falls back to Tier 2 (Raw active night Redis cache), and only marks Tier 3 (Pending sync) when no live records exist.
The 5 Scheduled Daily Beats
Thermostat runs five scheduled cron beats aligned with my day:
Executes via the daily-ai-brief MCP and Apple Podcasts store (MTLibrary.sqlite). It ingests newly dropped AI episodes, scans 22 technical engineering feeds, extracts arXiv breakthroughs and frontier lab model drops, and queues actionable takeaways for the morning brief.
Audits sleep data freshness → Evaluates 7-day recovery (HRV baselines, resting HR, workload ratio) → Checks yesterday's macro totals from PostgreSQL → Cross-checks calendar meetings and defends my 09:00–12:00 deep focus block → Outputs the day plan ticket to Linear and Slack.
Audits morning task progress against the plan, checks logged meals to date for protein pacing, triggers a quick camera alertness scan, and emits delta updates to the active day ticket.
Before I step out for a run or workout, it runs a 4-point gate to issue a binary GO / NO-GO verdict:
Reconciles workout data from wearable HR streams, calculates the remaining protein/macro target for dinner, and triggers local Tuya commands to start circadian lighting wind-down.
Closes daily records (training mileage, strength habit checks, nutrition balance, completed Linear tickets), updates rolling composite scores, and flags bedtime drift.
- Every 180 min · Host Watchdog: Checks Mac CPU load, memory pressure, swap %, disk headroom, and thermal state. Emits
[SILENT]when healthy. - Sunday 06:00 · Photo Purge: Automatically purges local visual scan receipts older than 30 days.
- Monday 09:30 · Weekly Retrospective: Audits cron reliability, runs automated LLM judge evaluations over past decisions, and patches skill prompts.
Workout & Physiology Tracking
Workout management in Thermostat is closed-loop: it determines if and how hard I should train, passively reconstructs exercise mechanics from biometric streams, captures subjective effort, and reconciles metabolic load into the evening meal target.
1. The 16:30 Pre-Exertion Decision Gate
Binary GO / NO-GO
Instead of following a rigid static calendar, workouts are dynamically cleared 30 minutes before departure. The thermostat-coach skill executes a 4-point gate:
Compares last night's HRV peak against the 7-day rolling envelope. If HRV dropped > 15% and resting HR nadir occurred late (> 04:30), intensity is automatically downgraded from threshold intervals to Zone 2 base.
Polls the 17:00–19:00 feels-like temperature window, solar UV index, and AQI. If outdoor air quality exceeds threshold, it routes the workout indoors.
Cross-checks EventKit calendar via macos-mcp. Guarantees a minimum 90-minute block free of calls and travel transitions.
Audits lunch protein and carb intake from Open Wearables to ensure adequate glycogen availability before high-exertion sessions.
2. Passive Heart Rate & Zone Reconstruction
reconstruct-run-from-hr
When a workout finishes, the agent reads continuous second-by-second heart rate streams from the Open Wearables database:
- Zone Distribution: Calculates time spent in Zone 1 (Recovery), Zone 2 (Aerobic Base), Zone 3 (Tempo), Zone 4 (Threshold), and Zone 5 (Anaerobic).
- Cardiac Drift & Aerobic Decoupling: Compares heart rate kinetics against pace to detect cardiovascular fatigue or dehydration across long runs.
- Recovery Heart Rate (HRR): Measures heart rate drop at 1-minute and 2-minute marks post-exertion to score acute autonomic tone.
3. Human Ground Truth & Qualitative RPE
run-feedback-analysis · biome.db
Biometrics only tell half the story. Whenever I drop a short note into Slack (e.g. "Ran 8.4km in 46m, felt smooth on climbs, slight right calf tightness, RPE 6"), the run-feedback-analysis skill parses it:
4. 19:30 Post-Exertion Reconciliation
Metabolic BalancingActive workout calories are factored into Total Daily Energy Expenditure (TDEE). The agent calculates the remaining protein and carbohydrate requirements for the day, outputting the exact dinner target in Slack before closing the training ticket on Linear.
The Nutrition & Meal Ingestion Pipeline
Nutrition runs through an automated pipeline that turns photos or plain-text meal notes into structured macronutrient records.
1. Ingestion Flow (food-log Skill)
When I drop a meal photo or food description into Slack, the agent processes it:
- Vision API Delegation: The core text agent downscales photos via
sipsand calls Google AI Studio's vision model to extract plate items and estimate quantities. - Conservative Estimation: Portions default to conservative estimates to avoid camera-angle inflation. If I provide explicit portions (grams, spoon counts), they serve as absolute ground truth.
- Unified Item Set: Combines detected image items with any typed notes (
Image Contents ∪ User Text). - Historical Twin Matching: If external APIs are unavailable, it matches dishes against historical logs in the database.
2. Daily Macro Gating
Macro numbers feed directly into the daily operational loops:
Compares cumulative daily protein against workout targets to check remaining dinner requirements.
Recalculates post-workout deficit and outputs the target for the day's final meal.
3. Nutrition Data Stores
Nutrition data is persisted across two dedicated local database stores:
meal_log & data_point_series)Maintained in Open Wearables. Stores structured plate items, meal type (breakfast, lunch, dinner, snack), exact ingestion timestamp, and computed macronutrient breakdowns: total calories, protein, carbohydrates, fats, and dietary fiber.
meal_feedback)Captures post-meal qualitative signals: satisfaction rating (1–5), subjective satiety (light, full, stuffed), and subsequent energy levels (energetic vs sluggish) to calibrate future portion estimation models.
The Daily Scoreboard & Execution Dashboard
At 22:30 each night, the agent closes the daily ledger, writes performance metrics to composite_scores in SQLite, and computes multi-day rolling adherence bands:
Personal Operating Ledger
Hermes v2.4Continuous execution tracking across 5 daily beats and 4 operational domains.
48.2 km weekly running volume · 3/3 Strength sessions · 0 pre-exertion gate violations.
7h 48m avg sleep duration · RHR nadir 47 bpm at 03:45 · HRV +8% vs 30-day baseline.
165g daily protein floor maintained · 100% meal photos logged · 0 late-night deficit spikes.
09:00–12:00 calendar blocks defended · 0 meeting collisions · Daily Linear issues closed.
Sensor Inventory & The Context Platter
Data from different systems flow differently. Some (like weather, environment) fire as a MacOS cronjob and deterministically write data to a local database. Some others like measuring calories from the photo of a meal fire on demand only when an image is posted on Slack. The system then computes all the data including rolling averages, and builds a consolidated current_context.json snapshot:
┌────────────────────────────────────────────────────────────────────────┐
│ DATA PLATTER SOURCES │
│ PostgreSQL (Wearables & Meals) · SQLite (Biome) · Apple MTLibrary │
│ IoT Room Telemetry · Hyperlocal Weather API · EventKit Calendar │
└──────────────────────────────────┬─────────────────────────────────────┘
│ Ingestion Daemon (every 15 min)
▼
┌────────────────────────────────────────────────────────────────────────┐
│ UNIFIED CONTEXT SNAPSHOT │
│ `~/.hermes/data/current_context.json` │
│ - Indoor Telemetry & Heat Index - 7d/14d/30d/180d HRV Trajectories │
│ - 3-Hour Climate Forecasts & AQI - Sleep Architecture & RHR Nadir │
│ - Cumulative Daily Macros - Calendar Clusters & Travel State │
└──────────────────────────────────┬─────────────────────────────────────┘
│ Injected directly into agent prompt
▼
┌────────────────────────────────────────────────────────────────────────┐
│ AUTONOMOUS OODA BEATS │
│ Agent reasons over full context state at once │
└────────────────────────────────────────────────────────────────────────┘
1. The Desk / Room IoT Board
Sampled every 30 mins2. Outdoor Weather & Climate
Continuous polling3. Biological Wearables (Open Wearables)
PostgreSQL & Redis Tiers4. Visual Telemetry & Camera Receipts
Built-in FaceTime HD Camera
Runs via a deterministic capture script: captures frame from camera → verifies file size (≥15KB) and JPEG header (ffd8ff) → generates SHA-256 capture receipt → extracts fatigue indicators (dark circles, hydration, alertness) → archives to disk with a 30-day retention purge.
The Modular Skillpack Catalog
Agent capabilities in Hermes are structured as modular Markdown skill files. Each skill contains exact execution rules, prompt templates, and data schemas:
A. Rhythm, Persona & Daily Loops
Defines the core persona, tone laws, and OODA loop governance.
Parses the 15-min context platter and computes rolling 7d/14d/30d trend lines.
Executes the 08:00 recovery evaluation and drafts the day's operating plan.
Runs the 22:30 scorecard close and audits plan vs actual execution.
Deterministic mechanical recipe for closing tickets and recording scores.
Calculates monthly composite scores across training, recovery, and deep work.
Standardized verdict-first formatter for all Slack notifications.
Manages monthly plan tickets and daily sub-issue lifecycles in Linear.
Generates monthly business review summaries across all personal systems.
B. Biometrics, Nutrition & Pipelines
Processes meal photos and descriptions into calories and macros via vision API.
Enforces cache tiering (Postgres → Redis → Pending) and freshness audits.
Read-only queries to Open Wearables database for raw biometric series.
Reconstructs workout distance, pace, and zones from raw HR streams.
Detects and reconstructs afternoon rest sessions triggered by human notes.
Extracts qualitative training feedback (perceived exertion, fatigue markers).
Calculates total daily energy expenditure combining BMR and active burn.
Captures camera receipts and analyzes facial fatigue and hydration cues.
C. Smart Home & Environment
Calculates color temperature and lux curves matching time of day.
LAN-only smart home drivers for bulbs and sockets without cloud latency.
Direct CLI interface for local socket communication to Tuya hardware.
Direct local Philips Hue bridge integration for desk and room lighting.
D. Operations, Learning & Continuous Feedback
Ingests Apple Podcasts, frontier lab updates, model drops, and arXiv breakthroughs via
daily-ai-brief MCP.
Restructures day calendar around commute times and live traffic.
Monday morning retrospective auditing cron execution and decision drift.
Health registry and watchdog for scheduled Hermes background crons.
Automated LLM-as-a-judge scoring of decision traces in Langfuse.
Security standards: zero tokens in plaintext, reversible actions only.
Tools, MCPs & Actuators
Thermostat connects to macOS, external services, and hardware actuators through open Model Context Protocol (MCP) servers and deterministic CLI tools:
40 tools that give AI agents hands on your Mac: reads and schedules Calendar events (via EventKit), manages Apple Reminders and Apple Notes, controls Apple Music playback, captures FaceTime camera snapshots, checks Mail, and monitors Mac health (CPU load, memory pressure, battery, and thermal state) over local stdio with zero cloud latency.
Pulls overnight intelligence across frontier lab releases, newly dropped AI podcast episodes, open-source model drops, and breakthrough arXiv papers into structured briefing payloads for the 07:30 learning beat.
Searches PubMed, arXiv, and Crossref to ground physiology, recovery, and training queries in peer-reviewed scientific literature rather than training-set approximations.
linear-mcp)Reads active monthly plan tickets, creates daily sub-issues, posts continuity comments, and closes tickets with root-cause notes.
Direct local socket communication to Tuya smart bulbs, IR blasters, and Philips Hue bridges. Executes circadian color temperature curves with zero cloud latency.
Deterministic & LLM-as-a-Judge Evals
To keep Thermostat reliable without human micromanagement, every skill run and daily beat is audited through a two-layer evaluation architecture:
1. Real-Time Deterministic Assertions (Zero-Token Guards)
Synchronous GuardrailsFast programmatic checks validate outputs before notifications are dispatched or tickets are updated:
- Freshness Bounds: Asserts that sleep/wearable timestamps are within 3 hours of execution. Rejects stale cache as
UNVERIFIABLE. - Camera Frame Integrity: Asserts file size is ≥ 15 KB with valid JPEG magic bytes (
ffd8ff) to prevent blank frame hallucination. - Strict Verdict Conformance: Validates that the agent returned an approved verdict enum (
GO,DRIFTED,ON-TRACK,UNVERIFIABLE) and refused open-ended questions. - Delta-Only Enforcement: Verifies that if no parameters drifted against the 08:00 plan, the agent emitted
[SILENT]or"No delta — plan holds".
2. LLM-as-a-Judge Trace Scoring (Langfuse)
Asynchronous Trace EvalsAll agent runs, tool calls, and Slack conversational traces stream directly into Langfuse. During the Monday 09:30 Retrospective, an automated judge model scores decision traces across four rubrics:
Verifies that every cited number (HRV, RHR nadir, protein grams, temperature) maps exactly to the frozen current_context.json snapshot.
Penalizes motivational lecturing, unsolicited life advice, or fluff. Enforces a crisp, objective builder voice.
Audits whether the 4-input pre-exertion gate correctly evaluated calendar, HRV baselines, climate AQI, and fuel floors before issuing a GO verdict.
Confirms that all executed tool actions (Linear updates, Tuya light adjustments) stayed strictly within reversible bounds without destructive side effects.
Langfuse Reliability & Quality Metrics
Real-time telemetry and weekly judge evaluations across 1,400+ trace runs.
Local Data Stores & Persistence
Thermostat relies on structured local databases (SQLite and PostgreSQL) rather than ephemeral prompt memory. Every observation, decision trace, and human override is recorded into dedicated tables:
1. Sensory & Weather Time-Series (telemetry_observations)
SQLite · telemetry.db
What it captures: Continuous time-series readings from room IoT boards (indoor temperature, relative humidity, VOC air quality, ambient lux, acoustic noise in dB, barometric pressure) paired with outdoor climate readings (ambient temp, feels-like heat index, UV index, wind velocity, multi-pollutant AQI, and 3-hour precipitation probability).
Why it stores it: Enables 60-minute rolling rate-of-change velocity calculations to catch sudden heat spikes or deteriorating indoor air quality before focus sessions or workouts begin.
2. Autonomous Decision Ledger (agent_decisions)
SQLite · ledger.db
What it captures: A complete immutable audit log for every scheduled beat (08:00 morning brief, 16:30 exertion gate, 22:30 ledger close). Each record stores the full frozen JSON snapshot of biometrics, schedule, and environment at that second, alongside the agent's synthesized step-by-step reasoning chain, the final verdict (GO, DRIFTED, ON-TRACK, UNVERIFIABLE), and emitted actuator payloads.
Why it stores it: Powers the Monday morning retrospective, enabling automated LLM-as-a-judge evals to inspect why a specific recommendation was made without relying on vague memory.
3. Ground-Truth & Human Override Store (human_feedback & meal_feedback)
SQLite · biome.db
What it captures: Direct human notes (e.g. typed meal corrections, manual nap notes, workout logs) alongside subjective ratings (1–5 scale), Rate of Perceived Exertion (RPE 1–10), and post-meal energy states (energetic vs sluggish).
Why it stores it: Serves as absolute ground truth. Whenever automated sensor models or vision estimations conflict with direct human entries, the human feedback record takes priority.
4. Monthly Composite Execution Scorecard (composite_scores)
SQLite · ledger.db
What it captures: Daily rolled-up performance metrics spanning workout volume vs weekly plan, strength habit adherence, sleep duration compliance against baseline envelopes, nutrition balance, and deep focus blocks defended.
Why it stores it: Computes 7-day, 14-day, 30-day, and 180-day rolling trend lines so the agent evaluates consistency against long-term envelopes rather than overreacting to single-day variance.
5. Biological Wearables & Podcasting Stores
PostgreSQL & Apple SQLite
What it captures: Open Wearables' PostgreSQL tables (meal_log and data_point_series for sleep stages, resting HR nadir, continuous HRV, and exercise heart rate) and macOS native Apple Podcasts database (MTLibrary.sqlite for newly downloaded episodes and played timestamps).
Why it stores it: Provides raw biometric and audio intelligence pipelines that feed the 15-minute context platter aggregator.
Open-Sourcing the Skills
The core capabilities of Thermostat are organized as open Markdown skills, deterministic context collector scripts, local relational schemas, and standard MCP tool servers.
The entire collection of Hermes skillpacks, schema migrations, and tool integrations is being prepared for open-source release on GitHub.