Skip to content

Full coach brief on tap; next-meal ideas that learn preferences - #18

Merged
gabrielbr merged 1 commit into
mainfrom
ccr-67ccb970-dqwwqd
Oct 20, 2026
Merged

gabrielbr merged 1 commit into
mainfrom
ccr-67ccb970-dqwwqd

Conversation

@gabrielbr

Copy link
Copy Markdown
Owner

Today: coach brief

  • Tapping the brief under the score rings now opens a sheet with the whole brief and an "Ask the coach about it" button.
  • Before, it opened the chat while the brief stayed cut at three lines.

Nutrition: next-meal idea

  • When it shows: once a third of the day's target has been eaten.
  • What it suggests: a plate of everyday Brazilian food and common fruit, sized to the calories left and the meal slot. Protein comes first when the user is short of it.
  • Actions: "Log this" logs the plate with its macros. "Other ideas" opens the coach with the suggestion.
  • How it's built: MealSuggester applies rules to a 24-food catalog, so it works without an AI key.

Coach tools

  • suggest_next_meal and get_food_preferences let the coach see the suggestion and existing preferences.
  • save_food_preference records an alternative the user agreed to, after the coach checks it against the goal.
  • Agreed preferences lead later suggestions while they fit the budget. Avoided foods or roles never appear.

Database: v31 adds food_preferences, which is archived.

Tests: MealSuggesterTest. CI green on 5a440db.


Generated by Claude Code

Today: tapping the brief under the score rings opened the chat, not the
brief, and the line is cut at three lines. It now opens a sheet with the
whole brief (title, body, chips) and an "Ask the coach about it" button.

Nutrition: once a third of the day's target is eaten, a "Next meal idea"
card suggests a plate of everyday Brazilian food and common fruit
(arroz e feijão, frango, tilápia, tapioca, cuscuz, banana, maçã…) sized
to the calories left and the slot's usual share, protein first when
short of the target. "Log this" logs it with its macros; "Other ideas"
opens the coach with the suggestion.

MealSuggester is rules over a small catalog, so the numbers add up and
it works without an AI key. In chat the coach can see the same idea
(suggest_next_meal), offers alternatives, checks a pushed-back choice
against the goal and calories left, and records what the user agrees
to (save_food_preference: slot, item, prefer/avoid, instead of what).
Agreeing again counts up. Later suggestions use agreed preferences
first whenever they still fit, and never an avoided food or role.

DB v31: food_preferences (archived).

Claude-Session: https://claude.ai/code/session_01P1t1aUqSUPd3whKXmgVm7w
@gabrielbr
gabrielbr merged commit 987b6d2 into main Oct 20, 2026
2 checks passed
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.

2 participants