← back to blog
building xeve

We Built an Energy Forecast That Predicts Your Best Hours — Like a Weather Report for Productivity

7 min read

You know the feeling. It is 2pm on a Wednesday, you have a three-hour block free, but your brain will not lock in. You stare at the editor, open Slack, close Slack, check your phone. The time was available, but the energy was not.

The problem is not scheduling. It is scheduling blind. Calendar apps show you when you are free, but they have no idea when you are actually capable of doing your best work. So we built something that does.

The Energy Forecast

xeve's Energy page now includes a 7-day hourly forecast that predicts your energy levels for the upcoming week. It looks like a weather report — a heatmap calendar where each cell represents one hour of one day, colored by predicted energy from peak (bright orange) to depleted (dark gray).

The forecast answers one question: when should I schedule deep work this week?

It answers it not with generic productivity advice ("mornings are best!") but with your specific data. If your historical pattern shows peak focus at 10am on Tuesdays but a consistent dip on Wednesday afternoons — that is what the forecast reflects.

How It Works

The algorithm has two layers: a baseline and modifiers.

The baseline is built from your last 6 weeks of app usage data. For every hour of every day of the week (e.g., "Tuesday 10am"), xeve computes your average focus ratio — productive app time divided by total screen time. If you historically spend Tuesday 10am in VS Code and Figma, that hour scores high. If you historically spend Friday 3pm in Slack and YouTube, it scores low.

This baseline captures your natural rhythm. It is not prescriptive — it reflects what you actually do, not what a productivity book tells you to do.

The modifiers adjust the baseline using real-time signals:

  • Sleep — Less than 6 hours last night? The forecast drops your next-day scores. 7-9 hours? A small boost.
  • Recovery — If you wear a Whoop or similar, your recovery score shifts the entire day. Below 33%: significant penalty. Above 66%: slight bonus.
  • Meeting load — This is the big one. The forecast overlays your Google Calendar events directly on the heatmap. Hours with meetings are marked and scored at a fixed 30 (meetings are neither productive nor depleted — they are just occupied). Days with more than 3 hours of meetings get a penalty applied to the remaining free hours, because context-switching between meetings and deep work has a real cost.
  • Consecutive strain — Three or more days of high strain (from Whoop data) triggers a burnout flag and drops all scores.
  • Screen time fatigue — More than 10 hours of screen time yesterday? Your morning scores take a hit.
  • Weekend proximity — Friday afternoons get a small penalty (your data probably already shows this). Monday mornings get a slight boost.

The Calendar Gate

The forecast requires Google Calendar to be connected. This is intentional, not a limitation. Without meeting data, a forecast is just a historical average — interesting but not actionable. The meeting overlay is what makes it useful. You can see exactly where your peak hours overlap with meetings, and decide whether to reschedule.

If you have not connected Calendar yet, the Energy page shows a simple prompt to connect it from Settings.

Daily Briefings

Below the heatmap, seven day cards give you a quick read on each day:

  • Overall score — a single number summarizing the day's predicted energy
  • Peak window — your best contiguous block of 2+ hours (e.g., "PEAK 09-11")
  • Meeting load — total meeting hours from your calendar
  • Day type — classified as MAKER DAY (under 1h of meetings), MEETING DAY (over 3h), BALANCED, or RECOVERY (if burnout risk is flagged)

The idea is that you glance at these cards on Sunday night or Monday morning and know immediately which days to protect for deep work and which to accept as meeting-heavy.

Burnout Monitor

The third new section tracks your energy over time with a specific question: are you sustainable?

It shows your last 14 days of energy scores as a bar chart with a burnout threshold line at 40. Bars below the line are red. Above the line, orange. Two summary metrics sit above the chart:

  • 7-day rolling average — if this drops below 40, something needs to change
  • Consecutive low days — three or more consecutive days below 40 triggers a burnout risk warning

This is not a clinical tool. It is a signal. If your rolling average is dropping week over week, you can see it before you feel it — and block recovery time, reduce meetings, or simply take a lighter day before the crash.

Morning Notifications

The iOS app now supports local notifications for a daily energy briefing. When enabled, you get a notification at your chosen time (default 7am) that tells you today's peak hours and score.

The notification is local — it does not require a push server or APNs setup. The content updates during each background sync cycle. A typical notification reads:

"Peak hours 09:00-11:00. Score: 72/100. Schedule deep work now."

On heavy meeting days, the message adapts:

"Peak hours 09:00-11:00. Heavy meeting day (4.5h). Protect deep work blocks."

You can enable the briefing and set the time in the iOS Settings tab under the new Notifications section.

Energy Widget

A new Home Screen widget shows today's energy score, peak window, and meeting load at a glance. It follows the same industrial design as the existing Productivity widget — monospace type, dark background, accent orange for the peak hours. If burnout risk is active, a red dot appears in the corner.

The Data Pipeline

For the technically curious: the forecast is computed entirely server-side in the Next.js server component. A new PostgreSQL function (get_hourly_patterns) aggregates 6 weeks of app_sessions by day-of-week and hour in the user's local timezone. The daily rollup edge function now also aggregates calendar events into total_meeting_ms and total_meeting_count on the daily_summaries table.

The client component receives the fully computed forecast as props and renders the heatmap using CSS Grid — not a charting library. Each cell is a div with background opacity proportional to the predicted score. Meeting hours get a thin orange bottom border. Hover reveals a tooltip with the score, confidence level, and label.

Confidence is based on data density. If you have 6 weeks of data for "Tuesday 10am," the confidence is high. If you only have 1 week, the cell shows a question mark and the prediction is less reliable. This is honest — the forecast gets better as you use xeve longer.

What Changes

The forecast does not tell you anything you could not theoretically figure out by reviewing 6 weeks of your own data. But you will not do that. Nobody scrolls through 42 days of hourly app usage to find patterns. The forecast makes the invisible visible — your Tuesday afternoon slump, your Thursday morning surge, the way back-to-back meeting days kill your Wednesday focus.

Once you see the pattern, you can act on it. Block your peak hours. Move the standup out of your best window. Accept that Friday afternoon is for admin, not architecture. Or just glance at the widget before your morning coffee and know what kind of day it is going to be.

The Energy Forecast is live now at xeve.io/dashboard/energy. Connect your Google Calendar to unlock it.

Written by Kevin — builder of xeve

Track your apps, coding, music, and health — all in one place.

try xeve free