Add per-meal calorie cap (1000 kcal) + kcal/protein display

- SKILL.md RATIONAL PORTIONS: add ~1000 kcal/meal cap; trim starch/cheese/halloumi/lentil
  (not protein) if over; use scripts/calc_meal.py to check
- scripts/calc_meal.py: estimate protein/kcal/fibre/satfat for a meal's items, flag
  over_kcal (>1000) + per-item max_per_meal breaches (unit-aware); gates daily sends
- scripts/verify_portions.py: now also flags KCAL CAP violations via calc_meal
- references/calories.md: per-portion kcal/macro estimate table (source of truth)
- references/email-template.md + meal-history.md: show Est. kcal + Protein per card/entry
- daily cron prompt: compute + record kcal/protein_g on each entry, show kcal in email,
  enforce 1000 kcal cap before send (pushed via cronjob update)
This commit is contained in:
hermes
2026-08-29 08:17:43 +01:00
parent d4c5a8f658
commit f7c9b78dc1
5 changed files with 132 additions and 1 deletions

View File

@ -71,6 +71,9 @@ Schema:
>=85% of that meal's protein — e.g. a bowl of 10 sausages. A balanced plate where the lead
protein is capped but other proteins + veg contribute is NOT overload (a normal 4-egg meal
passes). So spread across 3+ different proteins (plus veg, grain, dairy) so the plate is varied.
**CALORIE CAP: each meal must stay at or under ~1000 kcal** (est., excluding unlogged cooking
fat) — run `scripts/calc_meal.py` on the meal's items to check. If a capped+balanced meal
would exceed 1000 kcal, trim starch/cheese/halloumi/lentil portions (not protein) until it fits.
**If capped + balanced meals still can't reach ~165 g/day with current stock, DO NOT fake it**
— produce the best balanced meal you can, state the realistic total, and list the top 23
things to buy (eggs, whey, chicken, tuna) to close the gap. Never suggest "10 sausages" or any