Food Flow Explorer

The router: what kind of sentence, and about what

1. What kind of sentence, and about what?

Every sentence is one of four kinds: an answer to something we asked, a correction of something we did, a query (asking us something), or an action (asking us to do something). The kind is decided first, from the words. The subject is decided second. The module receives both.

R0 The person says something by voice, by typing, or by tapping one of the choices on screen Howard R1 ◆ Is it an answer to something we were waiting to hear? a tap, a yes or no, a number, one of the names we offered, or "I don't know" RQ §5 · FR §11 · Howard yes R1a An answer goes to the module that asked; it picks up where it left off RQ §5 · FR §11 no if we were waiting, that question is set aside now; asked again later if it still matters R2 ◆ Is it a correction of something we already did? "no, it was Dave's", "change that to 3/4 cup", "delete the eggs", "no, faster" FR §11 · Howard yes R2a A correction goes to the module that owns what is being corrected FR §11 · Howard no R3 ◆ Is it asking us something, or asking us to do something? "how much protein today?" is a query; "log", "set", "mute", "go to" are actions RQ §9 · Howard a query an action R4 ◆ About what? decided by the words; a model sorts it only when the words can't. The kind travels with the sentence to the module. RQ §9 · RQ §3.1 · Howard R5a Food its data, its settings RQ §9 R5b Workout its data, its settings RQ §9 R5c To-dos, notes, lists its data, its settings RQ §9 R5d The app itself app settings, mute, screens RQ §9 R5e None of ours decline, or a model, by policy proposal Each module receives the kind with the sentence: a query about its data, or an action on its data or on one of its own settings. Settings are of two kinds: the app's own ("speak slower", "mute") go to the app module; a module's own ("stop telling me protein") go to that module.
  1. Before the four kinds, the router discards what is not aimed at the app at all: background conversation, or nonsense that fits no kind and no subject. That is where "I didn't understand that" lives. A food-shaped sentence with an unfamiliar food is not nonsense; it goes to food, which searches for it (part 2).
  2. The order is deliberate. An answer is checked first because we know exactly what we asked and what an answer to it can look like. A correction second, because "no, it was Dave's" is not a new food even when nothing is waiting. Then query or action, then the subject.
  3. A sentence that names new foods and has no "yes", "no", or "number 2" in it is never an answer. That one rule would have kept "two bananas and a quarter cup of cottage cheese" out of the Chobani question.
  4. Only the subject decision may involve a model, and only when the words alone can't say what the sentence is about. The three kind decisions are settled by rules.

1b. The same thing as a case table

Kind down the side, "nothing waiting" and "waiting for an answer" across the top, an outcome in every cell. The diagram is only right if no cell is empty or wrong. This is the check a reviewer should run on the code too.

KindWhat the person saidNothing is waitingWe are waiting for an answer
NoiseNonsense, or background talk not aimed at the app ("three flibjopolis", two people chatting)Disregard it if it reads as background; otherwise say "I didn't understand that" and stop. Never logged, never routed.Same; the waiting question stays and is asked again once.
AnswerA tap on one of the choicesCannot happen; no choices are on screen.That choice is the answer; to the module that asked.
Answer"Yes", "no", "number 2", "the second one", one of the names offeredNothing to answer. Try the rows below; if none fits, say "I wasn't asking anything" and stop.The answer; to the module that asked.
Answer"I don't know", "not sure", "just estimate it"Nothing to answer; treated as the rows below.The answer; the module ends its question honestly (an estimate said plainly, or the assumed amount), never a dead end.
Answer"Cancel", "never mind", "forget it"Nothing to cancel; say so.Close the question. Nothing is written.
Answer"Um", "hmm", a half wordIgnore it.Ask the same question again, once.
Correction"No, it was Dave's", "change that to 3/4 cup", "delete the eggs", "no, faster"To the module that owns what is being corrected (food, or the app for a setting).If it is about the thing the question is about, it replaces the question. Otherwise the question is set aside, the correction runs, then the question is asked again if it still matters.
QueryAbout a module's data: "how much protein today", "what did I bench last time"To that module as a query; answered from the log; nothing written.Same; the waiting question is set aside the same way.
QueryAbout the app: "what voice speed is set", "what model are you using"To the app module; answered; nothing written.Same; set aside.
QueryAcross modules: "what did I do today"A small reporting job of its own, reading every module; nothing written.Same; set aside.
QueryAbout nothing we track: "weather tomorrow"Declined, or handed to a model, by policy; never logged.Same; the waiting question stays and is asked again.
ActionLog something: new foods with no yes/no/number in it, "log a to-do", "start my workout"To that module as an action.Same; the waiting question is set aside, asked again after, or dropped if the new sentence covers the same thing.
ActionA module's own setting: "stop telling me protein", "always assume Dave's"To that module as a setting change; confirmed in one sentence.Same; set aside.
ActionThe app's own setting, state, or screen: "speak slower", "mute", "go to the food screen"To the app module.Same; "mute" also closes the waiting question, like cancel.
ActionNothing we can do: "order a pizza"Declined by policy.Same; the question stays and is asked again.
?The rules find nothing aboveOne short question, never a chat reply.One short question: "Is that for the yogurt, or something new?"
  1. The rows are tried in this order. A sentence that fits an earlier row never reaches a later one.
  2. "Set aside" always means the same thing: the question is no longer open while the new sentence is handled, so nothing said next can accidentally answer it. It is re-asked in one sentence afterwards, or dropped.
  3. Two of this morning's failures are two cells here. The bananas were the first Action row, right column, and today's code has no rule there. The Chobani "Yes" was the second Answer row, applied to a question that should already have been set aside.

Inside the food module

2. Inside the food module

Five doors in, matching the five kinds the router can send: a new food to log, an answer to a question we asked, a correction or an edit, a question about food, a food setting. One central lookup that every path uses. Two tracks that never trade places: which food it is, and how much. One hand-off out, to the part of the app that saves, shows the card and speaks.

a stepa decisiona door in● has its own flowchart⚙ reads the precision settingⓁ Ⓙ Ⓒ Ⓐ Ⓕ Ⓤ Ⓜ Ⓦ Ⓔ Ⓓ connectors: the same letter joins two points
In1 A new food to log RQ §9 In2 An answer to our question RQ §9 In3 A correction or an edit RQ §9 In4 A question about food RQ §9 In5 A food setting RQ §9 F9 Answer it from the log totals, one entry, when it was logged; shown on a card; nothing changes RQ §1 · RQ §3 D F10 Change the setting saved by the app, then confirmed RQ §9 · FR §4 D F1 ◆ Is this about food at all? the module knows food better than the router does proposal no F1x Back to the router as "not food" proposal yes F2 ◆ One food, several, or a dish? a dish has parts and a parent FR §3 · FR §7 F3 Split it into foods several: each one continues on its own; a dish also gets a parent entry FR §3 · FR §11 · FR §7 F4 Put each food in the log now as the person said it, marked "being worked out"; it stays there unless they cancel or delete it Howard · RQ §4 · FR §1 F5 Classify each food basic, packaged (a brand), restaurant, or prepared FR §12 F6 Read the quantity and the unit two different things: "3" and "ounces"; precise, imprecise ("a big bowl"), or none FR §6.2 · FR §3 F7 Read the answer a pick, a name, yes, no, none of these, look it up, I don't know, cancel FR §5.4 · FR §11 a pick, an offered name, none of these → J "look it up" → W a name not offered ("strawberry") → L F7a ◆ "I don't know": which kind of question was it? Howard · FR §5.4 · FR §6.4 which food → log the offered range, or estimate → E how much → estimate the amount → U F7b "Cancel": close the question the entry is removed from the log; the app says so Howard · FR §11 D F8 Which entry? the thing we just did, or an earlier one by name or by day FR §11 · RQ §6.7 F8a ◆ What changes? the food, the amount, or delete it FR §11 the food L the amount A delete F8b Remove the entry RQ §6.7 D L F11 Look the food up every source at once: your saved foods and the catalogs; results ranked by source, never fetched one after another FR §3 · FR §12 · FR §10 J F12 ◆ Judge the candidates ⚙ a word-for-word match wins. Rows that agree within the precision setting are ONE food: logged at the person's words ("Quest bar") with the range across them, the flavours kept as alternatives. Rows that differ beyond it: ask. FR §5.1 · FR §5.2 · FR §12 · FR §4 several, differing beyond the setting one food (a match, or a cluster) nothing usable F13 Decide what to ask the clarification ladder FR §5.4 F15 That food, chosen its alternatives kept for the detail card FR §5.2 C F16 Search the web the maker's or restaurant's own nutrition pages only, once FR §10 · FR §10.1 · FR §12 W found some → J F14 ◆ Was this already asked? the same question is never asked twice FR §5.4 · Howard no D yes M a model, part 3 nothing F17 ◆ Do we at least know the kind of food? "a plain bagel" yes; a brand we have never seen, no FR §10 yes no F19 Say we can't find it; offer to enter it type the numbers or scan the nutrition label; the barcode as a long shot. The entry stays in the log either way FR §10 · Howard D F18 Offer an estimate from the kind, or to enter it type the numbers or scan the label; the barcode as a long shot, since the name may be misheard FR §10 · FR §9.2 E estimate → C ask → D A F20 ◆ Is the amount precise, imprecise, or missing? FR §6.2 · Howard precise missing imprecise F21 ◆ Ask how much, or assume? ⚙ the precision setting decides FR §6.1 · FR §6.5 ask D assume F23 Match the amount to the row's measures use the row's measure of the same kind the person used (weight or volume); unit changes within a kind are arithmetic; density only when the row has one kind and the person gave the other; count × serving FR §13 · FR §6.8 · FR §6.2 F F24 Interpret the imprecise measure a bowl, half a plate, a handful, a heaping spoon, "big", "small" → always a RANGE, for this food; the card shows the words said and how they were read FR §6.7 · FR §6.6 · Howard F fit it to the row F22 Estimate the amount the usual serving for this food, as a range, said plainly FR §6.4 · FR §9.2 U F25 Prepare the result EITHER the entry, finished, with a statement (what was logged; any assumption, which invites a correction) — OR a question, with what it offered recorded. Never both. Howard · FR §3 · FR §5.4 · RQ §2 F26 The app delivers it (outside the food module): updates the entry in the log and checks the save, shows the card, speaks the sentence; if a question was asked, waits for the answer D arrives here from: what to ask · cancel · can't find it · the entry offer · a food question · a food setting · remove. An entry only leaves the log by cancel or delete; an unresolved one stays, marked, for later. RQ §2 · RQ §4 · Howard D

