---
name: morning-briefing
trigger: "morning briefing"
version: 1.0
author: neuma
description: Generates a personalized morning briefing by synthesizing health, calendar, task, weather, and pattern data.
---

# Morning Briefing Skill

## Purpose

Generate a comprehensive daily briefing that synthesizes all available data sources into an actionable morning overview. The briefing should help the user start their day with full situational awareness — body status, schedule, priorities, and relevant patterns.

---

## Prerequisites

Before this skill can run, the following files and directories must exist:

- `memory/identity/core.md` — Required for personalization and tone
- `data/` directory — With at least one integration writing to it (e.g., `data/tasks/current.json` from Todoist)
- `output/briefings/` — Directory where briefing files are saved (create it if it doesn't exist: `mkdir -p ~/neuma/output/briefings`)
- The briefing skill file itself, registered in `CLAUDE.md` under the skill invocation table

Optional but recommended before first run:
- At least 3 entries in `memory/patterns/energy.md`
- At least one week of Todoist task data exported to `data/tasks/`

---

## When to Run

- Automatically via cron at a configured time (default: 6:00 AM local)
- Manually by saying "morning briefing" or "generate my briefing"
- Can be re-run mid-day with "refresh briefing" to update with new data

---

## Data Sources

Read the following files in order. If a file is missing, note the gap in the briefing and continue with available data.

### Required
1. **Identity:** `memory/identity/core.md` — for personal context, preferences, goals
2. **Calendar:** `data/calendar/YYYY-MM-DD.json` — today's events
3. **Tasks:** `data/tasks/current.json` — active tasks from Todoist

### Recommended
4. **Health:** `data/health/YYYY-MM-DD.json` — sleep, HRV, readiness, activity
5. **Weather:** `data/weather/YYYY-MM-DD.json` — conditions and forecast
6. **Energy patterns:** `memory/patterns/energy.md` — historical energy data
7. **Behavioral patterns:** `memory/patterns/behavioral.md` — active pattern alerts

### Optional
8. **Yesterday's briefing:** `output/briefings/YYYY-MM-DD.md` (yesterday's date) — for continuity
9. **Recent weekly review:** `memory/history/weekly/` (most recent file) — for ongoing themes

---

## Processing Instructions

### Step 1: Load Context
Read the identity document first. This shapes the tone, format, and personalization of the entire briefing. Note communication preferences (format, length, tone) and apply them throughout.

### Step 2: Assess Body Status
If health data is available:
- Extract sleep duration, quality score, deep sleep, REM
- Extract HRV and compare to the user's stated baseline (from `memory/patterns/energy.md`)
- Extract readiness/recovery score if available
- Note yesterday's activity (steps, workout type)
- Synthesize into a one-line energy prediction for the day

If health data is unavailable:
- Skip this section or note "Health data not available for today"

### Step 3: Map the Calendar
- List all events chronologically with time, title, and duration
- Identify preparation needed for each event (check if meeting notes or documents are referenced)
- Calculate open blocks between meetings (minimum 45 minutes to qualify as a usable block — adjust to match your own working style)
- Flag conflicts or back-to-back stretches longer than 2 hours

### Step 4: Prioritize Tasks
- Read all active tasks from the task source
- Categorize by: due today, due within 3 days, deferred/overdue
- Cross-reference with calendar to identify when each task fits
- Cross-reference with energy patterns to match task type to energy window
- Flag any task that has been deferred 3+ times (include deferral count and suggest smallest possible next action)

### Step 5: Check Weather
If weather data is available:
- Include only if conditions affect plans (rain, extreme heat/cold, travel-relevant)
- Skip on unremarkable weather days (or include a one-line summary)

### Step 6: Surface Patterns
Read pattern files and look for:
- **Active patterns:** Any pattern that matches current conditions (e.g., 3rd consecutive meeting-heavy day, exercise streak, sleep trend)
- **Warning signs:** Conditions that historically precede problems (e.g., meal skipping on meeting-heavy days)
- **Positive streaks:** Behaviors worth acknowledging and protecting (e.g., exercise streak, consistent sleep)

Do not fabricate patterns. Only reference patterns that are explicitly documented in the memory files.

### Step 7: Build Day Structure
Using all the above data:
- Create a time-blocked recommendation for the day
- Place high-cognitive tasks in peak energy windows
- Place administrative tasks in energy dips
- Protect meal times
- Include exercise if it's a training day
- Leave buffer between meetings and deep work blocks

---

## Output Format

Save the output to: `output/briefings/YYYY-MM-DD.md`

Use this structure:

```markdown
# Daily Briefing — [Day], [Full Date]

Generated at [Time] [Timezone]

---

## Body
[Health metrics summary]
→ [One-line energy interpretation]

---

## Calendar
[Table: Time | Event | Prep Needed]
[Open blocks summary]
→ [Key scheduling insight]

---

## Tasks
### High Priority (do today)
[3-5 tasks with energy-match notes]

### Due Soon
[Tasks due in 2-3 days]

### Deferred Watch List
[Flagged items with deferral count and micro-action suggestion]

---

## Weather
[Conditions summary — skip if unremarkable]

---

## Patterns
[Active patterns, warnings, positive streaks]

---

## Recommended Day Structure
[Time-blocked table with reasoning]
```

---

## Tone and Style

- Match the communication preferences in `memory/identity/core.md`
- Default: direct, concise, no filler
- Use "→" for interpretive comments (separates data from opinion)
- Tables for structured information (calendar, day structure)
- Bullet points for lists (tasks, observations)
- No motivational language unless the user's preferences explicitly request it

---

## Edge Cases

**Missing health data:** Generate the briefing without the Body section. Note at the top: "Health data unavailable — briefing generated without body metrics."

**No events today:** Replace the Calendar section with: "No events scheduled. Full day available for focused work."

**No tasks due:** Replace the Tasks section with: "No tasks due today. Consider advancing items from the 'due soon' list or working on a deferred item."

**Weekend:** Use a modified format — drop work-specific sections, emphasize health, recovery, and personal goals. Reference weekend preferences from `memory/preferences/work.md` if they exist.

**Travel day:** If calendar shows travel events, add a logistics section with departure times, transport details, and timezone notes. Adjust the day structure around travel blocks.

---

## Quality Checks

Before finalizing the briefing, verify:
- [ ] All referenced data files were actually read (no hallucinated data)
- [ ] Times are in the user's timezone
- [ ] Date format matches preferences (default: YYYY-MM-DD)
- [ ] Task priorities align with both urgency and energy matching
- [ ] Deferred items are flagged with specific counts
- [ ] Pattern observations reference documented patterns only
- [ ] The recommended day structure accounts for all calendar events

---

## Example Invocation

```bash
# Automated (via cron)
claude --permission-mode full -p \
  "Run the morning briefing skill. Today is $(date +%Y-%m-%d). \
   Read all required data sources and generate the briefing. \
   Save to output/briefings/$(date +%Y-%m-%d).md"

# Manual
claude
> "Morning briefing"
```

---

*This skill improves as your data sources expand. Start with calendar + tasks (immediately useful), add health data when available, and patterns after a few weeks of logging.*
