---
layout: "article.njk"
title: "Thermostat: How My Personal Assistant Agent Works"
description: "A Hermes-based personal assistant optimizing productivity and wellbeing across 5 daily beats, biometric telemetry, IoT climate sensing, deterministic guardrails, and Langfuse evals."
date: "2026-08-01"
tags: [thermostat, ai-agents, hermes, mcp, biometrics, langfuse, automation]
featured: true
permalink: "/articles/how-thermostat-works/"
eleventyExcludeFromCollections: false
published: true
---

Thermostat is an autonomous personal assistant agent running locally on macOS. Built on Nous Research's **Hermes Agent framework**, it executes 5 scheduled daily beats, maintains multi-sensor telemetry across biometrics, calendar, and room climate, enforces deterministic zero-token guardrails, and audits performance via Langfuse.

<nav class="p-5 bg-[#F7F2E7] border border-offblack/10 rounded-lg my-8 text-xs font-mono">
  <div class="font-bold text-offblack uppercase tracking-widest mb-3 text-[11px] text-rust">System Architecture Index</div>
  <div class="grid grid-cols-1 sm:grid-cols-2 gap-y-2 gap-x-6">
    <a href="#what-it-is" class="hover:text-rust transition-colors">01. What Thermostat Is &amp; Does</a>
    <a href="#operating-rules" class="hover:text-rust transition-colors">02. 5 Core Operating Rules</a>
    <a href="#the-loops" class="hover:text-rust transition-colors">03. The 5 Scheduled Daily Beats</a>
    <a href="#the-workouts" class="hover:text-rust transition-colors">04. Workout &amp; Physiology Tracking</a>
    <a href="#the-nutrition" class="hover:text-rust transition-colors">05. Nutrition &amp; Meal Pipeline</a>
    <a href="#the-scoreboard" class="hover:text-rust transition-colors">06. Daily Scoreboard &amp; Dashboard</a>
    <a href="#the-sensors" class="hover:text-rust transition-colors">07. Sensor Inventory &amp; Context Platter</a>
    <a href="#the-skills" class="hover:text-rust transition-colors">08. Modular Skillpack Catalog</a>
    <a href="#the-tools" class="hover:text-rust transition-colors">09. Tools, MCPs &amp; Actuators</a>
    <a href="#the-evals" class="hover:text-rust transition-colors">10. Deterministic &amp; LLM-as-a-Judge Evals</a>
    <a href="#the-data" class="hover:text-rust transition-colors">11. Local Persistence (SQLite &amp; PostgreSQL)</a>
    <a href="#open-sourcing" class="hover:text-rust transition-colors">12. Open-Sourcing the Skills</a>
  </div>
</nav>

---


<section id="what-it-is" class="space-y-5">
<div class="kicker">01 / Overview</div>

## What Thermostat Is & What It Does

Thermostat is a Hermes-based personal assistant optimizing productivity and wellbeing. Acting as a **chief of staff, learning advisor, running coach, nutritionist, travel planner, and MacOS mechanic**, it connects across physical hardware, biological telemetry, and digital workflows:

- **Calendar & Workspace:** Manages EventKit calendar focus blocks, Apple Notes, Reminders, and Linear monthly/daily plans.
- **Biometrics (HR, Sleep):** Ingests second-by-second workout heart rate streams, 7-day rolling HRV baselines, resting HR nadirs, and 3-tier sleep stage freshness via Open Wearables.
- **Workouts (Running, Strength):** Analyzes cardio kinetic load, cardiac drift, aerobic zones, and post-session heart rate recovery.
- **Visual Health Analysis (Fatigue, Dehydration):** Uses the built-in FaceTime HD camera for scheduled visual health & fatigue scans, and Gemini Flash to extract plate components, portions, and calories from meal photos dropped into Slack.
- **IoT Sensors (Temperature, Humidity, Luminosity, Sound):** Measures indoor room temperature, 60-min thermal velocity, relative humidity, calculated Heat Index, ambient light (Lux), and sound pressure levels (dB).
- **Smart Appliances (Lights, AC):** Controls room cooling via AC IR Blasters based on thermal drift, and automates Tuya Gateway smart lighting across high-focus reading presets and evening circadian warm-dim curves.
- **External APIs (Maps, Weather, Research):** Ingests hyperlocal Google Weather (17:00–19:00 window, feels-like temperature, UV, AQI), FlightAware live radar for real-time flight tracking, and arXiv/PubMed for scientific literature.
- **Weekly Self-Learning Loop:** Runs retrospectives analyzing deterministic assertions and LLM-as-a-judge decision traces in Langfuse once a week to continuously patch and improve its execution playbooks.
</section>

---

<section id="operating-rules" class="space-y-6">
<div class="kicker">02 / Rules of Execution</div>

## Operating Rules

The agent executes under five core operational rules:

<div class="space-y-4">
<div class="card p-5 space-y-1.5">
<div class="flex items-center justify-between">
<h3 class="text-sm font-bold text-[#111318] !mt-0">1. Verdicts, Not Questions</h3>
<span class="badge bg-[#ecece7] text-[#111318]">GO · DRIFTED · ON-TRACK</span>
</div>
<p class="text-xs text-[#5f6368] leading-relaxed !mb-0">
Checkpoints end with an explicit verdict (<code>GO</code>, <code>DRIFTED</code>, <code>ON-TRACK</code>) and the reasoning attached. If data is missing or incomplete, it states <code>UNVERIFIABLE</code>. It never guesses or asks open-ended questions.
</p>
</div>

<div class="card p-5 space-y-1.5">
<div class="flex items-center justify-between">
<h3 class="text-sm font-bold text-[#111318] !mt-0">2. Delta-Only Reporting &amp; Silence as Data</h3>
<span class="badge bg-[#ecece7] text-[#111318]">Silence Is Data</span>
</div>
<p class="text-xs text-[#5f6368] leading-relaxed !mb-0">
Checkpoints report only changes against the morning plan. Settled facts are not repeated. If nothing material has changed, the agent outputs <code>"No delta — plan holds"</code> or responds with <code>[SILENT]</code> to suppress notification noise.
</p>
</div>

<div class="card p-5 space-y-1.5">
<div class="flex items-center justify-between">
<h3 class="text-sm font-bold text-[#111318] !mt-0">3. Rolling Target Bands</h3>
<span class="badge bg-[#ecece7] text-[#111318]">7, 14, 30 &amp; 180-Day Trends</span>
</div>
<p class="text-xs text-[#5f6368] leading-relaxed !mb-0">
Evaluates 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.
</p>
</div>

<div class="card p-5 space-y-1.5">
<div class="flex items-center justify-between">
<h3 class="text-sm font-bold text-[#111318] !mt-0">4. Present, Don't Decide</h3>
<span class="badge bg-[#ecece7] text-[#111318]">Visible Evidence</span>
</div>
<p class="text-xs text-[#5f6368] leading-relaxed !mb-0">
The agent presents decisions with all underlying evidence visible. The human retains final override authority.
</p>
</div>

<div class="card p-5 space-y-1.5">
<div class="flex items-center justify-between">
<h3 class="text-sm font-bold text-[#111318] !mt-0">5. Multi-Tier Freshness Verification</h3>
<span class="badge bg-[#ecece7] text-[#111318]">Tier 1 → Tier 2 → Tier 3</span>
</div>
<p class="text-xs text-[#5f6368] leading-relaxed !mb-0">
Audits data freshness before making claims. For sleep data: checks <b>Tier 1 (Finalized database event)</b>, falls back to <b>Tier 2 (Raw active night Redis cache)</b>, and only marks <b>Tier 3 (Pending sync)</b> when no live records exist.
</p>
</div>
</div>
</section>

