{"definition_raw":"---\nid: ceo-insight-miner\ntitle: CEO Insight Miner\nschedule: \"0 4 * * 1-5\"\ntimeout: 180\nretry: false\nenabled: true\nnotify_on: failure\nrun_as: shell\ncommand: \". /home/lucienne/.claude/env/api_keys.env && cd /home/lucienne/workspace && python3 scripts/ceo_insight_miner.py\"\nbackground: false\ntags: [flysafair, ceo, briefing, insights]\nruntime_profile: direct_python\n---\n**OVERRIDES runtime profile:** uses `direct_python` (plain Python, no model) because scripts/ceo_insight_miner.py mines briefing data statistically; it imports only the data-extraction functions of ceo_briefing_audio (extract_data/build_context), never the claude-invoking narrative functions (MC-4942 U12 sweep).\n\nPre-computes the daily anomaly / cross-cut / theme bundle that the\n07:25 CEO audio briefing consumes. Runs at 04:00 SAST weekdays so the\nbrief always has a fresh insight spine.\n\nPipeline:\n1. Re-extracts dashboard context via ceo_briefing_audio.build_context()\n2. Snapshots ctx to ~/workspace/audio-library/ceo/_history/YYYY-MM-DD.json\n3. Loads up to 30 days of prior snapshots for trend stats\n4. Runs detectors:\n   - forward-curve gap deltas (1d / 7d, with flip detection)\n   - per-route yield z-scores vs 30-day rolling\n   - cross-cuts: price-war, demand-surprise, share-loss-in-growing-market\n   - econ moves: fuel WoW, ZAR MoM\n   - ops anomalies: OTP/NPS departures from target\n5. Penalises insights whose subject was deeply discussed in the last 5\n   transcripts (repeat suppression)\n6. Picks weekday theme (Mon = week ahead, Tue = route micro,\n   Wed = competitor watch, Thu = curve health, Fri = recap)\n7. Writes top 8 ranked insights + theme to\n   ~/workspace/audio-library/ceo/_insights/YYYY-MM-DD.json\n\nThe brief script (ceo_briefing_audio.py) reads this bundle at 07:25,\nfalls back to inline mining if the file is missing.\n\nSource: ~/workspace/dashboard-build/dashboard/Dashboard.html\nHistory: ~/workspace/audio-library/ceo/_history/\nOutput: ~/workspace/audio-library/ceo/_insights/YYYY-MM-DD.json\n","id":"ceo-insight-miner","last_run":{"duration_s":5.349089,"log_path":"/home/lucienne/workspace/logs/task-runs/ceo-insight-miner/409313.log","output":"Insight miner: 2 ranked insights\n  [1] sev=2 score=2.30 rep=0 curve_movement: Forward curve for 2026-06: now -7.2 points behind the curve. Seven days ago it was -11.5, so 4.3-point swing.\n  [2] sev=3 score=1.80 rep=0 crosscut_price_war: Price-war signal on CPT-PLZ: capacity up +28 percent, load factor down -13.2 points, yield flat at +3.9. We added seats,\n  history snapshots: 28\n  weekday theme: FRIDAY \u2014 week recap + next-week outlook\n","started_at":"2026-06-12T04:00:00.548734+02:00","status":"completed"},"next_run":"2026-06-15 04:00","next_run_iso":"2026-06-15T04:00:00+02:00","runs":[{"duration_s":5.349089,"finished_at":"2026-06-12T04:00:05.902159+02:00","id":409313,"log_path":"/home/lucienne/workspace/logs/task-runs/ceo-insight-miner/409313.log","output":"Insight miner: 2 ranked insights\n  [1] sev=2 score=2.30 rep=0 curve_movement: Forward curve for 2026-06: now -7.2 points behind the curve. Seven days ago it was -11.5, so 4.3-point swing.\n  [2] sev=3 score=1.80 rep=0 crosscut_price_war: Price-war signal on CPT-PLZ: capacity up +28 percent, load factor down -13.2 points, yield flat at +3.9. We added seats,\n  history snapshots: 28\n  weekday theme: FRIDAY \u2014 week recap + next-week outlook\n","started_at":"2026-06-12T04:00:00.548734+02:00","status":"completed","task_id":"ceo-insight-miner","task_name":"CEO Insight Miner"},{"duration_s":5.231092,"finished_at":"2026-06-11T04:00:05.631568+02:00","id":404956,"log_path":"/home/lucienne/workspace/logs/task-runs/ceo-insight-miner/404956.log","output":"Insight miner: 2 ranked insights\n  [1] sev=3 score=1.80 rep=0 crosscut_price_war: Price-war signal on CPT-PLZ: capacity up +28 percent, load factor down -13.2 points, yield flat at +3.9. We added seats,\n  [2] sev=3 score=1.50 rep=0 crosscut_share_loss_in_growing_market: Share loss on CPT-PLZ: total market up +3730 percent, our share down -4.7 points. AIRLINK added 1,995 seats while we add\n  history snapshots: 27\n  weekday theme: THURSDAY \u2014 booking-curve health lens\n","started_at":"2026-06-11T04:00:00.394948+02:00","status":"completed","task_id":"ceo-insight-miner","task_name":"CEO Insight Miner"},{"duration_s":5.12221,"finished_at":"2026-06-10T04:00:05.825348+02:00","id":400680,"log_path":"/home/lucienne/workspace/logs/task-runs/ceo-insight-miner/400680.log","output":"Insight miner: 4 ranked insights\n  [1] sev=2 score=2.00 rep=0 econ_fx: Rand weakened 12.1 percent month on month to 16.46. That's negative for the cost base, since most of our cost is dollar \n  [2] sev=2 score=2.00 rep=0 news_aviation: Aviation news in the last 24 hours: Airlink: Getting to Zanzibar just got a whole lot easier for South Africans; Airlink\n  [3] sev=3 score=1.80 rep=0 crosscut_price_war: Price-war signal on CPT-PLZ: capacity up +28 percent, load factor down -13.2 points, yield flat at +3.9. We added seats,\n  [4] sev=3 score=1.50 rep=0 crosscut_share_loss_in_growing_market: Share loss on CPT-PLZ: total market up +3730 percent, our share down -4.7 points. AIRLINK added 1,995 seats while we add\n  history snapshots: 26\n  weekday theme: WEDNESDAY \u2014 competitor watch lens\n","started_at":"2026-06-10T04:00:00.596665+02:00","status":"completed","task_id":"ceo-insight-miner","task_name":"CEO Insight Miner"},{"duration_s":5.485199,"finished_at":"2026-06-09T04:00:06.130372+02:00","id":396444,"log_path":"/home/lucienne/workspace/logs/task-runs/ceo-insight-miner/396444.log","output":"Insight miner: 8 ranked insights\n  [1] sev=3 score=3.15 rep=0 crosscut_price_war: Price-war signal on CPT-PLZ: capacity up +28 percent, load factor down -13.2 points, yield flat at +3.9. We added seats,\n  [2] sev=3 score=3.15 rep=0 crosscut_share_loss_in_growing_market: Share loss on CPT-PLZ: total market up +3150 percent, our share down -5.0 points. AIRLINK added 1,859 seats while we add\n  [3] sev=2 score=2.30 rep=0 yield_zscore: CPT-HLA yield is 2.0 standard deviations up vs the last 25 days. Now +51.0 percent year on year, normally around +29.3.\n  [4] sev=2 score=2.30 rep=0 yield_zscore: HRE-JNB yield is 2.0 standard deviations up vs the last 25 days. Now +17.4 percent year on year, normally around -2.9.\n  [5] sev=2 score=2.30 rep=0 yield_zscore: DUR-HLA yield is 2.0 standard deviations up vs the last 25 days. Now +47.0 percent year on year, normally around +45.0.\n  [6] sev=2 score=2.30 rep=0 yield_zscore: CPT-PLZ yield is 2.0 standard deviations up vs the last 25 days. Now +3.9 percent year on year, normally around -4.4.\n  [7] sev=2 score=2.00 rep=0 yield_zscore: BFN-CPT yield is 2.0 standard deviations up vs the last 25 days. Now +26.3 percent year on year, normally around +17.5.\n  [8] sev=2 score=2.00 rep=0 yield_zscore: CPT-MQP yield is 2.0 standard deviations up vs the last 25 days. Now +19.3 percent year on year, normally around -0.8.\n  history snapshots: 25\n  weekday theme: TUESDAY \u2014 route micro lens\n","started_at":"2026-06-09T04:00:00.539163+02:00","status":"completed","task_id":"ceo-insight-miner","task_name":"CEO Insight Miner"},{"duration_s":4.744724,"finished_at":"2026-06-08T04:00:05.424372+02:00","id":392352,"log_path":"/home/lucienne/workspace/logs/task-runs/ceo-insight-miner/392352.log","output":"Insight miner: 8 ranked insights\n  [1] sev=2 score=2.60 rep=0 econ_fx: Rand weakened 10.6 percent month on month to 16.24. That's negative for the cost base, since most of our cost is dollar \n  [2] sev=2 score=2.60 rep=0 news_aviation: Aviation news in the last 24 hours: Airlink: Breaking Airline News: Ethiopian Airlines Launches Historic Direct Route to\n  [3] sev=2 score=2.00 rep=0 yield_zscore: JNB-MRU yield is 2.2 standard deviations up vs the last 24 days. Now +8.2 percent year on year, normally around +3.9.\n  [4] sev=2 score=2.00 rep=0 yield_zscore: BFN-CPT yield is 2.2 standard deviations up vs the last 24 days. Now +26.3 percent year on year, normally around +17.2.\n  [5] sev=2 score=2.00 rep=0 yield_zscore: CPT-MQP yield is 2.2 standard deviations up vs the last 24 days. Now +19.3 percent year on year, normally around -1.6.\n  [6] sev=2 score=2.00 rep=0 yield_zscore: GRJ-HLA yield is 2.2 standard deviations up vs the last 24 days. Now +44.9 percent year on year, normally around +19.8.\n  [7] sev=2 score=2.00 rep=0 yield_zscore: BFN-JNB yield is 2.2 standard deviations down vs the last 24 days. Now +14.7 percent year on year, normally around +27.3\n  [8] sev=2 score=2.00 rep=0 yield_zscore: DUR-ELS yield is 2.2 standard deviations up vs the last 24 days. Now +19.8 percent year on year, normally around +1.0.\n  history snapshots: 24\n  weekday theme: MONDAY \u2014 week-ahead lens\n","started_at":"2026-06-08T04:00:00.571457+02:00","status":"completed","task_id":"ceo-insight-miner","task_name":"CEO Insight Miner"}],"runs_limit":20,"schedule":"0 4 * * 1-5","schedule_label":{"description":"Weekdays at 04:00","is_custom":false,"label":"Weekdays","sort":5,"sort_time":"04:00"},"stats":{"avg_duration":5.186462799999999,"completed":5,"failed":0,"timeout":0,"total":5},"task":{"_description":"**OVERRIDES runtime profile:** uses `direct_python` (plain Python, no model) because scripts/ceo_insight_miner.py mines briefing data statistically; it imports only the data-extraction functions of ceo_briefing_audio (extract_data/build_context), never the claude-invoking narrative functions (MC-4942 U12 sweep).\n\nPre-computes the daily anomaly / cross-cut / theme bundle that the\n07:25 CEO audio briefing consumes. Runs at 04:00 SAST weekdays so the\nbrief always has a fresh insight spine.\n\nPipeline:\n1. Re-extracts dashboard context via ceo_briefing_audio.build_context()\n2. Snapshots ctx to ~/workspace/audio-library/ceo/_history/YYYY-MM-DD.json\n3. Loads up to 30 days of prior snapshots for trend stats\n4. Runs detectors:\n   - forward-curve gap deltas (1d / 7d, with flip detection)\n   - per-route yield z-scores vs 30-day rolling\n   - cross-cuts: price-war, demand-surprise, share-loss-in-growing-market\n   - econ moves: fuel WoW, ZAR MoM\n   - ops anomalies: OTP/NPS departures from target\n5. Penalises insights whose subject was deeply discussed in the last 5\n   transcripts (repeat suppression)\n6. Picks weekday theme (Mon = week ahead, Tue = route micro,\n   Wed = competitor watch, Thu = curve health, Fri = recap)\n7. Writes top 8 ranked insights + theme to\n   ~/workspace/audio-library/ceo/_insights/YYYY-MM-DD.json\n\nThe brief script (ceo_briefing_audio.py) reads this bundle at 07:25,\nfalls back to inline mining if the file is missing.\n\nSource: ~/workspace/dashboard-build/dashboard/Dashboard.html\nHistory: ~/workspace/audio-library/ceo/_history/\nOutput: ~/workspace/audio-library/ceo/_insights/YYYY-MM-DD.json","_file":"ceo-insight-miner.md","_path":"/home/lucienne/workspace/tasks/ceo-insight-miner.md","background":false,"command":". /home/lucienne/.claude/env/api_keys.env && cd /home/lucienne/workspace && python3 scripts/ceo_insight_miner.py","enabled":true,"id":"ceo-insight-miner","notify_on":"failure","retry":false,"run_as":"shell","runtime_profile":"direct_python","schedule":"0 4 * * 1-5","tags":["flysafair","ceo","briefing","insights"],"timeout":180,"title":"CEO Insight Miner"}}
