Skip to content
Maxwell CollinsContact

Habit accountability system verified by devices and photos

An accountability system that prompts its owner's chosen habits in Discord and escalates when a prompt is ignored.

What it achieved

Checks habits against a rowing machine, a wearable and photos, so a habit counts only when proved.

The short version

Checks habits against a rowing machine, a wearable and photos, so a habit counts only when proved, holding its owner to the habits they chose instead of taking their word. Maxwell built it as an accountability system (habit-daemon) that prompts each habit on schedule in Discord. When a prompt is ignored, it escalates through five levels, and the third reminds the owner why they chose the habit. It verifies completion against a connected rower's logbook, a wearable's data and photos read by Claude. Each week it reviews the results and proposes changes the owner can apply, reject or discuss. A daily alignment check arrives by text message, and every event goes on a record nobody can quietly edit.

The problem

Most habit apps are gentle. A missed session earns a soft reminder and a fresh start. Self-report makes it worse, because the person most tempted to bend the truth is the one entering the data. habit-daemon takes the owner at their word when they plan the week and enforces that plan days later, when renegotiating would be easier.

In use

  1. A habit's prompt arrives in Discord at its scheduled time.
  2. If it is ignored, the prompt steps up through five levels. The third reminds the owner why they chose the habit, drawing on their recent pattern of misses.
  3. For the rowing habit, the daemon reads the session from the rower's logbook. There is no "I did it" button.
  4. For the strength habit, the owner uploads a photo of the training log and Claude checks it lists real lifts.
  5. An evening routine is confirmed the next day against the wearable's record. At the last level, any habit not done is recorded as missed.
  6. Once a week it reviews the results and proposes plan changes the owner can apply, reject or discuss.

What it achieved

  • No habit counts on say-so: three are confirmed by a rowing machine's logbook, a wearable's data and photos read by AI, a fourth is answered by text message, and there is no "I did it" button.
  • A broken sensor never counts as a pass: the run is marked unresolved and reported as a technical problem.
  • Nobody can quietly rewrite what happened: every outcome goes on a log where each entry is sealed to the one before it, and the database refuses edits and deletions.
  • It keeps running unattended: a persistent circuit breaker stops dispatching when check-ins fail across the board, an account-wide AI failure pauses all dispatch and alerts the owner in plain language, and a heartbeat file and a kill switch complete the safety set.

The full record

On this page
In one sentence

Maxwell built habit-daemon, an accountability daemon that fires habit prompts on a schedule, escalates through five levels when they are ignored, verifies completion against real hardware (a Concept2 rower's logbook, a wearable's data and photo proof read by Claude vision) with no self-report fallback, holds a weekly review that proposes plan changes, and records every state change to a hash-chained, append-only log, measured at 16,075 lines of source in 149 source files, 27,625 lines of tests in 89 test files (773 test cases, written without mocks), 11 database migrations and 314 commits. He builds by directing AI agents, and he built this system that way.

lines of source
16,075
lines of tests
27,625
database migrations
11
commits
314

What it does

Prompts on a schedule, and escalates

  • Habits with their own schedules. Each habit has a cron expression in local time, an escalation cadence and a way to prove it was done. The three sensor habits are a rowing session, a strength session and an evening routine.
  • Five levels of escalation. An ignored prompt steps up every 30 minutes for the row and strength habits, and on a tighter window of minutes for the evening routine. At the last level the run is recorded as missed.
  • The WHY ladder at L3. The third prompt draws on three wells of motivation, chosen by a fixed rule rather than by a model: a pattern in recent misses (three or more of the same reason in 28 days, at most once every 14 days) comes first; then an anomaly in the wearable's data; then a rotation through three named stakes the owner committed to in advance, financial or relational, never the same stake twice in 7 days.
  • Priority ordering. The previous day's evening result is settled before the next day's first prompt fires, through a dispatch priority and a guard that defers that prompt by 60 seconds if needed.

