Setup Ralph.

This commit is contained in:
2026-01-10 17:13:18 +00:00
parent f15e093254
commit d7ecc2944d
14 changed files with 1287 additions and 11 deletions

94
specs/nutrition.md Normal file
View File

@@ -0,0 +1,94 @@
# Nutrition Specification
## Job to Be Done
When I view my daily guidance, I want to see seed cycling and macro recommendations for my current cycle day, so that I can support my hormones through nutrition.
## Seed Cycling Protocol
Seed cycling provides lignans and essential fatty acids aligned with hormonal phases.
### Phase 1: Days 1-14 (Follicular)
- **Flax seeds** (1-2 tbsp) - Lignans support estrogen metabolism
- **Pumpkin seeds** (1-2 tbsp) - Zinc supports hormone production
### Phase 2: Days 15-31 (Luteal)
- **Sesame seeds** (1-2 tbsp) - Lignans support progesterone
- **Sunflower seeds** (1-2 tbsp) - Vitamin E supports luteal phase
### Seed Switch Alert
On day 15, display prominent alert:
> "🌱 SWITCH TODAY! Start Sesame + Sunflower"
## Macro Guidance
### Carbohydrate Ranges by Day
| Days | Carb Range | Keto Guidance |
|------|------------|---------------|
| 1-3 (Menstrual) | 100-150g | No - body needs carbs during menstruation |
| 4-6 (Early Follicular) | 75-100g | No - transition phase |
| 7-14 (Late Follicular) | 20-100g | OPTIONAL - optimal keto window |
| 15-16 (Ovulation) | 100-150g | No - exit keto, need carbs for ovulation |
| 17-24 (Early Luteal) | 75-125g | No - progesterone needs carbs |
| 25-31 (Late Luteal) | 100-150g+ | NEVER - mood/hormones need carbs for PMS |
### Hashimoto's Considerations
- Never go full keto during late luteal (thyroid stress)
- Extra carbs during flare days
- Avoid goitrogenic foods in raw form
## Nutrition Panel UI
### Required Elements
1. **Current Seeds**
- Display seed combination for today
- Quantity guidance (1-2 tbsp each)
2. **Carb Range**
- Target carbohydrate intake
- Visual indicator (e.g., low/medium/high)
3. **Keto Guidance**
- Clear yes/no/optional indicator
- Reason for guidance
- Color coding (green=OPTIONAL, yellow=No, red=NEVER)
4. **Seed Switch Alert**
- Only visible on day 15
- Prominent, dismissible
## Nutrition Utilities (`src/lib/nutrition.ts`)
**Functions:**
- `getNutritionGuidance(cycleDay)` - Returns seeds, carbRange, ketoGuidance
- `getSeedSwitchAlert(cycleDay)` - Returns alert text or null
**Return Type:**
```typescript
interface NutritionGuidance {
seeds: string;
carbRange: string;
ketoGuidance: string;
}
```
## Success Criteria
1. Seed recommendations match phase (1-14 vs 15-31)
2. Keto guidance is never "optional" during late luteal
3. Seed switch alert appears only on day 15
4. Carb ranges are specific, not vague
## Acceptance Tests
- [ ] Day 1 returns Flax + Pumpkin seeds
- [ ] Day 15 returns Sesame + Sunflower seeds
- [ ] Day 15 triggers seed switch alert
- [ ] Day 16 has no seed switch alert
- [ ] Days 7-14 show keto OPTIONAL
- [ ] Days 25-31 show keto NEVER
- [ ] Carb ranges are non-overlapping and specific