RU
🗂️ Personal Systems

On Four Hours of Sleep, Every Task Looks Doable. I Built a Card That Says How Much to Cut

A voice diary, ring sleep data with a ±30-minute error bar, and a table I agreed to while rested: a week of short nights becomes a concrete cut to the day, down to minutes of housework. How it's built in Home, my private app, and the rules you can reuse.

For a while now my nights have been short. I go to bed tired, my body won’t settle, and I fall asleep very late. It’s being treated, with doctors involved, and I’m leaving that part to them. No card replaces that.

This post is about the part no doctor schedules: the next morning. Work, dishes, a workout, the flat that needs cleaning. On four hours of sleep each of those looks doable on its own, and I say yes to them one at a time. The day as a whole then fails.

So I moved the decision out of the morning. Home, the private app my partner and I run on our own server (series map), now has a card. I type last night’s sleep from my Oura ring into it, and it answers with a level and a budget from a table I agreed to on a calmer day. Optional load means everything I could skip that day. Say, a week of four-hour nights reads: heavy, cut optional load by 50–70%, house chores 0–30 minutes.

Sleep and load a guide, not a medical norm

Short over 7 nights

24.7 h · heavy

range with ring error: 21.2–28.2 h · need 7.5 h, ring −30 min

4:221
3:482
4:113
3:254
4:305
3:566
3:347

Cut optional load by 50–70%

House chores: 0–30 min a day, zero on a bad day. An upper limit, not a target. You don't have to spend what's left on chores just because you physically can.

WorkShorter day or fewer tasks

HomeBasics only: dishes, rubbish, hygiene

CleaningVacuuming and floors: delegate or postpone

SportNo intense training; light movement if it feels good

PeopleFewer meetings

ProjectsOptional tasks on pause

RestA priority, even when sleep doesn't come

Better not to drive today.

If this lasts several days, talk to the doctor managing the treatment. Don't make up for it with caffeine, sport or willpower.

Illustration with entirely made-up data; the real page is in Russian.

The arithmetic was the easy part. The effort went into the rules around it: how a mumbled morning sentence turns into a clean diary entry, and how a ring’s flattering number gets an error bar.

Between 13 and 15 November I added three pieces to Home’s Health page, where medical letters and results live (part 4): a diary I talk to, a list of medications, and the sleep card.

A diary I talk to

The card needs more than the ring’s number: its rules look at how bad the symptoms were. So I dictate a few sentences into the Health page, the way I’d tell a friend: bad night again, lay down at midnight, asleep around four, took the usual in the evening, no coffee, I’d say eight out of ten.

Claude turns that into an entry (the text goes to Anthropic’s API, more on that at the end): the night it belongs to, each symptom with a 0–10 severity and where in the body, minutes to fall asleep, hours slept, medications with doses, and anything I mentioned as a possible factor. For any symptom the page draws the last 30 nights as a grid, green to red.

The rules that make it work are bookkeeping:

  • A night belongs to the evening it started. “Last night” said in the morning means yesterday’s date; “lay down and it’s back” said at 11 p.m. means today’s. The prompt spells out the cases, down to “after midnight but before about six”, which counts as the night that started the evening before.
  • Same thing, same name. The parser gets the list of symptoms already in the diary and reuses them, so “again” lands in last week’s series instead of starting a new one. One symptom stays one symptom wherever it’s felt; the body parts go in a separate field.
  • The model does the arithmetic. “Lay down at midnight, asleep at four” is 240 minutes to fall asleep. I’m not doing sums first thing in the morning.
  • What didn’t happen counts. “No coffee” goes in as a factor. A later search for patterns would need the nights without it too.
  • Keep the raw words. If the model call fails, the server saves the entry anyway, marked “not parsed”. I’d stop using a diary that loses a night to an API hiccup.

I don’t take the model’s answer as is either: the server checks the date and keeps severity within 0–10.

Medications as a list

The first version stored medications as whatever I said. I replaced it within the hour, before there was anything to migrate: a spoken diary mixes brand and generic names, and “did the dose track the bad nights?” only works if both spellings point to one thing.

Now Home keeps a short list: what each medication is, its brand name, the strength of one capsule, the usual schedule, and a status (taking now, as needed, or stopped, with dates). A diary entry points to an item on that list and records the dose. In a real entry, “two capsules” came out as the right medication with the dose in milligrams, worked out from the capsule strength on the list.

When the parser meets a medication it doesn’t know, it adds a draft item marked “check” and the page tells me. The list stays clean, and nobody asks me questions in the morning.

With doses stored as numbers, the night grid prints the dose under each date and colours the cell by the symptom’s severity. I want that grid on the table at the next appointment, in place of my memory of a month of nights. Reading it is the doctor’s job; dose changes are the doctor’s call.

Ring data with an error bar

I wear an Oura ring. In the morning I type its total sleep into the card as “4:10”, “4h 10m” or “4.2”. Typing the same night twice replaces it.

I assume the ring can flatter you: lie still and awake, and it may count that as sleep. So the card subtracts 30 minutes from every night and carries ±30 minutes of error. I picked both numbers; nobody measured them. They sit in settings next to my sleep need, 7.5 hours by default, and I change them from the health chat: “my norm is 8 hours”.