Verifies against real data

  • The rower. A Concept2 Logbook connection over OAuth pulls the day's sessions and checks distance, duration and type against the window. From L3 on, a photo of the rower's monitor is also accepted.
  • Strength. A photo of the training log is uploaded in Discord and read by Claude vision, which requires at least three distinct lifts, each with weight and reps.
  • The evening routine, in two stages. The owner types a set phrase before the window closes; the next day the daemon checks the wearable's record against the target the owner set. A gap is recorded with its minutes and followed by a curious question, not a scolding.
  • A vision registry. Each kind of photo proof is an entry with its own prompt and thresholds, so adding a new proof is a registry entry, not a code change. Three rejected photos in one run are called out in the next prompt.
  • No self-report. If a sensor is down, the daemon retries the wearable every 6 hours for 48 hours and then marks the run as unresolved for lack of data, reported as an infrastructure issue, never as a pass.

Reviews the week and adapts the plan

  • Once a week, the review gathers the week's runs, classified miss reasons, skips, unanswered prompts, 30-day patterns and sensor data, and posts four sections: what the week looked like, patterns noticed, stable habits, and proposals.
  • Three-reaction proposals. Each proposal is a concrete change (a time, a threshold, a window). Apply updates the habit and records the prior setting so it can be reversed; Reject asks what was wrong; Discuss opens a Discord thread where the daemon asks two or three questions and the thread resolves to applied, rejected, a counter-proposal or deferred.
  • Miss classification. Every miss reason is classified, with specifics recorded as category:entity slugs and a confidence, feeding the pattern well.

A daily alignment check by text message

  • A fourth habit asks four fixed alignment questions and escalates hourly by iMessage until they are answered, bounded by a daily cap, a minimum interval and quiet hours, with every text logged so the limits survive a restart.

Chat, web interface and API

  • Conversation in Discord. The owner can talk to the daemon, and create, update, archive and restore habits by message.
  • A Hono HTTP API for habits, runs, statistics and a recent-activity feed, behind a web interface.
  • Five Discord channels: one for each of the three sensor habits, one for wins (a bare log of completions) and one for the weekly review.

A record that cannot be rewritten

  • Hash-chained events. Every event is hashed over its canonical form (RFC 8785) joined to the hash of the one before it; database triggers refuse any update or delete; and verifyChain recomputes the whole chain. Event types are fixed by a database check: habit flow, proposals, chat and habit changes, and sensor failures.
  • Durable storage. SQLite in write-ahead-log mode with foreign keys on and periodic checkpoints.

What it achieved

  • 773 test cases in 89 test files, 27,625 lines of tests against 16,075 lines of source, with no mocks.
  • 314 commits and 11 database migrations.
  • Three habits verified by hardware and vision, a fourth checked in by text message, every outcome on a tamper-evident record.
  • Reliability guards keep it running unattended (below).

The problem it solves

Most habit apps are built to be gentle: a missed run earns a soft reminder and a fresh start. Self-report makes it worse, because the person most tempted to bend the truth is the one entering the data. habit-daemon takes the owner at their word when they plan the week and enforces that decision days later, when renegotiating would be easier. It separates the moment of weakness from the moment of consequence, checks the rower, the wearable and the camera instead of asking, and keeps a record nobody can quietly edit.

How he built it

  • A design document first. ARCHITECTURE.md fixes the data model, the escalation cadences, the L3 selection rule, the proof types, the review format and the reliability rules.
  • Deterministic where it matters. Escalation timing, the WHY-ladder choice and proof thresholds are plain code; models write prompts and read photos.
  • Tests without mocks. The 773 test cases run against real SQLite and real modules, table-driven where possible, behind one pnpm gate that type-checks, builds and runs everything.
  • Strict TypeScript and validated output. Every model dispatch must end in a typed footer validated by a Zod schema before the run is recorded.
  • Reliability guards. A persistent circuit breaker stops dispatching when check-ins fail across the board. A global AI-dependency state pauses all dispatch once on an account-wide failure, alerts the owner in plain language without calling Claude, and probes for recovery with one controlled request. A heartbeat file and a kill switch round out the safety set.
  • Sensor adapters behind contracts. The wearable adapter is a Python shim with a four-value exit-code contract; the Concept2 adapter refreshes its own tokens.
  • Maxwell built it by directing AI agents, on Node, TypeScript, discord.js 14, the Claude Agent SDK, Hono and SQLite.