aslope

A camera-based focus coach that catches you slouching or reaching for your phone, delivers a personalized AI nudge, and trains your brain to bounce back. No shame, no blockers.


Inspiration

I have ADHD, and the thing that wrecks my focus is not the distraction. It is what happens half a second after I notice it: the jolt of panic and self-blame, the shame cycle. The distraction is cheap. The emotional friction that follows is what actually costs me the next thirty minutes.

This is not just a feeling. Mark et al. (2008) found that a knowledge worker is interrupted roughly every 11 minutes and needs about 23 minutes to fully return to task. If you model the share of time actually spent in productive focus as

$$ P = \frac{t_{\text{focus}}}{t_{\text{focus}} + t_{\text{recover}}} $$

then with $t_{\text{focus}} = 11$ and $t_{\text{recover}} = 23$ minutes you get $P \approx 0.32$. Only about a third of the day is real focus. For people with ADHD, the recovery term is neurologically larger, and every recovery is taxed again by shame. Most productivity tools attack the wrong variable. Blockers and timers try to shrink interruptions, but the real leverage is in the denominator: cut $t_{\text{recover}}$, the time it takes to bounce back.

My capstone, Anchor, was my first attempt at this. I reverse-engineered a Bluetooth smart ring and paired it with a desktop app, so that when I caught myself drifting I could click the ring and instantly receive AI-generated, context-aware encouragement instead of spiraling. It externalized the act of refocusing and logged every recovery as a win.

Anchor worked, but it had a catch: it required me to notice and choose to click. aslope is the question Anchor left me with. What if the system noticed for me? What if refocusing did not depend on me having the self-awareness, in the worst moment, to act?

The name is the joke and the thesis: the slow slope of a slouching spine, and the slippery slope of one glance at your phone becoming twenty minutes gone.

What it does

aslope quietly watches your work session through your laptop camera and looks for the two behaviors that most reliably mark the start of a drift: slouching and picking up your phone. The instant it sees one persist, it does not scold you. It delivers a personalized nudge that was generated for you in advance: an image, or a short line spoken aloud by an AI voice coach. You correct, you recover, and it logs the win.

After each session, the system reasons about what just happened. It looks at how often you slouched, how often you reached for your phone, and crucially how fast you recovered each time, then it tunes the next session's nudges and tasks to what actually worked for you. The dashboard shows a Log of Wins rather than a tally of failures.

Each user picks a framing that fits them. Reward mode shows aspirational imagery of focus and good posture. Consequence mode shows the long-term cost of the habit. Neither mode ever blames the person. The framing is always about the trajectory, never about failure in the moment.

How we built it

The entire build was done with Claude Code, and the whole architecture follows one rule: slow generation never touches the real-time path.

The system runs on two clocks. The slow clock runs at the start and end of a session and handles all reasoning and asset generation. The fast clock runs continuously during the session and handles detection and reward delivery, with a latency budget under 300 milliseconds from trigger to on-screen nudge. Redis bridges the two: the slow clock fills a cache of ready-to-serve assets, and the fast clock only ever reads from it.

  • The Anthropic API is the orchestration brain. Using the Messages API MCP connector, a single Claude call both reasons and drives generation: it writes the prompts, generates the quote pool, and calls Midjourney directly through the connector. After a session, Claude does the heavy reasoning that personalizes the next one.
  • Midjourney generates the nudge imagery, themed to each user's interests and chosen mode.
  • Deepgram is the voice coach, reading the nudge aloud. Top lines are pre-rendered during prep so the first nudges are instant.
  • Redis is both the fast-clock cache and cross-session agent memory, using vector search so the coach can semantically recall past wins.
  • Sentry wraps the long-running generation jobs, the CV loop, and the IPC layer, since the most failure-prone parts are the multi-step pipelines and the flaky third-party servers.

Challenges we ran into

The biggest design challenge was latency. Midjourney takes tens of seconds to minutes, and a nudge that arrives a minute after you slouch is worthless. Recognizing that it simply could not live in the real-time loop, and then redesigning around pre-generation plus a Redis cache, was the decision that made the whole thing feasible.

The Midjourney MCP server was the flakiest integration. It is prerelease, and we hit OAuth and Cloudflare challenge errors more than once. We mitigated it by generating a real image stock early while the connection was healthy and making the cache able to serve pre-baked images so the demo never depended on a live call.

Computer vision was the riskiest core, so we built it first. Posture detection only became reliable once we added a calibration step to capture each person's good-posture baseline, plus persistence thresholds and a cooldown so the system was not firing constantly or reacting to a single shift in the chair.

The hardest challenge was not technical. It was making sure the consequence framing never tipped into shame, because shame is the exact thing we are trying to remove. Every generated line had to be about the trajectory, not the person.

What we learned

The deepest lesson came from Anchor and shaped aslope directly: the metric you choose can quietly sabotage the goal. Anchor's original dashboard counted clicks, but a raw count cannot tell resilience apart from dysregulation. A frantic, spiraling day and a calm, recovering day could produce the same number. That insight led to the Focus Wall idea of banking focus intervals instead of counting interruptions, and in aslope it became the principle that recovery time, not interruption count, is the real measure. Faster bounce-back is the thing worth optimizing.

We also learned that passive sensing changes the psychology. Anchor required a deliberate act, which gave the user agency but also a way to fail by simply not clicking. aslope removes that dependency, but it raises a new responsibility: a system that watches you has to be gentle, or it becomes one more source of pressure. That tension drove most of our design decisions.

What's next for aslope

The research framework from the Anchor capstone still points the way. The next real step is a within-subject feasibility pilot to test whether aslope genuinely helps people redirect faster and feel less shame, grounded in established behavioral approaches to ADHD intervention rather than in how useful people merely say it looks. Perceiving the value of a tool is not the same as testing it, and recovery time finally gives us an honest number to test against.

Built With

Share this project:

Updates