---

<section id="the-loops" class="space-y-6">
<div class="kicker">03 / Daily Operating Rhythm</div>

## The 5 Scheduled Daily Beats

Thermostat runs five scheduled cron beats aligned with my day:

<div class="space-y-6">
<div class="border-l-2 border-[#747982] pl-5 space-y-2">
<div class="flex items-center gap-2">
<span class="mono text-xs font-bold text-[#747982]">07:30</span>
<span class="font-bold text-sm">Daily Learning Summary</span>
</div>
<p class="text-xs text-[#5f6368] leading-relaxed">
Executes via the <code>daily-ai-brief</code> MCP and Apple Podcasts store (<code>MTLibrary.sqlite</code>). 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.
</p>
</div>

<div class="border-l-2 border-[#111318] pl-5 space-y-2">
<div class="flex items-center gap-2">
<span class="mono text-xs font-bold text-[#315cf5]">08:00</span>
<span class="font-bold text-sm">Morning Brief (The Day's Operating Plan)</span>
</div>
<p class="text-xs text-[#5f6368] leading-relaxed">
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.
</p>
</div>

<div class="border-l-2 border-[#747982] pl-5 space-y-2">
<div class="flex items-center gap-2">
<span class="mono text-xs font-bold text-[#747982]">12:30</span>
<span class="font-bold text-sm">Midday Checkpoint</span>
</div>
<p class="text-xs text-[#5f6368] leading-relaxed">
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.
</p>
</div>

<div class="border-l-2 border-[#315cf5] pl-5 space-y-2">
<div class="flex items-center gap-2">
<span class="mono text-xs font-bold text-[#315cf5]">16:30</span>
<span class="font-bold text-sm">Pre-Exertion Gate (4-Input Training Check)</span>
</div>
<p class="text-xs text-[#5f6368] leading-relaxed">
Before I step out for a run or workout, it runs a 4-point gate to issue a binary GO / NO-GO verdict:
</p>
<div class="bg-[#fbfbfa] p-3 rounded border border-[#e5e6e4] text-xs mono text-[#474b52] space-y-1">
<div>1. Calendar    → Is the evening free of conflicting meetings or travel?</div>
<div>2. Physiology  → Last night's HRV peak vs 7-night baseline &amp; resting HR nadir</div>
<div>3. Climate     → Hyperlocal weather feels-like temperature (17:00-19:00 window) &amp; AQI</div>
<div>4. Fuel Floor  → Protein intake to date (checking remaining dinner capacity)</div>
</div>
</div>

<div class="border-l-2 border-[#747982] pl-5 space-y-2">
<div class="flex items-center gap-2">
<span class="mono text-xs font-bold text-[#747982]">19:30</span>
<span class="font-bold text-sm">Post-Session Reconciliation &amp; Evening Transition</span>
</div>
<p class="text-xs text-[#5f6368] leading-relaxed">
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.
</p>
</div>

<div class="border-l-2 border-[#111318] pl-5 space-y-2">
<div class="flex items-center gap-2">
<span class="mono text-xs font-bold text-[#111318]">22:30</span>
<span class="font-bold text-sm">End-of-Day Look-Back (The Ledger Close)</span>
</div>
<p class="text-xs text-[#5f6368] leading-relaxed">
Closes daily records (training mileage, strength habit checks, nutrition balance, completed Linear tickets), updates rolling composite scores, and flags bedtime drift.
</p>
</div>

<div class="p-4 bg-[#fbfbfa] rounded border border-[#e5e6e4] space-y-2 text-xs">
<div class="font-bold text-[#111318]">Continuous Background Maintenance Tasks</div>
<ul class="space-y-1 text-[#5f6368] list-disc pl-4">
<li><b>Every 180 min · Host Watchdog:</b> Checks Mac CPU load, memory pressure, swap %, disk headroom, and thermal state. Emits <code>[SILENT]</code> when healthy.</li>
<li><b>Sunday 06:00 · Photo Purge:</b> Automatically purges local visual scan receipts older than 30 days.</li>
<li><b>Monday 09:30 · Weekly Retrospective:</b> Audits cron reliability, runs automated LLM judge evaluations over past decisions, and patches skill prompts.</li>
</ul>
</div>
</div>
</section>

---

<section id="the-workouts" class="space-y-6">
<div class="kicker">04 / Physiology &amp; Training</div>

## Workout &amp; 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.

<div class="space-y-4">
<div class="card p-5 space-y-3">
<div class="flex items-center justify-between border-b border-[#e5e6e4] pb-2">
<h3 class="text-sm font-bold text-[#111318] !mt-0">1. The 16:30 Pre-Exertion Decision Gate</h3>
<span class="badge bg-[#ecece7] text-[#111318]">Binary GO / NO-GO</span>
</div>
<p class="text-xs text-[#5f6368] leading-relaxed">
Instead of following a rigid static calendar, workouts are dynamically cleared 30 minutes before departure. The <code>thermostat-coach</code> skill executes a 4-point gate:
</p>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3 text-xs">
<div class="p-3 bg-[#fbfbfa] rounded border border-[#e5e6e4] space-y-1">
<b>1. Autonomic Recovery (HRV &amp; RHR)</b>
<p class="text-[#747982] leading-relaxed !mb-0">Compares last night's HRV peak against the 7-day rolling envelope. If HRV dropped &gt; 15% and resting HR nadir occurred late (&gt; 04:30), intensity is automatically downgraded from threshold intervals to Zone 2 base.</p>
</div>
<div class="p-3 bg-[#fbfbfa] rounded border border-[#e5e6e4] space-y-1">
<b>2. Hyperlocal Climate &amp; AQI</b>
<p class="text-[#747982] leading-relaxed !mb-0">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.</p>
</div>
<div class="p-3 bg-[#fbfbfa] rounded border border-[#e5e6e4] space-y-1">
<b>3. Schedule &amp; Travel Defense</b>
<p class="text-[#747982] leading-relaxed !mb-0">Cross-checks EventKit calendar via <code>macos-mcp</code>. Guarantees a minimum 90-minute block free of calls and travel transitions.</p>
</div>
<div class="p-3 bg-[#fbfbfa] rounded border border-[#e5e6e4] space-y-1">
<b>4. Fuel &amp; Energy Floor</b>
<p class="text-[#747982] leading-relaxed !mb-0">Audits lunch protein and carb intake from Open Wearables to ensure adequate glycogen availability before high-exertion sessions.</p>
</div>
</div>
</div>

<div class="card p-5 space-y-3">
<div class="flex items-center justify-between border-b border-[#e5e6e4] pb-2">
<h3 class="text-sm font-bold text-[#111318] !mt-0">2. Passive Heart Rate &amp; Zone Reconstruction</h3>
<span class="mono text-[11px] text-[#747982]"><code>reconstruct-run-from-hr</code></span>
</div>
<p class="text-xs text-[#5f6368] leading-relaxed">
When a workout finishes, the agent reads continuous second-by-second heart rate streams from the Open Wearables database:
</p>
<ul class="space-y-1.5 text-xs text-[#5f6368] list-disc pl-4 !mb-0">
<li><b>Zone Distribution:</b> Calculates time spent in Zone 1 (Recovery), Zone 2 (Aerobic Base), Zone 3 (Tempo), Zone 4 (Threshold), and Zone 5 (Anaerobic).</li>
<li><b>Cardiac Drift &amp; Aerobic Decoupling:</b> Compares heart rate kinetics against pace to detect cardiovascular fatigue or dehydration across long runs.</li>
<li><b>Recovery Heart Rate (HRR):</b> Measures heart rate drop at 1-minute and 2-minute marks post-exertion to score acute autonomic tone.</li>
</ul>
</div>

<div class="card p-5 space-y-3">
<div class="flex items-center justify-between border-b border-[#e5e6e4] pb-2">
<h3 class="text-sm font-bold text-[#111318] !mt-0">3. Human Ground Truth &amp; Qualitative RPE</h3>
<span class="mono text-[11px] text-[#747982]"><code>run-feedback-analysis</code> · <code>biome.db</code></span>
</div>
<p class="text-xs text-[#5f6368] leading-relaxed">
Biometrics only tell half the story. Whenever I drop a short note into Slack (e.g. <i>"Ran 8.4km in 46m, felt smooth on climbs, slight right calf tightness, RPE 6"</i>), the <code>run-feedback-analysis</code> skill parses it:
</p>
<div class="p-3 bg-[#fbfbfa] rounded border border-[#e5e6e4] text-xs mono text-[#474b52] space-y-1">
<div>• Distance &amp; Pace → Reconciled with GPS/HR stream</div>
<div>• Rate of Perceived Exertion (RPE) → Logged on a 1–10 scale into SQLite</div>
<div>• Biomechanical Flags → Tags musculoskeletal notes ("right calf tightness") for recovery tracking</div>
</div>
</div>

<div class="card p-5 space-y-2">
<div class="flex items-center justify-between border-b border-[#e5e6e4] pb-2">
<h3 class="text-sm font-bold text-[#111318] !mt-0">4. 19:30 Post-Exertion Reconciliation</h3>
<span class="mono text-[11px] text-[#747982]">Metabolic Balancing</span>
</div>
<p class="text-xs text-[#5f6368] leading-relaxed !mb-0">
Active 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.
</p>
</div>
</div>
</section>

---

<section id="the-nutrition" class="space-y-6">
<div class="kicker">05 / Nutrition Pipeline</div>

## The Nutrition & Meal Ingestion Pipeline

Nutrition runs through an automated pipeline that turns photos or plain-text meal notes into structured macronutrient records.

<div class="space-y-4">
<div class="card p-5 space-y-3">
<h3 class="text-sm font-bold text-[#111318] !mt-0">1. Ingestion Flow (<code>food-log</code> Skill)</h3>
<p class="text-xs text-[#5f6368] leading-relaxed">
When I drop a meal photo or food description into Slack, the agent processes it:
</p>
<ul class="space-y-1.5 text-xs text-[#5f6368] list-disc pl-4 !mb-0">
<li><b>Vision API Delegation:</b> The core text agent downscales photos via <code>sips</code> and calls Google AI Studio's vision model to extract plate items and estimate quantities.</li>
<li><b>Conservative Estimation:</b> Portions default to conservative estimates to avoid camera-angle inflation. If I provide explicit portions (grams, spoon counts), they serve as absolute ground truth.</li>
<li><b>Unified Item Set:</b> Combines detected image items with any typed notes (<code>Image Contents ∪ User Text</code>).</li>
<li><b>Historical Twin Matching:</b> If external APIs are unavailable, it matches dishes against historical logs in the database.</li>
</ul>
</div>

<div class="card p-5 space-y-2">
<h3 class="text-sm font-bold text-[#111318] !mt-0">2. Daily Macro Gating</h3>
<p class="text-xs text-[#5f6368] leading-relaxed !mb-0">
Macro numbers feed directly into the daily operational loops:
</p>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-2 pt-1 text-xs mono">
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>16:30 Pre-Exertion Check</b><br/>
<span class="text-[#747982]">Compares cumulative daily protein against workout targets to check remaining dinner requirements.</span>
</div>
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>19:30 Post-Exertion Check</b><br/>
<span class="text-[#747982]">Recalculates post-workout deficit and outputs the target for the day's final meal.</span>
</div>
</div>
</div>

<div class="card p-5 space-y-3">
<h3 class="text-sm font-bold text-[#111318] !mt-0">3. Nutrition Data Stores</h3>
<p class="text-xs text-[#5f6368] leading-relaxed">
Nutrition data is persisted across two dedicated local database stores:
</p>

<div class="grid grid-cols-1 sm:grid-cols-2 gap-3 text-xs">
<div class="p-3 bg-[#fbfbfa] rounded border border-[#e5e6e4] space-y-1.5">
<div class="font-bold text-[#111318]">PostgreSQL Store (<code>meal_log</code> &amp; <code>data_point_series</code>)</div>
<p class="text-[#5f6368] leading-relaxed !mb-0">
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.
</p>
</div>

<div class="p-3 bg-[#fbfbfa] rounded border border-[#e5e6e4] space-y-1.5">
<div class="font-bold text-[#111318]">SQLite Feedback Store (<code>meal_feedback</code>)</div>
<p class="text-[#5f6368] leading-relaxed !mb-0">
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.
</p>
</div>
</div>
</div>
</div>
</section>

---

<section id="the-scoreboard" class="space-y-6">
<div class="kicker">06 / Outcomes &amp; Review</div>

## 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:

<!-- MOCK DASHBOARD EMBED -->
<div class="card p-6 space-y-6 border-[#d0d7de] bg-[#ffffff] shadow-sm">
  
  <!-- DASHBOARD TOP BAR -->
  <div class="flex flex-col sm:flex-row sm:items-center justify-between gap-4 pb-4 border-b border-[#e5e6e4]">
    <div>
      <div class="flex items-center gap-2">
        <span class="w-2.5 h-2.5 rounded-full bg-emerald-500 inline-block animate-pulse"></span>
        <h3 class="text-base font-bold text-[#111318] !mt-0 !mb-0">Personal Operating Ledger</h3>
        <span class="mono text-[11px] px-2 py-0.5 bg-[#ecece7] rounded text-[#5f6368]">Hermes v2.4</span>
      </div>
      <p class="text-xs text-[#747982] !mt-1 !mb-0">Continuous execution tracking across 5 daily beats and 4 operational domains.</p>
    </div>
    <div class="flex items-center gap-4 text-xs mono">
      <div class="text-right">
        <div class="text-[11px] text-[#747982]">Current Streak</div>
        <div class="font-bold text-[#111318] text-sm">42 Days</div>
      </div>
      <div class="text-right border-l border-[#e5e6e4] pl-4">
        <div class="text-[11px] text-[#747982]">Composite Score</div>
        <div class="font-bold text-[#315cf5] text-sm">94.2%</div>
      </div>
    </div>
  </div>

  <!-- GITHUB STYLE EXECUTION HEATMAP -->
  <div class="space-y-2">
    <div class="flex items-center justify-between text-xs">
      <span class="font-semibold text-[#111318]">24-Week Daily Execution Consistency</span>
      <span class="mono text-[11px] text-[#747982]">168 Daily Ledgers Closed</span>
    </div>
    
    <!-- HEATMAP GRID -->
    <div class="p-3 bg-[#fbfbfa] rounded-lg border border-[#e5e6e4] overflow-x-auto">
      <div class="inline-grid grid-rows-7 grid-flow-col gap-1.5 min-w-full">
        <!-- Week 1-24 Heat Cells -->
        <div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div>
        <div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div>
        <div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div>
        <div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div>
        <div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div>
        <div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div>
        <div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div>
        <div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div>
        <div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div>
        <div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div>
        <div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div>
        <div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div>
        <div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div>
        <div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div>
        <div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div>
        <div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div>
        <div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div>
        <div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div>
        <div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div>
        <div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div>
        <div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div>
        <div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div>
        <div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div>
        <div class="w-3 h-3 rounded-[2px] bg-[#7ca2f9]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#133db5]"></div><div class="w-3 h-3 rounded-[2px] bg-[#315cf5]"></div>
      </div>
      <div class="flex items-center justify-between pt-2.5 text-[11px] text-[#747982] mono">
        <span>Mon · Wed · Fri · Sun</span>
        <div class="flex items-center gap-1.5">
          <span>Less</span>
          <span class="w-2.5 h-2.5 rounded-[2px] bg-[#e5e6e4]"></span>
          <span class="w-2.5 h-2.5 rounded-[2px] bg-[#c3d4fc]"></span>
          <span class="w-2.5 h-2.5 rounded-[2px] bg-[#7ca2f9]"></span>
          <span class="w-2.5 h-2.5 rounded-[2px] bg-[#315cf5]"></span>
          <span class="w-2.5 h-2.5 rounded-[2px] bg-[#133db5]"></span>
          <span>More</span>
        </div>
      </div>
    </div>
  </div>

  <!-- 4 DOMAIN METRIC CARDS -->
  <div class="grid grid-cols-1 sm:grid-cols-2 gap-3 text-xs">
    <div class="p-3.5 bg-[#fbfbfa] rounded-lg border border-[#e5e6e4] space-y-1">
      <div class="flex items-center justify-between">
        <span class="font-bold text-[#111318]">1. Training &amp; Movement</span>
        <span class="font-bold text-[#315cf5] mono">94.2%</span>
      </div>
      <p class="text-[#747982] leading-relaxed !mb-0">
        48.2 km weekly running volume · 3/3 Strength sessions · 0 pre-exertion gate violations.
      </p>
    </div>
    <div class="p-3.5 bg-[#fbfbfa] rounded-lg border border-[#e5e6e4] space-y-1">
      <div class="flex items-center justify-between">
        <span class="font-bold text-[#111318]">2. Recovery &amp; Sleep</span>
        <span class="font-bold text-[#315cf5] mono">88.5%</span>
      </div>
      <p class="text-[#747982] leading-relaxed !mb-0">
        7h 48m avg sleep duration · RHR nadir 47 bpm at 03:45 · HRV +8% vs 30-day baseline.
      </p>
    </div>
    <div class="p-3.5 bg-[#fbfbfa] rounded-lg border border-[#e5e6e4] space-y-1">
      <div class="flex items-center justify-between">
        <span class="font-bold text-[#111318]">3. Fuel &amp; Nutrition</span>
        <span class="font-bold text-[#315cf5] mono">91.0%</span>
      </div>
      <p class="text-[#747982] leading-relaxed !mb-0">
        165g daily protein floor maintained · 100% meal photos logged · 0 late-night deficit spikes.
      </p>
    </div>
    <div class="p-3.5 bg-[#fbfbfa] rounded-lg border border-[#e5e6e4] space-y-1">
      <div class="flex items-center justify-between">
        <span class="font-bold text-[#111318]">4. Deep Focus &amp; Ops</span>
        <span class="font-bold text-[#315cf5] mono">96.0%</span>
      </div>
      <p class="text-[#747982] leading-relaxed !mb-0">
        09:00–12:00 calendar blocks defended · 0 meeting collisions · Daily Linear issues closed.
      </p>
    </div>
  </div>

</div>
</section>

---

<section id="the-sensors" class="space-y-6">
<div class="kicker">07 / Data Ingestion &amp; Sensors</div>

## Sensor Inventory &amp; 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:

```text
┌────────────────────────────────────────────────────────────────────────┐
│                        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            │
└────────────────────────────────────────────────────────────────────────┘
```

<div class="space-y-4 pt-2">
<div class="card p-5 space-y-3">
<div class="flex items-center justify-between border-b border-[#e5e6e4] pb-2">
<h3 class="text-sm font-bold text-[#111318] !mt-0">1. The Desk / Room IoT Board</h3>
<span class="mono text-[11px] text-[#747982]">Sampled every 30 mins</span>
</div>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3 text-xs">
<div><b>Temperature:</b> Room temperature with 60-min rate-of-change velocity.</div>
<div><b>Humidity:</b> Relative humidity percentage.</div>
<div><b>Heat Index:</b> Calculated indoor thermal comfort.</div>
<div><b>Barometric Pressure:</b> Atmospheric pressure (hPa).</div>
<div><b>Gas Resistance / VOC:</b> Indoor air quality and VOC concentration.</div>
<div><b>Ambient Light (Lux):</b> Illuminance for circadian lighting automation.</div>
<div><b>PIR Motion:</b> Desk presence detection.</div>
<div><b>Acoustic Noise (dB):</b> Ambient room noise levels.</div>
</div>
</div>

<div class="card p-5 space-y-3">
<div class="flex items-center justify-between border-b border-[#e5e6e4] pb-2">
<h3 class="text-sm font-bold text-[#111318] !mt-0">2. Outdoor Weather &amp; Climate</h3>
<span class="mono text-[11px] text-[#747982]">Continuous polling</span>
</div>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3 text-xs">
<div><b>Ambient Temperature:</b> Outdoor baseline temperature.</div>
<div><b>Feels-Like Index:</b> Heat index governing outdoor workout safety.</div>
<div><b>UV Index (UVI):</b> Solar radiation level.</div>
<div><b>Wind Speed &amp; Direction:</b> Air movement and cooling factor.</div>
<div><b>Air Quality Index (AQI):</b> Multi-pollutant index (PM2.5, PM10, NO2, O3, CO).</div>
<div><b>Rain Probability:</b> 3-hour precipitation forecasts for workout timing.</div>
</div>
</div>

<div class="card p-5 space-y-3">
<div class="flex items-center justify-between border-b border-[#e5e6e4] pb-2">
<h3 class="text-sm font-bold text-[#111318] !mt-0">3. Biological Wearables (Open Wearables)</h3>
<span class="mono text-[11px] text-[#747982]">PostgreSQL &amp; Redis Tiers</span>
</div>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3 text-xs">
<div><b>Sleep Duration &amp; Efficiency:</b> Time asleep vs time in bed scored against targets.</div>
<div><b>Sleep Architecture:</b> Deep sleep, REM, light sleep, and latency.</div>
<div><b>Resting Heart Rate (RHR):</b> Nightly baseline RHR, trend, and nadir timing.</div>
<div><b>Heart Rate Variability (HRV):</b> Night peak, median, and 7d/14d/30d/180d averages.</div>
<div><b>HRV Readiness Score:</b> Ratio comparing current peak to rolling baseline.</div>
<div><b>Workout HR &amp; Steps:</b> Heart rate streams during exercise and daily step counts.</div>
</div>
</div>

<div class="card p-5 space-y-3">
<div class="flex items-center justify-between border-b border-[#e5e6e4] pb-2">
<h3 class="text-sm font-bold text-[#111318] !mt-0">4. Visual Telemetry &amp; Camera Receipts</h3>
<span class="mono text-[11px] text-[#747982]">Built-in FaceTime HD Camera</span>
</div>
<p class="text-xs text-[#5f6368] leading-relaxed !mb-0">
Runs via a deterministic capture script: captures frame from camera → verifies file size (≥15KB) and JPEG header (<code>ffd8ff</code>) → generates SHA-256 capture receipt → extracts fatigue indicators (dark circles, hydration, alertness) → archives to disk with a 30-day retention purge.
</p>
</div>
</div>
</section>

---

<section id="the-skills" class="space-y-6">
<div class="kicker">08 / Intelligence Layer</div>

## 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:

<div class="space-y-4">
<div class="card p-5 space-y-3">
<h3 class="text-sm font-bold text-[#315cf5] !mt-0">A. Rhythm, Persona &amp; Daily Loops</h3>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-2.5 text-xs">
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>thermostat-coach</b><br/>
<span class="text-[#5f6368]">Defines the core persona, tone laws, and OODA loop governance.</span>
</div>
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>context-platter</b><br/>
<span class="text-[#5f6368]">Parses the 15-min context platter and computes rolling 7d/14d/30d trend lines.</span>
</div>
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>morning-brief</b><br/>
<span class="text-[#5f6368]">Executes the 08:00 recovery evaluation and drafts the day's operating plan.</span>
</div>
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>eod-lookback</b><br/>
<span class="text-[#5f6368]">Runs the 22:30 scorecard close and audits plan vs actual execution.</span>
</div>
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>eod-mechanics</b><br/>
<span class="text-[#5f6368]">Deterministic mechanical recipe for closing tickets and recording scores.</span>
</div>
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>composite-score</b><br/>
<span class="text-[#5f6368]">Calculates monthly composite scores across training, recovery, and deep work.</span>
</div>
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>verdict-report</b><br/>
<span class="text-[#5f6368]">Standardized verdict-first formatter for all Slack notifications.</span>
</div>
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>linear-sync</b><br/>
<span class="text-[#5f6368]">Manages monthly plan tickets and daily sub-issue lifecycles in Linear.</span>
</div>
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>mbr-dashboard</b><br/>
<span class="text-[#5f6368]">Generates monthly business review summaries across all personal systems.</span>
</div>
</div>
</div>

<div class="card p-5 space-y-3">
<h3 class="text-sm font-bold text-[#315cf5] !mt-0">B. Biometrics, Nutrition &amp; Pipelines</h3>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-2.5 text-xs">
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>food-log</b><br/>
<span class="text-[#5f6368]">Processes meal photos and descriptions into calories and macros via vision API.</span>
</div>
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>wearable-data-pipeline</b><br/>
<span class="text-[#5f6368]">Enforces cache tiering (Postgres → Redis → Pending) and freshness audits.</span>
</div>
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>openwearables-reader</b><br/>
<span class="text-[#5f6368]">Read-only queries to Open Wearables database for raw biometric series.</span>
</div>
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>reconstruct-run-from-hr</b><br/>
<span class="text-[#5f6368]">Reconstructs workout distance, pace, and zones from raw HR streams.</span>
</div>
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>reconstruct-nap-from-hr</b><br/>
<span class="text-[#5f6368]">Detects and reconstructs afternoon rest sessions triggered by human notes.</span>
</div>
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>run-feedback-analysis</b><br/>
<span class="text-[#5f6368]">Extracts qualitative training feedback (perceived exertion, fatigue markers).</span>
</div>
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>energy-expenditure-pipeline</b><br/>
<span class="text-[#5f6368]">Calculates total daily energy expenditure combining BMR and active burn.</span>
</div>
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>biometric-vision-scan</b><br/>
<span class="text-[#5f6368]">Captures camera receipts and analyzes facial fatigue and hydration cues.</span>
</div>
</div>
</div>

<div class="card p-5 space-y-3">
<h3 class="text-sm font-bold text-[#315cf5] !mt-0">C. Smart Home &amp; Environment</h3>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-2.5 text-xs">
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>circadian-lighting</b><br/>
<span class="text-[#5f6368]">Calculates color temperature and lux curves matching time of day.</span>
</div>
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>tuya-driver</b><br/>
<span class="text-[#5f6368]">LAN-only smart home drivers for bulbs and sockets without cloud latency.</span>
</div>
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>tuya-lan-control</b><br/>
<span class="text-[#5f6368]">Direct CLI interface for local socket communication to Tuya hardware.</span>
</div>
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>openhue</b><br/>
<span class="text-[#5f6368]">Direct local Philips Hue bridge integration for desk and room lighting.</span>
</div>
</div>
</div>

<div class="card p-5 space-y-3">
<h3 class="text-sm font-bold text-[#315cf5] !mt-0">D. Operations, Learning &amp; Continuous Feedback</h3>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-2.5 text-xs">
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>daily-content-briefing</b><br/>
<span class="text-[#5f6368]">Ingests Apple Podcasts, frontier lab updates, model drops, and arXiv breakthroughs via <code>daily-ai-brief</code> MCP.</span>
</div>
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>travel-commute-planner</b><br/>
<span class="text-[#5f6368]">Restructures day calendar around commute times and live traffic.</span>
</div>
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>agent-weekly-review</b><br/>
<span class="text-[#5f6368]">Monday morning retrospective auditing cron execution and decision drift.</span>
</div>
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>hermes-cron-maintenance</b><br/>
<span class="text-[#5f6368]">Health registry and watchdog for scheduled Hermes background crons.</span>
</div>
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>llm-agent-evals</b><br/>
<span class="text-[#5f6368]">Automated LLM-as-a-judge scoring of decision traces in Langfuse.</span>
</div>
<div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
<b>integration-principles</b><br/>
<span class="text-[#5f6368]">Security standards: zero tokens in plaintext, reversible actions only.</span>
</div>
</div>
</div>
</div>
</section>

---

<section id="the-tools" class="space-y-6">
<div class="kicker">09 / Tools &amp; MCPs</div>

## Tools, MCPs & Actuators

Thermostat connects to macOS, external services, and hardware actuators through open Model Context Protocol (MCP) servers and deterministic CLI tools:

<div class="space-y-4 text-xs">
<div class="card p-5 space-y-2">
<div class="flex items-center justify-between border-b border-[#e5e6e4] pb-2">
<div class="font-bold text-[#111318] text-sm">Native macOS Companion MCP (<code>macos-mcp</code>)</div>
<div class="flex items-center gap-2 mono text-[11px]">
<a href="https://macos-mcp.builditwithai.xyz" target="_blank" rel="noreferrer" class="text-[#315cf5] hover:underline">Website</a>
<span class="text-[#e5e6e4]">·</span>
<a href="https://github.com/surendranb/macos-mcp" target="_blank" rel="noreferrer" class="text-[#315cf5] hover:underline">GitHub</a>
<span class="text-[#e5e6e4]">·</span>
<a href="https://www.npmjs.com/package/@surendranb/macos-companion-mcp" target="_blank" rel="noreferrer" class="text-[#747982] hover:underline">npm</a>
</div>
</div>
<p class="text-[#5f6368] leading-relaxed !mb-0">
40 tools that give AI agents hands on your Mac: reads and schedules <b>Calendar events</b> (via EventKit), manages <b>Apple Reminders</b> and <b>Apple Notes</b>, controls <b>Apple Music</b> playback, captures <b>FaceTime camera</b> snapshots, checks <b>Mail</b>, and monitors <b>Mac health</b> (CPU load, memory pressure, battery, and thermal state) over local stdio with zero cloud latency.
</p>
</div>

<div class="card p-5 space-y-2">
<div class="flex items-center justify-between border-b border-[#e5e6e4] pb-2">
<div class="font-bold text-[#111318] text-sm">Daily Intelligence MCP (<code>daily-ai-brief</code>)</div>
<div class="flex items-center gap-2 mono text-[11px]">
<a href="https://builditwithai.xyz" target="_blank" rel="noreferrer" class="text-[#315cf5] hover:underline">Website</a>
<span class="text-[#e5e6e4]">·</span>
<a href="https://github.com/surendranb/daily-ai-brief" target="_blank" rel="noreferrer" class="text-[#315cf5] hover:underline">GitHub</a>
</div>
</div>
<p class="text-[#5f6368] leading-relaxed !mb-0">
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.
</p>
</div>

<div class="card p-5 space-y-2">
<div class="flex items-center justify-between border-b border-[#e5e6e4] pb-2">
<div class="font-bold text-[#111318] text-sm">Research Papers MCP (<code>find-research-papers-mcp</code>)</div>
<div class="flex items-center gap-2 mono text-[11px]">
<a href="https://builditwithai.xyz" target="_blank" rel="noreferrer" class="text-[#315cf5] hover:underline">Website</a>
<span class="text-[#e5e6e4]">·</span>
<a href="https://github.com/surendranb/find-research-papers-mcp" target="_blank" rel="noreferrer" class="text-[#315cf5] hover:underline">GitHub</a>
</div>
</div>
<p class="text-[#5f6368] leading-relaxed !mb-0">
Searches PubMed, arXiv, and Crossref to ground physiology, recovery, and training queries in peer-reviewed scientific literature rather than training-set approximations.
</p>
</div>

<div class="card p-5 space-y-2">
<div class="flex items-center justify-between border-b border-[#e5e6e4] pb-2">
<div class="font-bold text-[#111318] text-sm">Project Tracking MCP (<code>linear-mcp</code>)</div>
<span class="mono text-[11px] text-[#747982]">Linear GraphQL API</span>
</div>
<p class="text-[#5f6368] leading-relaxed !mb-0">
Reads active monthly plan tickets, creates daily sub-issues, posts continuity comments, and closes tickets with root-cause notes.
</p>
</div>

<div class="card p-5 space-y-2">
<div class="flex items-center justify-between border-b border-[#e5e6e4] pb-2">
<div class="font-bold text-[#111318] text-sm">LAN Smart Home Actuators (Tuya &amp; Philips Hue)</div>
<span class="mono text-[11px] text-[#747982]">Local TCP Sockets &amp; Bridges</span>
</div>
<p class="text-[#5f6368] leading-relaxed !mb-0">
Direct local socket communication to Tuya smart bulbs, IR blasters, and Philips Hue bridges. Executes circadian color temperature curves with zero cloud latency.
</p>
</div>
</div>
</section>

---

<section id="the-evals" class="space-y-6">
<div class="kicker">10 / Quality &amp; Reliability</div>

## 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:

<div class="space-y-4">
<div class="card p-5 space-y-3">
<div class="flex items-center justify-between border-b border-[#e5e6e4] pb-2">
<h3 class="text-sm font-bold text-[#111318] !mt-0">1. Real-Time Deterministic Assertions (Zero-Token Guards)</h3>
<span class="mono text-[11px] text-[#747982]">Synchronous Guardrails</span>
</div>
<p class="text-xs text-[#5f6368] leading-relaxed">
Fast programmatic checks validate outputs before notifications are dispatched or tickets are updated:
</p>
<ul class="space-y-1.5 text-xs text-[#5f6368] list-disc pl-4 !mb-0">
<li><b>Freshness Bounds:</b> Asserts that sleep/wearable timestamps are within 3 hours of execution. Rejects stale cache as <code>UNVERIFIABLE</code>.</li>
<li><b>Camera Frame Integrity:</b> Asserts file size is &ge; 15 KB with valid JPEG magic bytes (<code>ffd8ff</code>) to prevent blank frame hallucination.</li>
<li><b>Strict Verdict Conformance:</b> Validates that the agent returned an approved verdict enum (<code>GO</code>, <code>DRIFTED</code>, <code>ON-TRACK</code>, <code>UNVERIFIABLE</code>) and refused open-ended questions.</li>
<li><b>Delta-Only Enforcement:</b> Verifies that if no parameters drifted against the 08:00 plan, the agent emitted <code>[SILENT]</code> or <code>"No delta — plan holds"</code>.</li>
</ul>
</div>

<div class="card p-5 space-y-3">
<div class="flex items-center justify-between border-b border-[#e5e6e4] pb-2">
<h3 class="text-sm font-bold text-[#111318] !mt-0">2. LLM-as-a-Judge Trace Scoring (Langfuse)</h3>
<span class="mono text-[11px] text-[#747982]">Asynchronous Trace Evals</span>
</div>
<p class="text-xs text-[#5f6368] leading-relaxed">
All agent runs, tool calls, and Slack conversational traces stream directly into <b>Langfuse</b>. During the Monday 09:30 Retrospective, an automated judge model scores decision traces across four rubrics:
</p>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3 text-xs">
<div class="p-3 bg-[#fbfbfa] rounded border border-[#e5e6e4] space-y-1">
<b>Evidence Grounding &amp; Factuality</b>
<p class="text-[#747982] leading-relaxed !mb-0">Verifies that every cited number (HRV, RHR nadir, protein grams, temperature) maps exactly to the frozen <code>current_context.json</code> snapshot.</p>
</div>
<div class="p-3 bg-[#fbfbfa] rounded border border-[#e5e6e4] space-y-1">
<b>Tone &amp; Anti-Sermonizing</b>
<p class="text-[#747982] leading-relaxed !mb-0">Penalizes motivational lecturing, unsolicited life advice, or fluff. Enforces a crisp, objective builder voice.</p>
</div>
<div class="p-3 bg-[#fbfbfa] rounded border border-[#e5e6e4] space-y-1">
<b>Decision Gate Logic Fidelity</b>
<p class="text-[#747982] leading-relaxed !mb-0">Audits whether the 4-input pre-exertion gate correctly evaluated calendar, HRV baselines, climate AQI, and fuel floors before issuing a GO verdict.</p>
</div>
<div class="p-3 bg-[#fbfbfa] rounded border border-[#e5e6e4] space-y-1">
<b>Action Reversibility &amp; Safety</b>
<p class="text-[#747982] leading-relaxed !mb-0">Confirms that all executed tool actions (Linear updates, Tuya light adjustments) stayed strictly within reversible bounds without destructive side effects.</p>
</div>
</div>
</div>

<!-- DUAL EVALUATION GRAPHS (DETERMINISTIC + LLM-AS-A-JUDGE) -->
<div class="card p-6 space-y-6 border-[#d0d7de] bg-[#ffffff] shadow-sm">
  <div class="flex flex-col sm:flex-row sm:items-center justify-between gap-2 pb-4 border-b border-[#e5e6e4]">
    <div>
      <h4 class="text-sm font-bold text-[#111318] !mt-0 !mb-0.5">Langfuse Reliability &amp; Quality Metrics</h4>
      <p class="text-xs text-[#747982] !mt-0 !mb-0">Real-time telemetry and weekly judge evaluations across 1,400+ trace runs.</p>
    </div>
    <div class="flex items-center gap-2 mono text-xs">
      <span class="px-2.5 py-1 bg-[#f0f9ff] text-[#0369a1] border border-[#bae6fd] rounded">Overall Quality: 98.6%</span>
    </div>
  </div>

  <div class="grid grid-cols-1 md:grid-cols-2 gap-6 text-xs">
    <!-- GRAPH 1: DETERMINISTIC ASSERTIONS -->
    <div class="space-y-3">
      <div class="flex items-center justify-between font-semibold text-[#111318]">
        <span>Deterministic Zero-Token Pass Rates</span>
        <span class="mono text-[#059669]">98.9% Avg</span>
      </div>
      <div class="space-y-2.5">
        <div>
          <div class="flex justify-between text-[11px] text-[#5f6368] mb-1">
            <span>Cron Heartbeat &amp; OODA Liveness</span>
            <span class="mono font-bold text-[#111318]">100%</span>
          </div>
          <div class="w-full bg-[#f1f3f4] h-2 rounded-full overflow-hidden">
            <div class="bg-[#059669] h-full rounded-full" style="width: 100%"></div>
          </div>
        </div>
        <div>
          <div class="flex justify-between text-[11px] text-[#5f6368] mb-1">
            <span>Decision Logging (SQLite Ledger)</span>
            <span class="mono font-bold text-[#111318]">100%</span>
          </div>
          <div class="w-full bg-[#f1f3f4] h-2 rounded-full overflow-hidden">
            <div class="bg-[#059669] h-full rounded-full" style="width: 100%"></div>
          </div>
        </div>
        <div>
          <div class="flex justify-between text-[11px] text-[#5f6368] mb-1">
            <span>Report Well-Formedness &amp; Length</span>
            <span class="mono font-bold text-[#111318]">100%</span>
          </div>
          <div class="w-full bg-[#f1f3f4] h-2 rounded-full overflow-hidden">
            <div class="bg-[#059669] h-full rounded-full" style="width: 100%"></div>
          </div>
        </div>
        <div>
          <div class="flex justify-between text-[11px] text-[#5f6368] mb-1">
            <span>Freshness Bounds (&lt; 3h timestamps)</span>
            <span class="mono font-bold text-[#111318]">98.4%</span>
          </div>
          <div class="w-full bg-[#f1f3f4] h-2 rounded-full overflow-hidden">
            <div class="bg-[#059669] h-full rounded-full" style="width: 98.4%"></div>
          </div>
        </div>
        <div>
          <div class="flex justify-between text-[11px] text-[#5f6368] mb-1">
            <span>Silence &amp; Delta Suppression</span>
            <span class="mono font-bold text-[#111318]">96.2%</span>
          </div>
          <div class="w-full bg-[#f1f3f4] h-2 rounded-full overflow-hidden">
            <div class="bg-[#315cf5] h-full rounded-full" style="width: 96.2%"></div>
          </div>
        </div>
        <div>
          <div class="flex justify-between text-[11px] text-[#5f6368] mb-1">
            <span>Linear Issue Lifecycle Sync</span>
            <span class="mono font-bold text-[#111318]">92.0%</span>
          </div>
          <div class="w-full bg-[#f1f3f4] h-2 rounded-full overflow-hidden">
            <div class="bg-[#315cf5] h-full rounded-full" style="width: 92.0%"></div>
          </div>
        </div>
      </div>
    </div>
    <!-- GRAPH 2: LLM-AS-A-JUDGE EVALUATION SCORES -->
    <div class="space-y-3">
      <div class="flex items-center justify-between font-semibold text-[#111318]">
        <span>LLM-as-a-Judge Evaluation Scores</span>
        <span class="mono text-[#315cf5]">0.984 / 1.00</span>
      </div>
      <div class="space-y-2.5">
        <div>
          <div class="flex justify-between text-[11px] text-[#5f6368] mb-1">
            <span>Evidence Grounding (Zero Hallucination)</span>
            <span class="mono font-bold text-[#111318]">0.99 / 1.00</span>
          </div>
          <div class="w-full bg-[#f1f3f4] h-2 rounded-full overflow-hidden">
            <div class="bg-[#315cf5] h-full rounded-full" style="width: 99%"></div>
          </div>
        </div>
        <div>
          <div class="flex justify-between text-[11px] text-[#5f6368] mb-1">
            <span>Tone &amp; Anti-Sermonizing (No Fluff)</span>
            <span class="mono font-bold text-[#111318]">0.98 / 1.00</span>
          </div>
          <div class="w-full bg-[#f1f3f4] h-2 rounded-full overflow-hidden">
            <div class="bg-[#315cf5] h-full rounded-full" style="width: 98%"></div>
          </div>
        </div>
        <div>
          <div class="flex justify-between text-[11px] text-[#5f6368] mb-1">
            <span>4-Point Exertion Gate Logic Fidelity</span>
            <span class="mono font-bold text-[#111318]">1.00 / 1.00</span>
          </div>
          <div class="w-full bg-[#f1f3f4] h-2 rounded-full overflow-hidden">
            <div class="bg-[#059669] h-full rounded-full" style="width: 100%"></div>
          </div>
        </div>
        <div>
          <div class="flex justify-between text-[11px] text-[#5f6368] mb-1">
            <span>Action Reversibility &amp; Blast Radius</span>
            <span class="mono font-bold text-[#111318]">1.00 / 1.00</span>
          </div>
          <div class="w-full bg-[#f1f3f4] h-2 rounded-full overflow-hidden">
            <div class="bg-[#059669] h-full rounded-full" style="width: 100%"></div>
          </div>
        </div>
        <div>
          <div class="flex justify-between text-[11px] text-[#5f6368] mb-1">
            <span>Plan Delta Adherence</span>
            <span class="mono font-bold text-[#111318]">0.95 / 1.00</span>
          </div>
          <div class="w-full bg-[#f1f3f4] h-2 rounded-full overflow-hidden">
            <div class="bg-[#315cf5] h-full rounded-full" style="width: 95%"></div>
          </div>
        </div>
        <div>
          <div class="flex justify-between text-[11px] text-[#5f6368] mb-1">
            <span>Multi-Turn Rule Retention</span>
            <span class="mono font-bold text-[#111318]">0.97 / 1.00</span>
          </div>
          <div class="w-full bg-[#f1f3f4] h-2 rounded-full overflow-hidden">
            <div class="bg-[#315cf5] h-full rounded-full" style="width: 97%"></div>
          </div>
        </div>
      </div>
    </div>
  </div>

  <!-- 6-WEEK RELIABILITY TREND TIMELINE -->
  <div class="pt-4 border-t border-[#e5e6e4] space-y-2">
    <div class="flex items-center justify-between text-xs">
      <span class="font-semibold text-[#111318]">6-Week Continuous Improvement Trajectory</span>
      <span class="mono text-[11px] text-[#747982]">Weekly Retrospective Refinements</span>
    </div>
    <div class="grid grid-cols-6 gap-2 text-center text-[11px] mono">
      <div class="p-2 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
        <div class="text-[#747982] text-[10px]">W01</div>
        <div class="font-bold text-[#747982]">86.2%</div>
      </div>
      <div class="p-2 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
        <div class="text-[#747982] text-[10px]">W02</div>
        <div class="font-bold text-[#747982]">89.4%</div>
      </div>
      <div class="p-2 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
        <div class="text-[#747982] text-[10px]">W03</div>
        <div class="font-bold text-[#315cf5]">93.1%</div>
      </div>
      <div class="p-2 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
        <div class="text-[#747982] text-[10px]">W04</div>
        <div class="font-bold text-[#315cf5]">95.8%</div>
      </div>
      <div class="p-2 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
        <div class="text-[#747982] text-[10px]">W05</div>
        <div class="font-bold text-[#059669]">97.5%</div>
      </div>
      <div class="p-2 bg-[#fbfbfa] rounded border border-[#059669]/40 bg-[#ecfdf5]">
        <div class="text-[#059669] text-[10px]">W06 (Live)</div>
        <div class="font-bold text-[#059669]">98.6%</div>
      </div>
    </div>
  </div>
</div>

<!-- EMBEDDED LANGFUSE EVALUATION TRACE MOCK -->
<div class="card p-5 space-y-4 border-[#d0d7de] bg-[#ffffff] shadow-sm">
  <div class="flex flex-col sm:flex-row sm:items-center justify-between gap-2 pb-3 border-b border-[#e5e6e4]">
    <div class="flex items-center gap-2">
      <span class="w-2 h-2 rounded-full bg-[#315cf5] inline-block"></span>
      <span class="font-bold text-xs text-[#111318]">Langfuse Trace Inspection</span>
      <span class="mono text-[11px] px-2 py-0.5 bg-[#ecece7] rounded text-[#5f6368]">trace_exertion_gate_1630</span>
    </div>
    <div class="flex items-center gap-3 mono text-[11px]">
      <span class="text-emerald-700 bg-emerald-50 px-2 py-0.5 rounded border border-emerald-200">200 OK · 842ms</span>
      <span class="text-[#747982]">Evaluated by Hermes-Judge-v1</span>
    </div>
  </div>

  <!-- SPAN EXECUTION TIMELINE -->
  <div class="space-y-1.5 mono text-[11px]">
    <div class="flex items-center justify-between p-2 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
      <div class="flex items-center gap-2">
        <span class="text-emerald-600 font-bold">✓</span>
        <span class="font-semibold text-[#111318]">span:context_platter_fetch</span>
      </div>
      <span class="text-[#747982]">14ms · 12.4 KB JSON payload</span>
    </div>
    <div class="flex items-center justify-between p-2 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
      <div class="flex items-center gap-2">
        <span class="text-emerald-600 font-bold">✓</span>
        <span class="font-semibold text-[#111318]">span:freshness_assertions</span>
      </div>
      <span class="text-[#747982]">8ms · Wearable tier: Postgres Finalized (&lt; 2h)</span>
    </div>
    <div class="flex items-center justify-between p-2 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
      <div class="flex items-center gap-2">
        <span class="text-emerald-600 font-bold">✓</span>
        <span class="font-semibold text-[#111318]">span:4_point_gate_evaluator</span>
      </div>
      <span class="text-[#747982]">32ms · Cal: Clear · HRV: +6% · AQI: 38 · Fuel: 110g</span>
    </div>
    <div class="flex items-center justify-between p-2 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
      <div class="flex items-center gap-2">
        <span class="text-emerald-600 font-bold">✓</span>
        <span class="font-semibold text-[#111318]">span:llm_verdict_synthesis</span>
      </div>
      <span class="text-[#747982]">788ms · Verdict: GO · Target: 8.0km Zone 2 Aerobic</span>
    </div>
  </div>

  <!-- LLM-AS-A-JUDGE SCORES -->
  <div class="grid grid-cols-2 sm:grid-cols-4 gap-2 pt-1 text-center">
    <div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
      <div class="text-[10px] text-[#747982] uppercase tracking-wider">Grounding</div>
      <div class="font-bold text-emerald-600 text-sm mono">1.00</div>
      <div class="text-[10px] text-[#9aa0a6]">Zero Hallucination</div>
    </div>
    <div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
      <div class="text-[10px] text-[#747982] uppercase tracking-wider">Anti-Sermon</div>
      <div class="font-bold text-emerald-600 text-sm mono">0.98</div>
      <div class="text-[10px] text-[#9aa0a6]">Zero Preachiness</div>
    </div>
    <div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
      <div class="text-[10px] text-[#747982] uppercase tracking-wider">Gate Fidelity</div>
      <div class="font-bold text-emerald-600 text-sm mono">1.00</div>
      <div class="text-[10px] text-[#9aa0a6]">4/4 Rules Passed</div>
    </div>
    <div class="p-2.5 bg-[#fbfbfa] rounded border border-[#e5e6e4]">
      <div class="text-[10px] text-[#747982] uppercase tracking-wider">Reversibility</div>
      <div class="font-bold text-emerald-600 text-sm mono">1.00</div>
      <div class="text-[10px] text-[#9aa0a6]">Safe Actuation</div>
    </div>
  </div>
</div>

</div>
</section>

---

<section id="the-data" class="space-y-6">
<div class="kicker">11 / Persistence Layer</div>

## 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:

<div class="space-y-4">
<div class="card p-5 space-y-3">
<div class="flex items-center justify-between border-b border-[#e5e6e4] pb-2">
<h3 class="text-sm font-bold text-[#111318] !mt-0">1. Sensory &amp; Weather Time-Series (<code>telemetry_observations</code>)</h3>
<span class="mono text-[11px] text-[#747982]">SQLite · <code>telemetry.db</code></span>
</div>
<p class="text-xs text-[#5f6368] leading-relaxed">
<b>What it captures:</b> 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).
</p>
<p class="text-xs text-[#5f6368] leading-relaxed !mb-0">
<b>Why it stores it:</b> 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.
</p>
</div>

