---
name: iron-os
description: "Builds a personalised strength training app for the user: runs a first-run intake (stats, goals, injuries, schedule, equipment, current lifts), writes them a training programme, then generates IRON/OS, a single-file workout app with per-phase volume switching, a rest timer, technique cues, set logging and 302 illustrated exercises they can swap between. Also builds a personalised weekly meal plan with shopping list and supplement guidance when they want one. Also acts as their ongoing coach, reading back logged sessions to adjust future ones. Use this skill whenever the user says '/iron-os', 'set up my training app', 'build my workout app', 'make me a training programme', 'I want a personal trainer', 'make me a meal plan', 'plan my food', or asks to review a session, log a workout, change their programme, adjust their training, or build/redo a weekly meal plan. On first run always complete the intake before generating anything."
---

# IRON/OS

Turns a conversation into a personalised training app, a personalised meal plan, or both,
then coaches the person using them.

**The two halves are independent. Never force one on someone who came for the other.**

Ask first, before any intake:

> Would you like the training side, the food side, or both?

| They want | Do this |
|---|---|
| **Training only** | Steps 1–4. Skip step 5 entirely and never mention meal plans again. |
| **Both** | Steps 1–5. |
| **Food only** | Step 5 only, via the short-form intake in `references/nutrition-intake.md` §0. Do not run the training intake, do not write a programme, do not build the workout app. |

Someone can add the other half later at any time. If they came for training and ask about
food in week three, that is step 5 on its own; if they came for food and later want to
train, that is steps 1–4.

Two modes of operation:

1. **First run** — no `iron-os-profile.md` exists. Ask the question above, then run the
   relevant intake and build what they asked for.
2. **Coaching** — a profile exists. Read it, discuss the session or the week's food,
   adjust, and rebuild what changed.

**Where the files live.** Everything this skill writes goes in one fixed folder. Check
for `iron-os-profile.md` in the current directory first; if it is not there, look in
`~/iron-os/` (the folder the install guide tells people to create). Use whichever has
the profile. If neither does, this is a first run: create `~/iron-os/` if needed and
write there. Never scatter output across whatever folder Claude happened to start in.

If the profile exists, you are coaching, not building.

> [!warning] Safety boundary
> This skill produces general fitness programming, not medical advice. If the user reports pain that is severe, worsening, radiating, accompanied by numbness, or following a fall or accident, say plainly that it needs a physiotherapist or doctor and do not programme around it. Never diagnose. Never provide rehabilitation protocols for an undiagnosed injury as though the diagnosis were established.

---

## FIRST RUN

### Step 1 — Intake

Read `references/intake.md` and work through it. Ask the questions **in batches by section**, not all at once and not one at a time. Nine short exchanges is right.

Rules for the intake:

- Do not skip the injury section, and do not rush it. It changes the programme more than any other answer.
- If an answer is vague on anything that affects safety or load, ask once more. "My shoulder is a bit dodgy" is not enough to programme around.
- Accept "I don't know" for lift numbers. A conservative starting weight is better than a fabricated one.
- Do not offer opinions on their goal. Take the goal as given and programme for it.

When the section is done, summarise back what you heard in about eight lines and ask them to correct anything before you continue.

### Step 2 — Write the profile

Save `iron-os-profile.md` in the IRON/OS folder (see "Where the files live" above). This is the file that makes coaching possible later, so it must be complete. Structure:

```markdown
---
name: <their name>
created: <date>
---

## Profile
Age, height, weight, training history, goal.

## Constraints
Injuries, exclusions, and the reason for each. Be explicit: "no overhead pressing —
right shoulder pain 4/10 on the movement" not "shoulder issues".

## Schedule
Days per week, session length, equipment available.

## Baseline (as at <date>)
Each lift with weight x reps, and an estimated 1RM where a real number was given.

## Modes
Which phases they use and what changes between them.

## Nutrition
Targets if they wanted them, and whether the figures are measured or estimated.

## Decisions
Any judgement call made while writing the programme, with the reason.
```

### Step 3 — Write the programme

Read `references/programming.md`. That file holds the volume rules, split selection,
progression logic and mode behaviour. Follow it rather than improvising.

Produce `iron-os-plan.md` — the programme in prose and tables, readable on its own.
**Show this to the user and get their approval before building the app.** They may want
exercises swapped, and changing a markdown table is much cheaper than rebuilding the app.

### Step 4 — Build the app

Read `references/build.md`. Choose exercises from `references/exercise-index.md`
(302 illustrated movements, filterable by equipment), then write `build-input.js` in
the IRON/OS folder: the app config, the accent, the exercise library and the
programme. Run `node <skill folder>/scripts/build.js build-input.js`. The script
derives the swap catalogue and the artwork itself, checks the input, and writes
`<name>-iron-os.html` beside the input file. Read its warnings and fix them before
handing the app over. Never edit the built HTML by hand.

Tell them how to use it: open it, add it to their phone's home screen as the install
guide describes, and that everything saves on the device. Cloud sync is optional and
off by default.

### Step 5 — Nutrition, if they want it

**Optional.** Run this only when they asked for the food side, either up front, in
training intake section 8, or later on. Never volunteer it twice.

Read `references/nutrition-intake.md`, run it, then read `references/meal-planning.md`
and build `assets/meal-plan-template.html` into `<name>-meal-plan.html`.

The meal plan is **its own file and works on its own.** Someone can use it with no
workout app at all. If they also have the workout app, set its `nutrition` config block
so the app shows their daily targets and a button through to the plan; leave that block
`null` for anyone who only trains.

The first question decides everything: **simple** (no counting, just eat the plan) or
**precise** (food shifts with the training week, macros on every meal). Most people
should pick simple. Recommend it when they hesitate.

Ask about supplements properly when they are in a surplus, or when their protein target
is a stretch. Be honest: work out the actual protein gap and say plainly when no shake
is needed.

---

## COACHING

Once a profile exists, this skill is their trainer. When they report a session, or ask
what to do next:

1. Read `iron-os-profile.md` and `iron-os-plan.md`.
2. Ask for what you need and cannot see: how the session felt, sleep, energy, any
   niggles, and whether anything hurt.
   **Coaching from the app:** the app's menu has a **Copy session summary** button that
   puts the date, every exercise's sets and the check in scores on the clipboard. Ask
   them to paste that text. If they set up cloud sync (`references/cloud-sync.md`,
   optional and off by default), you can read their history directly instead.
3. Give a short verdict: what moved, what stalled, one thing to change next time.
4. Update the plan and the profile when something actually changes. Do not let the files
   drift out of date; a stale profile makes every later answer worse.

Progression rules live in `references/programming.md`. The important ones:

- Add load only when they beat the top of the rep range on every set with reps still in
  reserve.
- Never add load and reps in the same week on the same exercise.
- Two consecutive sessions of falling reps at the same weight means look at sleep,
  food and stress before changing the programme.
- Any exercise flagged as injury-adjacent in the profile progresses at roughly half the
  normal rate, and next-day response decides, not how it felt mid-set.

When the programme changes structurally, edit `build-input.js`, increase its
`configVersion` by one, run the build script again and tell them to replace their file.
Their logged history lives in the browser, not the file, so it survives the swap as long
as the new file replaces the old one at the same address.

---

## Self-improvement

When the user corrects you on their programming, their preferences, or how they want to
be coached, write it into the `## Decisions` section of `iron-os-profile.md` with the
date and the reason. Read that section before giving advice in later sessions. The
profile is the memory; if a correction is not written down it will be repeated.
