Feature Spec: The Planning & Execution Loop (Doc 07)
Product specification connecting weekly meal planning, recipes, portions, inventory feedback, and shopping.
1. User Goal
To synchronize household eating habits with available inventory. The Owner plans the "House Menu" for the week, and the Chef executes it with real-time feedback to the inventory system.
2. Functional Logic & Rules
A. The 7-Day "Architecture" (Monday - Sunday)
-
The Planning Window: A fixed Monday-to-Sunday view.
-
The "Carry Over": Unfinished meals from Sunday are automatically suggested for Monday’s "Draft" menu.
-
Stock Validation: As the Owner adds a meal (e.g., "Tomato Pasta"), the app checks the Digital Twin.
-
Status - Green: All ingredients available.
-
Status - Yellow: Ingredient expiring soon (Use this meal early!).
-
Status - Red: Ingredient missing (Add to Shopping List).
-
B. The Portion-Based Consumption (The Math)
To maintain inventory accuracy without manual counting, the app uses "Portion Logic."
1. The Baseline: Each recipe/item has a "Standard Serving" (e.g., 100g Pasta per person).
2. The Execution: When the Chef marks a meal for 4 people as "Cooked," the app calculates: [Standard Serving] x [4 People].
3. The Deduction: This total is subtracted from the master inventory.
4. The Manual Correction: A "Correct Stock" button is available on the Chef’s completion screen if the physical jar looks different from the digital estimate.
C. The "Surprise Me" Engine (Manual Trigger)
A button that suggests meals based on the "Waste-First" Algorithm: * Priority 1: Items expiring in <48 hours. * Priority 2: Items that have been in the "Airtight Container" the longest (to ensure rotation). * Output: A suggested recipe or meal type that uses the most "At-Risk" ingredients.
3. User Interface (The Workflow)
Screen 1: The Weekly Architect (Owner View)
-
Visuals: A 7-day scrollable calendar.
-
Interaction: Tapping a day opens a "Meal Slot" (Breakfast, Lunch, Snack, Dinner).
-
Smart Search: When adding a meal, the search bar prioritizes items already in the pantry.
4. Logic Rules & Technical Constraints
| Feature | Logic Rule |
|---|---|
Ingredient Sourcing |
If an API is available, pull "Standard Portions." Otherwise, use the "First Time Rule": User enters portion once, app remembers forever. |
Missing Item Sync |
If the Chef marks an ingredient as "Missing" during cooking, it is immediately elevated to the Owner’s "Weekend Nudge" list with a High Priority flag. |
Guest Adjustment |
Owners can increment the "Headcount" for a specific meal, which automatically increases the portion deduction for that day. |