<div class="card p-5 space-y-3">
<div class="flex items-center justify-between border-b border-[#e5e6e4] pb-2">
<h3 class="text-sm font-bold text-[#111318] !mt-0">2. Autonomous Decision Ledger (<code>agent_decisions</code>)</h3>
<span class="mono text-[11px] text-[#747982]">SQLite · <code>ledger.db</code></span>
</div>
<p class="text-xs text-[#5f6368] leading-relaxed">
<b>What it captures:</b> 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 (<code>GO</code>, <code>DRIFTED</code>, <code>ON-TRACK</code>, <code>UNVERIFIABLE</code>), and emitted actuator payloads.
</p>
<p class="text-xs text-[#5f6368] leading-relaxed !mb-0">
<b>Why it stores it:</b> 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.
</p>
</div>

<div class="card p-5 space-y-3">
<div class="flex items-center justify-between border-b border-[#e5e6e4] pb-2">
<h3 class="text-sm font-bold text-[#111318] !mt-0">3. Ground-Truth &amp; Human Override Store (<code>human_feedback</code> &amp; <code>meal_feedback</code>)</h3>
<span class="mono text-[11px] text-[#747982]">SQLite · <code>biome.db</code></span>
</div>
<p class="text-xs text-[#5f6368] leading-relaxed">
<b>What it captures:</b> 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).
</p>
<p class="text-xs text-[#5f6368] leading-relaxed !mb-0">
<b>Why it stores it:</b> Serves as absolute ground truth. Whenever automated sensor models or vision estimations conflict with direct human entries, the human feedback record takes priority.
</p>
</div>

