Skip to content

Add Diet & Exercise Tracking and Cookbook recipes#12

Open
jeremyandrews wants to merge 11 commits into
tag1consulting:mainfrom
jeremyandrews:recipe-diet-tracking
Open

Add Diet & Exercise Tracking and Cookbook recipes#12
jeremyandrews wants to merge 11 commits into
tag1consulting:mainfrom
jeremyandrews:recipe-diet-tracking

Conversation

@jeremyandrews

@jeremyandrews jeremyandrews commented Mar 31, 2026

Copy link
Copy Markdown
Member

Summary

Two optional recipes — Diet & Exercise Tracking and Cookbook — that work independently but complement each other when both are enabled. Designed for any health tracking goal: weight loss, athletic training, sleep improvement, body recomposition, managing a health condition, or general wellness.

Diet & Exercise Tracking

Daily nutrition and exercise tracking with four synced views and a project journal for long-term context:

  • Daily journal — Markdown files in Projects/Diet/YYYY-MM-DD.md with structured meal tables and running totals
  • Spreadsheetsfood-log.xlsx and exercise-log.xlsx for long-term trend analysis
  • Chat dashboard — Colored emoji bars with macro flags (← low / ← high), adaptive calorie targets after exercise, and net calorie tracking
  • HTML dashboard — Persistent Dashboard-Fancy.html with Chart.js weight trend, macro bars, exercise journal, food log, progress bars, coach's notes, and body composition metrics. Static shell loads external JS data files — daily logging only rewrites small JS files, not the whole page

The HTML dashboard can be served locally via any static file server (e.g., miniserve with a symlink directory to avoid exposing the full vault). See the recipe doc for setup.

Project structure follows the entity-journal pattern: Projects/Diet/Overview.md (user-defined targets and goals), Journal.md (running log), and Timeline.md (milestones). Users define their own calorie targets, macro splits, day types, weight phases, and event-prep modes — nothing is hardcoded to a specific sport or goal.

Weekly accountability: Sunday routine generates a four-section report (Great, Good, Bad, Ugly) with ranked improvement suggestions based on actual data, saved to Knowledge/Health/Weekly-Diet-Analysis/.

Sample chat dashboard (training day, after lunch):

=== Thu May 8 | Training Day | 7.2km tempo run ===

Calories ████████████░░░░░░░░ 1,480 / 2,450 (60%)
Net ██████░░░░░░░░░░░░░░ 768 / 2,450 (31%) ← after 712 kcal run
Protein ██████████████░░░░░░ 104g / 150g (69%)
Carbs █████░░░░░░░░░░░░░░░ 68g / 250g (27%) ← low
Fat █████████████████░░░ 62g / 73g (85%) ← high

Remaining (baseline): ~970 cal, 46g protein

Cookbook

A living personal cookbook (unchanged from previous description — family reviews, verdict-based filing, tool references, ingredient-driven meal design).

Integration

When both are active, meal logging from tracked recipes auto-populates nutrition data, and meal suggestions consider remaining macro budget. Either works standalone.

Files

File Type
Recipe docs  
docs/src/recipes/diet-tracking.md Recipe page — setup, journal format, data flow, dashboard examples, meal planning lifecycle, browser serving
docs/src/recipes/cookbook.md Recipe page — cookbook setup, recipe format, meal design
docs/src/recipes/index.md Two rows added to recipe table
docs/src/SUMMARY.md Two lines added to book navigation
Guidelines (template)  
template/Knowledge/Jesse-Guidelines/Diet-Logging-Flow.md Per-log-event flow, diet-today.js spec, alcohol rules, carb-load protocol
template/Knowledge/Jesse-Guidelines/Diet-Dashboard-Guidelines.md ASCII dashboard format, colored bars, flags, adaptive targets, sync rules
template/Knowledge/Jesse-Guidelines/Diet-Dashboard-Display.md Read-only status display (querying state without logging new data)
template/Knowledge/Jesse-Guidelines/Weight-Tracker-Guidelines.md Weight tracking, dual regression, progress bars, phases, body composition
template/Knowledge/Jesse-Guidelines/Fancy-Dashboard-Build.md HTML dashboard architecture — Layer 1 (static HTML) + Layer 2 (dynamic JS)
template/Knowledge/Jesse-Guidelines/Sunday-Weekly-Diet-Analysis.md Weekly accountability report format (Great / Good / Bad / Ugly)
template/Knowledge/Jesse-Guidelines/Cookbook-Guidelines.md Recipe format, filing rules, meal design, tool references
Project structure (template)  
template/Projects/Diet/Journal.md Entity-journal running log
template/Projects/Diet/Timeline.md Milestones and key moments
Data templates  
template/Dashboard-Fancy.html HTML dashboard shell (generalized, no personal data)
template/diet-today.example.js Example data file showing the window.DIET_TODAY contract
template/Knowledge/Health/Coach-Notes-Log.md Rolling log of dashboard coach's notes
template/Knowledge/Cookbook/Pantry/Garden.md Garden/orchard inventory for ingredient-driven cooking

