> ## Documentation Index
> Fetch the complete documentation index at: https://smithers.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Whole Foods Meal Planner

> Build and validate a calorie, prep-time, and budget constrained meal plan, then approve an order webhook or receive checkout links.

`whole-foods-meal-planner` generates a delivery-oriented meal plan and grocery
list, recalculates its totals deterministically, and retries planning up to
three times when constraints are not met. It has a custom run UI for reviewing
meals, calories, groceries, budget, approval, and order status.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
bunx smithers-orchestrator workflow run whole-foods-meal-planner --input '{
  "householdSize": 2,
  "days": 7,
  "dailyCalorieTarget": 2000,
  "budget": 200,
  "maxPrepMinutes": 15,
  "favoriteFoods": "berries, chicken, yogurt",
  "allergiesExclusions": "peanuts",
  "zipCode": "94107"
}'
```

## Inputs

| Field                                                        | Meaning                                                                        |
| ------------------------------------------------------------ | ------------------------------------------------------------------------------ |
| `householdSize`, `days`                                      | Plan size. Defaults to two people for seven days.                              |
| `dailyCalorieTarget`                                         | Per-person daily target when individual profiles are absent.                   |
| `calorieProfiles`                                            | Optional person-specific targets such as `Alex: 2400, Sam: 1800`.              |
| `dietaryPreferences`, `favoriteFoods`, `allergiesExclusions` | Food preferences and hard exclusions.                                          |
| `maxPrepMinutes`, `budget`, `zipCode`                        | Prep, cost, and delivery constraints.                                          |
| `revisionPrompt`, `priorPlanJson`                            | Revise an existing plan while keeping its constraints.                         |
| `orderWebhookUrl`                                            | Optional HTTPS or localhost endpoint that receives the approved order payload. |
| `requireOrderApproval`                                       | Require durable approval before ordering. Defaults to `true`.                  |
| `deliveryOnly`                                               | Require direct Whole Foods or Amazon product links. Defaults to `true`.        |

## Validation and ordering

The workflow checks day numbering, item and meal calorie arithmetic, household
and person-specific calorie ranges, grocery subtotal, budget, exclusions, prep
time, favorite coverage, and delivery URLs. Residual findings feed the next
planning iteration.

When an order webhook is configured, approval is always required before the
side-effecting request. Without a webhook, the workflow returns Whole Foods
and Amazon checkout links and places no order. Set
`WHOLE_FOODS_ORDER_TOKEN` to send a bearer token to the webhook.
