# Dietitian Agent > How an agent turns a fitness intake questionnaire into a personalised weekly menu. Every page below is linked as its original Markdown source, served at the same path as the rendered page with a `.md` extension. [llms-full.txt](https://dietitian-agent-docs.pages.dev/llms-full.txt) is the whole site as one file. ## Overview - [Dietitian Agent](https://dietitian-agent-docs.pages.dev/index.md): This site is the working manual for an agent that reads a completed fitness intake questionnaire and writes the client a personalised weekly menu. ## How it works - [The pipeline](https://dietitian-agent-docs.pages.dev/project/how-it-works.md): One questionnaire goes in, one menu comes out. In between are nine steps that each narrow the problem: from 180 raw answers, to the 30 that matter, to a number of calories, to grams, to portions, to meals, to food, to a… - [Input: the answers file](https://dietitian-agent-docs.pages.dev/project/input-contract.md): The agent receives one JSON object: the SurveyJS response data for a completed questionnaire, keyed by field ID. - [Output: the menu](https://dietitian-agent-docs.pages.dev/project/output-contract.md): One file: menus/-.json. Structured data, validated against the schema before it ships, and rendered by the client demo rather than read as-is. - [Scope & limits](https://dietitian-agent-docs.pages.dev/project/scope-and-limits.md): This page outranks the rest of the site. Where a method page seems to permit something this page forbids, this page wins. ## Building a menu - [1. Read the intake](https://dietitian-agent-docs.pages.dev/method/01-read-the-intake.md): 180 fields go in. About 30 of them change the menu. This step finds those 30 and writes them down in one place, so that every later step reads from a short structured digest rather than re-reading raw JSON and reaching… - [2. Safety screen](https://dietitian-agent-docs.pages.dev/method/02-safety-screen.md): Run the whole of Red flags against the digest. Every entry, in order, before any arithmetic. - [3. Energy target](https://dietitian-agent-docs.pages.dev/method/03-energy-target.md): Three multiplications and one adjustment. - [4. Macro split](https://dietitian-agent-docs.pages.dev/method/04-macro-split.md): The target split is 45% carbohydrate, 20–30% protein, 25–30% fat, and the energy conversions are: - [5. Portion exchanges](https://dietitian-agent-docs.pages.dev/method/05-portion-exchanges.md): Grams become portions. This is the step that turns a macro target into something a client can actually follow, because nobody weighs 193 g of carbohydrate but everybody can count four slices of bread. - [6. Meal schedule](https://dietitian-agent-docs.pages.dev/method/06-meal-schedule.md): The day is three main meals and two snacks, on a clock. Not "eat when hungry", and not six small meals — five occasions, at times that line up with when the body handles food best. - [7. Plate & combinations](https://dietitian-agent-docs.pages.dev/method/07-plate-and-combinations.md): Portion counts become food. Each slot gets three or four options, and every option in a slot carries that slot's exact portion counts — that is what lets the client choose without the plan moving. - [8. Personalise](https://dietitian-agent-docs.pages.dev/method/08-personalise.md): This step is a filter, not a design step. It may change which food fills a portion. It may not change how many portions are in a slot. - [9. Assemble & check](https://dietitian-agent-docs.pages.dev/method/09-assemble-and-check.md): Write the menu into the schema's shape, then run the checklist. The checklist is the deliverable's actual quality gate — a menu that has not been through it is not finished, however good it looks. ## Nutrition reference - [Exchange lists](https://dietitian-agent-docs.pages.dev/reference/exchange-lists.md): The menu is built in portions , not grams. A portion is a fixed quantity of macronutrient; the foods listed under it are interchangeable because they deliver that same quantity. - [Food quality](https://dietitian-agent-docs.pages.dev/reference/food-quality.md): The portion system says how much. This page says which. An option that hits its portion counts using foods from the wrong side of these lists is a failed option, not a compromise. - [Fibre & the gut](https://dietitian-agent-docs.pages.dev/reference/fibre-and-gut.md): 25–30 g of fibre a day, from food. Not from a supplement, even where the client already takes one — a fibre supplement in healthsupplements is recorded and left alone, not built around. - [Menopause](https://dietitian-agent-docs.pages.dev/reference/menopause.md): This protocol applies when sysmensesstatus is "Perimenopausal" or "Post-menopausal". - [Hydration & eating behaviour](https://dietitian-agent-docs.pages.dev/reference/hydration-and-behaviour.md): Two sections of the client menu come from this page: Drinking and At the table. They are the same in every menu, which is why they live here rather than being composed per client. - [Supplements](https://dietitian-agent-docs.pages.dev/reference/supplements.md): The agent does not recommend supplements, does not set doses, and does not tell a client to start or stop one. That is a clinician's call and this menu is not clinical. - [Red flags](https://dietitian-agent-docs.pages.dev/reference/red-flags.md): A red flag is a field value that means no menu is written. Not a caveated menu, not a conservative menu, not a menu with a warning at the top. A referral note instead. ## The client menu - [Menu style guide](https://dietitian-agent-docs.pages.dev/menu/style-guide.md): The method pages decide what the menu contains. The schema decides its shape. This page decides how it reads — in English and in Hebrew, because every client-facing string in a localizedText is both. - [JSON schema](https://dietitian-agent-docs.pages.dev/menu/schema.md): The blank a menu is written into. Not a template to copy and fill in by hand — a JSON Schema (2020-12) that scripts/validate-menu.ts checks every menus/.json file against before it counts as finished. - [Worked example](https://dietitian-agent-docs.pages.dev/menu/worked-example.md): One complete run of the pipeline, from a real answers file to a finished menu, with the numbers shown at every step.