You're offline — showing cached data

Morning Briefing

morning-briefing
2026-06-13 06:14:46 SAST
← Back to Tasks

Morning briefing at 08:00 SAST (06:00 UTC), every day. Sends an exception-based Telegram message to the Life Manager forum topic with today's hard commitments, urgent/same-day/high-value exceptions, and one recommended next action when needed. Routine weekly calendar detail and low-risk Life tickets are omitted or batched for later digests.

Daily at 08:000 8 * * *
Yes
shell
480s
No
in 2h (2026-06-13 08:00)

Task Definition

tasks/morning-briefing.md
shell
set
No
Yes
set -e
. ~/.claude/env/api_keys.env
cd /home/lucienne/workspace
morning_briefing_prompt="$(cat <<'CLAUDE_PROMPT'
You are Luci. Send an exception-based Morning Briefing Telegram message to Elmar via the Life Manager forum topic.

Steps:
1. Run: python3 ~/workspace/scripts/life_manager.py today-calendar
   Get today's Outlook + Google Calendar events.

2. Run: python3 ~/workspace/scripts/life_manager.py week-calendar --days 7
   Get the next 7 days of calendar events (rolling window from today). Use this as context only; do not enumerate the full 7-day calendar.
   The Google output includes multiple calendars: conrelma@gmail.com (Elmar's primary), Family, and College (Cornwall Hill College — Cayla's school + sport).

   COLLEGE FILTER (Cayla is Grade 11, plays 1st team girls hockey):
   Only include College events that match ONE of:
     a) Mentions Cayla by name.
     b) Mentions Grade 11 / Gr 11 / G11 / Grd 11 / 'Senior' subject events that map to Grade 11 (e.g. 'Afrikaans Olympiad (Senior)').
     c) 1st team girls hockey ('1st XI Hockey', 'Girls Hockey 1st', 'College Girls Hockey vs ...' where it's the 1st team — if the entry doesn't say which team, include it and tag [verify team]).
     d) School-wide events that apply to ALL grades — term start/end, public holidays, day-rotation markers ('DAY 4', 'DAY 5', etc.), Mother's day, parents' evenings open to all, Olympiad rounds, school closures, exam timetables for whole school.
   DROP everything else: other grades' events, U14/U15/U16 sports, boys' sports, staff-only items (SEC Meeting, Executive Meeting, Break Duty, Standardized Test for other grades, Management Meeting, individual teacher rooms unless Grade 11), other-team trials, primary school events.

3. Run: python3 ~/workspace/scripts/life_manager.py open-tickets
   Get all open Life project tickets. Use them as exception context only.

4. Compose the briefing message as a string variable. Do not send it yet.
   Output contract:
   - Header: Luci | Morning Briefing -- [Day of week] [date]
   - TODAY: list today's hard commitments with times (Outlook + Google, deduplicated). If none, say 'No hard commitments today.'
   - EXCEPTIONS: show at most 3 visible decision/risk items total across calendar, school/family items, and Life tickets. Pick only urgent/same-day/high-value items where Elmar must decide, do, approve, prepare, or be aware of risk before the next digest.
   - Include next 24-48h risks only when they create a concrete prep need, decision, or schedule risk.
   - Include school/family critical items; tag Cayla/Cornwall Hill items with [Cayla] when shown.
   - Critical/time-sensitive items bypass routine quieting. If there are more than 3, show the earliest/highest-risk 3 and add a one-line count of additional critical/time-sensitive items without listing routine detail.
   - Exactly one line starting `I recommend ...` when there is anything for Elmar to do. Choose the single best next action; do not ask him to rank options.
   - If nothing truly needs Elmar, say the day looks normal and 'No action needed before the next digest.'
   - Do not enumerate the full 7-day calendar.
   - Do not list open Life tickets unless they are urgent/same-day/high-value, direct-Elmar decisions, or create a prep/risk item.
   - Do not introduce approval flows, reply drafts, side-effect sends, or generic `Want me to...?` questions.
   Keep it short -- Elmar reads this on his phone.

4b. MC-5014 Attention Gate shadow log: before sending, keep the candidate JSON
    in process memory or a local shell variable and pipe it to the gate over stdin:
    `printf '%s' "$attention_candidate_json" | python3 ~/workspace/attention_gate.py`.
    Do not write the raw briefing candidate to /tmp or another persistent file,
    and do not pass raw JSON via argv/env vars where it can leak through process listings.
    Use `source=morning-briefing`, `emitter=morning-briefing`,
    `task_id=morning-briefing`, `message_class=morning-briefing`,
    `tier_hint=digest`, and the briefing text as `summary`. If the briefing
    contains critical/time-sensitive content, also set an appropriate
    `risk_category`/`critical` field so the MC-5013 attention-decision ledger
    can record critical bypass evidence. Record the returned decision in task
    output for before/after evidence. Do not suppress the scheduled briefing
    based on this shadow result; this phase is dry-run evidence only. If the
    shadow gate command fails, times out, or cannot append to the ledger, log
    the error in task output and still send the scheduled briefing.

4c. Send it only after the shadow log via: python3 ~/workspace/notify.py
    (LUCI_NOTIFY_DEST=life-manager is set by scheduler from notify_to). Do NOT pass --dest.

5. Run: python3 ~/workspace/scripts/life_manager.py mark-email-processed (no-op, keeping state fresh)
CLAUDE_PROMPT
)"
/home/lucienne/.local/bin/claude --settings /home/lucienne/.claude/settings-worker.json -p "$morning_briefing_prompt" --dangerously-skip-permissions
This task calls claude directly. If the scheduler profile is GLM, Kimi, or MiniMax, prefer ~/workspace/PKA/scripts/claude-provider-run.sh so backup providers run in API-key-only mode with explicit settings/MCP context.

Edit Schedule

Result:
7
Runs (7d)
7
Completed
0
Failed
0
Timeout
100%
Success (7d)
3.0m
Avg Duration
life morning briefing calendar telegram personal

Run History (7)

StartedFinishedStatusDurationOutputLog
22h ago 22h ago completed 2.8m
Morning Briefing sent. ✅ **Done:** - Pulled today + 7-day calendar (Outlook + Google primary/Family/College) and open L ...
View log
2d ago 2d ago completed 3.0m
Briefing delivered to Life Manager forum topic. All 5 steps done. **Done:** - Today + 7-day calendar pulled (Outlook + ...
View log
3d ago 3d ago completed 3.4m
Briefing sent. ✅ **Done:** - Pulled today + 7-day calendar (Outlook UTC→SAST, Google primary/Family/College) + Life tic ...
View log
4d ago 4d ago completed 3.4m
Morning Briefing sent. Done. **Delivered** → Life Manager forum topic. - TODAY: Exco 09:30, 2× Project Heron Q&A (14:0 ...
View log
5d ago 5d ago completed 3.8m
Morning Briefing delivered to Life Manager topic. Exit 0. **Done:** - Pulled today + 7-day calendar (Outlook 68 events ...
View log
6d ago 6d ago completed 2.1m
Briefing sent. Done. **Actions** - Pulled today + 7-day calendar (Outlook + Google) + 35 open Life tickets. - College f ...
View log
7d ago 7d ago completed 2.7m
Done. Briefing sent to Life Manager forum topic. **Summary** - Pulled today + 7-day calendar (Outlook + Google) and ope ...
View log

Comments (0)

No comments yet — add instructions for Luci
Help