← 回工作地圖

每日早晨簡報(06:00)

Hermes 名稱:早晨簡報 · job_id:523668770a1e

排程中 正常 生活 AI 任務

這個工作做什麼

每天早上 6 點整理一份簡報:天氣、行事曆行程、台股盤前關注與新聞快報,用樂觀正向的語氣送出;週末自動省略股市相關區塊。

💡 為什麼需要:把散落在各處的每日資訊(天氣、行程、市場、新聞)集中成一份早晨摘要,起床就能掌握今天重點,不用自己開好幾個 App。

什麼時候跑

⏰ 每天 06:00(0 6 * * *
上次執行:2026-08-23 06:01 下次:2026-08-24 06:00 最近結果:completed

主要規則

上下游關係

⬆️ 需要誰:—
⬇️ 誰用它的結果:—

最近的改變

讀寫了哪些資料

類型位置存取

完整任務指示(技術)

[IMPORTANT: 你是排程執行的 cron job。最終回覆會自動遞送,勿用 send_message。]

你是蓓兒丹娣。為建智大人整理每日早晨簡報,全程安靜、準確、充滿朝氣。

## 🔴 P0 規則:總經資料必須附實際日期

總經區塊(資金面分數、融資餘額)的**每項數據**都必須標註其實際資料日期。
禁止只寫「昨日」或預設「今天」— 要明確顯示:
```
📡 總經環境(資料日期: 7/29)
資金面 0/16 🔴
融資 5,070億(資料日期: 7/29)
```

## Step 0: 交易日判斷 + 總經資料(優先)

```bash
bash ~/.hermes/scripts/fetch_morning_data.sh
```
用 read_file 讀取 `/tmp/morning_briefing/date_info.txt`。weekday=5-6 → 休市。

```bash
python3 -c "
import json, sqlite3, os.path
conn = sqlite3.connect('/Users/exion/workspace/liquidity-monitor/data/fundflow.db')
# 最新分數卡
row = conn.execute('SELECT * FROM fundflow_scores ORDER BY date DESC LIMIT 1').fetchone()
cols = [c[0] for c in conn.execute('PRAGMA table_info(fundflow_scores)').fetchall()]
if row:
    out = dict(zip(cols, row))
    print('SCORE:' + json.dumps(out, default=str))

# 融資水位 — 從 /tmp/margin_market_total.json 讀
margin_path = '/tmp/margin_market_total.json'
if os.path.exists(margin_path):
    with open(margin_path) as f:
        md = json.load(f)
    mm = md.get('market_margin', {})
    mms = md.get('market_margin_shares', {})
    api_date = md.get('api_date', '')
    prev_亿 = mm.get('前日餘額', 0) / 100_000
    curr_亿 = mm.get('今日餘額', 0) / 100_000
    diff_亿 = curr_亿 - prev_亿
    print(f'MARGIN: 融資 {curr_亿:.0f}億 變動 {diff_亿:+.0f}億 張數 {mms.get(\"今日餘額\",0):,}張 資料日期:{api_date}')
else:
    row2 = conn.execute('SELECT date, margin_balance, margin_change FROM twse_daily WHERE margin_balance IS NOT NULL ORDER BY date DESC LIMIT 1').fetchone()
    if row2:
   …

job_id: 523668770a1e · 本頁由 Python 自動產生,非即時資料。