Then the plainest sum I could think of. For each of the last seven nights, how far short of the need was I? A week of nights at four hours after the correction comes to 24.5 hours. The card shows a range around it, here about 21 to 28 hours, because one number would claim a precision the ring doesn’t have.

Two more rules raise the level, one from the diary and one from last night (the levels are in the table below). If four or more of those seven nights have a symptom at 7 or worse, the level goes up a step (unless it’s already heavy): I assume a night spent fighting symptoms costs more than the same hours of quiet sleep. And if last night came out under four hours after the correction, the level is at least “noticeable”, whatever the weekly total says.

What the level means for today

Short over 7 nights Level Cut optional load by House chores, at most
under 5 h fine — as usual
5–10 h light 20–30% an hour
10–18 h noticeable 30–50% 30–45 minutes
18 h and more heavy 50–70% 0–30 minutes; zero on a bad day

I chose these numbers for myself and approved them. They aren’t a medical norm or a measure of anyone’s capacity.

The heavy row is advice I was given and agreed with: after a week of four-hour nights with poor sleep every night, cut optional load by roughly half to two thirds for a while. It was meant as a practical guide, to stop me living as if nothing were going on. The heavy row follows it almost word for word. Claude drafted the softer rows, and I kept them.

“Cut 50–70%” means nothing at the kitchen sink, so under the level the card breaks it down by area: work, home, cleaning, sport, people, side projects, rest. At the heavy level that reads: a shorter day or fewer tasks; dishes, rubbish and hygiene only; vacuuming and floors delegated or postponed; no intense training; fewer meetings; side projects paused; rest as a priority even when sleep doesn’t come.

Under the chores budget sits the line I’d underline: you don’t have to spend what’s left on chores just because you physically can. The original advice put it in kitchen terms. If mopping the floor leaves nothing for dinner, for talking to anyone or for a quiet evening, mopping can wait.

Two notes appear only when they apply. When last night was under five hours after the correction, or at the heavy level: better not to drive today. And once the heavy level has three or more nights of data behind it: talk to the doctor managing the treatment, and don’t try to pay back sleep with coffee, hard workouts or willpower.

Why a rule

What I want from the card is an end to the morning negotiation. On four hours each task passes “can I do this?” on its own, and the day as a whole fails. I agreed to the table while rested, so in the morning I read the answer instead of arguing with myself.

I plan to show the card at home, too, so the cut to chores becomes a rule we both read, not a favour I have to ask for.

Where it stands

The card is a few days old, so I can’t yet say whether it changes my mornings. Three things are still open: whether minus 30 minutes and ±30 are the right numbers, what my doctor makes of the night grid, and whether the card becomes a rule at home.

Build your own: paste this into Claude Code

This sets up the diary, the list of what you take and the card, not diagnosis or treatment. You pick the table’s numbers on a rested day, and reading the night grid stays with your doctor.

prompt.md
Help me build a spoken sleep diary and a daily planning card. Step by step, ask before anything irreversible.
You are not a doctor: this is a diary and a planning rule, never diagnosis or treatment. When something needs
a doctor, say so.
1. I dictate a few sentences each morning. Turn them into an entry: the night it belongs to, each symptom
with a 0–10 severity and where it's felt (a separate field), minutes to fall asleep, hours slept, what I took,
and anything I name as a factor, including what didn't happen ("no coffee"). Do the time arithmetic yourself.
2. A night belongs to the evening it started: "last night" said in the morning is yesterday's date, and after
midnight but before about six counts as the evening before. Give the parser the symptom names already
in the diary and reuse them. Keep my raw words with every entry; if parsing fails, save it anyway,
marked "not parsed". Check the date and keep severity within 0–10 before saving.
3. Keep what I take as a list I confirm myself; an entry links to an item on it. An unknown item becomes a draft
marked "check" that the page shows me, never a silent new entry and never a question in the morning.
For any symptom, draw the last 30 nights as a grid, green to red, for me to bring to the doctor.
4. I type last night's total from my ring as 4:10, 4h 10m or 4.2; the same night typed twice replaces it.
Subtract a correction and show an error bar. The correction, the error and my sleep need are settings I change
in chat; they are my guesses, not measurements. Show a range, never a bare number.
5. Sum how far short of my need I was over the last 7 nights and map it to levels (fine, light, noticeable, heavy),
each with a cut to optional load and a cap on house chores. Propose the numbers; I approve them on a rested day.
Raise the level a step if 4 or more of those nights had a symptom at 7 or worse; make it at least "noticeable"
if last night was under 4 hours after the correction.
6. Head the card with "a guide, not a medical norm". Break the cut down by area: work, home, cleaning,
sport, people, side projects, rest. Add the line: "you don't have to spend what's left on chores just because
you physically can." Only when they apply: a short night or the heavy level means better not to drive today;
the heavy level over 3 or more nights means talk to my doctor, and don't pay back sleep with coffee,
hard workouts or willpower.
7. Diary text sent to a model goes to a third party. Tell me so before the first call, and keep the raw entries
on my own disk.