{"definition_raw":"---\nid: life-manager-digest\ntitle: Life Manager Digest\nschedule: \"0 12,17 * * 1-5\"\ntimeout: 300\nretry: false\nenabled: true\nnotify_on: failure\nnotify_to: life-manager\nrun_as: shell\ncommand: |\n  set -e\n  . ~/.claude/env/api_keys.env\n  cd /home/lucienne/workspace\n  life_digest_prompt=\"$(cat <<'CLAUDE_PROMPT'\n  You are Luci. Send a life digest to the Life Manager Telegram topic.\n\n  Steps:\n  1. Run: python3 ~/workspace/scripts/life_manager.py open-tickets\n     Get all open Life project tickets.\n\n  2. Run: python3 ~/workspace/scripts/life_manager.py today-calendar\n     Get today's Outlook + Google Calendar events.\n\n  2b. Run: python3 ~/workspace/scripts/life_manager.py reminders\n      Get upcoming Google Tasks (Elmar's personal reminder list).\n\n  3. Compose your digest message as a string variable. Do not send it yet.\n     Output contract:\n     - Header: Luci | Life Digest -- [Morning/Afternoon] [date]\n     - Exactly one line starting `I recommend ...` that names the single best next action.\n     - Show at most 3 visible decision items total across calendar, reminders, and Life tickets. Pick only items where Elmar must decide, do, approve, or prepare within the next 48 hours.\n     - For the top item, include one short `Why now:` clause.\n     - Add one quiet-work line: what Iris already handled or filed without needing Elmar.\n     - Add backlog count only (for example: `Backlog: 17 lower-priority Life tickets not shown`). Do not list the rest.\n     - Do not make Elmar rank a list. Pick the next best action; if nothing truly needs Elmar, say so and report handled-quietly/backlog counts.\n     - Do not ask generic optional questions such as `Want me to...?` unless you already have a concrete, approval-gated draft/action ready.\n     Keep it short -- Elmar reads this on his phone.\n\n  3b. MC-5014 Attention Gate shadow log: before sending, keep the candidate JSON\n      in process memory or a local shell variable and pipe it to the gate over stdin:\n      `printf '%s' \"$attention_candidate_json\" | python3 ~/workspace/attention_gate.py`.\n      Do not write the raw digest candidate to /tmp or another persistent file, and\n      do not pass raw JSON via argv/env vars where it can leak through process listings.\n      Use `source=life-manager-digest`, `emitter=life-manager-digest`,\n      `task_id=life-manager-digest`, `message_class=digest`, `tier_hint=digest`,\n      and the digest text as `summary`. Record the returned decision in the task\n      output for before/after evidence. Do not suppress the scheduled digest based\n      on this shadow result; this phase is dry-run evidence only. If the shadow\n      gate command fails, times out, or cannot append to the ledger, log the error\n      in task output and still send the scheduled digest.\n\n  3c. Send it only after the shadow log: python3 ~/workspace/notify.py --topic life-manager \"your_composed_message\"\n\n  4. Run: python3 ~/workspace/scripts/life_manager.py mark-email-processed (no-op, just keeping state fresh)\n  CLAUDE_PROMPT\n  )\"\n  /home/lucienne/.local/bin/claude --settings /home/lucienne/.claude/settings-worker.json -p \"$life_digest_prompt\" --dangerously-skip-permissions\ntags: [life, digest, telegram, personal]\nruntime_profile: claude_glm\n---\n\nTwice-daily life digest (12:00 + 17:00 SAST, weekdays only).\nSends a Telegram DM summary of open Life tickets + today calendar events.\n","id":"life-manager-digest","last_run":{"duration_s":139.206139,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-digest/411567.log","output":"Digest sent to Life Manager topic.\n\n**Shadow gate (dry-run evidence):** `tier=tier2`, `decision=dry_run_notify`, `critical_bypass=true` (reason: critical keyword \"legal\"), `ledger_recorded=true`. Did NOT suppress send \u2014 dry-run only, sent as scheduled.\n\n**Sent digest** (3 visible items, 48h-bound):\n- Top: APPROVE NCC opinions release to Simon (MC-5044) + Why now \u2014 Matthew blocked, waiting on yes/no.\n- ACSA OR Tambo parking form, deadline Mon 15 Jun (MC-5041).\n- Approve WFH leave E Vorster 15 Jun (MC-5035).\n- Quiet line: Iris auto-filed findata reports, Absa USD 5m FX (MC-5022), Pacific Padel AGM (MC-5009), ASL Exco notes (MC-5049).\n- Backlog: 40 of 43 open Life tickets not shown.\n\n`mark-email-processed` \u2192 `{\"marked\": 0}`. State fresh.\n\nSuggested next: handle MC-5044 \u2014 Matthew is blocked on your release call.\nReply now with yes/no for MC-5044 and I draft Matthew's release confirmation? (yes/no)\n","started_at":"2026-06-12T17:00:27.447970+02:00","status":"completed"},"next_run":"2026-06-15 12:00","next_run_iso":"2026-06-15T12:00:00+02:00","runs":[{"duration_s":139.206139,"finished_at":"2026-06-12T17:02:46.655675+02:00","id":411567,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-digest/411567.log","output":"Digest sent to Life Manager topic.\n\n**Shadow gate (dry-run evidence):** `tier=tier2`, `decision=dry_run_notify`, `critical_bypass=true` (reason: critical keyword \"legal\"), `ledger_recorded=true`. Did NOT suppress send \u2014 dry-run only, sent as scheduled.\n\n**Sent digest** (3 visible items, 48h-bound):\n- Top: APPROVE NCC opinions release to Simon (MC-5044) + Why now \u2014 Matthew blocked, waiting on yes/no.\n- ACSA OR Tambo parking form, deadline Mon 15 Jun (MC-5041).\n- Approve WFH leave E Vorster 15 Jun (MC-5035).\n- Quiet line: Iris auto-filed findata reports, Absa USD 5m FX (MC-5022), Pacific Padel AGM (MC-5009), ASL Exco notes (MC-5049).\n- Backlog: 40 of 43 open Life tickets not shown.\n\n`mark-email-processed` \u2192 `{\"marked\": 0}`. State fresh.\n\nSuggested next: handle MC-5044 \u2014 Matthew is blocked on your release call.\nReply now with yes/no for MC-5044 and I draft Matthew's release confirmation? (yes/no)\n","started_at":"2026-06-12T17:00:27.447970+02:00","status":"completed","task_id":"life-manager-digest","task_name":"Life Manager Digest"},{"duration_s":300.5662,"finished_at":"2026-06-12T12:08:57.994762+02:00","id":410713,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-digest/410713.log","output":"Killed after 300s\n--- partial stdout (last 0 chars) ---\n\n--- partial stderr (last 1000 chars) ---\n/workspace/attention_gate.py\", line 416, in main\n    candidate = _load_candidate(args.candidate_file)\n                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/lucienne/workspace/attention_gate.py\", line 391, in _load_candidate\n    loaded = json.load(sys.stdin)\n             ^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3.12/json/__init__.py\", line 293, in load\n    return loads(fp.read(),\n           ^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3.12/json/__init__.py\", line 346, in loads\n    return _default_decoder.decode(s)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3.12/json/decoder.py\", line 337, in decode\n    obj, end = self.raw_decode(s, idx=_w(s, 0).end())\n               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3.12/json/decoder.py\", line 355, in raw_decode\n    raise JSONDecodeError(\"Expecting value\", s, err.value) from None\njson.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n/bin/bash: line 17: summary: command not found\n","started_at":"2026-06-12T12:03:57.426052+02:00","status":"timeout","task_id":"life-manager-digest","task_name":"Life Manager Digest"},{"duration_s":107.260616,"finished_at":"2026-06-11T17:02:00.584747+02:00","id":407322,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-digest/407322.log","output":"Digest sent to Life Manager topic. State refreshed.\n\n**Done:**\n- Calendar: AviaDev Day 2 (Gaborone) dominates today + College hockey/Valencia padel\n- Reminders: 1 undated Google Task\n- Tickets: 25 open Life, 10 HIGH shown, +15 more flagged\n- `mark-email-processed` \u2192 0 marked (clean)\n\nHeadline open item: MC-4983 \u2014 Simon McGill waiting on Heron aircraft-count reply (48 vs 37).\n\nSuggested next: draft the MC-4983 Heron aircraft-count reply for Simon McGill so it's ready to send. Want me to draft it? (yes/no)\n","started_at":"2026-06-11T17:00:13.320991+02:00","status":"completed","task_id":"life-manager-digest","task_name":"Life Manager Digest"},{"duration_s":170.07477,"finished_at":"2026-06-11T12:03:17.835146+02:00","id":406391,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-digest/406391.log","output":"Done. Digest live in Life Manager topic.\n\n**Sent:**\n- Today: AviaDev Day 2 (Gaborone). Surfaced remaining items \u2014 \u2b50 Project Heron all-parties call 16:00, gala 18:00, hockey, padel, Henk's birthday.\n- Reminders: 1 Google Task (pooled storage, undated).\n- Tickets: 41 open Life, all `elmar`. Showed 10 high (flagged time-sensitive MC-4945 Blacky points + MC-4928 Heron prep), +31 more.\n- `mark-email-processed` \u2192 0 (state fresh).\n\nSuggested next: surface MC-4928 (Heron CP tracker) before the 16:00 call \u2014 want me to pull the CP tracker and prep a one-page brief? (yes/no)\n","started_at":"2026-06-11T12:00:27.757497+02:00","status":"completed","task_id":"life-manager-digest","task_name":"Life Manager Digest"},{"duration_s":131.337801,"finished_at":"2026-06-10T17:02:19.747457+02:00","id":402981,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-digest/402981.log","output":"Digest delivered to Life Manager topic.\n\n**Done:**\n- 13 Outlook + 3 school events \u2192 deduped today block (AviaDev Gaborone day)\n- 1 reminder (undated storage-limit task)\n- 28 open tickets \u2192 9 high + 1 med shown, 18 more noted\n- State refreshed (`marked: 0`, no-op)\n\nNote: task said `--topic` but real flag is `--dest life-manager` \u2014 used that. Send confirmed \"Forum: Life Manager\".\n\nSuggested next: MC-4934 (ML Engineer approval, Pieter waiting) is the hottest \u2014 has the ML-vs-AI-Engineer discrepancy Erina flagged. Want me to pull the full thread + organigram and draft Elmar's approve/decline call? (yes/no)\n","started_at":"2026-06-10T17:00:08.406489+02:00","status":"completed","task_id":"life-manager-digest","task_name":"Life Manager Digest"},{"duration_s":170.010336,"finished_at":"2026-06-10T12:06:12.493951+02:00","id":402120,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-digest/402120.log","output":"Digest sent \u2192 Life Manager topic. State refreshed.\n\n**Done:**\n- Calendar: combined Outlook+Google, deduped, SAST. AviaDev Gaborone day (panel, lunch, outreach, reception, ACS dinner) + Rowen flight + College tennis.\n- Reminders: 1 Google Task (pooled storage, undated).\n- Tickets: 19 open, all elmar. Showed 5 high + 5 medium, +9 more noted.\n- `mark-email-processed` \u2192 0 (no-op, fine).\n\nSuggested next: nothing pending \u2014 digest delivered clean.\nHappy for me to stop here? (yes/no)\n","started_at":"2026-06-10T12:03:22.480063+02:00","status":"completed","task_id":"life-manager-digest","task_name":"Life Manager Digest"},{"duration_s":71.236913,"finished_at":"2026-06-09T17:01:23.439749+02:00","id":398697,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-digest/398697.log","output":"Done.\n\n**Done:**\n- Pulled tickets/calendar/reminders, composed digest, sent to Forum: Life Manager \u2713\n- State refreshed (`mark-email-processed`, no-op) \u2713\n\n**Digest contents:** afternoon header, today's calendar (UTC\u2192SAST, Genesis + choir dupes collapsed), 1 Google Task reminder, all 8 open Life tickets grouped HIGH/MED/LOW (under 10 \u2192 no overflow count).\n\nNote: `mark-email-processed []` literal empty list errors \u2014 CLI needs \u22651 id. Used `\"\"` token, returned `{\"marked\": 1}`. Harmless, but the `[]` in the runbook is wrong.\n\nSuggested next: fix that step in whatever calls this (skip the call when no IDs, or pass `--none` sentinel) so it stops erroring. Want me to patch the caller? (yes/no)\n","started_at":"2026-06-09T17:00:12.199569+02:00","status":"completed","task_id":"life-manager-digest","task_name":"Life Manager Digest"},{"duration_s":95.533799,"finished_at":"2026-06-09T12:02:01.947372+02:00","id":397833,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-digest/397833.log","output":"Done. Digest sent to Life Manager topic.\n\n**Summary**\n- Calendar: pulled Outlook (Exco, Heron Q&A sessions, Gaborone accommodation) + Google/College, deduped, SAST times.\n- Reminders: 1 Google Task (pooled storage limit, undated).\n- Tickets: 37 open Life tickets, top 10 HIGH shown + \"+27 more\".\n- Sent via `notify.py --topic life-manager` \u2192 RC 0, \"Sent to Forum: Life Manager\".\n- State refresh: `mark-email-processed \"[]\"` \u2192 `{\"marked\": 1}`.\n\nNote: step said `[]` no-op but it marked 1 \u2014 harmless state touch.\n","started_at":"2026-06-09T12:00:26.410149+02:00","status":"completed","task_id":"life-manager-digest","task_name":"Life Manager Digest"},{"duration_s":76.578072,"finished_at":"2026-06-08T17:01:26.059396+02:00","id":394521,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-digest/394521.log","output":"Done. Life digest sent to Life Manager topic.\n\n**Sent:**\n- Calendar (today SAST): 5 timed Outlook events + 2 all-day birthdays + College DAY 1/Break Duty. Dawie birthday deduped across Outlook+Google. Tomorrow's College events excluded.\n- Reminders: 1 undated Google Task (pooled storage limit).\n- Open Life tickets: 11 high shown (top 10 + note), 38 total, \"+28 more\" tail.\n\nState refreshed (`mark-email-processed` \u2192 marked 1).\n\nNote: task said `--topic`; real flag is `--dest`. Used `--dest life-manager` \u2014 landed in Forum: Life Manager.\n","started_at":"2026-06-08T17:00:09.479132+02:00","status":"completed","task_id":"life-manager-digest","task_name":"Life Manager Digest"},{"duration_s":78.518375,"finished_at":"2026-06-08T12:01:44.715918+02:00","id":393687,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-digest/393687.log","output":"Done. Life digest sent to Telegram Life Manager topic.\n\n**Sent:**\n- Calendar: 3 timed (T5 strategic 11:00, ACS lunch 12:00, Elmar/Dave 15:00) + 4 all-day (2 birthdays, College DAY 1, Break Duty). Dawie birthday deduped Outlook\u2194Google.\n- Reminders: 1 undated Google Task (pooled storage limit).\n- Tickets: 10 high listed; flagged +35 more (19 med, 16 low). Top item MC-4813 Heron chair \u2014 BoU/ACG call **tomorrow 14:00**.\n- mark-email-processed no-op ran (state fresh).\n","started_at":"2026-06-08T12:00:26.193515+02:00","status":"completed","task_id":"life-manager-digest","task_name":"Life Manager Digest"}],"runs_limit":20,"schedule":"0 12,17 * * 1-5","schedule_label":{"description":"Weekdays at 12:00, 17:00","is_custom":false,"label":"Weekdays","sort":5,"sort_time":"12:00"},"stats":{"avg_duration":134.03230209999998,"completed":9,"failed":0,"timeout":1,"total":10},"task":{"_description":"Twice-daily life digest (12:00 + 17:00 SAST, weekdays only).\nSends a Telegram DM summary of open Life tickets + today calendar events.","_file":"life-manager-digest.md","_path":"/home/lucienne/workspace/tasks/life-manager-digest.md","command":"set -e\n. ~/.claude/env/api_keys.env\ncd /home/lucienne/workspace\nlife_digest_prompt=\"$(cat <<'CLAUDE_PROMPT'\nYou are Luci. Send a life digest to the Life Manager Telegram topic.\n\nSteps:\n1. Run: python3 ~/workspace/scripts/life_manager.py open-tickets\n   Get all open Life project tickets.\n\n2. Run: python3 ~/workspace/scripts/life_manager.py today-calendar\n   Get today's Outlook + Google Calendar events.\n\n2b. Run: python3 ~/workspace/scripts/life_manager.py reminders\n    Get upcoming Google Tasks (Elmar's personal reminder list).\n\n3. Compose your digest message as a string variable. Do not send it yet.\n   Output contract:\n   - Header: Luci | Life Digest -- [Morning/Afternoon] [date]\n   - Exactly one line starting `I recommend ...` that names the single best next action.\n   - Show at most 3 visible decision items total across calendar, reminders, and Life tickets. Pick only items where Elmar must decide, do, approve, or prepare within the next 48 hours.\n   - For the top item, include one short `Why now:` clause.\n   - Add one quiet-work line: what Iris already handled or filed without needing Elmar.\n   - Add backlog count only (for example: `Backlog: 17 lower-priority Life tickets not shown`). Do not list the rest.\n   - Do not make Elmar rank a list. Pick the next best action; if nothing truly needs Elmar, say so and report handled-quietly/backlog counts.\n   - Do not ask generic optional questions such as `Want me to...?` unless you already have a concrete, approval-gated draft/action ready.\n   Keep it short -- Elmar reads this on his phone.\n\n3b. MC-5014 Attention Gate shadow log: before sending, keep the candidate JSON\n    in process memory or a local shell variable and pipe it to the gate over stdin:\n    `printf '%s' \"$attention_candidate_json\" | python3 ~/workspace/attention_gate.py`.\n    Do not write the raw digest candidate to /tmp or another persistent file, and\n    do not pass raw JSON via argv/env vars where it can leak through process listings.\n    Use `source=life-manager-digest`, `emitter=life-manager-digest`,\n    `task_id=life-manager-digest`, `message_class=digest`, `tier_hint=digest`,\n    and the digest text as `summary`. Record the returned decision in the task\n    output for before/after evidence. Do not suppress the scheduled digest based\n    on this shadow result; this phase is dry-run evidence only. If the shadow\n    gate command fails, times out, or cannot append to the ledger, log the error\n    in task output and still send the scheduled digest.\n\n3c. Send it only after the shadow log: python3 ~/workspace/notify.py --topic life-manager \"your_composed_message\"\n\n4. Run: python3 ~/workspace/scripts/life_manager.py mark-email-processed (no-op, just keeping state fresh)\nCLAUDE_PROMPT\n)\"\n/home/lucienne/.local/bin/claude --settings /home/lucienne/.claude/settings-worker.json -p \"$life_digest_prompt\" --dangerously-skip-permissions\n","enabled":true,"id":"life-manager-digest","notify_on":"failure","notify_to":"life-manager","retry":false,"run_as":"shell","runtime_profile":"claude_glm","schedule":"0 12,17 * * 1-5","tags":["life","digest","telegram","personal"],"timeout":300,"title":"Life Manager Digest"}}