Connectors: L the central lookup · J judging the candidates · C that food, chosen · A the amount step · F fit an interpreted measure to the row · M ask a model why the question is stuck (part 3) · U estimate the amount (the person said they don't know) · W the web search · E the estimate-or-enter step · D the hand-off to the app.

  1. Back to the router. The router decides from words and never looks anything up; the food module does. So the module gets the first say on "is this food at all", and hands the sentence back marked "not food" when it is not. The router then tries the other subjects, and if none takes it, the "none of ours" cell applies.
  2. Correction versus edit. Same door, same machinery after the first box; the difference is only in finding the entry. A correction is about the thing we just did ("no, it was Dave's"); an edit is about an earlier entry ("change yesterday's lunch"). Correcting a confirmation while its question is still open is not a correction at all: it is an answer, caught at the top level. Once the entry is found, a change of food goes to the same central lookup as a new food, a change of amount goes to the same amount step, and a deletion removes the entry.
  3. One lookup (F11), one judgement (F12). Every source is searched at the same time, not one after another. The order of sources (your saved foods, then makers and restaurants, then USDA, then Open Food Facts) is how the results are ranked, not how they are fetched. There is one lookup box because there must be one lookup in the code. The judgement states the precision setting's meaning: rows that agree within it are one food, logged at the person's words with the range across them ("Quest bar", flavours as alternatives on the card); rows that differ beyond it are asked about.
  4. "Nothing usable" searches first (F16), then decides (F17), and it is never "gibberish". A food-shaped sentence whose food we cannot find, even on the web, is an unfamiliar food, not nonsense. The web search (the maker's or restaurant's own nutrition pages) runs first. If it finds nothing either: when we at least know the kind of food ("a plain bagel"), the app offers an estimate from the kind or to let them enter it; when we don't (a brand we have never seen), it says it can't find it and offers manual entry, by typing the numbers or scanning the nutrition label, with the barcode as a long shot since the name may have been misheard. Whole-sentence nonsense and background talk never reach this module; the router handles them (part 1).
  5. Cancel and "I don't know" are answers (F7, F7a, F7b), so they come in through the answer door whenever a question is open. Cancel closes the question and removes the entry from the log, and the app says so. "I don't know" is read by which kind of question was asked: to a which-food question, the offered rows are logged as a range at the person's words, or an estimate is made; to a how-much question, the amount is estimated as a range. The precision setting already decided that we should ask, so it is not consulted again. Neither is ever a dead end.
  6. "The same question is never asked twice" means exactly that: a second, different clarification may follow ("which one", then "how much"). When the rules would repeat one, something else is going on, and the rules cannot tell what. That is a model's job: see part 3. One case never reaches it: an answer that names something we did not offer ("strawberry" to a chocolate-oatmeal-mint question) is read by the rules as a new lookup of that product, with the brand kept, before any repeat could happen.
  7. Quantity and unit are two things, and an amount can be precise, imprecise, or missing (F6, F20). "3" and "ounces" are read separately. A precise amount is matched to the row's own measures (F23): the row's measure of the same kind the person used, weight or volume; a unit change within a kind (ounces to grams, cups to millilitres) is arithmetic; density is used only when the row gives one kind and the person gave the other. "A big bowl of oatmeal", "half a plate of spaghetti", "a handful", "a heaping teaspoon" are stated amounts, not missing ones: they are interpreted (F24) into a range for that food, always a range, and the detail card shows the words said and how they were read ("a handful of nuts", read as 1 to 2 tablespoons, 100 to 200 calories). Only a truly missing amount goes to "ask or assume" (F21).
  8. The entry is in the log from the moment it is said (F4). Each food is written as the person said it, marked as being worked out, while the module resolves it or asks about it. It leaves the log only by cancel (F7b) or delete (F8b). If it cannot be resolved, it stays: with a best estimate, or marked as unresolved, so the person can fix it later (a misheard name, a slip). Nothing said is ever forgotten.
  9. A question or a statement, never both (F25). When the module asks, nothing is finished. When it logs, it says what it logged and may add a statement, such as an assumption it made, which invites a correction but is not a question and does not wait for an answer.
  10. The hand-off. The module ends by preparing a result: what to save, what the card shows, what to say, and what question stays open. Saving, checking the save, showing the card and speaking are done by the app outside the module, the same way for every module. This is how the code is built today: the module returns write intents and a reply, and the shell applies, verifies, renders and speaks.

2b. The flowcharts behind the dots

One per dotted box, keyed by the box number, each to be drawn on the details page with its own diagram and case table. The one-line scope is what each must cover.

BoxSub-flowWhat it must cover
F1Is this about food at allWhat makes a sentence food (food words, amounts, brands, "I had"); what sends it back to the router; a mixed sentence ("log a to-do and I had an apple").
F2One food, several, or a dishA list joined by "and" or commas; a dish named with parts ("omelette with…"); a dish named alone ("a sandwich"); implied parts; which words belong to which food.
F3Splitting into foodsEach food keeps its words as said, its amount words, its brand words, its preparation words ("toast", "fried") set apart from the name; a dish gets a parent entry; when a model may reformat, returning the same shape.
F4Putting the entry in the log nowThe provisional entry: written as said, marked as being worked out, shown in the log at once; updated as the module learns; removed only by cancel or delete; left marked if unresolved, with what was tried.
F5Classifying the foodBasic (an apple), packaged with a brand (Chobani), restaurant (a Chipotle bowl), prepared or homemade; whether a brand or restaurant is named; what each class means for which sources matter and what a serving looks like.
F6Reading the quantity and the unitThe quantity ("3", "a", "two", "half"), the unit (ounces, cups, grams, slices, a bar, a bottle), a size word ("large"), a range; precise versus imprecise versus missing; fractions and spoken numbers.
F7Reading an answerA tap; a number or ordinal within the count offered; a name that is one of the offered names, whole or in part; a name not offered (a new lookup, brand kept); yes and no and what a bare yes means on each kind of question; "none of these"; "look it up"; "I don't know" by kind of question; cancel; an amount given along with a pick.
F8Finding the entry to correct or edit, and what changesThe thing we just did; the last entry; a named entry; an entry from an earlier day; when several fit; when none does. Then: the food (through F11, replacing the entry), the amount (through F20), delete, add a part to a dish; never a duplicate.
F9Answering a food questionTotals for today, a nutrient in one entry, what was logged when; answered from the log, shown on a card; nothing changes.
F10Changing a food settingWhat the app says after a log, a default for a food, the precision profile; changed, saved, confirmed.
F11Looking the food upEvery source at once: saved foods, the catalogs; how the query is built and normalised (apostrophes, case, preparation words removed); ranking by source; a plausibility check on every row (serving size for the kind of food, calories per gram, a named source); never renaming a row.
F12Judging the candidatesRejected rows dropped; a word-for-word match wins and variants become alternatives; rows that carry every spoken word; extra words that change the food (pepper, baked); agree within the precision setting → one food at the person's words with the range, alternatives kept; differ beyond it → several; one uncertain row → a confirmation that names what distinguishes it; nothing usable.
F13The clarification ladderA numbered list within the cap; varieties named past it; a narrowing question inside a variety; a confirmation of one; the step after a rejection; the offer to search the web; the estimate step; each question asked at most once; how a "which one" question also carries "how much" when both are open.
F16The web searchThe maker's or restaurant's own nutrition pages, once; how results are checked before they become rows; counting truthfully what is new; never random pages.
F17Do we at least know the kind of foodA known kind of food with no row, versus a name we cannot place at all; what "the kind" means (a bagel, a protein bar, a yogurt) and where it comes from.
F18Offer an estimate from the kind, or to enter itAn estimate from the kind of food, at the person's words, with their amount, as a range; the offer to type the numbers, scan the label, or scan the barcode; what happens with what they enter; rejected rows never return.
F20Precise, imprecise, or missingPrecise (a number and a unit the row can take), imprecise (a vessel, a hand, a size word), or missing; what is unusable and why.
F21Ask how much, or assumeThe one choice the precision setting governs here: assume the usual serving with a plain note, or ask "how much?"; the shape of that question; an amount answer that arrives with a which-one answer.
F22Estimating the amountThe usual serving for this food, as a range; said plainly as an assumption, never as doubt; how "I don't know" lands here.
F23Matching the amount to the row's measuresThe row's measures (often both weight and volume); pick the one of the same kind the person used; unit arithmetic within a kind; density only when the row has one kind and the person gave the other; count × serving; cooked versus dry; per-100 g rows; a range over several rows scaled to one basis first.
F24Interpreting an imprecise measureVessels (a bowl, a plate, a glass, a mug), hands (a handful, a pinch), spoons with modifiers (a heaping teaspoon), fractions of vessels (half a plate), size words (big, small, large); each becomes a range for that food, using the food's density and usual form; the card shows the words and the reading; what happens when the vessel makes no sense for the food.
F25Preparing the resultEither the finished entry with its statement (what was logged; any assumption, which invites a correction), or a question with what it offered recorded; what the card shows; what is said by voice versus shown in chat; the wording ladder; never explaining the app's doubts.
F26How the app delivers itOutside the module: the entry updated in the log and the save checked; the card built; the sentence spoken; an open question held for the answer; what "unresolved" looks like in the log.
PThe precision settingThe three profiles; the one comparison it governs in judging (how far rows may differ and still be one food); the one choice it governs for a missing amount (assume or ask); what it never does: change an amount's value or override a stated one.
  1. Where these come from: the requirements document (sources in section 5, amounts in 6, the precision setting in 6.3, the ladder in 10, corrections in 11, rejection in 12) and the code as it stands, used as a record of the thinking, not as the truth.
  2. The clarification ladder is one box on purpose. Today it is spread across several places that disagree; the box is the statement that it should be one thing.

When a model is consulted

3. When a model is consulted

One rule everywhere: the rules run first; a model is asked only at the marked points; it is given the node's own rules and the words as said; it answers in a fixed JSON shape that the rules then apply; it never speaks to the person; and if its answer does not fit the shape, the node takes its own safe outcome. Every model call is recorded in the trace like any other decision.

M M1 The rules would ask a question again something is wrong that the rules cannot see. Given: the question, what it offered, what the person said, the turn so far Howard · RQ §3.1 M2 Ask a model which of five things happened it answers with one reason and one payload, in JSON, nothing else; its guideline is this list and the node's rules Howard · Howard M3 The question was not logical e.g. it asked which of two rows that are the same product. → drop it; take the node's safe outcome (log or estimate) proposal M4 They said "I don't know" in words the rules missed ("beats me", "whatever"). → the I-don't-know path (F7a) FR §6.4 · proposal M5 They picked one, in words the rules missed ("the seedy one", "the first, bigger one"). → the model names the offered choice; back through F7 proposal M6 They named something we did not offer asked chocolate, oatmeal or mint; they said "strawberry". → look it up as that product, brand kept (F11); the rules do this first Howard M7 They misunderstood the question their answer fits a different question than the one asked. → the model rewords it; asked once, as a new question proposal M8 If the model's answer does not fit the shape, or the reworded question would itself be a repeat: the node takes its own safe outcome log with the best honest estimate and say so, or close the question; never a third try, never a chat reply, never a dead end Howard · proposal Every consult is recorded: what was given, what came back, which of the five the rules applied. The trace reads it like any other decision. The model is told the node's rules and the five reasons; it is never asked to decide what the food is or what the amount is.

3b. Every point where a model may be consulted

Anything not on this list runs on rules alone. Each row says why the rules are not enough there, what the model is given, what it must return, and the safe outcome if it fails.

WhereWhy rules alone are not enoughGivenMust return (JSON)If unusable
Part 1 · noiseWhether a sentence is aimed at the app at all can't always be read from words.The words; whether a question is waiting.aimed-at-app: yes / no.Treat as aimed at the app.
Part 1 · the kindAnswer / correction / query / action is decided by rules; a model is asked only when the rules find no row of the case table.The words; the waiting question and what it offered; the rules for the four kinds.kind, and the part of the sentence that shows it.One short question to the person ("Is that for the yogurt, or something new?").
Part 1 · the subjectFood, workout, to-dos, the app: usually plain from the words; not always ("log 20 minutes").The words; the list of subjects.subject, confidence.One short question to the person.
Part 2 · splitting the sentenceGrammar handles most sentences; a long or oddly worded one may not split cleanly.The words; the shape the rules use (foods, each with amount, brand, preparation words).The same shape, with the words as said kept per food.Treat the whole sentence as one food and let the lookup say what it finds.
Part 2 · the web searchA maker's nutrition page is prose and tables; a model turns it into a row.The page text; the row shape; the food's words.Rows, each with serving, calories, macros, and the sentence on the page it came from.Discard the page; the search found nothing there.
Part 2 · a question would repeatThe rules can see the repeat but not the reason (part 3 above).The question, its offered choices, what the person said, the turn so far, the five reasons.One of the five reasons, with its payload.Log with the best honest estimate and say so, or close the question.
Part 1 · none of oursAn outside question ("weather tomorrow") is answered by a model or declined, by policy.The words; the policy.An answer, or a decline.Decline.
  1. What a model is never asked: which food the person meant, whether two rows are the same food, what the amount is, whether to log or ask. Those are the rules' decisions from facts, and a model's guess there is how we got the "meal or snack?" reply.
  2. Two model points exist in the code today that are not on this list and should go: the ownership check that decides answer-or-new for anything outside a short list (it is a coin flip), and the general chat reply that answers a food sentence when the food route rejects it.

F1 · Is this about food at all

Given: the sentence the router sent, as said; its kind (an action to log) and subject (food) from the router
Outputs: continue as food; or back to the router as "not food"; or the food part kept and the rest handed back

A sentence the router sent to food as an action (log) — with the words as said F1.1 ◆ Does it name something eaten? a food word, a brand or product word, a restaurant item, or an amount with a unit ("3 ounces", "a cup") proposal yes Continue: it is food a bare product word ("Chobani", "a Quest bar") counts no F1.2 ◆ Is the sentence a to-do, a workout, or a note that merely mentions a food? "remind me to buy milk", "log a to-do: eat some gum", "did a set of curls with a banana on the bench" RQ §3 yes F1x Back to the router as "not food" the router sends it to the module the sentence is for proposal no F1.3 ◆ Is part of it about something else? "I had an apple and remind me to buy milk" RQ §5 yes Keep the food part; hand the rest back to the router each part is one sentence to its own module no F1.4 It is food; continue to F2 nothing decided about which food or how much yet proposal
The person saidWhat this box doesWhy
"I had two eggs"Food; continue.A food word and an amount.
"Chobani"Food; continue.A bare product word is a food said without an amount.
"I ate at Chipotle"Food; continue (F5 will class it as restaurant).A venue with "ate" is a food sentence even with no item named.
"Log a to-do to buy Chobani"Back to the router as "not food".The sentence is a to-do; the food word is its object.
"I had a great workout"Back to the router as "not food".No food word; "had" alone is not enough.
"I had an apple and remind me to buy milk"Keep "I had an apple"; the rest goes back to the router.Two sentences in one; each to its own module.
"Three flibjopolis"Food; continue to the lookup.A food-shaped sentence with an unknown word is an unfamiliar food, never nonsense (F16, F17).
  1. This box exists because the router decides from words and never looks anything up. The module knows food better, so it gets the first say on "is this food". Handing back is normal, not an error.
  2. Nothing here reads a list of food names. "Something eaten" is recognised by shape: a noun after "had / ate / drank", an amount with a unit, a brand or product word, a venue.

F2 · One food, several, or a dish

Given: the food sentence as said
Outputs: one food; several foods; a dish with a parent and parts (stated or implied); a saved meal

A food sentence from F1 F2.1 ◆ Does it name a dish with parts? a dish word followed by "with" or a list: "an omelette with three eggs, cheddar and a tomato", "a salad with grilled chicken" FR §7 yes A dish a parent entry named at the person's words; each part is a food beneath it (§7) no F2.2 ◆ Does it name a dish alone? "a sandwich", "an omelette", "a burrito" — a dish word with no parts said FR §7 yes A dish with implied parts the parts the dish implies are unstated; the core ones are asked about (§7), the rest estimated and stated no F2.3 ◆ Does it list several foods? joined by "and", commas, "plus", "with" on a plain food ("oatmeal with blueberries") code · FR §11 · Howard yes Several foods each one continues on its own, no parent; the meal is the day's list no F2.4 ◆ Is it a saved meal by name? "my Breakfast A", "my usual breakfast" RQ §12 · proposal yes Several foods, from the saved meal the saved definition supplies the parts and their amounts no F2.5 One food continues alone proposal
The person saidWhat this box doesWhy
"two eggs"One food.One noun, one amount.
"eggs and toast"Several: eggs; toast.A list, no dish word.
"an omelette with three eggs, a quarter cup of cheddar and a sliced tomato"A dish: parent "omelette"; parts eggs (3), cheddar (1/4 cup), tomato (1).A dish word with parts.
"a sandwich"A dish with implied parts.A dish word alone; bread and a filling are implied; the filling is a core part → asked (§7).
"oatmeal with blueberries"Several: oatmeal; blueberries."with" on a plain food joins two foods; no dish word, so no parent.
"a bowl of oatmeal with berries"Several: oatmeal (a bowl — imprecise, F6); berries.The vessel belongs to the amount of the first food, not to a dish.
"my Breakfast A"Several, from the saved meal.A saved meal is a named list.
"a turkey sandwich on Dave's Killer Bread with 3 ounces of turkey and romaine"A dish: parent "turkey sandwich"; parts bread (Dave's), turkey (3 oz), romaine."on" and "with" after a dish word give its parts.
  1. Which words are dish words is data (the rule pack's dish forms), never a list in decision code, and it is a class rule: it must handle omelette, sandwich, salad, wrap, bowl, burrito, smoothie alike.
  2. A dish counts once in the day's total: the parent shows the sum of its parts (§7).

F3 · Splitting into foods

Given: the sentence and its shape (one, several, a dish)
Outputs: one part per food: words as said, amount words, brand and variant words, preparation words; a dish's parent

The sentence and its shape from F2 F3.1 Cut the sentence into its parts at "and", commas, "plus", "with"; a dish word before them is the parent, not a part code · proposal F3.2 For each part, keep the words exactly as said this is the name the entry will carry; nothing downstream may rename it FR §5.2 F3.3 Mark the amount words in each part "two", "a quarter cup of", "3 ounces" — they stay attached to their own part (read in F6) FR §6.2 F3.4 Mark the brand, venue and variant words "Dave's Killer Bread", "Chobani", "at Chipotle"; "light", "1%", "organic" — identity, kept with the part FR §8 F3.5 Mark the preparation words "toast(ed)", "fried", "sunny side up", "sliced", "grilled" — preparation, set apart from the name; whether it changes the food is a class rule (§8) decided later, not here FR §8 F3.6 ◆ Did the grammar fail to cut it cleanly? a long or oddly worded sentence; words that could belong to either neighbour RQ §3.1 · Howard yes F3.6m A model reformats it into the SAME shape parts, each with words-as-said, amount words, brand words, preparation words; nothing added, nothing renamed; if its answer does not fit the shape, the whole sentence is one part and the lookup says what it finds Howard no F3.7 The parts, each carrying its own words a dish also carries its parent; on to F4 proposal
The person saidWhat this box doesWhy
"two sunny side up eggs and one slice of Dave's killer bread toast"Part 1: words "sunny side up eggs", amount "two", preparation "sunny side up". Part 2: words "Dave's killer bread", brand "Dave's killer bread", amount "one slice", preparation "toast"."toast" is how the bread was prepared; it never goes into the product's name — that is what sent the lookup to the web for 41 seconds this morning.
"an omelette with three eggs a quarter cup of Cheddar cheese and one sliced tomato"Parent "omelette". Parts: eggs (3); Cheddar cheese (1/4 cup); tomato (1, preparation "sliced").The dish word heads the sentence; "with" opens its parts.
"a half a cup of strawberries and a half a cup of fair life fat free milk"Two parts, each with its own amount; part 2 brand "fair life", variant "fat free".Each amount stays with its own food.
"I had a Chobani cherry yogurt"One part: words "Chobani cherry yogurt", brand "Chobani", amount: none (a count of one is implied by "a" — F6).The words as said become the entry's name if the lookup ends in a cluster (§5.2).
"I had a Quest cookies and cream protein bar"One part; the "and" inside a product name does not cut.A cut is made only where both sides are foods; "cookies and cream" is a flavour of one bar (a model reformat may be needed here — F3.6).
  1. The words as said are the one thing every later box must preserve. Renaming a row to these words, or these words to a row, is the fault the assessor found behind the Chobani tube.
  2. A model may be used only at F3.6, only to produce the same shape, and never to decide what a food is.

F4 · Putting the entry in the log now

Given: the parts from F3, with their words and amounts as said
Outputs: one provisional entry per part, visible at once, updated in place; removed only by cancel or delete

The parts from F3 F4.1 Write one entry per part, now name = the words as said; amount = as said, or "amount pending"; nutrition pending; a dish = a parent entry with its parts beneath Howard · RQ §4 F4.2 Mark it "being worked out" the log and the card show it at once, with that mark; the day's total leaves it out until it has numbers RQ §4 · Howard F4.3 Update the same entry as the module learns the chosen food, the amount, the range, the assumptions — always in place, never a second entry FR §11 F4.4 ◆ Is a question open about it? RQ §4 yes The entry shows "waiting for your answer" with the question it is waiting on; it stays visible no F4.5 ◆ Did the person cancel or delete it? Howard yes Remove the entry the only two ways an entry leaves the log no F4.6 ◆ Did the module finish without a resolution? nothing found, no estimate possible, the person declined to enter it FR §10 · FR §1 yes The entry stays, marked "unresolved" with what was tried on its card; the person can fix it later through a correction (F8) no F4.7 The entry is finished the mark is cleared; the total includes it proposal
The person saidWhat this box doesWhy
"I had a cup of Chobani yogurt" and the app asks which oneThe entry "Chobani yogurt, 1 cup" is in the log at once, marked "waiting for your answer".Nothing said is ever invisible while it is being worked on.
The person answers and it is loggedThe same entry is updated with the food, numbers and range; the mark is cleared.Never a second entry.
The person says "cancel"The entry is removed.Cancel is one of the two exits.
The app cannot find it and the person does not enter itThe entry stays, marked "unresolved", with "couldn't find; you can add the numbers or scan the label".It can be fixed later; a misheard name is not a lost meal.
The app was closed mid-questionThe entry is still there next time, marked; the question is not re-asked out of the blue — the card offers it.The log is the record; the conversation is not.
An amount was assumedThe entry shows the assumption on its card ("assumed 1 medium").A stated assumption invites a correction; it is not a question.
  1. This is the policy Howard set on 2026-09-23: it appears in the log as soon as the person says it, and nothing is lost unless they cancel or delete it.
  2. What the app was closed mid-question should do (re-offer the question on next launch, or just leave the mark) is a choice to confirm with Howard; the row above shows the safer reading.

F5 · Classifying the food

Given: one part: its words as said, brand, venue and variant words
Outputs: one of: restaurant, packaged, prepared, basic — and the class rules that apply

One part: its words, brand, venue and variant words from F3 F5.1 ◆ Is a restaurant or venue named, or a menu-style item? "at Chipotle", "a Chipotle chicken bowl", "a Big Mac" FR §12 · FR §8 yes Restaurant menu sources first; a packaged look-alike is a poor substitute; sides, sauces and dips are real items (§8) no F5.2 ◆ Is a brand named, or a packaged product form? "Quest bar", "Chobani", "a protein shake", "a Dave's Killer Bread slice" FR §12 yes Packaged brand sources and label servings; the package or bar is often the amount (§6.2) no F5.3 ◆ Is it a prepared or home-made dish? "my mom's lasagna", "homemade chili", a dish name with no brand FR §12 yes Prepared recipe-style rows or the dish's parts (§7); amounts are often imprecise no F5.4 Basic a single-ingredient food: an apple, chicken breast, cottage cheese; standard rows; the class rules of §8 apply (fat level, raw vs cooked, cooked vs dry) FR §12 · FR §8
The person saidWhat this box doesWhy
"a Chipotle chicken bowl"Restaurant.A venue name with an item.
"a Quest bar"Packaged.A brand and a product form; the bar is the amount.
"an apple"Basic.Single ingredient, no brand.
"my mom's lasagna"Prepared.Home-made; no catalog product.
"chicken breast"Basic; raw-vs-cooked is a class question (§6.8) answered later.The class does not decide identity, only which rows matter.
"cottage cheese"Basic; dairy fat level is identity when stated (§8).A class rule shapes the candidates; the setting still decides whether to ask.
"Dave's killer bread"Packaged.A brand.
"a protein shake"Packaged (form only, no brand).The form says which sources matter even without a brand.
  1. The class never decides what the food is. It decides which sources are worth searching first, what a serving looks like (a bar, a bottle, a menu portion), and which class rules of §8 apply.
  2. Today's code has a packaged-food class list (protein shake, yogurt cup, protein bar, snack bar, bread slice, packaged food). That is a data table of forms, which is allowed; a rule about one product is not.

F6 · Reading the quantity and the unit

Given: one part's amount words, size words and modifiers
Outputs: quantity; unit; size; and one of: precise, imprecise, not-an-amount, missing

One part's amount words from F3 F6.1 Read the quantity digits, number words, fractions ("half", "a quarter", "two and a half"); "a" or "an" = 1 when a unit or a countable item follows; "some", "a few", "a bit" = vague; "two or three" = a range FR §6.2 F6.2 Read the unit, separately weight (g, oz, lb); volume (cup, tbsp, tsp, ml, fl oz); a count unit (slices, eggs, pieces); a package (bar, bottle, packet, container); a scoop (product-defined); a serving FR §6.2 F6.3 Read any size or modifier word small, medium, large, big, heaping, level — kept with the amount FR §6.2 F6.4 ◆ Is there a number and a unit a row can take? weight, volume, a count of the food, a known package FR §6.2 yes Precise "3 ounces", "a cup", "two eggs", "a Quest bar" (one package) no F6.5 ◆ Is there a vessel, a hand, or a size word instead? a bowl, a plate, a glass, a mug, a handful, a spoonful, "big", "small"; "some", "a bit" FR §6.2 yes Imprecise a stated amount that must be read as a range (F24) no F6.6 ◆ Is the number a nutrient, not an amount? "a 42 g protein shake", "a 100-calorie pack" — the number describes the product proposal yes Not an amount it stays with the identity; the package itself is the amount (one) no F6.7 Missing no quantity words at all; F21 decides whether to ask or assume FR §6.1
The person saidWhat this box doesWhy
"3 ounces of turkey"Precise: 3, weight (oz).A number and a weight unit.
"a cup of blueberries"Precise: 1, volume (cup)."a" is one when a unit follows.
"two eggs"Precise: 2, count (eggs).A count of the food itself.
"a Quest bar"Precise: 1, package (bar).A bar is a known quantity for a packaged food (§6.2).
"one and a half cups"Precise: 1.5, volume.A spoken mixed number.
"a big bowl of oatmeal"Imprecise: vessel "bowl", size "big".A vessel is quantity evidence, not a measure; read as a range in F24.
"some peanuts"Imprecise: vague."Some" gives a configurable range (§6.6), never zero information.
"a handful of nuts"Imprecise: hand measure.Read as a range for this food.
"half a plate of spaghetti"Imprecise: fraction of a vessel.A plate has no defensible food volume; the vague-serving range applies (§6.7).
"chicken"Missing.No amount words; F21 decides ask or assume.
"a 42 g protein shake"Precise: 1 package; "42 g protein" is identity, not an amount.A nutrient figure describes the product.
"a scoop of protein powder"Precise only once the product is known; otherwise treated as missing.A scoop has no universal size (§6.2).
"two slices of Dave's killer bread"Precise: 2, count (slices) — usable only against a per-slice row (F23).A stated unit whose size no source established keeps its question (§6.2).
  1. Quantity and unit are read as two things because the unit is what F23 matches to the row's measures and the quantity is what multiplies it.
  2. The last, most explicit amount in one sentence wins when two are said (§6.6). An amount said later, in an answer, beats one said now (§11).

F7 · Reading an answer

Given: the answer as said; the open question's record (kind, offered names and count, what a bare yes means, the rejected list)
Outputs: a choice; a hold; a cancel; a rejection; a wider search; an I-don't-know by kind; a new lookup; a choice with an amount; or the stuck-question consult

An answer, with the open question's record the record says: which kind of question (which food / how much / is that right / should I log), what it offered (names, count), what a bare "yes" means there, the rejected list F7.1 ◆ A tap on a shown choice? RQ §5 yes That choice, exactly never re-read; a tap is an answer even to a question that named no choices in prose no F7.2 ◆ Only thinking sounds? "um", "hmm", "uh", a half word FR §11 yes Hold the same question is said again, once; nothing is closed, nothing is treated as a food no F7.3 ◆ Cancel words? "cancel", "never mind", "forget it"; on a confirmation, also "no thanks" FR §11 yes F7b Cancel (F7b) the question closes; the entry leaves the log; the app says so Howard · FR §11 no F7.4 ◆ A number or an ordinal within the count offered? "2", "number two", "the second one", "the last one" — within the count the question recorded FR §5.4 · RQ §5 yes That offered choice a position past the count picks nothing; the question stands. A position is never an amount no F7.5 ◆ One of the offered names, whole or as a part? read against the names the question recorded: word-for-word wins; a part that fits one name picks it; a part that fits several asks over those only FR §5.4 · RQ §5 yes That offered choice "Good Seed" → the Good Seed rows; "whole grains" fitting two → a question over those two no F7.6 ◆ Yes or no? "yes", "yeah", "mm-hmm", "uh-huh" = yes; "no", "nope", "uh-uh" = no; what a bare yes means is on the record FR §11 yes On a confirmation: yes takes it, no rejects it on "or should I log an estimate?": yes = the estimate. On a which-one list, a bare yes means nothing → hold no F7.7 ◆ "None of these" / "neither"? decided by what the sentence OFFERED (§11): a rung that showed choices takes it as a rejection of them; a rung that showed none takes it as ending the turn FR §11 yes Rejection the rejected rows, and every row a rejected variety stood for, join the rejected list; the ladder moves to its next rung (F13) no F7.8 ◆ Only the lookup command? "look it up", "look it up online", "can you look it up", "search for it" — nothing left once "please", "can you", "online", "again" are set aside; only on a rung that asks which food FR §5.4 yes Search wider (F16) decided on grammar, no model; on an amount question or a "should I log" confirmation it is not a lookup reply no F7.9 ◆ "I don't know", "not sure", "just estimate it"? FR §6.4 yes F7a By the kind of question (F7a) which food → the offered rows logged as a range at the person's words, or an estimate; how much → the amount estimated as a range (F22) Howard · FR §5.4 · FR §6.4 no F7.10 ◆ A name that was not offered? asked chocolate, oatmeal or mint; they said "strawberry" Howard yes A new lookup of that product (F11) the brand and the words kept; the rejected list kept no F7.11 ◆ An amount said with the answer? "number 1, two slices" FR §5.4 yes The pick, plus the amount the amount goes to F20 with the chosen food; it beats an amount said earlier (§11) no F7.12 None of the above the rules cannot read it → the stuck-question consult (part 3, M1); never a chat reply Howard · RQ §3.1
The person saidWhat this box doesWhy
Tap "Good Seed"That choice.A tap is exact.
"number 2" to a list of threeThe second offered choice.Within the count.
"number 5" to a list of threeNothing picked; the question stands.Past the count; not an amount.
"the seedy one" to Good Seed / Whole Wheat / PowerseedRules cannot read it → M1 (part 3); the model may map it to "Good Seed".Not one of the recorded names.
"yes" to "I think you mean X. Is that right?"X taken; logged.The record says a bare yes confirms X.
"yes" to "Which one — 1, 2, or should I log an estimate?"The estimate.The record says the sentence's last offer was the estimate.
"no" to "Is that right?"X rejected; the ladder continues.A bare no on a confirmation rejects the one product named.
"none of these" to a listRejection; those rows and their varieties' rows join the rejected list.What the sentence offered decides.
"never mind" to "Which one?"Cancel; the entry leaves the log.Cancel words end the turn.
"look it up" to "Which Dave's Killer Bread?"Search wider (F16), no model.The lookup command on a which-food rung.
"look it up" to "How much did you have?"Not a lookup reply; read as an unrecognised answer → M1.Only which-food rungs take the lookup command.
"I don't know" to "Which one?"The offered rows logged as a range at the person's words.I-don't-know on a which-food question.
"I don't know" to "How much?"The amount estimated as a range (F22).I-don't-know on a how-much question; the setting is not consulted again.
"strawberry" to chocolate / oatmeal / mintA new lookup: Quest strawberry.A name not offered is a product to find.
"number 1, two slices"The first choice, with the amount 2 slices.An amount given with a pick.
"um"The question is said again, once.Thinking sounds hold.
  1. Every decision here reads the question's record — its kind, the names and count it offered, what a bare yes means — never the question's sentence. That record is written by F25 when the question is asked.
  2. A model is consulted only at the end (F7.12), and only to say which of five things happened (part 3). It never picks a food.

F8 · Finding the entry to correct or edit, and what changes

Given: the correction as said; the log; the entry we just did
Outputs: the entry; and one of: a food change (to F11), an amount change (to F20), a deletion, a dish-part change; or a which-entry question

A correction or an edit, with the log "no, it was Dave's", "change that to 3/4 cup", "delete the eggs", "make yesterday's lunch two bowls" F8.1 ◆ Is it about the thing we just did? the last entry written or updated this conversation; "no, it was…", "not that, …", "change that…" FR §11 · RQ §3 yes The entry we just did a correction; the entry is known no F8.2 ◆ Does it name an entry, or a day? "the eggs", "the Chobani", "yesterday's lunch", "the second thing I logged" FR §11 yes The named entry an edit; found by its words, or by day and order no F8.3 ◆ Do several entries fit? two egg entries today FR §11 · RQ §2 yes Ask which entry a numbered list of the entries that fit; never a guess (§11) no F8.4 ◆ Does none fit? proposal yes Say so; offer the recent entries "I don't have a milk entry today. Did you mean one of these?" — never a dead end no F8.5 Read what changes the food ("it was Dave's"), the amount ("3/4 cup", "two slices"), delete ("delete the eggs"), or a part of a dish ("add cheese to the omelette") FR §11 F8.6 ◆ The food? FR §11 yes The new words go through the central lookup (F11) and the judgement (F12); the result REPLACES the entry, keeping its amount unless a new one was said no F8.7 ◆ The amount? FR §11 yes The new amount goes to F20 for the same food the entry is updated in place; no lookup no F8.8 ◆ Delete? RQ §6.7 yes F8b Remove the entry (F8b) soft delete; retained; the app says so RQ §6.7 no F8.9 A part of a dish the part is added, changed or removed beneath the parent; the parent's total follows FR §7
The person saidWhat this box doesWhy
"No, it was Dave's killer bread" right after "Logged toast"The toast entry; the food changes → F11 with "Dave's killer bread"; replaces the entry, keeps one slice.A correction of the thing just done.
"Change that to 3/4 of a cup"The last entry; the amount changes → F20 with 0.75 cup.Amount only; no lookup; never "which exact … should replace".
"Delete the eggs"The eggs entry removed.Named entry; delete.
"Change the half a cup of fairlife milk to a half a cup of Friendly's cottage cheese"The milk entry found by its words; the food changes → F11 with "Friendly's cottage cheese", amount ½ cup kept.An edit of a named entry.
"Make yesterday's lunch two bowls"The lunch entry from yesterday; amount changes.Found by day.
"Change the eggs" when two egg entries exist"Which eggs — 1. the two at breakfast, 2. the omelette's?"Ambiguous reference asks; never guesses.
"Change the milk" when no milk entry exists"I don't have a milk entry today. Did you mean one of these: …?"No dead end.
"Add cheese to the omelette"A part is added beneath the omelette parent.A dish part.
"No, it was X" while a question about it is still openNot this door: it is an answer (R1, F7).Correcting an open question is answering it.
  1. A correction never creates a second entry (§11). A food change goes through the same lookup and judgement as a new food, and the result replaces the entry, carrying the amount, the estimate status and any rejection.
  2. A correction also seeds the person's default for those words, so the same question is not asked next time (§11).

F9 · Answering a food question

Given: the question as said; the log
Outputs: a number or a list, on a card and in one sentence; nothing written

A question about food, as said "how much protein have I had today", "what were the carbs on the last thing I logged", "what did I eat yesterday" F9.1 Read what is asked the measure (calories, protein, carbs, fat, a total); the scope (today, yesterday, the last entry, a named entry, a meal); the form (a number, a list) RQ §3 F9.2 ◆ Is the scope an entry that is still being worked out? RQ §4 yes Answer with what is known and say what is pending "the Chobani is still waiting on your answer; the rest of today is 840 calories" no F9.3 Compute from the log sums use each entry's point figure; a range is reported when the entries carry ranges; nothing is written FR §9.4 F9.4 Answer on a card and in one sentence the number first; the scope named; "About 34 grams of protein today, from three entries" RQ §2
The person saidWhat this box doesWhy
"How much protein have I had today""About 34 grams of protein today."A total over today's entries.
"What were the carbs on the last thing I logged""The Quest bar: 22 grams of carbs."A nutrient of one entry.
"What did I eat yesterday"A list card; one sentence naming the count and the total.A list scope.
"How much protein was in the cottage cheese I ate earlier""The cottage cheese: 12 grams."A named entry.
A question while an entry is being worked outThe known total, with the pending entry named.Nothing invented for a pending entry.
  1. Today's code turned "what were the carbohydrates on the last thing I logged" into a food lookup and said it could not complete the nutrition lookup for that sentence. This door exists so a question is never a lookup.

F10 · Changing a food setting

Given: the setting as said
Outputs: the setting saved by the app and confirmed; or one question for the missing value

A food setting, as said "from now on just tell me the calories", "always assume Dave's Killer Bread when I say bread", "set my precision to loose", "stop asking about bread" F10.1 Read which setting what is said after a log (which figures); a default for some words; the precision profile; a per-food "don't ask" RQ §9 · FR §4 · FR §1 F10.2 ◆ Is the value clear? "loose" is a profile; "Dave's" needs a product to be the default proposal yes Save it, then confirm in one sentence "From now on I'll just say the calories." no F10.3 Ask the one missing thing "Which Dave's Killer Bread should be your default?" — a which-food question through F11/F12 RQ §6.7
The person saidWhat this box doesWhy
"From now on just tell me the calories when I log a food"Saved; "From now on I'll just say the calories."A readback setting.
"Tell me protein too"Saved; confirmed.Adds a figure to the readback.
"Always assume Dave's Killer Bread Good Seed when I say bread"Saved as the default for "bread"; confirmed.A default for words (§3 step 2).
"Always assume Dave's when I say bread""Which Dave's Killer Bread should be your default?"The value needs a product.
"Set my precision to loose"Saved; confirmed.A profile name.
  1. On 09-20 "from now on just tell me the calories" was answered with "I understood the nutrition question, but I could not find a solid number for that food yet". This door exists so a setting is never a lookup or a question.

F11 · Looking the food up

Given: one food's identity words, brand and class; the rejected list
Outputs: the candidate rows, each with its own name, source and a plausibility flag

One food's identity words, brand, class; the rejected list from F5 (a new food), F8 (a food change), or F7 (a name not offered) F11.1 Build the query the identity words, normalised once: lower case, apostrophes and punctuation made uniform, preparation words removed ("toast" → the bread), amount words removed; the same normaliser is used on every row compared proposal F11.2 Search every source at the same time the person's saved foods; the on-device catalog; the server catalogs (USDA, maker and restaurant data, Open Food Facts) — the class (F5) says which are worth the wait; none is fetched after another FR §3 · FR §12 F11.3 Keep only rows that carry every identity word a row with extra words that change the food (pepper, baked, whites) is a different food and is dropped; descriptor-only extras (raw, organic, brand spelling) stay as variants FR §3 · FR §12 F11.4 Check each row before anyone decides on it serving size plausible for the class (a 43 g tube is not "a yogurt" cup); calories per gram plausible; a named source; implausible rows quarantined (§12) FR §12 F11.5 Rank by match quality, then by source match quality first (word-for-word, then carried words); the source order breaks ties among the same product from several places: saved > maker/restaurant > USDA > Open Food Facts (§12). Precedence never overrides matching FR §12 F11.6 Drop the rejected list rows already turned down, by label, product key, or a rejected variety's name for the same food and maker FR §12 F11.7 The candidate rows, with their source and their own names no row is renamed; on to F12 FR §5.2
The person saidWhat this box doesWhy
"Chobani cherry yogurt"Rows carrying chobani + cherry + yogurt from every source; the tube rows flagged implausible for a yogurt cup (43 g); the Greek cup rows kept.The check at F11.4 is what was missing this morning: two tube rows agreed and nothing said a tube is not a cup.
"one banana"Banana rows; "Peppers, Banana, Raw" dropped (an extra word that changes the food); "Banana, Baked" dropped (a preparation that changes it).F11.3 is the rule the 09-21 fix loosened.
"Dave's killer bread toast"Query "dave's killer bread" (toast is preparation); the Dave's rows from the catalog, ranked; the maker's page only if F16 asks.Preparation words never enter the query.
"my saved Quest bar" (a saved alias)The saved food, word for word → the single candidate.A saved food matches only word for word (§3 step 2).
"quest blueberry protein bar"Quest blueberry rows from the catalog; the saved "Quest cookies and cream" does NOT match (different words).Precedence never overrides matching.
A row with 1,455 calories per 100 gQuarantined; never a candidate.§12 plausibility.
  1. Every source is searched at once. The source order is how ties are broken among the same product, never the order of fetching (Howard, 09-23).
  2. Nothing here renames a row to the person's words, and nothing downstream renames the person's words to a row. That is the fault behind the Chobani tube.

F12 · Judging the candidates

Given: the candidate rows with their names and sources; the words as said; the precision setting; the rejected list
Outputs: one food (a match, a default, or a cluster with alternatives); several (to F13); a confirmation of one; nothing usable (to F16)

The candidate rows; the words as said; the precision setting; the rejected list from F11 F12.1 ◆ Is there a word-for-word match? a row (or a saved food) whose name is exactly the words said FR §12 · FR §3 yes That row wins variants with more words become alternatives on the card; two exact rows with the same numbers are a duplicate, pick either (§12) no F12.2 ◆ Does the person's history or default pick one? a default for these words; "the same Quest bar you've had the last three times" FR §3 · FR §5.3 yes That row, and say so "I assumed the same Quest bar as last time; tell me if it was a different one" (§5.3) no F12.3 ◆ Do the rows agree within the precision setting? ⚙ measure how far apart their enabled macros are, per serving, against the setting (§4); fat level, size and source variants are clustered by this same test, never by a per-food rule FR §5.1 · FR §4 yes ONE food, a cluster logged at the person's words ("Quest bar"), a point figure from one row AND the range across them; the rows kept as alternatives on the card; "needs review" opens that picker (§5.2) no F12.4 ◆ Do they form a few clusters that differ? group by macros under the setting; name each cluster by a real product FR §5.1 yes Several: ask (F13) the clusters, at most five, named by what distinguishes them; nothing written no F12.5 ◆ Is there exactly one row, not word-for-word? FR §5.4 yes Confirm it, naming what distinguishes it "I think you mean Chobani cherry yogurt TUBE, 43 g. Is that right?" — never an echo of the person's words; a bare yes takes it, no rejects it no F12.6 Nothing usable no candidate survived F11's checks and the rejected list → F16 FR §10
The person saidWhat this box doesWhy
"two eggs" with rows Egg; Sunny side egg; Scrambled eggs (seeded)Word-for-word "Egg" wins; the others are alternatives.Exact match is the answer; variants are alternatives (09-22).
"a Quest bar" with five flavours within the settingOne food: "Quest bar", 190 (170–210), five flavours as alternatives.Agreeing rows are one cluster; logged at the person's words.
"a Chobani cherry Greek yogurt" with three rows that differAsk: "Which one — 1 …, 2 …, 3 …?"They differ beyond the setting.
"an apple" with 25 varieties, all within the settingOne food: "apple", the cluster's range; the generic apple row if one exists.The apple rule (§5.2).
"Chobani cherry yogurt" with two tube rows and (after F11.4) the cup rowsThe tube rows are flagged; the cups differ from the tubes → ask, naming tube vs cup.Never confirm a flagged row as if it were the cup.
"cottage cheese" with 1% and 4% rowsThey differ beyond the setting → ask "1% or 4%?"; a stated level would have been honoured at F11.Dairy fat level is identity (§8).
One uncertain rowConfirm it, naming what distinguishes it.A confirmation offers one choice.
Rows all on the rejected listNothing usable → F16.Rejected rows never return.
  1. This is the box the decision core already implements from facts. Its two faults this morning were upstream: a renamed row (F11.7 forbids it) and no plausibility check (F11.4 adds it).
  2. The precision setting is read here for exactly one thing: how far rows may differ and still be one food (P).

F13 · The clarification ladder

Given: the clusters that differ; the words as said; the record of what has already been asked about this food
Outputs: one question, with its facts recorded (kind, names and count offered, what a bare yes means); or the estimate; never a repeat

Several clusters that differ; the words as said; what has already been asked about this food from F12 (or from F7 after a rejection or a wider search) F13.1 ◆ Has the person's history or their words concentrated it to a small set? "three soups this month"; a brand said; a venue said; the catalog genuinely has few variants (§5.4) FR §5.4 yes Continue to the rungs below the set is honest; a question is legitimate no F13.2 ◆ Is it a huge flat field with nothing concentrating it? "soup", "a sandwich", "a salad" FR §5.4 yes Rung A — an open question "What kind of soup?" — never the top five of a big field because something had to rank first no F13.3 ◆ Five clusters or fewer? RQ §5 yes Rung B — a numbered list the lead-in names the shared part once; each option is only its distinguishing words; every option can be picked by number, ordinal or name; the estimate spans all of them no F13.4 ◆ More than five, but they group by a variety or a kind? many Dave's Killer Bread rows → Good Seed, 21 Whole Grains, Powerseed…; homemade / restaurant / packaged FR §5.4 yes Rung C — a narrowing question "Which Dave's Killer Bread — Good Seed, 21 Whole Grains, Powerseed, or another?"; the chosen variety's rows are then a cluster (F12 again) no F13.5 ◆ Exactly one candidate? FR §5.4 yes Rung D — a confirmation "I think you mean X. Is that right?" naming what distinguishes X; a bare yes takes it no F13.6 After a rejection ("none of these") the rejected rows leave; re-select over what remains through the rungs above; if nothing remains: Rung E — offer to search wider ("I can look it up online — say look it up, or cancel"); the entry stays in the log FR §12 · FR §5.4 F13.7 After a wider search anything new is OFFERED through the rungs above (a list, a narrowing, a confirmation for one); if nothing new: say so, offer the same choices and the estimate; never "not found" while rows are loaded FR §5.4 F13.8 The estimate rung is always the last move on any list "…or should I log an estimate?"; taken by "yes", "I don't know", or when every rung has been said: one entry at the person's words with the offered rows' range (§5.4 step 5) FR §5.4 F13.9 ◆ Would the chosen rung repeat a question already asked about this food? the record of what has been asked is kept per food, never per turn FR §5.4 · Howard yes Do not ask it (F14) the stuck-question consult (part 3) says what really happened; its safe outcome is the estimate rung no F13.10 One question, written with its facts kind (which food), the names and count offered, what a bare yes means, the estimate as the last offer; on to F25 as a question FR §5.4
The person saidWhat this box doesWhy
"a Chobani cherry Greek yogurt" → three rows that differRung B: "Which one — 1 Simply 100 black cherry, 2 black cherry on the bottom, 3 …?"Few, honest choices.
"soup"Rung A: "What kind of soup?"A huge flat field; a list would be absurd.
"Dave's killer bread" → twelve rowsRung C: "Which Dave's Killer Bread — Good Seed, 21 Whole Grains, Powerseed, or another?"Many rows that group by variety.
"Good Seed" to Rung C → two Good Seed rows that differF12 again over that variety: "I found two Good Seeds. Which one?" (a new question, not a repeat)The variety's rows are a cluster run through the ordinary rules (§11).
"none of these" to Rung BThe three rows are rejected; nothing remains → Rung E: "None of those, then. I can look it up online — say look it up, or cancel."After a rejection, re-select over what remains.
"look it up" to Rung E → the web finds two new productsRung B over the two new products; the rejected ones never return.Anything new is offered, even one.
"look it up" while products are still offeredSearch wider for the same food; new rows join the list; the offered ones stay.§5.4: a lookup on an offered list widens it.
"I don't know" to any rungThe estimate rung: one entry at the person's words with the offered rows' range; said in one sentence; correction invited.I-don't-know ends the funnel honestly.
The rules would ask Rung B againNot asked → F14 → the model consult (part 3).The same question is never asked twice.
A "which one" question while "how much" is also openOne question that asks both, or the which-one first and the how-much next; never two open questions.Never two open questions at once (part 1).
  1. The rungs are ordered by how much the evidence concentrates the answer (§5.4). The estimate is the last offer on every list, so a "yes" or an "I don't know" always has somewhere honest to land.
  2. Wording rules for any question (§5.4): it adds information and says why; short enough to answer by voice; never makes the person repeat their own words; never exposes a wrong guess; options are real rows, never invented. Wording lives in F25, not here.
  3. Today this ladder is spread over several places that disagree (the correction path, the fresh-log path, the wider-search path). This box is the statement that it is one thing.

F16 · The web search

Given: the food's words and brand; what was offered; the rejected list
Outputs: new rows for F12, with their evidence; or "nothing new" with what was searched

The food's identity words and brand; what was already offered; the rejected list from F12 (nothing usable) or F7 ("look it up") F16.1 ◆ Has the web already been searched for this food this turn? proposal yes Do not search again say what was found last time; offer the same choices and the estimate (F13.7) no F16.2 Search authoritative pages only, once the maker's own site or label page for a packaged food; the restaurant's own menu or nutrition page; a government or institutional database. Never a blog, a forum, a recipe site (§12) FR §12 · FR §10 F16.3 A model reads each page into rows the product and variant; the serving quantity, unit and basis (a serving, a package, per 100 g); calories, protein, carbs, fat; the copied passage and its URL; uncertainty kept apart from what the page states (§10.1) FR §10.1 F16.4 Check each row against its passage labels, units and basis must agree with the passage; a contradiction drops the row; the checker failing to read a format does not (§10.1). Then the same plausibility check as F11.4 FR §10.1 F16.5 Count what is NEW, truthfully against what was already offered, by product, with the same normaliser as F11; a rejected product is not new FR §5.4 F16.6 ◆ Anything new? FR §5.4 yes The new rows join the candidates → F12 offered through the ladder (F13); "found three more" only when three are new no F16.7 Nothing new → F17; the sentence says the search ran and what it found: never "not found" while rows are loaded, never "found nothing else" when new rows exist FR §5.4
The person saidWhat this box doesWhy
"look it up" on the Dave's listThe maker's page; new varieties offered; "found three more"Authoritative page; truthful count.
"Giovanni strawberries and cream protein drink" (nothing in the catalogs)The search runs; a maker's page may match "Chobani strawberries and cream protein drink" → offered as "I think you mean…"A misheard brand can still be found by the rest of the words.
A blog post with the food's caloriesNot a source; ignored.Random pages are never a source (§12).
A page whose numbers contradict its own passageRow dropped.A contradiction, not a format the checker cannot read.
The same food, second "look it up" in one turnNo second search; the same choices and the estimate offered.Once per food per turn.
  1. The model here reads pages into rows; it does not decide what the food is. The rows it returns go through the same checks as catalog rows and are offered by the same ladder.
  2. What the search retains (product, serving basis, passage, URL, uncertainty) is the evidence a trace shows (§10.1).

F17 · Do we at least know the kind of food

Given: the words as said; the class
Outputs: the kind is known (to F18) or unknown (to F19)

Nothing usable after the catalogs and the web the words as said; the class from F5 F17.1 ◆ Does a word in it name a kind of food we have rows for? "bagel", "protein bar", "yogurt", "bread", "chicken" — a class with generic rows and a range; brand words set aside FR §10 yes The kind is known → F18 an estimate from the kind is possible; so is entering it no F17.2 ◆ Does the class from F5 give a kind? "a Chipotle bowl" → a restaurant bowl; "a protein shake" → shakes FR §12 yes The kind is known → F18 no F17.3 The kind is unknown → F19 a brand or a word we cannot place ("three flibjopolis"); say we can't find it and offer to enter it; the entry stays in the log, marked FR §10 · Howard
The person saidWhat this box doesWhy
"a plain bagel" not in any sourceKind known: bagel → F18 (an estimate from bagels, as a range, or enter it).A class word.
"a Zorbly bar"Kind known: bar → F18."bar" is a kind even if "Zorbly" is unknown.
"three flibjopolis"Kind unknown → F19: "I couldn't find flibjopolis. You can type the numbers or scan the label."No word we can place; not nonsense — an unfamiliar food.
"a Chipotle thing"Kind from the class: restaurant → F18 with a wide range and the offer to name the item.The class supplies a kind.

F18 · Offer an estimate from the kind, or to enter it

Given: the words as said; the amount; the kind
Outputs: a class estimate logged as a range with a caution; or the person's own entered food, checked and saved; or an unresolved entry kept

A known kind of food with no row for the product the words as said; the amount; the kind F18.1 Build the class estimate the range across the kind's rows (§9.3: median best, inner percentiles, identity-preserving); at the person's words; with their amount; marked as an estimate with a caution FR §9.3 · FR §10 F18.2 Offer both moves in one question "I couldn't find that exact product. I can log a typical bagel, 250 to 350 calories, or you can type the numbers or scan the label. Which?" — the estimate is the last offer, so "yes" and "I don't know" take it FR §10 · FR §5.4 F18.3 ◆ Did they take the estimate? "yes", "estimate", "I don't know", or silence at the end of the ladder FR §5.4 yes Log the class estimate the entry at the person's words, the range, the caution; the card explains: what was said, that the product was not found, that this is a range for the kind, and the ways to narrow it (§10 step 4) no F18.4 ◆ Did they enter it? typed numbers; a scanned label; a scanned barcode (a long shot: if it were in the databases it would have been found — but the name may have been misheard) FR §10 · Howard yes Check it, save it as their own food, log it physically possible? (25 calories with 20 g protein cannot exist) — questioned kindly if not; saved to the person's own foods; the entry finished no F18.5 Neither (cancel, or nothing more) the entry stays in the log, marked unresolved, with the offer on its card; nothing invented FR §1 · Howard
The person saidWhat this box doesWhy
"a plain bagel" → "yes""Logged bagel: 250-350 calories, an estimate for bagels." The card offers the ways to narrow it.The estimate taken.
"…or scan the label" → a scanned labelThe numbers checked, saved as the person's own food, logged exactly.Entered by scan; a point, not a range (§9.3).
Typed "25 calories, 20 g protein""That can't be right — 20 g of protein is at least 80 calories. Check the label?"Physical possibility check (§10).
"cancel"The question closes; the entry stays marked unresolved (F4) — or is removed if they say to delete it.Cancel on this rung closes the question; the log policy keeps the entry.
A packaged phrase with no grounding, e.g. "a Zorbly bar"Never logged with invented macros: the estimate offered is the class (bars), said as such, or enter it.§10: a branded phrase with no grounding is never written with invented numbers.
  1. The estimate here is from the kind, as a range, and it is always said to be one. The card is where the person sees what was said, why it is a range, and how to narrow it (§9.4).
  2. The barcode is offered honestly as a long shot (Howard, 09-23).

F20 · Precise, imprecise, or missing

Given: the chosen food and its measures; the amount read at F6
Outputs: precise (to F23), imprecise (to F24), or missing / unusable (to F21)

The chosen food (a row or a cluster) and the amount read at F6 or the corrected amount from F8 F20.1 ◆ Was an amount stated at all? FR §6.2 yes Continue no: missing → F21 F20.2 ◆ Is it a package the row knows? "a bar", "a bottle", "a packet", a labelled single serving — for a packaged food whose row carries that serving FR §6.2 yes Precise: the package is the amount → F23 one package × the row's serving (§6.2) no F20.3 ◆ Is it a number with a weight, a volume, or a count of the food? "3 ounces", "a cup", "two eggs", "two slices" — and the row has a measure of that kind, or a density to reach it FR §6.2 yes Precise → F23 no F20.4 ◆ Is it a vessel, a hand, a vague word, or a size word? a bowl, a plate, a glass, a handful, a spoonful, "some", "big" FR §6.2 yes Imprecise → F24 a stated amount read as a range no F20.5 ◆ Is it a unit the row cannot take and nothing can convert? "two slices" against a per-100 g row with no slice weight; "a scoop" of an unknown product FR §6.2 yes Unusable → F21 treated as missing for this row; the question, if asked, is about the amount, never about identity (§6.2) no F20.6 Missing → F21 FR §6.1
The person saidWhat this box doesWhy
"a Quest bar" on a per-bar rowPrecise: one bar.A known package.
"3 ounces of turkey" on a per-100 g rowPrecise: weight → F23 converts ounces to grams.Same kind of measure.
"a cup of milk" on a row that lists 240 mlPrecise: volume → F23.Same kind.
"a cup of oatmeal" on a per-100 g row with a densityPrecise → F23 uses the density.Different kind, convertible.
"two slices of Dave's" on a per-slice rowPrecise: 2 × slice.A count the row takes.
"two slices" on a per-100 g row with no slice weightUnusable → F21 (assume or ask how much); never "which one".A stated unit whose size no source established (§6.2).
"a big bowl of oatmeal"Imprecise → F24.A vessel with a size word.
"some peanuts"Imprecise → F24.A vague word gives a range (§6.6).
"chicken"Missing → F21.No amount words.
  1. This box sorts; it does not compute. The arithmetic is F23, the interpretation of vessels is F24, the decision to ask is F21.

F21 · Ask how much, or assume

Given: a food with no usable amount; history; defaults; the precision setting
Outputs: a question ("How much?"), or the assumed range logged and said

A food with no usable amount from F20 F21.1 ◆ Does a saved default carry an amount for these words? "make one cup of Fairlife my default" FR §6.2 · RQ §6.7 yes Use it; say so "I assumed your usual cup" (§6.2) no F21.2 ◆ Does history give a usual amount for this food? the same food logged before with an amount FR §6.5 yes Use it; say so "I assumed the same 3 ounces as last time; tell me if it was different" (§5.3) no F21.3 Build the plausible amount range from data the row's serving; the typical-size reference (§6.7); the vague-serving multipliers (§6.6) — never a number in decision code FR §6.1 · FR §6.7 · FR §6.6 F21.4 ◆ Does that range, in macros, exceed the precision setting? ⚙ both the percentage and the absolute for any enabled characteristic (P) FR §6.1 · FR §4 yes Ask how much "How much chicken did you have?" — specific to the item; the entry waits in the log; on "I don't know" → F22 no F21.5 Assume: log the range and say so (F22) "Logged romaine lettuce: 8-16 calories." — the correct number is not known and the setting says it does not matter FR §9.2
The person saidWhat this box doesWhy
"chicken" with no historyPlausible 3 to 8 oz → 140 to 370 calories → exceeds → "How much chicken did you have?"Job 2 of the setting asks.
"romaine lettuce" on a sandwichPlausible range 8 to 16 calories → within → logged as a range, no question.A range is the first move when it does not matter (§9.2).
"Fairlife fat free milk" with a default of one cupOne cup assumed and said.A saved default with an amount (§6.2).
"Quest bar" logged three times as one barOne bar assumed and said.History.
"an omelette" with no egg countThe eggs are a core part with a wide plausible range → ask "how many eggs?" (§7)The threshold decides which part is asked about, never the part's name.
Same, at the loosest profileAssume 3 eggs from the typical-count reference; said as an assumption.§6.5: the loosest template logs a visible estimate.
  1. The precision setting is read here once (P, job 2). The VALUE of the amount always comes from data: the row's serving, history, the typical-size reference. There is no flat default for anything (§6.1).

F22 · Estimating the amount

Given: the food; the plausible amount range from data
Outputs: a logged range with the assumption recorded and said plainly

An amount to estimate from F21 (assume), or from "I don't know" to a how-much question (F7a) F22.1 Take the plausible amount range from F21.3: the row's serving, history, the typical-size reference, the vague-serving multipliers; a stated size word narrows it ("a large") FR §6.5 F22.2 Convert its low and high to macros through the row F23 does the arithmetic for each end; the best value at the row's serving or the median FR §13 F22.3 Record the assumption as a fact on the entry "assumed one medium banana (118 g)"; "assumed 3 eggs"; the fact belongs to this entry alone; a new amount clears it (§6.2) FR §6.2 F22.4 Say it plainly, as an assumption, never as doubt "Logged banana: 90-135 calories; I assumed one medium." — a statement that invites correction; not a question (F25) FR §5.3 · FR §6.4 · Howard
The person saidWhat this box doesWhy
"I don't know" to "How much chicken?"The plausible range (3 to 8 oz) logged: "Logged chicken breast: 140-370 calories; I estimated the amount."I-don't-know estimates; the setting is not read again.
"chicken" at the loosest profileThe same range, logged without asking, said as an assumption.§6.5.
"a large banana" with no row for largeThe class's large weight, if the reference has it; else ask the person the size in their words (§6.2).A stated size is the size logged, never the medium.
An estimate said with "the nutrition range reflects serving-size uncertainty"Never said.Howard, 09-23: a range is fine; no sentence about the app's doubts.
  1. An assumption on how much is stated, on the entry and in the sentence, and is one correction away. That is the difference between this box and a question: nothing waits.

F23 · Matching the amount to the row's measures

Given: a precise amount; the row's measures (weight, volume, count, size); the food's density and form
Outputs: the quantity fitted to the row: macros and range, the person's unit kept

A precise amount (quantity, unit, size) and the chosen row's measures a row often lists both a weight and a volume for its serving, sometimes only one, sometimes a count unit F23.1 ◆ Is the amount a count of the row's own unit? "two eggs" on a per-egg row; "two slices" on a per-slice row; "a bar" on a per-bar row FR §6.2 · FR §13 yes quantity × the row's serving a stated size word picks the sized row or the reference weight ("two large eggs") no F23.2 ◆ Does the row have a measure of the same kind the person used? weight for weight, volume for volume FR §13 yes Use that measure; convert units within the kind by arithmetic ounces ↔ grams, cups ↔ millilitres, pounds ↔ grams — no density, no guessing no F23.3 ◆ Does the row have only the other kind? the person said a cup; the row is per 100 g (or the reverse) FR §6.8 yes Convert through the food's density from the density reference for this food and form; never "a cup is 100 g"; the person's unit stays on the entry; the conversion is shown in the trace (§6.8) no F23.4 ◆ Is the food cooked-or-dry ambiguous, or raw-vs-cooked? pasta, rice, grains, hot cereals; meat and poultry FR §6.8 yes Pick the matching row by the flag; ask only if it matters history first ("as you logged before"); a cooked food never uses a raw row (§6.8) no F23.5 ◆ A range over several rows (a cluster)? FR §9.3 yes Scale every row to ONE basis first, then take the range the Dave's "two slices at 200" and "1 slice at 100" rows are one basis before they are compared no F23.6 The amount fitted: quantity, the person's unit, the macros and range on to F25 FR §13
The person saidWhat this box doesWhy
"3 ounces of turkey" on a row per 100 g85 g; arithmetic.Same kind (weight).
"a cup of milk" on a row listing 240 ml and 244 gThe volume measure: 1 cup = 240 ml → that serving.The row's measure of the same kind; no density needed.
"a cup of oatmeal (dry)" on a row per 100 g onlyDensity of dry oats → about 80 g.Only the other kind: density.
"two eggs" on a per-egg row2 × the row's serving.A count of the row's unit.
"two large eggs" on a row "1 large (50 g)"2 × 50 g; "assumed two large eggs" said.A sized row.
"two slices" on a per-slice row at 70 and a two-slice row at 200 (a cluster)Both scaled to per-slice before the range: 70 and 100 → "two slices: 140-200".One basis first; this is the 90-calorie bug from this morning.
"half a cup of rice" with history "cooked"The cooked row, half a cup by its volume; "as you logged before".The cooked-or-dry flag from history.
"a chicken breast, grilled" against a raw row onlyNever the raw row; a cooked row or a question.Raw and cooked are different foods.
  1. Density is the exception, not the rule: it is used only when the row gives one kind of measure and the person gave the other (Howard, 09-23).
  2. The person's unit stays on the entry; the conversion is visible in the trace, never silent.

F24 · Interpreting an imprecise measure

Given: an imprecise amount; the chosen food; the typical-size reference; the vague-serving multipliers
Outputs: a range in the food's unit, marked imprecise, with the words and the reading recorded

An imprecise amount and the chosen food a vessel, a hand, a spoon with a modifier, a fraction of a vessel, a size word, a vague word F24.1 ◆ A vessel with a defensible capacity? a bowl, a glass, a mug — the typical-size reference has low/best/high capacities by size word (§6.7) FR §6.7 yes Capacity range × the food's density and form a bowl of oatmeal and a bowl of almonds differ; the size word (small, big) picks the reference entry no F24.2 ◆ A vessel with no defensible food volume? a plate, a dish — geometry is evidence, not a volume (§6.7) FR §6.7 yes The configurable vague-serving range 0.75 to 2.0 × the food's serving today; a fraction ("half a plate") scales it no F24.3 ◆ A hand or a spoon measure? a handful, a pinch, a heaping teaspoon, a spoonful FR §6.7 yes The reference entry for that measure, as a range "a handful of nuts" → 1 to 2 tablespoons; "heaping" scales the spoon up no F24.4 ◆ A vague word only? "some", "a bit", "a few" FR §6.6 yes The vague-serving range 0.75 to 2.0 × the serving (§6.6) no F24.5 The result is ALWAYS a range low, best, high in the food's unit; kept marked imprecise; the words said and the reading are recorded for the card Howard · FR §6.7 F24.6 Fit it to the row (F23) as a range and then P job 2 decides whether the range still needs a question (F21.4) FR §6.1
The person saidWhat this box doesWhy
"a big bowl of oatmeal"Large-bowl capacity × cooked oatmeal density → e.g. 300-450 g → logged as a range.A vessel with a capacity reference.
"half a plate of spaghetti"Half of the vague-serving range for spaghetti → a range.A plate has no food volume.
"a handful of nuts"1 to 2 tablespoons → 100-200 calories; the card says: you said "a handful of nuts"; read as 1-2 tbsp.The card shows the words and the reading (Howard, 09-23).
"a heaping teaspoon of chocolate sauce"The teaspoon reference scaled up → a range.A spoon with a modifier.
"some peanuts"0.75 to 2 × the serving → a range.A vague word.
"a glass of water"A range whose macros are zero → logged, no question.Low impact is decided by the numbers, never by the word (§6.3).
"a bowl of soup" at the balanced settingThe range exceeds the setting → F21 asks how much; "I don't know" → the range is logged.P job 2 still applies to an imprecise amount.
  1. Imprecise measures are always logged as ranges (Howard, 09-23). "A glass", "a bowl", "a plate" are not special cases with rules of their own; they are amounts whose value is a range, and the setting decides whether that range matters (Howard, 08-27).
  2. No size lives in decision code: bowl capacities, spoon sizes and the vague-serving multipliers are data with provenance (§6.7).

F25 · Preparing the result

Given: the decisions and facts for this food, or a question
Outputs: either a finished entry with its card and one sentence, or a question with its record and the waiting entry

Everything decided so far for this food the chosen row or cluster, the fitted amount, the facts (assumptions, estimate status, rejections, alternatives) — or a question from F13 / F18 / F21 F25.1 ◆ Is there a question to ask? Howard yes Prepare the question the sentence (from the wording ladder); its record: kind, the names and count offered, what a bare yes means, the estimate as the last offer, which food it is about; the entry stays in the log as "waiting for your answer"; NOTHING is logged as finished no F25.2 Prepare the entry, finished name = the words as said; the point figure and the range; the alternatives for the card; the assumptions as facts; the source named; a dish as parent and parts; a correction replaces the entry FR §5.2 · FR §12 · FR §7 F25.3 Prepare the card what was said; what was logged; the range and why; any assumption; the source; the alternatives to tap; the ways to narrow a range; "unresolved" or "needs review" only when true FR §9.4 · FR §12 · RQ §2 F25.4 Prepare the sentence: what happened first, then any statement "Logged Quest bar: 190-210 calories." + at most one statement: an assumption ("I assumed one medium"), a basis ("from the maker's page"), or an invitation ("tell me if it was a different one"). Never a sentence about the app's doubts; never the options read out when they are shown as buttons FR §1 · FR §5.3 · Howard F25.5 The wording ladder, in one place "Logging X" · "I think you mean X. Is that right?" · "Which one: 1 …, 2 …" · "None of those, then. I can look it up online — say look it up, or cancel." · "…or should I log an estimate?" — the same shapes on every path; concise choices; the person never repeats their own words Howard · FR §5.4 · RQ §5 F25.6 Hand off to the app (F26) either the finished entry + card + sentence, or the question + its record + the waiting entry proposal
The person saidWhat this box doesWhy
A Quest bar logged from a clusterEntry "Quest bar", 190 (170-210), five flavours as alternatives; card shows them; "Logged Quest bar: 170-210 calories."A statement, no question.
An assumed amount"Logged banana: 90-135 calories; I assumed one medium."The assumption is a statement that invites correction; nothing waits.
A which-one question"Which one — 1 …, 2 …, 3 …?" with the record (kind: which food; names; count 3; a bare yes means nothing here); the entry waits.A question; nothing finished.
A correction answeredThe toast entry replaced by the Dave's entry with the amount carried; "Updated toast to Dave's Killer Bread Good Seed: 140 calories."Replace, never duplicate (§11).
Options shown as buttonsThe chat shows the buttons; the sentence does not list them; the voice reads them only when nothing is on screen.Howard, 09-23: not both.
The old "The nutrition range reflects serving-size uncertainty."Never.Howard, 09-23.
  1. Question or statement, never both (Howard, 09-23). A statement may state an assumption and invite a correction; that is not a question and nothing waits on it.
  2. All wording lives here. No other box composes a sentence, and no decision anywhere reads one.

F26 · How the app delivers it

Given: the module's result: an entry or a question
Outputs: the database updated and checked; the card shown; the sentence spoken; an open question held

The module's result from F25: an entry or a question; this box is the app's, shared by every module F26.1 Write the entry to the database update the provisional entry in place (F4); a dish as parent and parts; a correction replaces; a delete is soft FR §3 · RQ §6.7 F26.2 Check the save read it back; if the save cannot be confirmed, say that truthfully about the SAVE ("I couldn't confirm that was saved") — never about the food, and never when nothing was asked to be saved RQ §2 F26.3 Show the card the log row and the detail card from F25.3; the "being worked out" / "waiting for your answer" / "unresolved" marks as they truly are; navigate to the food screen when a log was asked for by voice RQ §4 · Howard F26.4 Speak the sentence the chat text and the spoken text say the same thing; options shown as buttons are not read out; a question is spoken last RQ §2 · FR §5.4 F26.5 ◆ Was a question asked? proposal yes Hold it open and wait exactly one open question at a time; its record is what R1 and F7 read next turn; a new request sets it aside (R1) no F26.6 The turn is finished the entry counts in the total; the trace records every box that ran RQ §2 · Howard
The person saidWhat this box doesWhy
A finished entryWritten, checked, shown, spoken; the total updated.The normal case.
A questionThe waiting entry shown with its mark; the question spoken; held open.One open question.
The save cannot be confirmed"I couldn't confirm that was saved; it's still marked as being worked out." — the entry stays provisional.Truthful about the save, silent about nothing else.
"I could not confirm that the change was saved" after "look it up"Never: nothing was asked to be saved.This morning's false sentence came from this box being reached with no write.
A log by voiceThe food screen is shown.Howard, 09-23: it did not navigate.
  1. Today this is the shell's result applier, write repositories, card model and speaker: the module returns intents and a reply, the app applies, verifies, renders and speaks. The box is drawn so the module never does any of that itself.

P · The precision setting

Given: the active profile's numbers
Outputs: a yes/no to two questions: do these candidates differ enough to ask? does this unknown amount matter enough to ask?

The active precision profile up to eight numbers: for calories, protein, fat, carbs — a percentage and an absolute amount; calories on by default; held in ONE settable place; every trace records which profile was active P.1 Job 1 — which food (read by F12.3) for each enabled characteristic: the candidates' difference, measured against their midpoint, exceeds BOTH the percentage and the absolute amount → they differ; any one characteristic exceeded → differ. Otherwise they agree: one food, logged with the range FR §4 P.2 Job 2 — how much (read by F21) the plausible amount range (from the food's data, history, the vague-serving reference) converted to macros; exceeds the setting the same way → ask how much; within it → assume and log the range, say so FR §6.1 P.3 What it never does it never supplies an amount's VALUE (that comes from data); it never overrides a stated amount; it is never consulted twice on one question (after "I don't know", estimate); decision code never contains a profile's numbers or its name FR §6.1 · FR §4 P.4 The three profiles are templates balanced (25 calories absolute, 15 percent), loose, precise; advanced mode sets each number; changeable and readable by voice (F10) FR §4
The person saidWhat this box doesWhy
A cup of grapes: rows at 40 and 60 caloriesPercent exceeded, absolute (25) not → agree → logged with the range.Both must be exceeded (§4).
Two protein bars at 190 and 260 caloriesBoth exceeded → differ → ask.A 70-calorie gap, 31 percent.
Lettuce on a sandwich, amount unstated: 8 to 16 calories plausibleWithin the setting → logged as 8-16, no question.Job 2; a range is the first move only when the setting says it does not matter (§9.2).
A bowl of spaghetti, amount unstated: 200 to 600 plausibleExceeds → "How much?"Job 2 asks.
"I don't know" to "How much?"Estimate the amount (F22); the setting is not read again.Consulted once per question.
"three small bananas"The stated size and count are logged; the setting is never consulted.A stated amount always wins (§6.2).
  1. The setting's only two jobs (Howard, 09-22): decide whether asking which is worth it, and whether asking how much is worth it. It is not a source of numbers.
  2. A range that straddles the threshold is surfaced as a range, not turned into a question (§4).

Requirements behind the boxes

Every box carries a small label above its top-right corner saying where its rule comes from. Click a label, here or on any diagram, to read the wording and leave a note on it.

FR §5.4 a section of Food Resolution and Clarification · RQ §5 a section of the Requirements · Howard something Howard said (2026-09-21/23) that is not yet written into the library · code mirrors what today's code does, not a rule · proposal the diagram author's proposal, open to veto

Notes

Every sticky note on every page, newest first. A note is pinned to a box: press the small + in any box's corner. The round button at the bottom right adds a note about a whole page. Each note is a thread: reply under it, and Claude answers there too (its replies arrive with the next version of this page). When Claude says a change is done, check it and delete the note.

Notes on this