David HsiaoCase study / 03
Applied AI / native product
Working title · In active development · TestFlight validation · Not available on the App Store

WorkoutFrame: Correction-First Workout Intelligence

A native workout recorder that treats AI as an editable draft: on-device movement estimates support the live session, while queued video analysis builds a post-workout record.

RoleProduct + AI engineering
DeviceSwiftUI · Apple Vision
AnalysisGemini video
PipelineQueues · D1 · R2
01

Corrections are a first-class control.

Exercise, set, and rep estimates can be wrong, so the interface is designed around fast correction before, during, and after a workout. User-entered targets remain distinct from what the tracker observes, and the final timeline stays editable instead of presenting an AI result as unquestionable truth.

  • Live controls can correct the current exercise, set, and rep count.
  • Rest, weight, RPE, and the final exercise timeline remain editable.
  • Reanalysis creates a new draft without removing the user correction path.
02

Immediate estimates, deeper review later.

Apple Vision body-pose joints feed an on-device estimator for live completion events. After the workout, a separate Gemini video pass identifies exercises, sets, and reps with more context. The two loops serve different moments instead of forcing one model to own the entire experience.

03

Queue the expensive work.

The native client and Cloudflare backend separate recording from analysis. Workout media is stored in R2, D1 holds durable state, and a Cloudflare Queue runs video analysis with retry and generation fences so stale or duplicate completion attempts cannot silently replace newer work.

04

Video intelligence starts with permission.

Before the first upload, the app asks permission to store workout video with Cloudflare and share it with Gemini for analysis. Revocation stops future uploads and new analysis. Optional Apple Health matching remains on the iPhone, and the camera flow does not record audio.

05

Measure events, not just a final count.

The supporting evaluation harness compares video-model outputs and replays pose traces against event-level labels. The working criteria include completion precision and recall, false completions, missed reps, set boundaries, and visibility conditions; no accuracy claim is published before representative evaluation supports it.