{
  "id": "catalogue_version_plan_preview_copy_v1",
  "catalogue_id": "plan_preview_copy",
  "record_type": "catalogue_version",
  "schema_version": 1,
  "catalogue_version": "plan_preview_copy.v1",
  "status": "published",
  "created_at": "2026-08-18T00:00:00Z",
  "contract": {
    "display_pillar_order": [
      "fitness",
      "nutrition",
      "recovery"
    ],
    "internal_pillar_aliases": {
      "wellness": "recovery"
    },
    "required_card_fields": [
      "target",
      "action",
      "rationale"
    ],
    "required_card_count": 3,
    "unresolved_template_policy": "use_pillar_fallback",
    "plan_generation_failure_policy": "never_fail_for_preview_copy",
    "preview_values_source": "saved_plan_and_generation_input_snapshot"
  },
  "selection": {
    "eligibility_order": [
      "selected_goal",
      "saved_focus_action",
      "safety_outcome"
    ],
    "match_priority": [
      "safety",
      "exact",
      "preference",
      "context",
      "goal",
      "fallback"
    ],
    "keep_saved_action": true,
    "never_invent_values": true
  },
  "goal_previews": [
    {
      "goal_id": "energy",
      "goal_label": "All-day energy",
      "plan_title": "Your energy plan",
      "goal_summary": "The goal is steadier energy through the day.",
      "cta_text": "Start my energy plan",
      "default_case_ids": {
        "fitness": "fit-steps-mid",
        "nutrition": "nut-protein-breakfast",
        "recovery": "rec-wind"
      }
    },
    {
      "goal_id": "body",
      "goal_label": "Body composition",
      "plan_title": "Your body composition plan",
      "goal_summary": "The goal is a body composition routine you can keep.",
      "cta_text": "Start my body plan",
      "default_case_ids": {
        "fitness": "fit-strength",
        "nutrition": "nut-balanced-lunch",
        "recovery": "rec-wake"
      }
    },
    {
      "goal_id": "sleep",
      "goal_label": "Sleep and recovery",
      "plan_title": "Your sleep and recovery plan",
      "goal_summary": "The goal is more consistent sleep and recovery.",
      "cta_text": "Start my sleep plan",
      "default_case_ids": {
        "fitness": "fit-mobility",
        "nutrition": "nut-early-dinner",
        "recovery": "rec-lights"
      }
    },
    {
      "goal_id": "fitness",
      "goal_label": "Strength and fitness",
      "plan_title": "Your strength and fitness plan",
      "goal_summary": "The goal is stronger, fitter movement built around your week.",
      "cta_text": "Start my fitness plan",
      "default_case_ids": {
        "fitness": "fit-strength",
        "nutrition": "nut-post-training",
        "recovery": "rec-earlier"
      }
    },
    {
      "goal_id": "healthspan",
      "goal_label": "Healthspan",
      "plan_title": "Your healthspan plan",
      "goal_summary": "The goal is a routine that supports the long term.",
      "cta_text": "Start my healthspan plan",
      "default_case_ids": {
        "fitness": "fit-walk",
        "nutrition": "nut-vegetables",
        "recovery": "rec-sunlight"
      }
    }
  ],
  "hero_variants": [
    {
      "variant_id": "full",
      "label": "Health data and answers",
      "condition_codes": [
        "health.has_reliable_data",
        "questionnaire.complete"
      ],
      "template": "We used your recent health history and your answers, then chose the actions that fit your goal and the time you have."
    },
    {
      "variant_id": "questionnaire",
      "label": "Questionnaire-led",
      "condition_codes": [
        "health.data_insufficient",
        "questionnaire.complete"
      ],
      "template": "Your Apple Health history is still building. For now, this plan uses your answers and the time you said you can protect."
    },
    {
      "variant_id": "preference",
      "label": "Preference-led",
      "condition_codes": [
        "preferences.used_in_plan"
      ],
      "template": "We used the activities and food choices you already make, then fitted them around the time you have."
    },
    {
      "variant_id": "recovery",
      "label": "Recovery takes priority",
      "condition_codes": [
        "recovery.constraint_applied"
      ],
      "template": "Your goal sets the direction. Your recent recovery signals keep the first week lighter."
    },
    {
      "variant_id": "injury",
      "label": "Safety-adjusted",
      "condition_codes": [
        "safety.adjustment_applied"
      ],
      "template": "Your goal still sets the direction. The first week uses lower-impact actions that fit the injury information you gave us."
    },
    {
      "variant_id": "busy",
      "label": "Limited time",
      "condition_codes": [
        "availability.constrained"
      ],
      "template": "The plan uses the shorter windows you marked as available, with the longer sessions kept for lighter days."
    },
    {
      "variant_id": "fallback",
      "label": "Default fallback",
      "condition_codes": [
        "always"
      ],
      "template": "This plan uses your goal and the answers you gave us. As more data comes in, the plan can become more specific."
    }
  ],
  "pillar_fallback_case_ids": {
    "fitness": "fit-fallback",
    "nutrition": "nut-fallback",
    "recovery": "rec-fallback"
  },
  "cases": [
    {
      "case_id": "fit-steps-low",
      "pillar": "fitness",
      "match_type": "exact",
      "name": "Lower recent step baseline",
      "trigger_description": "Reliable recent step baseline in the lower activity band.",
      "condition_codes": [
        "health.steps.reliable",
        "health.steps.band.low"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [
        "fitness_steps"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Start with a step target you can repeat",
      "action_template": "{{weekday_steps}} steps on weekdays and {{weekend_steps}} at weekends",
      "rationale_template": "Your recent step pattern gives this target a realistic starting point for the week.",
      "template_tokens": [
        "weekday_steps",
        "weekend_steps"
      ],
      "evidence_fields": [
        "weekday_steps",
        "weekend_steps",
        "step_baseline"
      ]
    },
    {
      "case_id": "fit-steps-mid",
      "pillar": "fitness",
      "match_type": "exact",
      "name": "Established step routine",
      "trigger_description": "Reliable recent step baseline in the reasonably active band.",
      "condition_codes": [
        "health.steps.reliable",
        "health.steps.band.reasonably_active"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [
        "fitness_steps"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Build on the movement already in your week",
      "action_template": "{{weekday_steps}} steps on weekdays and {{weekend_steps}} at weekends",
      "rationale_template": "You already move regularly, so this target builds on that rhythm while leaving room for planned sessions.",
      "template_tokens": [
        "weekday_steps",
        "weekend_steps"
      ],
      "evidence_fields": [
        "weekday_steps",
        "weekend_steps",
        "step_baseline"
      ]
    },
    {
      "case_id": "fit-steps-high",
      "pillar": "fitness",
      "match_type": "exact",
      "name": "High step baseline",
      "trigger_description": "Reliable recent step baseline in the active band.",
      "condition_codes": [
        "health.steps.reliable",
        "health.steps.band.active"
      ],
      "eligible_goal_ids": [
        "energy",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [
        "fitness_steps"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Hold the movement base you already have",
      "action_template": "{{weekday_steps}} steps on weekdays and {{weekend_steps}} at weekends",
      "rationale_template": "Your recent movement is already high, so this target helps you maintain that established base.",
      "template_tokens": [
        "weekday_steps",
        "weekend_steps"
      ],
      "evidence_fields": [
        "weekday_steps",
        "weekend_steps",
        "step_baseline"
      ]
    },
    {
      "case_id": "fit-walk",
      "pillar": "fitness",
      "match_type": "preference",
      "name": "Walking is familiar",
      "trigger_description": "Walking appears in Apple Health or the movement questionnaire.",
      "condition_codes": [
        "movement.familiar.walking"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "sleep",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [
        "fitness_daily_walk"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Keep walking in the week",
      "action_template": "{{session_count}} {{duration_minutes}}-minute walk{{plural_suffix}} this week",
      "rationale_template": "Walking is already part of your recent routine. These sessions use something familiar and fit it into the time you marked as available.",
      "template_tokens": [
        "duration_minutes",
        "session_count",
        "plural_suffix"
      ],
      "evidence_fields": [
        "session_count",
        "duration_minutes",
        "available_days"
      ]
    },
    {
      "case_id": "fit-run",
      "pillar": "fitness",
      "match_type": "preference",
      "name": "Running is familiar",
      "trigger_description": "Running appears in Apple Health or the movement questionnaire and is safe.",
      "condition_codes": [
        "movement.familiar.running"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [
        "fitness_run"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Keep your running rhythm",
      "action_template": "{{session_count}} {{duration_minutes}}-minute run{{plural_suffix}} this week",
      "rationale_template": "Running already appears in your history or your answers. These sessions keep that familiar activity at the duration shown.",
      "template_tokens": [
        "duration_minutes",
        "session_count",
        "plural_suffix"
      ],
      "evidence_fields": [
        "session_count",
        "duration_minutes",
        "movement_source"
      ]
    },
    {
      "case_id": "fit-cycle",
      "pillar": "fitness",
      "match_type": "preference",
      "name": "Cycling is familiar",
      "trigger_description": "Cycling appears in Apple Health or the movement questionnaire and is safe.",
      "condition_codes": [
        "movement.familiar.cycling"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [
        "fitness_cycle"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Use the riding you already do",
      "action_template": "{{session_count}} {{duration_minutes}}-minute ride{{plural_suffix}} this week",
      "rationale_template": "Cycling is already part of your history or your stated preferences. These sessions build on that familiar activity.",
      "template_tokens": [
        "duration_minutes",
        "session_count",
        "plural_suffix"
      ],
      "evidence_fields": [
        "session_count",
        "duration_minutes",
        "movement_source"
      ]
    },
    {
      "case_id": "fit-swim",
      "pillar": "fitness",
      "match_type": "preference",
      "name": "Swimming is familiar",
      "trigger_description": "Swimming appears in Apple Health or the movement questionnaire and is safe.",
      "condition_codes": [
        "movement.familiar.swimming"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [
        "fitness_swim"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Keep swimming in the plan",
      "action_template": "{{session_count}} {{duration_minutes}}-minute swim{{plural_suffix}} this week",
      "rationale_template": "Swimming is one of the activities you already do or selected. The sessions use that preference and the time you said you have.",
      "template_tokens": [
        "duration_minutes",
        "session_count",
        "plural_suffix"
      ],
      "evidence_fields": [
        "session_count",
        "duration_minutes",
        "available_days"
      ]
    },
    {
      "case_id": "fit-hike",
      "pillar": "fitness",
      "match_type": "preference",
      "name": "Hiking is familiar",
      "trigger_description": "Hiking appears in Apple Health or the movement questionnaire and is safe.",
      "condition_codes": [
        "movement.familiar.hiking"
      ],
      "eligible_goal_ids": [
        "energy",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [
        "fitness_hike"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Use a longer walk you already enjoy",
      "action_template": "One {{duration_minutes}}-minute hike on {{scheduled_day}}",
      "rationale_template": "You selected hiking or it appears in your recent activity. The plan places it on the day with the time to carry it.",
      "template_tokens": [
        "duration_minutes",
        "scheduled_day"
      ],
      "evidence_fields": [
        "duration_minutes",
        "scheduled_day",
        "movement_source"
      ]
    },
    {
      "case_id": "fit-row",
      "pillar": "fitness",
      "match_type": "preference",
      "name": "Rowing is familiar",
      "trigger_description": "Rowing appears in Apple Health or the movement questionnaire and is safe.",
      "condition_codes": [
        "movement.familiar.rowing"
      ],
      "eligible_goal_ids": [
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [
        "fitness_row"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Keep rowing in your training week",
      "action_template": "{{session_count}} {{duration_minutes}}-minute rowing session{{plural_suffix}}",
      "rationale_template": "Rowing is familiar from your history or answers. These sessions fit the time available and the level appropriate for you.",
      "template_tokens": [
        "duration_minutes",
        "session_count",
        "plural_suffix"
      ],
      "evidence_fields": [
        "session_count",
        "duration_minutes",
        "safety_outcome"
      ]
    },
    {
      "case_id": "fit-elliptical",
      "pillar": "fitness",
      "match_type": "preference",
      "name": "Elliptical is familiar",
      "trigger_description": "Elliptical training appears in Apple Health or the movement questionnaire and is safe.",
      "condition_codes": [
        "movement.familiar.elliptical"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [
        "fitness_elliptical"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Use the cardio option you know",
      "action_template": "{{session_count}} {{duration_minutes}}-minute elliptical session{{plural_suffix}}",
      "rationale_template": "The elliptical is already part of your routine or preferences. These sessions keep that familiarity in the plan.",
      "template_tokens": [
        "duration_minutes",
        "session_count",
        "plural_suffix"
      ],
      "evidence_fields": [
        "session_count",
        "duration_minutes",
        "movement_source"
      ]
    },
    {
      "case_id": "fit-strength",
      "pillar": "fitness",
      "match_type": "preference",
      "name": "Traditional strength is familiar",
      "trigger_description": "Traditional strength appears in Apple Health or the movement questionnaire and is safe.",
      "condition_codes": [
        "movement.familiar.traditional_strength_training"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [
        "fitness_strength_training"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Hold the strength rhythm you already have",
      "action_template": "{{session_count}} {{duration_minutes}}-minute strength session{{plural_suffix}}",
      "rationale_template": "Strength work already appears in your history or answers. These sessions fit the days and duration available to you.",
      "template_tokens": [
        "duration_minutes",
        "session_count",
        "plural_suffix"
      ],
      "evidence_fields": [
        "session_count",
        "duration_minutes",
        "available_days"
      ]
    },
    {
      "case_id": "fit-functional",
      "pillar": "fitness",
      "match_type": "preference",
      "name": "Functional strength is familiar",
      "trigger_description": "Functional strength is selected or recently logged and is safe.",
      "condition_codes": [
        "movement.familiar.functional_strength_training"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [
        "fitness_functional_strength_training"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Keep a practical strength session in the week",
      "action_template": "{{session_count}} {{duration_minutes}}-minute functional strength session{{plural_suffix}}",
      "rationale_template": "This is a strength format you already use or selected. The plan keeps it specific and fits it around your available days.",
      "template_tokens": [
        "duration_minutes",
        "session_count",
        "plural_suffix"
      ],
      "evidence_fields": [
        "session_count",
        "duration_minutes",
        "movement_source"
      ]
    },
    {
      "case_id": "fit-yoga",
      "pillar": "fitness",
      "match_type": "preference",
      "name": "Yoga is familiar",
      "trigger_description": "Yoga appears in Apple Health or the movement questionnaire and is safe.",
      "condition_codes": [
        "movement.familiar.yoga"
      ],
      "eligible_goal_ids": [
        "sleep",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [
        "fitness_yoga"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Keep the yoga you already use",
      "action_template": "{{session_count}} {{duration_minutes}}-minute yoga session{{plural_suffix}}",
      "rationale_template": "Yoga is part of your recent activity or preferences, so these sessions keep a familiar form of movement in your week.",
      "template_tokens": [
        "duration_minutes",
        "session_count",
        "plural_suffix"
      ],
      "evidence_fields": [
        "session_count",
        "duration_minutes",
        "movement_source"
      ]
    },
    {
      "case_id": "fit-desk-breaks",
      "pillar": "fitness",
      "match_type": "context",
      "name": "Desk-based working day",
      "trigger_description": "Desk, home or hybrid work style with short available windows.",
      "condition_codes": [
        "profile.work_style.desk",
        "availability.short_window"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "sleep",
        "healthspan"
      ],
      "source_action_ids": [
        "fitness_movement_breaks"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Break up the longest sitting blocks",
      "action_template": "Two short movement breaks on {{scheduled_days}}",
      "rationale_template": "Your workday keeps you at a desk and the available windows are short. The plan uses brief breaks instead of adding another full session.",
      "template_tokens": [
        "scheduled_days"
      ],
      "evidence_fields": [
        "work_style",
        "scheduled_days"
      ]
    },
    {
      "case_id": "fit-travel",
      "pillar": "fitness",
      "match_type": "context",
      "name": "Travel or no equipment",
      "trigger_description": "Frequent travel, no equipment or a day marked travelling.",
      "condition_codes": [
        "context.travelling_or_no_equipment"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [
        "fitness_movement_breaks",
        "fitness_daily_walk",
        "fitness_mobility_session"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Keep movement possible away from home",
      "action_template": "{{duration_minutes}} minutes of equipment-free movement on {{scheduled_day}}",
      "rationale_template": "Travel changes the setting, so the plan uses an action that does not depend on your usual gym or equipment.",
      "template_tokens": [
        "duration_minutes",
        "scheduled_day"
      ],
      "evidence_fields": [
        "duration_minutes",
        "scheduled_day",
        "travel_context"
      ]
    },
    {
      "case_id": "fit-mobility",
      "pillar": "fitness",
      "match_type": "safety",
      "name": "Recovery or mobility priority",
      "trigger_description": "Recovery signals or safety review make a lower-load option preferable.",
      "condition_codes": [
        "recovery.lower_load_preferred"
      ],
      "eligible_goal_ids": [
        "sleep",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [
        "fitness_mobility_session"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Keep movement light enough to recover from",
      "action_template": "{{duration_minutes}} minutes of mobility on {{scheduled_day}}",
      "rationale_template": "Your current recovery and movement needs make a lighter session the better fit for this day.",
      "template_tokens": [
        "duration_minutes",
        "scheduled_day"
      ],
      "evidence_fields": [
        "duration_minutes",
        "scheduled_day",
        "safety_reason"
      ]
    },
    {
      "case_id": "fit-injury",
      "pillar": "fitness",
      "match_type": "safety",
      "name": "Stable injury adjustment",
      "trigger_description": "Declared stable injury overlaps the original action's loaded body area.",
      "condition_codes": [
        "safety.outcome.adjusted"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "sleep",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [],
      "applies_to_any_saved_action": true,
      "excluded_from_focus": false,
      "target_template": "Keep movement manageable",
      "action_template": "{{duration_minutes}} minutes of {{approved_alternative_label}}",
      "rationale_template": "The lower-load session accounts for the limitation you recorded while keeping movement in your week.",
      "template_tokens": [
        "approved_alternative_label",
        "duration_minutes"
      ],
      "evidence_fields": [
        "duration_minutes",
        "approved_alternative_label",
        "injury_area"
      ]
    },
    {
      "case_id": "fit-fallback",
      "pillar": "fitness",
      "match_type": "fallback",
      "name": "Fitness default fallback",
      "trigger_description": "No reliable movement history or preference supports a more specific rationale.",
      "condition_codes": [
        "always"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "sleep",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [],
      "applies_to_any_saved_action": true,
      "excluded_from_focus": false,
      "target_template": "Keep a manageable movement slot in the week",
      "action_template": "{{session_count}} {{duration_minutes}}-minute {{activity_label}} session{{plural_suffix}}",
      "rationale_template": "This fits a manageable movement session into the time available this week.",
      "template_tokens": [
        "activity_label",
        "duration_minutes",
        "session_count",
        "plural_suffix"
      ],
      "evidence_fields": [
        "session_count",
        "duration_minutes",
        "activity_label"
      ]
    },
    {
      "case_id": "nut-protein-breakfast",
      "pillar": "nutrition",
      "match_type": "goal",
      "name": "Protein-rich breakfast",
      "trigger_description": "Selected by the goal rules and compatible with dietary answers.",
      "condition_codes": [
        "action.selected",
        "diet.compatible"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "sleep",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [
        "nutrition_protein_breakfast"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Give the morning meal more staying power",
      "action_template": "Choose a protein source at breakfast on {{scheduled_days}}",
      "rationale_template": "This focuses on one clear meal while respecting the dietary preferences and restrictions you recorded.",
      "template_tokens": [
        "scheduled_days"
      ],
      "evidence_fields": [
        "scheduled_days",
        "dietary_preferences",
        "allergy_exclusions"
      ]
    },
    {
      "case_id": "nut-protein-each",
      "pillar": "nutrition",
      "match_type": "goal",
      "name": "Protein across the day",
      "trigger_description": "Training or recovery goal supports protein distribution and the action is compatible.",
      "condition_codes": [
        "action.selected",
        "diet.compatible",
        "plan.has_structured_training"
      ],
      "eligible_goal_ids": [
        "body",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [
        "nutrition_protein_each_meal"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Spread protein across the day",
      "action_template": "Add a protein source to each meal on {{scheduled_days}}",
      "rationale_template": "Spreading protein across meals supports the structured training already planned for this week.",
      "template_tokens": [
        "scheduled_days"
      ],
      "evidence_fields": [
        "scheduled_days",
        "structured_sessions",
        "dietary_preferences"
      ]
    },
    {
      "case_id": "nut-slow-carb",
      "pillar": "nutrition",
      "match_type": "goal",
      "name": "Slower-digesting lunch choice",
      "trigger_description": "All-day energy or sleep goal and compatible dietary answers.",
      "condition_codes": [
        "action.selected",
        "diet.compatible"
      ],
      "eligible_goal_ids": [
        "energy",
        "sleep"
      ],
      "source_action_ids": [
        "nutrition_slow_carb_lunch"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Make lunch carry the afternoon",
      "action_template": "Choose a slower-digesting carbohydrate at lunch on {{scheduled_days}}",
      "rationale_template": "This focuses the action at lunch while keeping the choice aligned with your recorded preferences and restrictions.",
      "template_tokens": [
        "scheduled_days"
      ],
      "evidence_fields": [
        "scheduled_days",
        "dietary_preferences",
        "allergy_exclusions"
      ]
    },
    {
      "case_id": "nut-balanced-lunch",
      "pillar": "nutrition",
      "match_type": "goal",
      "name": "Balanced lunch",
      "trigger_description": "Body composition or healthspan goal and a lunch action is selected.",
      "condition_codes": [
        "action.selected",
        "diet.compatible"
      ],
      "eligible_goal_ids": [
        "body",
        "healthspan"
      ],
      "source_action_ids": [
        "nutrition_plate_built_lunch",
        "nutrition_balanced_meal"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Give lunch a clear structure",
      "action_template": "Build a balanced lunch on {{scheduled_days}}",
      "rationale_template": "The plan uses one specific meal rather than asking you to change every plate. The exact foods stay within the preferences you recorded.",
      "template_tokens": [
        "scheduled_days"
      ],
      "evidence_fields": [
        "scheduled_days",
        "lunch_source",
        "dietary_preferences"
      ]
    },
    {
      "case_id": "nut-snack",
      "pillar": "nutrition",
      "match_type": "exact",
      "name": "Afternoon snack swap",
      "trigger_description": "Questionnaire or food context supports an afternoon snack action.",
      "condition_codes": [
        "questionnaire.afternoon_snack_relevant"
      ],
      "eligible_goal_ids": [
        "energy",
        "body"
      ],
      "source_action_ids": [
        "nutrition_snack_swap"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Make the afternoon snack more useful",
      "action_template": "Choose protein or fruit for your afternoon snack on {{scheduled_days}}",
      "rationale_template": "The afternoon snack gives you one clear moment to choose protein or fruit.",
      "template_tokens": [
        "scheduled_days"
      ],
      "evidence_fields": [
        "scheduled_days",
        "snack_context"
      ]
    },
    {
      "case_id": "nut-early-dinner",
      "pillar": "nutrition",
      "match_type": "goal",
      "name": "Earlier, lighter dinner",
      "trigger_description": "Sleep or energy goal with a suitable evening meal window.",
      "condition_codes": [
        "sleep.window.available"
      ],
      "eligible_goal_ids": [
        "energy",
        "sleep"
      ],
      "source_action_ids": [
        "nutrition_earlier_lighter_dinner"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Leave more room between dinner and bed",
      "action_template": "Finish a lighter dinner by {{target_time}} on {{scheduled_days}}",
      "rationale_template": "Finishing dinner earlier creates a clearer gap before your planned sleep time.",
      "template_tokens": [
        "scheduled_days",
        "target_time"
      ],
      "evidence_fields": [
        "target_time",
        "scheduled_days",
        "sleep_window"
      ]
    },
    {
      "case_id": "nut-lunch-prep",
      "pillar": "nutrition",
      "match_type": "context",
      "name": "Prepare tomorrow's lunch",
      "trigger_description": "Home-cooked lunch preference and a suitable evening or Sunday slot.",
      "condition_codes": [
        "meal_source.lunch.home_cooked"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "sleep",
        "healthspan"
      ],
      "source_action_ids": [
        "nutrition_prepare_lunch"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Make tomorrow's lunch easier to follow",
      "action_template": "Prepare tomorrow's lunch on {{scheduled_day}}",
      "rationale_template": "You said home-prepared lunches fit your routine. The plan uses one preparation slot rather than adding work to every day.",
      "template_tokens": [
        "scheduled_day"
      ],
      "evidence_fields": [
        "scheduled_day",
        "lunch_source"
      ]
    },
    {
      "case_id": "nut-caffeine",
      "pillar": "nutrition",
      "match_type": "exact",
      "name": "Caffeine cutoff",
      "trigger_description": "Caffeine use is declared and sleep timing supports a cutoff action.",
      "condition_codes": [
        "questionnaire.caffeine.confirmed",
        "sleep.window.available"
      ],
      "eligible_goal_ids": [
        "energy",
        "sleep"
      ],
      "source_action_ids": [
        "nutrition_caffeine_cutoff"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Move the last coffee earlier",
      "action_template": "Finish your last coffee by {{cutoff_time}} on {{scheduled_days}}",
      "rationale_template": "An earlier caffeine cutoff creates more space between your last coffee and planned bedtime.",
      "template_tokens": [
        "cutoff_time",
        "scheduled_days"
      ],
      "evidence_fields": [
        "cutoff_time",
        "scheduled_days",
        "caffeine_use"
      ]
    },
    {
      "case_id": "nut-post-training",
      "pillar": "nutrition",
      "match_type": "context",
      "name": "Post-training carbohydrate",
      "trigger_description": "A structured workout is scheduled on the same day.",
      "condition_codes": [
        "plan.structured_workout.same_day"
      ],
      "eligible_goal_ids": [
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [
        "nutrition_post_training_carbs"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Refuel the session already in your plan",
      "action_template": "Add a carbohydrate portion to the meal after training on {{scheduled_days}}",
      "rationale_template": "This pairs the meal action with the structured training already planned for the same day.",
      "template_tokens": [
        "scheduled_days"
      ],
      "evidence_fields": [
        "scheduled_days",
        "paired_workout_id"
      ]
    },
    {
      "case_id": "nut-vegetables",
      "pillar": "nutrition",
      "match_type": "goal",
      "name": "Vegetable variety",
      "trigger_description": "Healthspan or body composition goal and no recorded restriction prevents it.",
      "condition_codes": [
        "diet.compatible"
      ],
      "eligible_goal_ids": [
        "body",
        "healthspan"
      ],
      "source_action_ids": [
        "nutrition_three_vegetables"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Add more variety to today's meals",
      "action_template": "Choose {{target_varieties}} different vegetables on {{scheduled_days}}",
      "rationale_template": "The saved target keeps this action specific and easy to track.",
      "template_tokens": [
        "scheduled_days",
        "target_varieties"
      ],
      "evidence_fields": [
        "target_varieties",
        "scheduled_days"
      ]
    },
    {
      "case_id": "nut-legume",
      "pillar": "nutrition",
      "match_type": "preference",
      "name": "Legume or wholegrain",
      "trigger_description": "Dietary pattern supports legumes or wholegrains.",
      "condition_codes": [
        "diet.legume_or_wholegrain_compatible"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "healthspan"
      ],
      "source_action_ids": [
        "nutrition_legume_or_wholegrain"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Add one fibre-rich staple",
      "action_template": "Add a legume or wholegrain to {{meal_label}} on {{scheduled_days}}",
      "rationale_template": "The action uses a food group compatible with the preferences and restrictions you recorded, at one named meal moment.",
      "template_tokens": [
        "meal_label",
        "scheduled_days"
      ],
      "evidence_fields": [
        "meal_label",
        "scheduled_days",
        "dietary_preferences"
      ]
    },
    {
      "case_id": "nut-home-dinner",
      "pillar": "nutrition",
      "match_type": "preference",
      "name": "Home-cooked dinner",
      "trigger_description": "Home-cooked dinner preference and an evening slot.",
      "condition_codes": [
        "meal_source.dinner.home_cooked"
      ],
      "eligible_goal_ids": [
        "body",
        "healthspan"
      ],
      "source_action_ids": [
        "nutrition_home_cooked_dinner"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Use one dinner you can repeat",
      "action_template": "Cook one simple dinner at home on {{scheduled_day}}",
      "rationale_template": "Home cooking is already part of your answers. The plan asks for one specific dinner, not a complete change to the week.",
      "template_tokens": [
        "scheduled_day"
      ],
      "evidence_fields": [
        "scheduled_day",
        "dinner_source"
      ]
    },
    {
      "case_id": "nut-vegetarian",
      "pillar": "nutrition",
      "match_type": "preference",
      "name": "Vegetarian compatibility",
      "trigger_description": "Vegetarian preference or restriction is recorded.",
      "condition_codes": [
        "diet.preference.vegetarian"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [
        "nutrition_protein_breakfast",
        "nutrition_protein_each_meal",
        "nutrition_balanced_meal",
        "nutrition_plate_built_lunch",
        "nutrition_legume_or_wholegrain"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Use a protein choice that fits how you eat",
      "action_template": "Add one of your usual vegetarian protein sources to {{meal_label}}",
      "rationale_template": "This keeps the meal aligned with the vegetarian preference you recorded.",
      "template_tokens": [
        "meal_label"
      ],
      "evidence_fields": [
        "meal_label",
        "dietary_preferences"
      ]
    },
    {
      "case_id": "nut-vegan",
      "pillar": "nutrition",
      "match_type": "preference",
      "name": "Vegan compatibility",
      "trigger_description": "Vegan preference or restriction is recorded.",
      "condition_codes": [
        "diet.preference.vegan"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [
        "nutrition_protein_breakfast",
        "nutrition_protein_each_meal",
        "nutrition_balanced_meal",
        "nutrition_plate_built_lunch",
        "nutrition_legume_or_wholegrain"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Use a protein choice that fits how you eat",
      "action_template": "Add one of your usual plant protein sources to {{meal_label}}",
      "rationale_template": "This keeps the meal aligned with the vegan preference you recorded.",
      "template_tokens": [
        "meal_label"
      ],
      "evidence_fields": [
        "meal_label",
        "dietary_preferences"
      ]
    },
    {
      "case_id": "nut-pescatarian",
      "pillar": "nutrition",
      "match_type": "preference",
      "name": "Pescatarian compatibility",
      "trigger_description": "Pescatarian preference is recorded.",
      "condition_codes": [
        "diet.preference.pescatarian"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [
        "nutrition_protein_breakfast",
        "nutrition_protein_each_meal",
        "nutrition_balanced_meal",
        "nutrition_plate_built_lunch"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Use a protein choice already familiar to you",
      "action_template": "Add a pescatarian protein source to {{meal_label}}",
      "rationale_template": "The meal action uses the preference you recorded. It stays specific to the meal without prescribing an unconfirmed food.",
      "template_tokens": [
        "meal_label"
      ],
      "evidence_fields": [
        "meal_label",
        "dietary_preferences"
      ]
    },
    {
      "case_id": "nut-allergy",
      "pillar": "nutrition",
      "match_type": "safety",
      "name": "Allergy or intolerance filter",
      "trigger_description": "One or more food allergies, intolerances or religious restrictions are recorded.",
      "condition_codes": [
        "diet.has_restriction"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "sleep",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [],
      "applies_to_any_saved_action": true,
      "excluded_from_focus": false,
      "target_template": "Keep the food action inside your restrictions",
      "action_template": "{{action_sentence}} using an option that fits your recorded restrictions",
      "rationale_template": "This keeps the meal action compatible with the food restrictions you recorded.",
      "template_tokens": [
        "action_sentence"
      ],
      "evidence_fields": [
        "action_label",
        "allergy_exclusions",
        "dietary_preferences"
      ]
    },
    {
      "case_id": "nut-travel",
      "pillar": "nutrition",
      "match_type": "context",
      "name": "Eating away from home",
      "trigger_description": "Frequent travel, ordered meals or restaurant meal source.",
      "condition_codes": [
        "meal_source.bought_or_ordered"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "sleep",
        "healthspan"
      ],
      "source_action_ids": [
        "nutrition_balanced_meal",
        "nutrition_plate_built_lunch",
        "nutrition_snack_swap",
        "nutrition_earlier_lighter_dinner"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Keep one food choice clear while away",
      "action_template": "{{action_sentence}} on {{scheduled_day}}",
      "rationale_template": "This keeps the meal action practical when you are buying or ordering food away from home.",
      "template_tokens": [
        "action_sentence",
        "scheduled_day"
      ],
      "evidence_fields": [
        "action_label",
        "meal_label",
        "scheduled_day"
      ]
    },
    {
      "case_id": "nut-fallback",
      "pillar": "nutrition",
      "match_type": "fallback",
      "name": "Nutrition default fallback",
      "trigger_description": "No reliable food preference or meal context supports a more specific rationale.",
      "condition_codes": [
        "always"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "sleep",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [],
      "applies_to_any_saved_action": true,
      "excluded_from_focus": false,
      "target_template": "Make one meal easier to repeat",
      "action_template": "{{action_sentence}} on {{scheduled_days}}",
      "rationale_template": "Focusing on one meal action makes it easier to repeat during the week.",
      "template_tokens": [
        "action_sentence",
        "scheduled_days"
      ],
      "evidence_fields": [
        "action_label",
        "meal_label",
        "scheduled_days"
      ]
    },
    {
      "case_id": "rec-wake",
      "pillar": "recovery",
      "match_type": "exact",
      "name": "Consistent wake time",
      "trigger_description": "Reliable sleep history or questionnaire wake time supports a target.",
      "condition_codes": [
        "sleep.target_wake_time.available"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "sleep",
        "healthspan"
      ],
      "source_action_ids": [
        "wellness_fixed_wake_time"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Anchor the morning at a time that fits your routine",
      "action_template": "Wake at {{target_time}} on {{scheduled_days}}",
      "rationale_template": "The wake time reflects the sleep routine available when this plan was created.",
      "template_tokens": [
        "scheduled_days",
        "target_time"
      ],
      "evidence_fields": [
        "target_time",
        "scheduled_days",
        "sleep_source"
      ]
    },
    {
      "case_id": "rec-lights",
      "pillar": "recovery",
      "match_type": "exact",
      "name": "Planned lights-out time",
      "trigger_description": "Reliable sleep timing or questionnaire bedtime supports a target.",
      "condition_codes": [
        "sleep.target_lights_out.available"
      ],
      "eligible_goal_ids": [
        "energy",
        "sleep",
        "healthspan"
      ],
      "source_action_ids": [
        "wellness_lights_out"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Give the night a clear stopping point",
      "action_template": "Turn the lights out at {{target_time}} on {{scheduled_days}}",
      "rationale_template": "A clear lights-out time gives your evening a consistent stopping point.",
      "template_tokens": [
        "scheduled_days",
        "target_time"
      ],
      "evidence_fields": [
        "target_time",
        "scheduled_days",
        "sleep_window"
      ]
    },
    {
      "case_id": "rec-wind",
      "pillar": "recovery",
      "match_type": "exact",
      "name": "Evening wind-down",
      "trigger_description": "Sleep insight or questionnaire points to a missing wind-down routine.",
      "condition_codes": [
        "sleep.wind_down_relevant"
      ],
      "eligible_goal_ids": [
        "energy",
        "sleep",
        "healthspan"
      ],
      "source_action_ids": [
        "wellness_wind_down"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Put a buffer before bed",
      "action_template": "Begin a {{duration_minutes}}-minute wind-down at {{target_time}}",
      "rationale_template": "Your recent sleep pattern or answers make the evening transition the useful place to act. The plan keeps it to one clear routine.",
      "template_tokens": [
        "duration_minutes",
        "target_time"
      ],
      "evidence_fields": [
        "duration_minutes",
        "target_time",
        "related_insight"
      ]
    },
    {
      "case_id": "rec-screen",
      "pillar": "recovery",
      "match_type": "exact",
      "name": "Screen cutoff",
      "trigger_description": "Bedtime screen use is declared and a valid sleep window exists.",
      "condition_codes": [
        "questionnaire.bedtime_screen_use.confirmed"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "sleep"
      ],
      "source_action_ids": [
        "wellness_screens_off"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Clear the last part of the evening",
      "action_template": "Turn screens off {{duration_minutes}} minutes before bed on {{scheduled_days}}",
      "rationale_template": "A screen-free buffer gives the evening routine a clear transition towards bed.",
      "template_tokens": [
        "duration_minutes",
        "scheduled_days"
      ],
      "evidence_fields": [
        "duration_minutes",
        "scheduled_days",
        "screen_use"
      ]
    },
    {
      "case_id": "rec-earlier",
      "pillar": "recovery",
      "match_type": "exact",
      "name": "Earlier bedtime opportunity",
      "trigger_description": "Recent sleep duration is below the user's usual pattern and bedtime can move.",
      "condition_codes": [
        "sleep.duration.below_personal_baseline"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "sleep",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [
        "wellness_earlier_bed"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Make a little more room for sleep",
      "action_template": "Go to bed {{duration_minutes}} minutes earlier on {{scheduled_days}}",
      "rationale_template": "Your recent nights have been shorter than your usual pattern. The plan adds a modest sleep window rather than making a result claim.",
      "template_tokens": [
        "duration_minutes",
        "scheduled_days"
      ],
      "evidence_fields": [
        "duration_minutes",
        "scheduled_days",
        "sleep_baseline"
      ]
    },
    {
      "case_id": "rec-sunlight",
      "pillar": "recovery",
      "match_type": "goal",
      "name": "Morning sunlight",
      "trigger_description": "Sleep or energy goal and a morning action is suitable.",
      "condition_codes": [
        "action.selected"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "sleep",
        "healthspan"
      ],
      "source_action_ids": [
        "wellness_morning_sunlight"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Give the morning a clear cue",
      "action_template": "Get outside for {{duration_minutes}} minutes after waking",
      "rationale_template": "A short morning outdoor cue gives your daily routine a clear starting point.",
      "template_tokens": [
        "duration_minutes"
      ],
      "evidence_fields": [
        "duration_minutes",
        "wake_window"
      ]
    },
    {
      "case_id": "rec-breathe",
      "pillar": "recovery",
      "match_type": "context",
      "name": "Breathing break for a desk day",
      "trigger_description": "Desk-based or busy work context with a short available window.",
      "condition_codes": [
        "profile.work_style.desk_or_busy"
      ],
      "eligible_goal_ids": [
        "energy",
        "sleep",
        "healthspan"
      ],
      "source_action_ids": [
        "wellness_breathing_break"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Put one quiet break into the workday",
      "action_template": "Take a {{duration_minutes}}-minute breathing break at {{timing_label}}",
      "rationale_template": "Your workday is packed and the available window is short. The plan uses one brief pause instead of adding another long task.",
      "template_tokens": [
        "duration_minutes",
        "timing_label"
      ],
      "evidence_fields": [
        "duration_minutes",
        "timing_label",
        "work_style"
      ]
    },
    {
      "case_id": "rec-mindful",
      "pillar": "recovery",
      "match_type": "preference",
      "name": "Existing mindful routine",
      "trigger_description": "Mindful sessions appear in Apple Health or the questionnaire.",
      "condition_codes": [
        "health.mindful_session.familiar"
      ],
      "eligible_goal_ids": [
        "energy",
        "sleep",
        "healthspan"
      ],
      "source_action_ids": [
        "wellness_breathing_break"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Keep the quiet routine you already use",
      "action_template": "Take a {{duration_minutes}}-minute breathing break on {{scheduled_days}}",
      "rationale_template": "Mindful sessions already appear in your recent history or answers. The plan keeps that familiar pattern in the week.",
      "template_tokens": [
        "duration_minutes",
        "scheduled_days"
      ],
      "evidence_fields": [
        "duration_minutes",
        "scheduled_days",
        "mindful_source"
      ]
    },
    {
      "case_id": "rec-rhr",
      "pillar": "recovery",
      "match_type": "exact",
      "name": "Resting heart rate above usual",
      "trigger_description": "A reliable personal baseline and recent resting heart rate are available, and the selected recovery action is compatible.",
      "condition_codes": [
        "health.resting_heart_rate.above_personal_baseline"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "sleep",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [
        "wellness_breathing_break",
        "wellness_wind_down"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Give recovery more room this week",
      "action_template": "{{action_sentence}} on {{scheduled_days}}",
      "rationale_template": "Your recent resting heart rate is above your usual pattern, so this week leaves more room for recovery.",
      "template_tokens": [
        "action_sentence",
        "scheduled_days"
      ],
      "evidence_fields": [
        "action_sentence",
        "scheduled_days",
        "rhr_baseline"
      ]
    },
    {
      "case_id": "rec-hrv",
      "pillar": "recovery",
      "match_type": "exact",
      "name": "HRV below usual",
      "trigger_description": "A reliable personal baseline and recent HRV are available, and the selected recovery action is compatible.",
      "condition_codes": [
        "health.hrv.below_personal_baseline"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "sleep",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [
        "wellness_breathing_break",
        "wellness_wind_down"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Keep the first week easier to absorb",
      "action_template": "{{action_sentence}} on {{scheduled_days}}",
      "rationale_template": "Your recent HRV is below your usual pattern, so the first week keeps recovery clear and manageable.",
      "template_tokens": [
        "action_sentence",
        "scheduled_days"
      ],
      "evidence_fields": [
        "action_sentence",
        "scheduled_days",
        "hrv_baseline"
      ]
    },
    {
      "case_id": "rec-sleep-short",
      "pillar": "recovery",
      "match_type": "exact",
      "name": "Sleep duration below usual",
      "trigger_description": "Reliable sleep duration is shorter than the personal baseline, and the selected recovery action supports sleep opportunity.",
      "condition_codes": [
        "sleep.duration.below_personal_baseline"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "sleep",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [
        "wellness_earlier_bed",
        "wellness_lights_out",
        "wellness_screens_off",
        "wellness_wind_down"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Raise the sleep opportunity before adding more load",
      "action_template": "{{action_sentence}} on {{scheduled_days}}",
      "rationale_template": "Your recent sleep has been shorter than your usual pattern, so this action creates more room for recovery.",
      "template_tokens": [
        "scheduled_days",
        "action_sentence"
      ],
      "evidence_fields": [
        "action_sentence",
        "scheduled_days",
        "sleep_baseline"
      ]
    },
    {
      "case_id": "rec-sleep-variable",
      "pillar": "recovery",
      "match_type": "exact",
      "name": "Variable sleep timing",
      "trigger_description": "Reliable sleep history shows an inconsistent sleep or wake window.",
      "condition_codes": [
        "sleep.timing.variable"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "sleep",
        "healthspan"
      ],
      "source_action_ids": [
        "wellness_fixed_wake_time",
        "wellness_lights_out"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Make one part of the sleep window more regular",
      "action_template": "Follow your {{target_time}} sleep timing on {{scheduled_days}}",
      "rationale_template": "Your recent sleep timing has moved around. The plan anchors one end of the night rather than changing everything at once.",
      "template_tokens": [
        "scheduled_days",
        "target_time"
      ],
      "evidence_fields": [
        "sleep_timing_action",
        "target_time",
        "scheduled_days"
      ]
    },
    {
      "case_id": "rec-busy",
      "pillar": "recovery",
      "match_type": "context",
      "name": "Busy day adaptation",
      "trigger_description": "Daily check-in is Busy or available time is reduced.",
      "condition_codes": [
        "daily_check_in.busy"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "sleep",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [],
      "applies_to_any_saved_action": true,
      "excluded_from_focus": false,
      "target_template": "Keep recovery possible on the packed day",
      "action_template": "Use the {{duration_minutes}}-minute version of {{recovery_action_label}}",
      "rationale_template": "A shorter version keeps recovery manageable on a day with less time.",
      "template_tokens": [
        "duration_minutes",
        "recovery_action_label"
      ],
      "evidence_fields": [
        "duration_minutes",
        "recovery_action_label",
        "check_in_status"
      ]
    },
    {
      "case_id": "rec-travel",
      "pillar": "recovery",
      "match_type": "context",
      "name": "Travelling today",
      "trigger_description": "Daily check-in is Travelling or travel context is active.",
      "condition_codes": [
        "daily_check_in.travelling"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "sleep",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [],
      "applies_to_any_saved_action": true,
      "excluded_from_focus": false,
      "target_template": "Keep one recovery cue while travelling",
      "action_template": "{{action_sentence}} at {{local_timing_label}}",
      "rationale_template": "This keeps recovery possible while you are away from your usual space and equipment.",
      "template_tokens": [
        "local_timing_label",
        "action_sentence"
      ],
      "evidence_fields": [
        "travel_safe_action",
        "local_timing_label",
        "check_in_status"
      ]
    },
    {
      "case_id": "rec-sick",
      "pillar": "recovery",
      "match_type": "safety",
      "name": "Sick today",
      "trigger_description": "Daily check-in is Sick.",
      "condition_codes": [
        "daily_check_in.sick"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "sleep",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [],
      "applies_to_any_saved_action": true,
      "excluded_from_focus": false,
      "target_template": "Let today be lighter",
      "action_template": "{{action_sentence}} if it feels manageable",
      "rationale_template": "You marked today as sick. The plan removes the harder load and keeps only the lower-demand action selected for today.",
      "template_tokens": [
        "action_sentence"
      ],
      "evidence_fields": [
        "sick_day_action",
        "check_in_status"
      ]
    },
    {
      "case_id": "rec-social",
      "pillar": "recovery",
      "match_type": "preference",
      "name": "Social walk",
      "trigger_description": "Social connection context supports the approved walk-with-someone action.",
      "condition_codes": [
        "action.selected"
      ],
      "eligible_goal_ids": [
        "energy",
        "sleep",
        "healthspan"
      ],
      "source_action_ids": [
        "wellness_walk_with_someone"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": false,
      "target_template": "Pair light movement with time together",
      "action_template": "Take a {{duration_minutes}}-minute walk with someone on {{scheduled_day}}",
      "rationale_template": "This pairs gentle movement with time together in one manageable action.",
      "template_tokens": [
        "duration_minutes",
        "scheduled_day"
      ],
      "evidence_fields": [
        "duration_minutes",
        "scheduled_day"
      ]
    },
    {
      "case_id": "rec-hydration",
      "pillar": "recovery",
      "match_type": "context",
      "name": "Water stays supplementary",
      "trigger_description": "Water tracking is enabled on the dashboard.",
      "condition_codes": [
        "dashboard.water_tracking.enabled"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "sleep",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [
        "passive_water"
      ],
      "applies_to_any_saved_action": false,
      "excluded_from_focus": true,
      "target_template": "Keep water in its own tracker",
      "action_template": "Track {{water_target_ml}} ml in the water section",
      "rationale_template": "Water remains visible alongside the three focus cards without replacing your recovery action.",
      "template_tokens": [
        "water_target_ml"
      ],
      "evidence_fields": [
        "water_target_ml"
      ]
    },
    {
      "case_id": "rec-fallback",
      "pillar": "recovery",
      "match_type": "fallback",
      "name": "Recovery default fallback",
      "trigger_description": "No reliable sleep or recovery fact supports a more specific rationale.",
      "condition_codes": [
        "always"
      ],
      "eligible_goal_ids": [
        "energy",
        "body",
        "sleep",
        "fitness",
        "healthspan"
      ],
      "source_action_ids": [],
      "applies_to_any_saved_action": true,
      "excluded_from_focus": false,
      "target_template": "Protect one regular recovery cue",
      "action_template": "{{action_sentence}} on {{scheduled_days}}",
      "rationale_template": "This keeps one clear recovery action in your week while more of your routine becomes available.",
      "template_tokens": [
        "action_sentence",
        "scheduled_days"
      ],
      "evidence_fields": [
        "recovery_action_label",
        "scheduled_days"
      ]
    }
  ]
}
