Template-based meal planning for realistic meals. Use when user wants practical meals with proper structure (protein + legume + vegetables), different foods at each meal, or human-like meal composition. Triggers on "realistic meals", "different foods each meal", "actual meals", "template", "meal structure", "not the same food".
This skill uses template-based optimization to create realistic meal plans that look like what humans actually eat. Unlike Stigler-style optimization (which spreads across many foods), this approach selects one protein + one legume + vegetables per meal.
Problem with Stigler-style optimization:
Breakfast: Lettuce 325g, Onions 100g, Brussels Sprouts 100g, Kale 125g
Lunch: Beans 200g, Onions 150g, Brussels Sprouts 150g, Lettuce 350g
Dinner: Beans 200g, Onions 150g, Brussels Sprouts 150g, Lettuce 350g (IDENTICAL!)
Template-based produces:
Breakfast: Eggs 150g, Edamame 100g, Kale 100g
Lunch: Cod 235g, Kidney beans 216g, Zucchini 161g
Dinner: Salmon 170g, Lentils 113g, Carrots 149g
Snack: Peanuts 30g
# Basic template-based optimization
uv run llmn optimize --pattern pescatarian --template --json
# With multiple patterns
uv run llmn optimize --pattern pescatarian --pattern slow_carb --template --json
# With reproducible seed
uv run llmn optimize --pattern pescatarian --template --seed 42 --json
# With goal-based targets
uv run llmn optimize --pattern pescatarian --template --goal "fat_loss:185lbs:165lbs" --json
| Pattern | Protein Sources | Carb Sources | Notes |
|---|---|---|---|
pescatarian | Fish, eggs | Legumes, grains | No meat |
vegetarian | Eggs, tofu, cheese | Legumes, grains | No meat/fish |
vegan | Tofu, tempeh | Legumes, grains | Plant-based |
keto | Fish, eggs, meat | Fats (not carbs!) | Very low carb |
mediterranean | Fish, poultry | Grains, legumes | + olive oil |
paleo | Meat, fish, eggs | Starchy veg, fruits | No legumes/grains |
slow_carb | Any protein | Legumes only | No white carbs |
Combine patterns: --pattern pescatarian --pattern slow_carb
Map to patterns:
--pattern pescatarian--pattern vegetarian--pattern vegan--pattern mediterranean or --pattern paleo--pattern slow_carb--pattern keto--pattern mediterraneanUse the --goal flag:
--goal "fat_loss:185lbs:165lbs" (current:target)--goal "maintenance:165lbs"--goal "muscle_gain:165lbs:175lbs"uv run llmn optimize --pattern pescatarian --pattern slow_carb --template --goal "fat_loss:185lbs:165lbs" --json
Template output has per-meal structure:
{
"meals": {
"breakfast": {
"foods": [
{"description": "Egg, whole, cooked, fried", "grams": 150, "slot": "protein"},
{"description": "Edamame, frozen, prepared", "grams": 100, "slot": "legume"},
{"description": "Kale, raw", "grams": 100, "slot": "vegetable"}
],
"totals": {"calories": 450, "protein": 35}
},
"lunch": {...},
"dinner": {...},
"snack": {...}
},
"daily_totals": {"calories": 1920, "protein": 175}
}
Present each meal with its foods and macros.
Phase 1 - Selection (Discrete):
--seed for reproducibilityPhase 2 - Optimization (Continuous):
--seed for reproducibility: Same seed = same meal plan--pattern pescatarian --pattern slow_carb is powerful| Feature | Template | Multi-period | Single-period |
|---|---|---|---|
| Meal structure | By design | Constrained | None |
| Different foods/meal | By design | Not guaranteed | N/A |
| Exact per-meal calories | Approximate | Exact | N/A |
| Food-meal affinity | Built-in | Manual config | N/A |
| Complexity | Simple | Complex | Simple |
User: "I want realistic meals, not the same vegetables everywhere"
uv run llmn optimize --pattern pescatarian --pattern slow_carb --template --goal "fat_loss:185lbs:165lbs" --json