Test plan

  • Diet tracker and cookbook recipe pages render in mdBook
  • Both appear in recipe index and SUMMARY navigation
  • Sample dashboard uses correct bar colors and zone thresholds
  • Dashboard-Fancy.html renders with diet-today.example.js (load in browser, verify sections appear)
  • Weight-Tracker-Guidelines includes regression prevention rules
  • Diet-Dashboard-Guidelines cross-references Weight-Tracker-Guidelines correctly
  • Cross-references between diet-tracking.md and cookbook.md resolve
  • Either recipe can be enabled standalone without referencing the other
  • Entity-journal files (Journal.md, Timeline.md) follow the pattern from other recipes
  • No marathon-specific or personal data in any template file

jeremyandrews and others added 11 commits March 31, 2026 16:12
…event-prep modes

Diet tracking recipe (diet-tracking.md):
- Added colored emoji bar dashboard with floor/ceiling metric rules
- Added adaptive calorie targets (base + exercise × burn rate)
- Added weight tracking section with phases, progress bars, trends
- Added fancy HTML dashboard (Chart.js weight visualization)
- Added event-prep modes (carb load, diet break, refeed)
- Added food identification rule (reuse recent entries to prevent drift)
- Added weekly accountability report format (Great/Good/Bad/Ugly)
- Added goals section with general-purpose examples
- Fixed sample dashboard bar colors to match floor/ceiling rules

Diet Dashboard Guidelines (template):
- Complete rewrite with colored bar specification
- Added adaptive calorie formula documentation
- Added weight tracker cross-reference
- Added fancy HTML dashboard rendering rules
- Added event-prep mode target overrides

Weight Tracker Guidelines (new template):
- Phase model (loss, maintenance, gain)
- Pace bar algorithm: range-as-subset visualization (20 blocks)
- Progress bars toward user-defined goals
- Body composition bars (fat/lean pace, single-block highlight)
- Design history documenting 5 iterations of bar rendering
- 10 regression prevention rules for bar rendering

Recipe index (index.md):
- Updated diet tracking description to reflect new features
Fancy-Dashboard-Build.md is the single source of truth for generating
Dashboard-Fancy.html. It documents the two-layer architecture (static HTML
rebuilt on weigh-in, diet-today.js rewritten on every food/exercise log),
the exact window.DIET_TODAY field-name contract, when to rebuild vs.
rewrite, static/dynamic section specs, error isolation rules, bar rendering
algorithms (range-as-subset pace, single-block composition, fill-to-position
progress), the verification step, and coach's notes continuity rules.

Coach-Notes-Log.md is a rolling 30-day log of notes rendered on the fancy
dashboard, used to maintain consistency and prevent advice from contradicting
itself across days.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…line

- Add hydration artifact exclusion rules to Data Pipeline: entries with
  '⚠️ hydration artifact' in Notes are excluded from the composition
  window; BIA readings within 4 hours of heavy exercise should be flagged;
  composition window requires ≥10 clean entries after exclusion
- Clarify Progress Bars section: two bars for two goals, never collapsed
- Update Fancy Dashboard section: add trajectory line spec (four reference
  weights: start, goal 1, goal 2, projected date weight), add pointer to
  Fancy-Dashboard-Build.md as single source of truth

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
New guidelines file covering the full per-log-event flow:
(1) parse, (2) estimate, (3) update journal, (4) append xlsx,
(5) rewrite diet-today.js, (6) show ASCII dashboard, (7) fancy
dashboard auto-updates — no HTML rebuild on food/exercise logs.

