IRON & CHALK

Bodybuilding Meal Plan Architect · 12-phase periodization model

Live formulas v1.0 · RAW / DRY weights v5.6 · build 2026-06-14-15:25

Profile & Daily Macro Targets

Fill the blue cells; everything else recalculates. Phase macros come from Phase Reference, modifiers from Adjustments. Activity Multiplier is auto-computed below.

Client Information

Useful when hosting online. Each slug gets its own localStorage. URL:

Athlete Profile

Derived Stats

Phase Selection

Individual Adjustment Modifiers

Cardio, Climate & Sweat Rate — drives the Hydration tab

Baseline Phase Coefficients (g/kg of TOTAL bodyweight)

Macro g/kg Adjustment (g/kg) Final g/kg Grams/day Kcal/day
Protein
Carbohydrates
Fats
Phase Cal Adj (%TDEE)

Adjustment = Carb-tolerance + Age/Thyroid + NEAT layered on top of the chosen phase. Range Position blends Low → Mid → High (Lowest..Low..Slightly Low..Mid..Slightly High..Higher..Highest).

Final Daily Targets — use these for meal building

Protein
g
Carbs
g
Fats
g
Total kcal
kcal
vs TDEE
kcal

Physiological Warning Flags

    Activity Multiplier Calculator

    Fill the blue inputs. The Effective Multiplier auto-feeds the Activity Multiplier (above).

    1 · Inputs

    2 · Energy Breakdown (kcal/day)

    3 · Engine Constants (advanced)

    Table 1 — Master Macronutrient Table (12 Phases)

    All values in grams per kilogram of total bodyweight. Caloric adjustment is % of TDEE. Mid = avg(Low,High).

    Phase P Low P High P Mid C Low C High C Mid F Low F High F Mid Cal Low Cal High Cal Mid Primary Goal

    Source: Sub-section 5.1, Table 1. Use Low end for conservative dosing, High for aggressive, Mid as default starting point.

    Adjustment Modifier Tables

    Tables 3, 4 & 5 — these layer on top of the baseline phase macros.

    Table 3 — Carb Tolerance & Insulin Sensitivity

    Tier (Marker Profile)Carb Adj (g/kg)Fat Adj (g/kg)Protein Adj (g/kg)Preferred Carb Sources

    Table 4 — Age & Thyroid Status Modifiers

    Demographic / ConditionProtein AdjCarb AdjFat AdjNotes

    Note on N.E.A.T.

    N.E.A.T. is now fully driven by the Activity Multiplier Calculator below your profile (steps + job type). The old Table 5 has been retired — the calculator already auto-translates your daily movement into a multiplier that TDEE is multiplied by, so a separate N.E.A.T. tier table is redundant.

    Weekly Carb Cycling Planner

    Modeled on Table 7 — Joe Bennett / Neil Hill split. Edit the blue carb % cells; protein & fats compute. The weekly average auto-compares to your daily target.

    Daily target (kcal)
    Daily protein (g)
    Daily carbs (g)
    Daily fats (g)
    Day Training Split Carb % Protein (g) Carbs (g) Fats (g) Kcal Phys. Goal / Notes
    WEEKLY AVG
    vs TARGET (deviation)

    Carb % > 100% = above-baseline training day · < 100% = rest day. Fats are auto-calculated to land near total daily target kcal.

    Carb % Rhythm — see the week at a glance

    Daily Meal Builder

    Pick a weekday from the dropdown — the target row pulls that day's macros from the Weekly Cycle Plan. Daily Target (flat) uses the single daily target from Profile. Choose foods from the dropdowns and enter raw/dry gram weights; macros auto-fill and validate against the target.

    Switch weekday
    ★ Favorites
    No favorites yet — click ★ on any food in the search list below to add it here.
    Target P
    g
    Target C
    g
    Target F
    g
    Target kcal
    kcal
    TDEE-Adj kcal
    kcal
    # Food Weight (g) Protein (g) Carbs (g) Fats (g) Kcal Notes
    DAILY TOTAL
    DEVIATION vs TARGET
    DEVIATION VS TDEE-adjusted Target (kcal)
    VALIDATION
    Macro split (% kcal)

    If a macro shows ✗ ADJUST, change portion weights in 10–25 g increments on the right macro source. Carb sources move carbs, oils/nuts move fat, protein sources move protein. Target: all 4 columns green (within ±10 g P/F, ±20 g C, ±50 kcal).

    Daily Nutrient Summary — % of target covered by today's foods

    Target

    %DV is calculated against standard adult reference intakes (US FDA label values). This is a quick coverage check — it doesn't track absorption, interactions, or your individual needs.

    Saved Meal Plan

    Stripped, read-only view of every day you marked as Saved from the Meal Builder. Empty / unused food slots are hidden — only what you actually eat shows up.

    View

    Shopping List

    Aggregated raw/dry gram weights for every food on the days you select, with a 10% buffer to absorb scale error, spillage, and last-minute cooking loss. The list is sorted by total quantity (largest first).

    Scope
    Food Total (raw g) +10% Buffer Buy (g) Buy (kg / pack) kcal Tier / Category
    TOTAL

    The "Buy" column is the total raw/dry weight with the 10% buffer applied — that's what you should put on the scale at the store. "Buy (kg / pack)" rounds up to the nearest practical unit. Whole eggs are auto-converted from grams to count (50 g raw ≈ 1 large egg). Day pills with have saved data.

    Food Database — Macros per 100 g (RAW / DRY / UNCOOKED)

    ~90 common foods synthesized from Efferding (Vertical Diet) digestibility-first, Aceto carb hierarchy, Palumbo fat sources. Type exact names in the Meal Builder dropdowns.

    0 foods
    Food Protein Carbs Fats Fiber Kcal Tier / Category Allergens

    Macros per 100 g, raw / dry / uncooked weights (USDA FoodData Central + bodybuilding standards). Cooking only changes water weight, not the macro ledger here.

    Table 2 — S/A/B/C/D Tier Rankings by Phase

    Sanity-check overlay on your phase choice. S/A-tier is your defaults; B is situational; C/D should be avoided. Filter by phase or edit any cell to customize.

    Phase S-Tier (Optimal) A-Tier (Highly Effective) B-Tier (Situational) C / D-Tier (Avoid)

    Click any cell to edit. Changes persist to localStorage and replace the default for your client.

    Warning Flags & Health-First Checkpoints

    Hard physiological thresholds and the bi-annual bloodwork panel. Bloodwork overrides any macro plan.

    Warning Flags — Hard Physiological Limits

      Health-First Checkpoints — Bi-Annual Biomarker Panel

      Panel / MarkerWhat it tells you / threshold to act on

      Evidence Ratings

      PrescriptionEvidence Level & Source

      Hydration Protocol

      Strict application of Sub-Section 16.1: Daily Hydration Protocols. LBM-based baseline + training + cardio + climate + protein clearance, distributed hour-by-hour.

      Rest Day Target
      L/day
      Training Day Target
      L/day
      Hourly Sweat Rate
      L/hr (if tested)

      Inputs

      Drives the calculations below

      Calculation Breakdown

      Show your work
      Enter inputs to see the breakdown.

      Day-by-Day Breakdown — per-week targets, dynamic from your cycle + cardio days

      DayActivityCarb %Cardio?Target (L)

      Daily Schedule

      Front-loaded morning, peri-workout peak, nighttime taper.

      TimeVolumeAdditivesRationale

      Quality & Longevity

      Non-negotiable elite protocol

      Progress Tracker

      Weight, body fat, blood pressure, measurements, sleep, steps, and blood work — all time-stamped, all charted, all yours.

      Body Weight (kg)

      Body Fat (%)

      Blood Pressure

      Sleep (hours / night)

      Daily Steps

      Measurements (cm) — custom fields

      Blood Work — custom fields

      Progress Photos — front / side / back by date, AI visual comparison

      Session date
      Label (optional)
      Front
      no photo
      Side
      no photo
      Back
      no photo

      Photo Sessions — saved photos by date

      Visual Comparison — pick two sessions, the model judges direction

      Baseline (earlier)
      Current (later)
       

      Bodybuilding Meal Plan Architect

      Operationalizing Sub-section 5.1 — Macronutrient Prescriptions (12-phase periodization model).

      📸 Progress Photos — local AI vision setup

      Yes, this is possible. Here's how the picture tracker is wired and how to plug in a local vision model for real "is the client going in the right direction?" judgment.

      What ships by default (zero setup, fully offline)

      • Upload front / side / back photos by date — auto-resized to 400×600 to keep localStorage lean.
      • Each photo gets a 64-bit dHash perceptual fingerprint computed in pure JS at upload time.
      • Comparison: Hamming distance between the two sessions' hashes, per pose. Returns 0–64 (0 = identical, 64 = completely different) and a similarity %.
      • Verdict: "significant visible change" / "modest" / "minimal" based on the average distance. Detects change, not direction.

      Optional upgrade: real LLM judgment via local Ollama

      This gives you actual coaching-grade text — e.g. "Front: more shoulder separation and visible upper-ab outline. Side: lower-ab fat appears reduced. Overall trending toward the goal."

      🍥 Easiest path: the bundled iron-chalk launcher (no OLLAMA_ORIGINS setup needed)

      The iron-chalk binary included in the zip is a single self-contained executable that:

      • Serves the app on http://localhost:8765/ with no setup
      • Proxies /api/* calls to Ollama on :11434 and injects the CORS headers automatically — so you never need to set OLLAMA_ORIGINS
      • Probes Ollama on launch and shows whether your models are loaded
      • Auto-opens your browser

      Just double-click the binary. No terminal, no script, no flags.

      Steps to get Qwen-VL judging your photos

      Step 1. Install Ollama (single binary, no Docker) and start it however you like (Launchpad app on Mac, just running on Linux, system service on Windows).
      Step 2. Pull your vision model. With 16 GB VRAM, the q8-quantized 7-8B tier is sweet:
      # Recommended for 16 GB VRAM
      ollama pull qwen3-vl:8b            # ~8.6 GB, newest Qwen3-VL — DEFAULT in the app
      ollama pull qwen2.5vl:7b-q8_0      # ~8.5 GB, previous-gen Qwen 2.5 VL 7B
      ollama pull llama3.2-vision:11b-q8_0  # ~11 GB, Meta's 11B vision
      ollama pull minicpm-v:8b          # ~8 GB, very strong for the size
      
      # Lighter (faster, less VRAM)
      ollama pull llava:7b              # ~4.7 GB, fast
      ollama pull qwen2.5vl:3b           # ~3 GB, tiny but capable
      Step 3. Double-click the iron-chalk binary. It will:
      • Open your browser to http://localhost:8765/
      • Probe Ollama and print which models are loaded
      • Stay running in the background — close the terminal to stop
      Step 4. In the app, go to Progress → Progress Photos. The Vision provider is set to Ollama by default. The URL field shows /api (relative — this routes through the launcher's CORS proxy). The model is qwen3-vl:8b. Click Compare on any two saved sessions and the AI verdict appears below the perceptual-hash verdict.

      If you'd rather run the app from the raw HTML/JS/CSS (no launcher)

      You'd need to either set the CORS env var on Ollama, or serve the app and Ollama from the same origin. The launcher's CORS-proxy approach is the cleanest "no flags" option. If you do want to use OLLAMA_ORIGINS=*:

      # Mac / Linux (run Ollama manually in a terminal)
      OLLAMA_ORIGINS="*" ollama serve
      
      # Windows (PowerShell)
      $env:OLLAMA_ORIGINS="*"; ollama serve
      
      # Windows (CMD)
      set OLLAMA_ORIGINS=* & ollama serve
      
      # macOS launchd service: edit ~/Library/LaunchAgents/ollama.plist
      # Add <key>OLLAMA_ORIGINS</key><string>*</string> to EnvironmentVariables
      
      # Linux systemd: edit /etc/systemd/system/ollama.service
      # [Service]
      # Environment="OLLAMA_ORIGINS=*"
      # sudo systemctl daemon-reload && sudo systemctl restart ollama

      Then change the Ollama URL field in the app from /api to http://localhost:11434/api for a direct call.

      Building the launcher for your platform

      Linux x64 binary is pre-built and bundled. For Mac / Windows, run this once (requires Bun):

      # Mac (Apple Silicon)
      bun build --compile --target=bun-darwin-arm64 --outfile=iron-chalk launcher.ts
      
      # Mac (Intel)
      bun build --compile --target=bun-darwin-x64  --outfile=iron-chalk launcher.ts
      
      # Windows
      bun build --compile --target=bun-windows-x64 --outfile=iron-chalk.exe launcher.ts
      
      # Linux (other archs)
      bun build --compile --target=bun-linux-arm64 --outfile=iron-chalk launcher.ts
      Step 4. On the Progress tab, in the Progress Photos card header, set the dropdown to "Ollama (LLaVA / Llama-3.2-Vision)". Then on two saved sessions, click Compare. The AI verdict is appended below the perceptual-hash verdict.

      How the AI call works

      When you click Compare with the Ollama provider enabled, the app sends the two front and two side photos to POST /api/generate as base64, along with this prompt:

      You are a physique coach comparing two progress photos. Image 1 = earlier, Image 2 = later (front, side, front, side).
      For each image pair note: any visible changes in muscle definition, body fat, posture, or proportions.
      Then give a 2-3 sentence verdict: is the client trending in the right direction (e.g., leaner, fuller, more defined) or not?
      Be honest, specific, and avoid generic praise. Perceptual-hash similarity scores: front=…% side=…%

      The response is rendered as a separate verdict card so you can see both the local signal (perceptual hash) and the AI's qualitative read side by side.

      Tuning the prompt for Qwen 2.5 VL

      Qwen 2.5 VL is a chat model — it responds well when the prompt is framed as a system + user role. If you want crisper output, you can edit queryOllamaVision() in app.js to send the Ollama /api/chat endpoint with a messages: [{role:"system", content:"…"}, {role:"user", content:"…", images:[…]}] payload instead of /api/generate. Qwen2.5-VL's chat format gives notably more grounded, less generic answers on physique comparisons.

      Privacy

      The perceptual-hash path is 100% browser — no image leaves your device. The Ollama path is also fully local (sent to localhost), so no image is ever sent to a third-party server.

      Going further (when you want it)

      • Switch the app to Ollama's /api/chat endpoint and send Qwen-style system + user messages for noticeably better coaching prose.
      • Add the client's current Phase (cutting / lean bulk / maintenance) from the Profile as a system message, so the model knows which direction "good" means.
      • For pose-invariant similarity, layer in a small CLIP-ViT-B/32 in the browser via @xenova/transformers (~300 MB, fully local). Returns a 512-d embedding per image; cosine distance is more robust to small pose / lighting drift than dHash.
      • Long-term: a small fine-tuned regression head on the embeddings can estimate % body-fat change or lean-mass delta from a pair of images, going beyond "change / no change".

      Sheets & Purpose

      SectionPurpose & How to Use

      Color Legend

      • User input — change these to drive everything else
      • Formula output — do not overwrite; will break dependents
      • Lookup value or assumption — verify it matches your phase
      • Pass indicator — within target window
      • Warning — outside safe physiological range

      Quick-start checklist

      1. Open Profile & Targets. Fill in the blue cells under Athlete Profile.
      2. Pick your phase and range position. Then fill the Activity Calculator (steps, job type, sessions/week, minutes/session, intensity).
      3. Pick your carb tolerance tier, age bracket, and NEAT level. The Final Daily Targets are your numbers.
      4. Review the warning flags. If anything turns red, revisit your phase choice or your stats.
      5. Open Weekly Cycle to design your carb cycle. Open Meal Builder to build a sample day and validate.
      6. Rebuild the Meal Builder each time you swap a meal — the validation indicator catches drift.
      ⌬ DEBUG LOG