Analyze Rohlik delivery history to extract taste preferences, staple items, co-purchase patterns, brand preferences, and seasonal trends. Run BEFORE every grocery order to ensure memory is up-to-date. Also use when the user asks to analyze their shopping history, or on first run to bootstrap the grocery profile.
Analyze past Rohlik deliveries and maintain structured memory files in /workspace/group/grocery/ so the shopping planner always has up-to-date knowledge about the household.
Before every grocery order: The shopping planner should trigger a memory refresh before building a cart. This means:
delivery-log.md to find unprocessed deliveriesThis ensures the planner always works with up-to-date preferences, staples, and fridge state.
All files live in /workspace/group/grocery/. Create the directory if it doesn't exist.
| File | Purpose |
|---|---|
preferences.md | Taste profile, liked/disliked items, brand preferences, dietary restrictions |
staples.md | Items appearing in 70%+ of orders with typical quantities and Rohlik product IDs |
patterns.md | Co-purchase patterns, seasonal trends, order frequency stats |
meals.md | Favorite meals, last cooked dates, required ingredients |
planning-feedback.md | Tracked user corrections during planning sessions (implicit preference signals) |
household.md | Household size, dietary needs, budget range |
delivery-log.md | Compact processed delivery summaries |
spending.md | Average order cost, spending trends |
fridge-state.md | Current estimated contents (managed by fridge-tracker skill) |
# Use rohlik MCP tools — do NOT scrape the website
Call mcp__rohlik__get_order_history to get recent orders. Then call mcp__rohlik__get_order_detail for each order to get item-level data. Process orders one at a time to avoid context overflow.
For each order, record:
After processing all orders, identify:
staples.mdpreferences.mdpreferences.mdpatterns.mdpatterns.mdpreferences.md:
# Taste Preferences
Last updated: YYYY-MM-DD
## Liked Categories
- Category (specific items, brands)
## Disliked / Avoided
- Items never ordered despite being common staples
## Brand Preferences
| Category | Preferred Brand | Notes |
|----------|----------------|-------|
| Milk | Brand | Fat %, size |
## Dietary Restrictions
- List any detected or user-stated restrictions
staples.md:
# Staple Items
Last updated: YYYY-MM-DD
| Product | Rohlik ID | Typical Qty | Frequency | Category |
|---------|-----------|------------|-----------|----------|
| Item name | 12345 | N | every order / every other | Category |
When processing orders via mcp__rohlik__get_order_detail, extract the Rohlik product ID for each item and store it in staples.md. This allows the shopping planner to call mcp__rohlik__add_to_cart directly without re-searching. Update IDs if Rohlik changes them (detect by name match with different ID).
meals.md:
# Favorite Meals
Last updated: YYYY-MM-DD
| Meal | Key Ingredients | Times Ordered | Last Cooked | Source |
|------|----------------|---------------|-------------|--------|
| Pasta bolognese | pasta, canned tomatoes, ground beef, parmesan | 5 | 2026-03-15 | co-purchase pattern |
Build this from co-purchase patterns and user-stated meals. When the same ingredient combination appears across multiple orders, infer a meal. When the user explicitly mentions a meal ("we're making pizza tonight"), add it with source "user-stated". Track Last Cooked from the most recent order containing all key ingredients.
planning-feedback.md:
# Planning Session Feedback
Last updated: YYYY-MM-DD
Tracks repeated user corrections during shopping planning sessions.
Only promote to preferences.md when a pattern is clear (3+ occurrences).
## Removals (user removed from proposed cart)
| Item | Times Removed | Last Session | Promoted |
|------|--------------|--------------|----------|
| Yogurt natural | 3 | 2026-03-23 | yes → preferences.md |
## Additions (user added items not in staples)
| Item | Times Added | Last Session | Promoted |
|------|------------|--------------|----------|
| Sparkling water | 2 | 2026-03-20 | no |
## Quantity Adjustments
| Item | Direction | Times | Last Session |
|------|-----------|-------|--------------|
| Milk | increased (1→2) | 4 | 2026-03-23 |
patterns.md:
# Shopping Patterns
Last updated: YYYY-MM-DD
## Co-Purchase Patterns
- Item A + Item B + Item C (reason/meal)
## Seasonal Trends
- Summer: items
- Winter: items
## Order Frequency
- Average interval: N days
- Typical order size: N-M items
- Typical cost: N-M CZK
spending.md:
# Spending Patterns
Last updated: YYYY-MM-DD
## Summary
- Average order: N CZK
- Monthly average: N CZK
- Orders per month: N
## Recent Orders
| Date | Items | Total | Notes |
|------|-------|-------|-------|
Before building a new grocery order, refresh memory with any unprocessed completed deliveries:
mcp__rohlik__get_order_history to find recent completed/delivered ordersdelivery-log.md to identify which orders have already been processed (by order ID or date)mcp__rohlik__get_order_detailpreferences.md, staples.md, patterns.md, spending.mddelivery-log.mdfridge-state.md with delivered items (use actual delivery date, not order date)This is an incremental process: existing consolidated data + newest deliveries → updated consolidation. No need to re-analyze the entire history each time.
When processing completed orders, calculate actual consumption rates per product:
fridge-state.md under ## Calibrated Rates:## Calibrated Rates
| Product | Category Default | Actual Avg | Data Points | Last Updated |
|---------|-----------------|------------|-------------|--------------|
| Milk 1.5% 1L | 5-7 days | 4 days | 6 | 2026-03-23 |
| Eggs 10pc | 14 days | 10 days | 4 | 2026-03-23 |
The fridge-tracker skill will use calibrated rates when available, falling back to category defaults.
After updating memory from completed orders, check planning-feedback.md:
preferences.md under "## Disliked / Avoided" and mark as Promoted: yesstaples.md (with Rohlik ID if known) and mark as Promoted: yesstaples.mdThis is the ONLY mechanism for learning from planning sessions — it requires repeated, consistent signals, not one-time corrections.
Compare reorder intervals against expected consumption:
preferences.md under a "## Waste Risk" sectionIf any file exceeds 400 lines:
delivery-log.md: keep last 20 orders detailed, summarize earlier ones as monthly aggregatesIf grocery/ directory is empty or doesn't exist:
household.md