# Add a dish of the household's own

New dishes belong to this household only (other households never see them). They can be planned at
once. The server checks every dish: unknown ingredients and wrong units are refused, so fix the input,
never work around it.

## 1. Is it there already?
`find_dishes(query)`. If the household has it, use that (or `update_dish` to change it).

## 2. Read the recipe
- **From a link:** open the page with your web tool. Take the facts: name, servings, total time, every
  ingredient with amount and unit, and the method.
- **From a cookbook photo:** look at the photos (`get_saved_recipe_photos` for ones saved in the app, or
  the image the user sent you). Pages may be out of order or split across photos. If a number or word is
  unreadable, ask the user; never guess amounts.
- **From an idea:** agree the dish with the user, then write a sensible recipe.

**Copyright:** never copy a recipe's text or photos. Write the steps in your own words, short, in Danish.
Put where it came from in `source` (the link, or the book and page, e.g. "Ottolenghi: Simple, s. 112").

## 3. Map every ingredient
`find_ingredients([...all ingredient names...])` in one call. For each:
- known → use its `key` as `item`, and one of its `units`.
- a near match is a different thing unless it is truly the same product (grøn karrypasta ≠ rød
  karrypasta, kyllingelår ≠ kyllingebryst).
- unknown → add it to `new_ingredients` with a category from the list (see `how_to("ingredients")`).

## 4. Units (they decide what gets bought)
Only Scandinavian metric kitchen units, and only the ones `find_ingredients` lists for that ingredient.
Convert: 1 cup = 2,4 dl (flour ≈ 140 g, sugar ≈ 200 g); 1 tbsp = 1 spsk; 1 tsp = 1 tsk; 1 oz = 28 g;
1 lb = 450 g; a thumb of ginger = 3 cm; a head of garlic = 10 fed; a pinch = 1 knivspids;
a 400 g can = 1 dåse; a handful of herbs = 1 bundt.

## 5. The dish
- `servings`: as the recipe says (usually 4); the household's settings scale it.
- `minutes`: realistic total time (busy days use it).
- `protein`: the main one: oksekød, svinekød, kylling, lam, fisk, skaldyr, vegetar, æg.
- Spices, oil, salt, pepper, soy sauce: include the ones that define the dish; leave out salt/pepper/oil.
  Cupboard items are shown in the recipe but never bought.
- `optional: true` for garnish / "hvis I har".
- `note` on a line: how it is cut or prepared ("i stave", "hakket fint", "presset"). Put it on the line,
  not in the steps; the recipe shows "4 stk gulerod, i stave".
- `part` on a line: the part of the dish it belongs to ("Marinade", "Peanutsauce"); the recipe shows the
  lines under those headings. The same ingredient may be listed in two parts (3 spsk soja in the marinade,
  2 in the sauce), each with its own note; the shopping list adds them up.
- Water and other things from the tap: list them as lines too (`vand`, e.g. 3 spsk) so they scale with the
  persons. `vand` is never bought (the catalog marks it `never_buy`).
- Built on another dish, the way cookbooks do it ("ca. 1/3 af linsegryden, s. 26"): make the base its own
  dish first, then give this one `uses: [{"recipe": "<base id>", "portion": 0.33}]` (the share of the base
  recipe as written). Its ingredients are folded in automatically, scaled: list only this dish's own.
- `tags`: a few useful words (gryde, pasta, fredag, børnevenlig).
- `type`: `dessert`, `snack` or `extra` for anything that is not a dinner, so the planner never suggests it;
  it can still be put on a day by hand. Leave it out for a dinner.
- `steps`: one step per line, no numbers (the app numbers them).

## 6. Confirm, then create
Show the user a short table (ingredient → amount unit) plus minutes, protein and anything you decided
yourself (conversions, amounts). On yes: `create_dish(...)`. Error? Read it, fix, try again.

Changing a shared dish just for this household: `update_dish(dish, ...)` saves the household's own
version; other households keep the original.

Dishes with choices, or sauces/bases that are not dinners on their own: `how_to("flexible_dish")`.
