{"call_it":"\"Plan today’s Hyrox training session\" by James Raybould","owner":"James Raybould","runbook":"https://myrunbook.ai/jamesraybould","n":27,"id":"mettle","name":"Plan today’s Hyrox training session","runner":"a training app I built","schedule":"on demand","description":"When I ask, today's session and how hard to go, worked out from my sleep, weight and every logged workout. Hyrox is a race of running, sleds and weights.","reads":["sleep and heart data from a ring","body weight and composition","every logged workout","race date and goal"],"lands":"A coaching answer in the app, with today's session and how hard to go","loop":"Each logged session feeds the next day's plan","source":null,"figure":"296 workouts logged","link":null,"example":{"kind":"invented","note":"You: What should I do today?\nCoach: You slept 6h 20m and resting heart rate is up two beats on the two-week average. Yesterday was an hour of intervals. Keep today easy: 45 minutes on the bike at a conversational pace, then ten minutes of mobility. Save the hard session for Thursday."},"output":"Training plan","build":"Ask first\n- What is the event and its date? (default none; the coach then trains for general fitness)\n- Training history, injuries, and any pace or load limits? (default a paragraph you write once)\n- How many sessions a week, and which days? (default five, your choice of days)\n- Which data can it pull? (default none; you log workouts, sleep and weight by hand)\n- Where do you ask it? (default a chat; a small app if you can host one)\n- What marks a poor night? (default sleeping heart rate 3 or more beats above the trailing 30-day average, or a sleep score under 70)\n\nNeeds\n- A workout log, one record per session: date, type, duration, distance or load, a hard-or-easy rating. A simple form to add them, or the person tells the assistant.\n- Sleep data per day (average and lowest sleeping heart rate, heart rate variability, sleep score, readiness) and weight entries, from a ring, watch or scale with a data interface, or typed in. Connecting: \"It reads your sleep, heart and weight figures; it writes nothing back to the devices.\"\n- The event and the athlete profile stored as data, not in code, so the date can be changed by chat.\n- If your assistant can only chat: each morning say how you slept and what you did yesterday, then ask what to do today; steps 3 and 4 work on what you say.\n\nBuild\n1. Read (sync): pull the ring and scale data a few times a day in windows, merging by day so reruns are safe. Fetch sleep one day past the end date, since some sleep endpoints exclude the end date.\n2. Read (ask): on each question, assemble the coach prompt from the profile, the event, recent workouts, body data and sleep. Give the coach a tool to fetch the full history on demand.\n3. Decide (rules): use only what is logged; never prescribe a pace or rep count the athlete has not done; a fast session appears every week except taper weeks; a poor night (the test above) makes today easier.\n4. Deliver: today's session and how hard to go, in the chat or app. Fallback: a message each morning with the same. Mark poor-night days on a calendar view.\n5. Memory: each logged session feeds the next day's answer. Weekly, archive the workout log to a notes page. A stronger model for the opening and closing turns, a cheaper one for tool calls; a few model calls per question.\n\nCheck\n- Ask what to do today: the answer names real sleep and workout figures from the log.\n- Log a badly slept night and ask again: the advice is easier.\n- Quiet run: a sync with no new data changes nothing and moves the stamp; the first real sync shows as today's row.\n\nIn my version\n- Mettle, my training app, for Hyrox (a race of running, sleds and weights). Oura ring for sleep and heart data, a smart scale for weight, race date as data, weekly archive to Notion. The workouts calendar marks a night amber on that poor-night test; the coach weighs readiness against its 14-day average.","built":{"method":"POST","url":"https://myrunbook.ai/api/runbooks/_bSFet4kFzjy/built","body":{"job":"mettle","by_handle":"<your own runbook handle, if you have one>","note":"<what you built, what you changed, what broke; up to 1200 characters>"},"ask_first":"Only send this after the person says yes.","link_for_the_person":"https://myrunbook.ai/jamesraybould/built?routine=27"}}