Skip to content

Reykjavíksunrise --:--sunset --:--

hire

personal software in the agent era 2/x: life-os and Lumen

7 min read

The first post in this series was about jstop, a menu bar app that does one small thing. This one is the opposite: the biggest piece of personal software I have, and the one I'd miss most if it disappeared.

life-os collects the data my life already produces into one place I own. Lumen is the desktop app I look at it through.

§the problem

My day is scattered across a dozen apps that don't talk to each other. Whoop knows how I slept. Strava knows I ran. Screen Time knows I spent forty minutes in Slack. Things knows what I said I'd do, GitHub knows what I actually shipped, and my calendar knows where the rest of the day went.

Every one of them has its own dashboard, and none of them can answer the question I actually have: how did this week go?

I didn't want another dashboard. I wanted the data in one table I can query, so that I, or an agent, can ask anything of it.

§one store, three shapes

life-os is a collector. A launchd job on my Mac pulls from about fourteen sources: Whoop, Strava, Screen Time, GitHub, Things, Google Calendar, Spotify, Toggl, Asana, my Obsidian vault and the weather.

Everything lands in one SQLite file. The schema is the part I'm proudest of, because it's so boring. Every raw API response is kept in an append-only raw_records table, so I can always rebuild from what the source actually said. Everything else fits in three generic tables:

  • samples: a reading at a point in time. Recovery, heart rate, the temperature.
  • intervals: something with a start and an end. A sleep, a run, forty minutes in Slack.
  • entities: things that exist. A task, a calendar event, a pull request.

Adding a source means mapping it onto those three, not designing a new table. That's how eight connectors could land on the first day.

§agents are the first client

The first thing that read the store wasn't a UI. It was an MCP server, landed on day one, with three tools: describe_schema, query_sql and sync_status.

describe_schema doesn't just return the tables. It returns the metric and category names actually in the data, so an agent knows to ask for recovery and not guess at recovery_score. query_sql takes read-only SQL and caps the result at a thousand rows. That's the whole interface, and it's enough for Claude to answer "did I sleep worse on days I had evening meetings?" without me writing a line of code for it.

§Lumen

Lumen came a day later. It's a Tauri app: a small Rust shell around a React UI, with the Bun server compiled into a single binary that Tauri starts and keeps alive.

It has views for Today, Body, Screen & Work, Tasks, Code Factory, Ask, Logs and Sources. It lives in the menu bar, and the menu bar shows today's recovery score, which is the one number I want without opening anything. The sidebar uses the native macOS frosted glass, the colours are Flexoki, and everything moves with Vim keys: j and k scroll, gg goes to the top, and the number keys switch views.

Lumen's Today view: a recovery ring at 55, last sleep, screen time, last workout and 30-day average recovery
Today. One sentence about the morning, then the numbers behind it.

Today opens with a sentence, not a chart: "Middling recovery with a clear day, steady, useful work and a moderate session." It reads recovery and the calendar together, because the same score means something different on a day full of meetings.

Body is where the questions get answered. It doesn't just plot sleep and recovery, it weighs them against each other: over the last 30 days, nights with seven hours or more were followed by recovery four points higher. That number is more useful to me than any of the charts that produced it.

Lumen's Body view: 30 days of recovery bars with a sleep line, and cards comparing recovery after long and short sleep
Body. Seven hours of sleep is worth four points of recovery, for me.

Screen & Work puts Screen Time next to the hours I logged in Toggl, "logged against lived", as the view calls it. It's also an honest record of this series: Rex is the top app by a distance, and ró is already on the list.

Lumen's Screen & Work view: top apps led by Rex, screen time by hour and weekday, and logged work by project
Screen & Work. Rex first, then the browser.

There's also an Ask view that turns a question into SQL with a local model (qwen2.5-coder:7b through Ollama), so the obvious questions don't need a round trip to anyone's cloud.

§everything else reports here too

Once there was one place I looked every morning, other projects started reporting to it.

Logs. My projects log with evlog, and life-os has an endpoint that takes their events. The client is one file, evlog-http.ts, that I copy into any project. It batches events and ships them every few seconds. If the hub is down it keeps a bounded buffer and drops the oldest, because a log call must never throw and never block the thing it's logging. The Logs view is one table across every project, filterable by level and project. Most of it is life-os talking to itself, every sync and every replication tick, which turns out to be the fastest way to see why a number looks wrong.