Also documents:
- Tiered exercise adjustment: ≤1,500 cal burned → 7%, >1,500 → 10%
- Full window.DIET_TODAY object shape with exact field names
- Alcohol rules: separate 'Alcohol' meal entry + next-day journal note
- Carb-load day protocol: 2,400–2,600 cal window, 400–500g carbs,
  ≤50g fat ceiling, three-point cross-check, mode banner
Replace the inline 'Fancy Dashboard (Optional)' section with a one-line
pointer to Knowledge/Jesse-Guidelines/Fancy-Dashboard-Build, which is the
single source of truth. Keeps all ASCII dashboard rules intact.
… rule

diet-tracking.md:
- New intro describing two-layer architecture and all major features
- Expanded What You Get: HTML dashboard, Coach-Notes-Log, tiered adaptive
  targets, carb-load protocol, alcohol enforcement
- Updated vault structure: Dashboard-Fancy.html and diet-today.js at root,
  Diet-Logging-Flow.md, Fancy-Dashboard-Build.md, Coach-Notes-Log.md
- Configuration section now references template files rather than inlining
  full file content; updated instruction file snippet with correct names
- How It Works: replace three-view sync with two-layer architecture; add
  carb-load, alcohol, and weigh-in flows; document diet-today.js rewrite
  on every food/exercise log
- Tips: update adaptive target description to tiered rates; fix file refs
- New Debugging section: stale bars, field name mismatch, Chart.js errors,
  textContent destroying child elements

cookbook.md:
- Add lookup-before-advising rule for equipment with tool reference files
Creates template/Knowledge/Cookbook/Pantry/Garden.md as a living seasonal
inventory with per-item harvest log tables that build multi-year harvest
patterns. Items with no "Last harvest" in the current year are available
for ingredient-driven meal design.

Updates Cookbook-Guidelines.md: adds Pantry/ to the directory structure
and updates ingredient-driven meal design step 1 to check Garden.md before
other inventory sources.

Updates docs/src/recipes/cookbook.md: adds Pantry/ to vault structure
diagram, updates mkdir setup command, updates instruction file snippet to
mention garden inventory check, and adds a "Garden & Orchard Inventory"
section explaining the harvest log format, seasonal availability logic,
and diet tracker integration.
…g, and missing guidelines

New template files:
- Projects/Diet/Journal.md and Timeline.md (entity-journal pattern)
- Dashboard-Fancy.html (generalized HTML dashboard shell)
- diet-today.example.js (sample data file showing the contract)
- Diet-Dashboard-Display.md (read-only status display guidelines)
- Sunday-Weekly-Diet-Analysis.md (weekly accountability report format)

Updated:
- diet-tracking.md: add proposed-diet-today.js lifecycle section,
  add Viewing in a Browser section (miniserve + symlinks)

The HTML dashboard template is stripped of personal data and renders
sections conditionally — metrics, weight chart, progress bars, and
coach's notes only appear when their respective data files exist.
All data files are optional except diet-today.js.
…p wizard

- Macro model: floors/ceilings/windows with rationale; goal chips and a
  bottom legend on every bar; fat rendered as a window (red when too low).
- Calorie target: exercise add-back with a tracker-overestimation haircut
  (discount 25%, add back 50%), replacing the tiered 7/10% formula.
- Day-Style Registry: dayStyle machine field plus a canonical registry
  (normal, endurance, refeed, sick, carb-load, fasting); HTML STYLE_PROFILES
  kept in sync; back-compat resolution for old data files.
- Setup wizard: new guideline deriving calorie/macro targets from BMR
  (Katch-McArdle when body-fat known, else Mifflin-St Jeor), inclusive
  sex handling, and a self-correcting calibration loop.
- Time-gated low flags (default 16:00); floor-miss trend monitoring (3 of 7
  days) surfaced in coach notes and the weekly report.
- Docs: getting-started/setup-wizard section, macro model, calorie formula,
  and day styles documented; recipe contract reconciled to the targets shape.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant