Weidong Shi.

Local-First Habit Coach · 2026 · Live

HabitCheck

Missed days shouldn’t force fake checkmarks; people need honest recovery that keeps momentum real.

Problem worth solving

Most habit apps punish a miss with a broken streak or invite fake completion to keep the chart pretty. HabitCheck starts from a different promise: recover after missed days — no shame, no inflated checkmarks. Weekly targets stay flexible; recovery is a real path, not a rewrite of history.

Intended user

Busy adults building healthier routines who want a personal habit OS — not a social feed, not a medical product. Wellness language stays supportive and non-clinical. Offline and declined AI still leave a complete tracking app.

Place in the series

HabitCheck is AI in Action #4 · Better Living. It is the personal habit operating system in the family — not RetireCheck domain math, not SleepCheck sensory wind-down, not Readiness enterprise gates. Tracking is deterministic; coaching is first-class and gated.

HabitCheck Facts versus Coach trust pattern diagram
Facts come from code. Coach is optional AI — accept, edit, or dismiss. Never rewrite week truth.

Constraints that shaped the solution

  • At most three active habits — focus over feature sprawl
  • Flexible weekly target only (N of 7, Mon–Sun); formal miss only after Sunday
  • Smaller-version completion counts as recovery, not full done toward the weekly target
  • Local-first Dexie storage; optional AI sends whitelisted summaries only, behind per-action consent
  • UI always labels Facts (code) vs Coach (AI)

Architecture decision

A single Next.js PWA owns the product surface. Week math lives in a pure src/lib/tracking module — Vitest-covered, no Dexie, no fetch. Persistence is Dexie / IndexedDB. The AI path is a privacy gate plus POST /api/ai: versioned prompts, cost caps, fail-closed to Facts-only when offline or declined.

Governing rule: the model never writes scores or invents completion — Coach narrates; Facts stay honest.

HabitCheck local-first architecture with Facts tracking and gated Coach API
Browser PWA → tracking Facts + Dexie storage; Coach only through privacyGate → /api/ai.

Tradeoffs

  • Accepted: no accounts or multi-device sync so privacy stays a product story
  • Rejected: free chat and full-history model payloads; no streak theater that invites fake checkmarks
  • Delayed: break-habit modes and weekday-specific schedules until the weekly OS proves itself
  • Excluded: clinical claims, subscriptions, and app-store packaging for this case study

MVP product surface

  • Today loop with check-in, optional difficulty, mid-week at-risk banner
  • Recovery paths: smaller version, reschedule in week, restart day, AI Comeback
  • Pause (indefinite or until date) without rewriting history
  • Weekly review: Facts panel + Coach insight cards; ±1 Plan Adjuster with AI explanation (effective next Monday)
  • AI surfaces: Habit Starter, smaller-version refine, Comeback, Review cards, Plan Adjuster explain
  • Privacy page, master AI toggle, export/import, installable PWA

How AI was used — and what stayed human

AI-assisted engineering accelerated UI and coach surfaces under a written MVP contract. Human judgment owned the recovery promise, week-boundary rules, Facts vs Coach labeling, privacy gate, and what never ships (fake completion, clinical claims, chat that bypasses consent). Speed was not the achievement — honest progress under constraints was.

Privacy, security, reliability

  • Habit data stays on-device in IndexedDB via Dexie
  • AI is opt-in per action; only selected summaries leave the device
  • Offline / declined AI → Facts-only flows still complete
  • Vitest covers tracking math, privacy gate, and export/import
  • Wellness disclaimer: not medical advice or treatment

What was delivered

Lessons

  1. Lock the recovery promise before polishing coach copy — honesty is the product.
  2. Put week math in a pure module; treat AI as narrated guidance, not a second source of truth.
  3. Label Facts vs Coach in the UI so trust is visible, not buried in a privacy policy.
  4. Same series loop: Build → Validate → Improve → Document → Share.

Limitations and future considerations

HabitCheck is a personal-lab wellness showcase — not a clinical tool and not a multi-device sync product. Cloud accounts, break-habit modes, and monetization stay out of scope unless evidence clearly justifies them. The live app is the source of truth for behavior; the LinkedIn #4 post and this case study document the engineering lesson.

Full delivery narrative: AI in Action #4: I Used to Lie to My Habit App.

Sibling case studies: RetireCheck · SleepCheck · Readiness.