Generate a daily briefing with health assessments (sleep, exercise, diet, mindfulness) from TimTracker data.
Generate a daily briefing section in obsidian/Timatron/GTD/_DAILY.md that assesses the last week's health data from TimTracker:
~/.config/timtracker/config.json:{
"api_url": "https://timtracker-api.vercel.app",
"api_key": "your-gpt-api-key-here"
}
The api_key is the GPT_API_KEY configured in Vercel for the TimTracker API.
Run the Python script to fetch data and generate the briefing:
cd ~/brain/git/personal/agent-instructions
poetry run python scripts/daily_briefing.py
The script will:
/api/weekly-summaryTake the script output and add it to obsidian/Timatron/GTD/_DAILY.md:
_DAILY.md## YYYY-MM-DD) or create one if it doesn't exist### Health Briefing subsection with the generated content## YYYY-MM-DD
### Health Briefing
#### Sleep
[Assessment of sleep quality, hours, consistency]
#### Exercise
[Assessment of workout frequency, duration, types]
#### Diet
[Assessment of nutrition scores and trends]
#### Mindfulness
[Assessment of mindful minutes and consistency]
#### Summary
[Overall health assessment and recommendations]
Use these targets when evaluating the data:
| Category | Target | Notes |
|---|---|---|
| Sleep | 7-8 hours/night | Consistency matters more than occasional long sleeps |
| Exercise | 150+ min/week | Mix of cardio and strength preferred |
| Diet | Score 7+/10 | Higher scores indicate healthier eating |
| Mindfulness | 10+ min/day | Any amount is beneficial |
When generating assessments:
API key not found: Ensure ~/.config/timtracker/config.json exists with valid credentials.
No data returned: Check that data exists in TimTracker for the date range. The API may return nulls for days without data.
Authentication errors: Verify the API key is correct and hasn't expired.