Process store receipt images sent via WhatsApp. When a photo of a grocery receipt from any shop (Albert, Lidl, Tesco, Billa, Kaufland, Penny, etc.) is received, extract purchased items and update fridge-state.md so the fridge tracker reflects what was bought outside of Rohlik. Use whenever an image message contains a receipt or the user says they bought groceries elsewhere.
When the user sends a photo of a grocery store receipt from a shop other than Rohlik, extract the purchased items and update the fridge state so the household inventory stays accurate regardless of where groceries were bought.
Trigger this workflow when:
If the image is unclear or you're not sure it's a receipt, ask:
"Is this a store receipt? I can extract the items and update your fridge inventory."
Examine the image carefully. Czech grocery receipts typically contain:
Extract:
Map each receipt item to one of the fridge-tracker consumption categories:
| Category | Days | Receipt clues |
|---|---|---|
| Fresh meat/fish | 2-3 | kuře, kureci, vepřové, hovězí, ryba, losos, filé |
| Deli/ham | 4-5 | šunka, salám, párek, klobása |
| Fresh dairy (liquid) | 5-7 | mléko, kefír, smetana |
| Yogurt | 7-10 | jogurt, skyr, tvaroh |
| Fresh vegetables | 5-7 | salát, rajče, paprika, okurka, cuketa |
| Root vegetables | 14-21 | brambory, mrkev, cibule, česnek |
| Fresh fruit | 3-5 | banán, jahody, hroznové, maliny |
| Citrus/apples | 10-14 | pomeranč, citrón, jablko, grep |
| Bread | 3-4 | chléb, rohlík, pečivo, bageta |
| Eggs | 14 | vejce |
| Hard cheese | 14-21 | eidam, parmazán, gouda, čedar |
| Soft cheese | 7-10 | mozzarella, brie, hermelín, žervé |
| Butter | 21-30 | máslo, margarín |
| Pantry staples | 60-90 | rýže, těstoviny, mouka, konzerv, luštěniny |
| Cooking oils | 60-90 | olej, olivový |
| Spices/condiments | 180+ | sůl, pepř, kečup, hořčice, koření |
| Frozen items | 60 | mražen, zmrzlina |
| Cleaning/household | 60-90 | prací, ubrousky, toaletní papír |
| Drinks (juice) | 5-7 | džus, šťáva, smoothie |
| Drinks (shelf-stable) | 30 | perlivá voda, minerálka, limonáda |
Skip non-food items that don't fit any category (bags, batteries, magazines, etc.) unless they fall under cleaning/household.
Before updating the fridge state, present a summary for confirmation:
"I see a receipt from Albert (March 23, 2026):
- Milk 1.5% x2 — dairy
- Chicken breast 500g — fresh meat
- Bananas 1kg — fresh fruit
- Pasta 500g — pantry
- Toilet paper x4 — household
Should I add these to your fridge tracker?"
Keep the confirmation concise — group items by category, skip prices (the user already knows what they paid). If many items (10+), summarize by category counts instead of listing each item.
If the user says "just add it" or has previously indicated they don't need confirmation, skip this step in future interactions.
Read /workspace/group/grocery/fridge-state.md and add the extracted items.
For each item:
Place items in the correct section (Fresh, Pantry, Frozen) following the existing file format:
| Item | Qty | Delivered | Est. Remaining | Status |
|------|-----|-----------|---------------|--------|
| Chicken breast (Albert) | 1 | Mar 23 | ~100% | FULL |
Add the store name in parentheses after the item name so the user can distinguish Rohlik deliveries from other shops.
If an item already exists from a recent Rohlik delivery with OK/FULL status, don't duplicate it — the user likely bought extra. Instead, increase the estimated remaining percentage or note the additional quantity.
Append a compact entry to /workspace/group/grocery/delivery-log.md:
### Mar 23 — Albert (receipt scan)
Items: 5 | Total: ~320 CZK
Categories: dairy (2), meat (1), fruit (1), pantry (1), household (1)
Mark it as "receipt scan" to distinguish from Rohlik deliveries.
staples.md or preferences.md from receipt data — those files track Rohlik ordering patterns specifically. Non-Rohlik purchases inform fridge state only.spending.md with non-Rohlik purchases — that file tracks Rohlik spending only.