Lumen's Logs view: a table of events with time, project, level, event name and fields
Logs. Every project, one table.

Code Factory. I have a small software factory running as Claude cloud routines. Every night a triage loop scans my repos and files issues for what it finds: failing typechecks, lint, flaky tests. An hourly loop picks up the issues I've approved and opens a pull request for each one.

The gate between the two is a label. Triage is never allowed to add auto; only I am. The board in Lumen is where I do that. Dragging a card from Awaiting Review to Queued adds the label, and the PR column has a merge button. It reads GitHub live instead of going through the sync engine, because a control surface that's an hour stale is worse than none.

Lumen's Code Factory board: counts for awaiting review, queued, building, in review, blocked and shipped, with issue cards below
Code Factory. Eight issues waiting on me, one being built.

The two loops run on different clocks on purpose. Triage runs once a day, so I review a night's findings in one sitting. Dispatch runs every hour, so approved work doesn't wait. The label is the clutch between them.

§then it moved to the edge

For the first two months everything ran on my laptop, which meant nothing worked when the laptop was closed.

So the store got a copy on Cloudflare: a D1 database built from the same migrations as the local one, "so the two stores stay one schema", fed by the Mac pushing changes to a replicate endpoint. A Worker serves an API on top of it. Lumen reads from the edge first and falls back to the local server, and since October it tells me when it's reading local data.

The copy is deliberately partial. raw_records is most of the store and never leaves the Mac, because the edge is "a serving replica, never the system of record". And exactly one job runs at the edge instead of on the Mac: weather. Every other source can catch up after the laptop wakes. Open-Meteo's current reading has no history, so "an hour the laptop sleeps is an hour that never existed".

That API is also where the Whoop numbers on the front page of this site come from. A GitHub Action reads them once a day with its own read-only key.

§what reality taught it

The interesting bugs all came from the gap between how software is supposed to run and how a laptop actually lives.

  • The laptop that was half awake. With the lid closed, macOS wakes for a few seconds of maintenance and launchd jobs run. Whoop's refresh tokens are single-use, so a sync could rotate the token, the Mac would fall asleep before saving the new one, and the next run would replay a dead token. Now a token refresh only happens when pmset says the machine is properly awake.
  • The blank window. bun --compile appends its bundle after the code signature, which invalidates it. macOS 27 kills such binaries at launch, silently, with exit 137 and an empty window. The build script now re-signs the sidecar.
  • The numbers that looked fine. After a repo rename, the job publishing numbers to this site still pointed at the old name, and the front page showed a five-week-old score that looked completely normal. The fix moved the calculation into one shared module with a comment listing exactly what may be public, and made the endpoint fail loudly instead of serving something stale. This site now prints "N days old" when the snapshot lags.

None of these are bugs you design your way out of. You find them by living with the thing.

§how it got built

The first commit was on 21 June: the sync engine plus Screen Time and GitHub. Six more connectors and the MCP server landed the same day. The desktop app, a React rebuild and the name Lumen followed within three days.

After that it became a place to practice working with agents properly. Bigger features start as a plan in docs/plans/ with slices sized for one agent run. The API plan is a numbered checklist that an agent wrote and then worked through. There's a Claude hook that refuses to run commands that would print a credential, and the MCP server carries a note for the next agent: stdout is the JSON-RPC channel, never console.log here.

One decision I like for how it aged. The API plan says Effect was "evaluated and declined", because the read path had almost nothing that could fail. Two months later, with replication, rate limits and a queue in the picture, the edge API was rewritten on Effect. Both calls were right at the time. That's cheap to say when a rewrite is an afternoon, and it is now.

§the stack, plainly

  • TypeScript on Bun, Drizzle, Hono, about 19k lines
  • SQLite locally, Cloudflare D1 and a Worker at the edge, deployed with Alchemy
  • Tauri 2 and React for Lumen
  • MCP for agents, Ollama for the local Ask view
  • Built with Claude Code, 144 commits and counting

life-os is the thing I'd least want to buy from someone else. The value isn't the charts. It's that every number about my life is in one table, on my machine, and anything I build next can start from there.

g+

h homeb blogu usesa abouts somedayw nowq quotes