<div class="card p-5 space-y-3">
<div class="flex items-center justify-between border-b border-[#e5e6e4] pb-2">
<h3 class="text-sm font-bold text-[#111318] !mt-0">4. Monthly Composite Execution Scorecard (<code>composite_scores</code>)</h3>
<span class="mono text-[11px] text-[#747982]">SQLite · <code>ledger.db</code></span>
</div>
<p class="text-xs text-[#5f6368] leading-relaxed">
<b>What it captures:</b> 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.
</p>
<p class="text-xs text-[#5f6368] leading-relaxed !mb-0">
<b>Why it stores it:</b> 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.
</p>
</div>

<div class="card p-5 space-y-3">
<div class="flex items-center justify-between border-b border-[#e5e6e4] pb-2">
<h3 class="text-sm font-bold text-[#111318] !mt-0">5. Biological Wearables &amp; Podcasting Stores</h3>
<span class="mono text-[11px] text-[#747982]">PostgreSQL &amp; Apple SQLite</span>
</div>
<p class="text-xs text-[#5f6368] leading-relaxed">
<b>What it captures:</b> Open Wearables' PostgreSQL tables (<code>meal_log</code> and <code>data_point_series</code> for sleep stages, resting HR nadir, continuous HRV, and exercise heart rate) and macOS native Apple Podcasts database (<code>MTLibrary.sqlite</code> for newly downloaded episodes and played timestamps).
</p>
<p class="text-xs text-[#5f6368] leading-relaxed !mb-0">
<b>Why it stores it:</b> Provides raw biometric and audio intelligence pipelines that feed the 15-minute context platter aggregator.
</p>
</div>
</div>
</section>

---

<section id="open-sourcing" class="space-y-6">
<div class="kicker">12 / Open Source Release</div>

## 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.

<div class="pt-4 flex flex-wrap gap-4 text-sm font-semibold mono">
<a href="https://github.com/surendranb" target="_blank" rel="noreferrer">→ Follow the Open-Source Release on GitHub</a>
<a href="https://builditwithai.xyz" target="_blank" rel="noreferrer">→ Explore more builds at builditwithai.xyz</a>
</div>
</section>
