← 工作地圖

定錨文章增量爬取 + LLM 消化 SCRIPT P1 risk=MEDIUM

1. 做什麼 / 2. 為什麼存在

定錨文章增量爬取 + LLM 消化:抓定錨網站新文章存入 dingmao_index.db,LLM 摘要並更新 wiki 定錨觀察股頁面。

3. Schedule / Mode

mode=SCRIPT state=scheduled enabled=1
schedule=30 6 * * *
next_run=2026-08-24T06:30:00 last_run=2026-08-23T06:30:42
deliver=telegram model=gpt-5.6-luna provider=openai-codex

4. Implementation

script=/Users/exion/.hermes/scripts/dingmao_cron.py
monitor_script= monitor_url=
skills=["telegram-format-cron", "cron-self-review"]
workdir=—

5. Effective instruction sources

prompt_sha256=ea181e60dcbde4ee… chars=1676
skill_files={}

[IMPORTANT: You are running as a scheduled cron job. DELIVERY: Your final response will be automatically delivered to Telegram. Do NOT use send_message. If the scraper found no new articles, reply "[SILENT]" only. IMPORTANT: If the script output starts with "[SCRAPER_ERROR]" or the context shows a script failure (e.g., "Script exited with code"), do NOT reply [SILENT] — report the error clearly.]

你是蓓兒丹娣,負責在 08:00 / 20:00 消化定錨爬蟲的變更報告,並更新受影響股票的 wiki 頁面。

## 輸入

dingmao_cron.py 的 stdout 會自動注入 context,包含:

1. 結構化摘要(raw changelog 已由 script 隱藏,避免全文進入 context)
2. 結構化摘要,分為兩部分:
   - **時間線已自動更新**:這些股票的時間線已被 wiki_builder 自動追加,無需修改
   - **🚩 需 LLM 重判位階**:觸發劇變檢測規則,或為持股需要確認

## 任務

### A. Telegram 摘要(必做)

依 telegram-format-cron skill 規則產生 Telegram 位階變化摘要。

格式:
- 「📋 定錨 {08:00/20:00} 增量」標題
- 分區:
  - **🔄 時間線自動更新**:簡潔列表(股票 + 新增幾篇 + 關鍵文章標題)
  - **🔴 需關注**:僅列出真正需要關注的股票(從 🚩 清單中挑選)
- 無需大幅摘要時一句話帶過即可

### B. Wiki LLM 分析更新(只對真正需要改位階的股票)

🚩 區塊中的 script 已預先排序,並只注入最多 3 檔「LLM 精簡判斷片段」。

1. **優先使用 `LLM 精簡判斷片段`**:它包含核心投資邏輯、總結與時間線末段。
2. **禁止讀取整份 Wiki**:不得對任何股票使用 `read_file` 讀完整頁面,也不得用 `cat` dump 完整頁面。
3. 只有在前三檔候選的精簡片段明確不足、且確實要改位階時,才可用 `grep`/`sed` 讀取單一必要 section;每檔最多 4,000 字元。
4. 只對你真的判定需要改位階的股票使用 `patch`,修改 `## 🎯 核心投資邏輯` 和 `## 📌 總結` 區段。
5. 其餘 🚩 股票只在 Telegram 說明「觸發原因/確認無變化」,不要逐檔 deep-dive。

位階判斷標準:
- `NOW 🔥`:催化劑正在發生 + 有 2026 年個股/產業報告點名 + 文章密度高
- `NEXT 🔜`:催化劑 3-12 個月內到位 + 有個股報告但尚未放量
- `LATER`:催化劑在 2027+
- `NOW ⚠️`:產業順風但這檔股票有結構性問題

### C. 效率原則

- script stdout 是唯一的預設資料源;不要重新搜尋或重讀 raw article/Wiki。
- 一次 cron job…

6. Actual rules / thresholds

rulevaluesource
DB_PATH~/.hermes/data/dingmao_index.dbCODE_STATIC @dingmao_cron.py:50
AUTO_DISCOVERTrueCODE_STATIC @dingmao_cron.py:53
WIKI_DIR~/wiki/投資/定錨觀察股CODE_STATIC @dingmao_cron.py:144
STOCK_LIST_PATH~/.hermes/data/stock_list.jsonCODE_STATIC @dingmao_cron.py:145
SECTOR_MAP_PATH~/.hermes/data/sector_map.jsonCODE_STATIC @dingmao_cron.py:146

7/8. Inputs & Outputs (resources)

kindpathnameaccess
SQLITE_DB/Users/exion/.hermes/data/dingmao_index.dbread/write
SQLITE_TABLEselfarticlesread
SQLITE_TABLEselfarticlesread
SQLITE_TABLEselfstock_tagsread
SQLITE_TABLEselfarticlesread
SQLITE_TABLEselfstock_tagsread
SQLITE_TABLEselfarticlesread
SQLITE_TABLEselfstock_tagsread
SQLITE_TABLEselfarticlesread
SQLITE_TABLEselfstock_tagsread
SQLITE_TABLEselfstock_tagsread
SQLITE_TABLEselfarticlesread
SQLITE_TABLEselfarticlesread
SQLITE_TABLEselfstock_tagsread
SUBPROCESS/Users/exion/venvs/vision/bin/python3execute
SUBPROCESS/Users/exion/venvs/vision/bin/python3execute
SUBPROCESS/Users/exion/venvs/vision/bin/python3execute

9/10. Upstream / Downstream

Upstream:
Downstream:
Transitive downstream (0):

Edges (typed evidence)

typehard?fromtoresourceoriginconfevidence
none

11. Shared resources

12. Recent executions

failure_streak=0
last_error=
delivery_error=

14. Drift history

16. Impact / change risk

change_risk=MEDIUM