Process Inbox
telegramdesktop/tdesktop
Process the local ignored ai-tdesktop inbox into durable, independently testable Telegram Desktop task records while task execution worktrees remain active.
Daily portfolio briefing with 3 tiers: /briefing (quick ~1min), /briefing full (~3min), /briefing deep (~5min).
$ npx skills add PatrickSUDO/fadacai-portfolio --skill briefing -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install PatrickSUDO/fadacai-portfolio briefing --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/PatrickSUDO/fadacai-portfolio.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/briefing .claude/skills/briefing && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "briefing" agent skill from https://github.com/PatrickSUDO/fadacai-portfolio/tree/main/.agents/skills/briefing into .claude/skills/briefing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "briefing", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/PatrickSUDO/fadacai-portfolio/tree/main/.agents/skills/briefingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add PatrickSUDO/fadacai-portfolio --skill briefing -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install PatrickSUDO/fadacai-portfolio briefing --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PatrickSUDO/fadacai-portfolio.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/briefing .agents/skills/briefing && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "briefing" agent skill from https://github.com/PatrickSUDO/fadacai-portfolio/tree/main/.agents/skills/briefing into .agents/skills/briefing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "briefing", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add PatrickSUDO/fadacai-portfolio --skill briefing -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install PatrickSUDO/fadacai-portfolio briefing --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PatrickSUDO/fadacai-portfolio.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/briefing .cursor/skills/briefing && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "briefing" agent skill from https://github.com/PatrickSUDO/fadacai-portfolio/tree/main/.agents/skills/briefing into .cursor/skills/briefing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "briefing", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/PatrickSUDO/fadacai-portfolio.git --path .agents/skills/briefing--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add PatrickSUDO/fadacai-portfolio --skill briefing -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install PatrickSUDO/fadacai-portfolio briefing --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PatrickSUDO/fadacai-portfolio.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/briefing .gemini/skills/briefing && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "briefing" agent skill from https://github.com/PatrickSUDO/fadacai-portfolio/tree/main/.agents/skills/briefing into .gemini/skills/briefing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "briefing", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install PatrickSUDO/fadacai-portfolio briefingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add PatrickSUDO/fadacai-portfolio --skill briefing -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/PatrickSUDO/fadacai-portfolio.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/briefing .github/skills/briefing && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "briefing" agent skill from https://github.com/PatrickSUDO/fadacai-portfolio/tree/main/.agents/skills/briefing into .github/skills/briefing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "briefing", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add PatrickSUDO/fadacai-portfolio --skill briefing -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install PatrickSUDO/fadacai-portfolio briefing --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PatrickSUDO/fadacai-portfolio.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/briefing .opencode/skills/briefing && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "briefing" agent skill from https://github.com/PatrickSUDO/fadacai-portfolio/tree/main/.agents/skills/briefing into .opencode/skills/briefing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "briefing", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
briefingDaily portfolio briefing with 3 tiers: /briefing (quick ~1min), /briefing full (~3min), /briefing deep (~5min).
Briefing is an agent skill from PatrickSUDO/fadacai-portfolio. Daily portfolio briefing with 3 tiers: /briefing (quick ~1min), /briefing full (~3min), /briefing deep (~5min). Replaces daily-briefing.
Its SKILL.md is about 15k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Productivity & Automation. It works with Telegram. The repository describes itself as: Claude Code 投資研究與組合管理框架:skills + MCP + 第一性原理紀律 + thesis ledger. The licence is MIT.
12 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit b34fa31. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
python3codexuvclaudeFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
FRED_API_KEYX_BEARER_TOKENFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Briefing loads about 15k tokens when it runs. Until then it costs about 36 tokens; SKILL.md has 4,523 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from PatrickSUDO/fadacai-portfolio at commit b34fa31, republished under its MIT licence (© PatrickSUDO). 4,523 words, ~15,248 tokens.
.claude/skills/briefing/SKILL.md (or your agent's skills folder).三層結構的每日投資組合簡報,取代原 /daily-briefing。
/briefing → Quick(~1 分鐘)/briefing full → Quick + Full(~3 分鐘)/briefing deep → Quick + Full + Deep(~5 分鐘)/briefing telegram → Telegram Push Tier(~2-3 分鐘)— 盤中推送專用,不跑 Phase 1-3任何 tier 加上 --send 會在 tier 執行完後:
briefing-out/YYYY-MM-DD-full.md(Write tool)briefing-out/YYYY-MM-DD-telegram.txt(Write tool)python3 tools/send_briefing.py YYYY-MM-DD(Bash tool)推送至 Telegram + Emailgenerate_html.py,push HTML 到 reports repo,並在 Telegram 訊息末加上網頁連結briefing telegram 沒有 --send 時:只寫 briefing-out/ 兩個檔案,不發送。
若需手動生成 HTML(不發送):python3 tools/generate_html.py briefing YYYY-MM-DD [--push]
/briefing(quick)→ Sonnet 5(純彙整;session 已長則先 /compact)/briefing telegram → Sonnet 5(每日 launchd 自動推送,成本敏感,固定 Sonnet;週五 --codex 另走 gpt-5.5)/briefing full → Opus 5.5(中等綜合 + Verdict;Phase 2 subagent 已外包 Sonnet 5)/briefing deep → Opus 5.5(深度合成 + Codex 整合 + 機率/EV)切換方式:/model sonnet、/model opus 或 /model fable 後執行 skill。
執行 AGENTS.md 的 Step 0 統一規範(0a → 0b → 0c → 0d → 0e)。
plan.md + feedback/*.md(必做)get_account_position 取即時持倉讀 cache(不打 API,所有數據由 tools/fetch_macro.py 預載到 briefing-out/cache/macro-snapshot.json):
Read briefing-out/cache/macro-snapshot.json判定:
status == "ok" 或 "partial" 且 cache mtime < 36h → 使用,在 Quick Take 區前顯示 1 行:📊 Macro: Fed {fed_funds}% | 2s10s {value} ({regime}) | HY OAS {value} ({regime}, pct {pct_1y}%) | VIX {value} ({regime}) | regime: {regime_tag}status == "skipped"(FRED key 缺失)→ 顯示 ⚠️ Macro snapshot unavailable (FRED_API_KEY not set) 並跳過⚠️ Macro snapshot stale ({mtime_hours}h old) 仍使用但標記將 5 個 series + regime_tag 內容餵給 Step 0e 與後續呼叫的 probability-honesty-checker agent(其 Step 1i 必須收到此資料)。
讀 cache(不打 API,由 tools/fetch_leading.py 預載,TTL 20h;配置 research/leading-config.json):
Read briefing-out/cache/leading-indicators.json判定(逐 block,不整檔否決):
status == "ok" 或 "partial" 且 mtime < 36h → 使用;partial 時只跳過 status ∉ {"ok","partial","warming_up"} 的 block,各標 ⚠️ {block} unavailablestatus == "carried_forward" → 使用但標 (前日值 {data_as_of})status == "skipped" / 檔案缺失 → 顯示 ⚠️ Leading indicators unavailable,跳過所有相關段落;Deep tier 強制刷新:uv run --directory tools python3 tools/fetch_leading.py --force 後重讀;Quick/Full/Telegram 標旗即續blocks.revision_delta 某 archive 窗 available == false → 顯示 ⏳ archive-diff {窗} warming up({available_from} 起可用),該窗不產生 archive decel 旗標。vendor 7d 曲線法(Fundamentals Data Feed 的 vendor_* 欄位)自首日可用:decel_tickers 為兩法 union,decel_tickers_archive / decel_tickers_vendor 分列(/trade-review 各驗命中率);vendor_book 給 7d vs 30d 上修寬度對比blocks.tw_monthly 各檔 history_months < 2 → accel/轉負 flags 為 null 不判定,僅列數字在 📊 Macro 行下方顯示 1 行 🚦 儀表(所有 tier 一致,欄位缺失以 — 填):
🚦 先行: HY {delta_5d_bps:+}bp/5d ({velocity_flag}) | VIX期限 {ratio} ({term_flag}) | 半導體寬度 {pct_above_50dma}%>50DMA ({breadth_flag}) | 記憶體報價 {memory.n_hits}則/功率 {power.n_hits}則 | 台股月營收 {data_month} {最強檔 YoY%或 —}🔁 輪動相關儀表(2026-09-14 新增,display-only,H8 影子): 讀 briefing-out/cache/rotation-corr.json(tools/rotation_corr.py,runner 每日預跑、archive 凍結;手動 briefing 時 uv run --directory tools python3 tools/rotation_corr.py),在 🚦 儀表行下方原樣貼其 banner(例:🔁 輪動相關: 軟體~半導體 20d ρ +0.17(不顯著,基準 +0.22) | regime-shift: 無顯著變化)。措辭鐵則:ρ 的形容只准用工具給的三種(正相關 / 負相關 / 不顯著)——「負相關」只在 95% CI 上界 <0 時存在;regime_shifts 為空就寫「無顯著變化」,不得用「感覺軟體硬體在對做」之類敘事補位。有 regime-shift 時進 Key Alerts 一行、不觸發任何加減碼;由 /trade-review 驗 H8(旗標後 10 日兩籃相對報酬 ≥5pp 才算有資訊量)。
gauges 另帶兩個 FMP 免費層儀表(不進一行 banner,供 full/deep 段落與 Key Alerts 引用):
treasury(10Y/2Y/3M/30Y + 2s10s/3m10y spread)— plan「10Y <4.35 再加滿」類閘門的即時對照semis_industry_pe(半導體行業 PE 日頻 + Δ5d/Δ20d + 100 日分位)— 估值溫度計:與 revision 寬度並讀可分離「估值壓縮 vs 基本面惡化」(PE 大跌 + revision 寬度不動 = 純 de-rating)紀律(同影子訊號 A4,記錄不阻擋): 本 cache 所有旗標為 display-only + Key Alerts 標旗,不得單獨觸發任何加減碼/harvest/否決;由 /trade-review 跑滿 ≥2 期驗命中率後才可討論升級硬閘門。
質性訊號 theta(2026-08-19 起,資訊有時間衰減): 凡引用 pricing_watch excerpt 或 cross-read leader 訊號作 prior,必附訊號 age(來源日 → 今日,格式 (N 天前));age > 14 天 → 標 🕒 stale,降為背景不作 prior(同 revision >45d stale 的質性版——每組資訊過一定時間就被 fully price-in)。來源日缺失 → 標 (age unknown) 並降權。
這份 cache 用於:
🟠 decel 標註與 Section 12.5 飛輪檢查 revision 轉折佐證↳ read-through 子行、T5 🚦 alerts、T8a/T8b 🚦 區塊讀 cache(由 tools/earnings_history.py 預載):
Read briefing-out/cache/earnings-history.json
Read briefing-out/cache/earnings-dates.json判定:
status == "ok" → 使用,後續 Section 4.5 與 Telegram tier earnings 區直接引用status == "skipped" / mtime stale → 標記 ⚠️ Earnings cache stale 但仍使用最後一份這兩份資料用於:
Trailing 8Q beat / avg surprise 欄位📅 Earnings This Week 加 beat rate 標註probability-honesty-checker Step 1d「Base rate」備選來源(EODHD fundamentals-snapshot 為首選)讀 cache(由 tools/fetch_fundamentals.py 預載,TTL 24h):
Read briefing-out/cache/fundamentals-snapshot.json判定:
status == "ok" 且 mtime < 30h → 使用,供估值區塊、probability-honesty-checker 1d/1h 使用status == "skipped" / mtime > 30h / 缺失 → 標記 ⚠️ Fundamentals cache stale/missing;Deep tier 強制派 subagent 刷新,Quick/Telegram 標旗但繼續EODHD 資料缺口處理(必守):
highlights.pe_ratio == 0.0 或 peg_ratio == 0.0 → 丟棄該三錨點錨,標 (anchor unavailable),不進 Fair PE 計算avg_surprise_pct 對低基期股(EPS estimate ≤$0.10)可能失真 → beat 次數可信,avg% 在機率計算中標 (unreliable-low-base) 並拉寬區間Cache-miss fallback / Deep 強制刷新:
Agent(subagent_type="data-collector",
prompt: "對以下全部持倉(TICKER.US 格式)呼叫 mcp__eodhd-mcp__get_fundamentals_snapshot 與
mcp__eodhd-mcp__get_earnings_history,回傳 dict {ticker: {snapshot:{...}, base_rate:{...}}},
不分析不合成。")Deep tier 每次必跑(強制刷新);Quick/Full 僅在 cache miss 時派。
這份 cache 用於:
probability-honesty-checker Step 1d(beat base-rate 首選來源)與 Step 1h(quarterly growth → fundamental intact X/Y)fair_value_before/after 重算從同一 cache 取三錨點輸入讀 cache(由 tools/fetch_news.py 預載,TTL 6h):
Read briefing-out/cache/news-articles.json判定:
status == "ok" 且 mtime < 8h 且 "content" in fields_available → 使用,P3 信號擷取(Deep tier §9.5)可讀 bodystatus == "ok" 但 "content" not in fields_available → 有限使用(只有 headline+sentiment,P3 只能做 headline 掃描,標 ⚠️ news body 不可用)status == "skipped" / mtime > 8h / 缺失 → 標記 ⚠️ News cache stale/missing,Quick/Full/Telegram 略過 P3 信號擷取,Deep tier 繼續(P3 降級為僅 SEC/逐字稿)Read research/facts-current.json。寫到 Fed 主席、財長、CEO 等現任職位時以此為準(2026-09 起 Fed 主席 = Kevin Warsh/華許);不在檔內的人名不確定就寫職稱。stale_terms 內的字樣寫出來 hook 會擋。
讀 cache(由 tools/fetch_twitter.py 預載,TTL 20h;配置私有 research/source-config.json,schema 範例見 docs/source-config.example.json):
Read briefing-out/cache/twitter-signals.json判定:
status == "ok" 或 "partial" 且 mtime < 24h → 使用;"partial" 標 ⚠️(部分帳號讀取失敗,仍用已讀到的貼文)budget_exhausted == true → 標 💸(本輪 X API 讀取額度用盡),仍用已讀到的部分status == "skipped"(無 X_BEARER_TOKEN 或 x_fetch.enabled=false)/ mtime > 24h / 缺失 → 顯示 ⚠️ 來源訊號 unavailable,跳過 §9.6 與相關 Key Alerts / Telegram 段落單則貼文 date 距今 > 14 天 → 標 🕒 stale,降為背景不作 prior(同 Step 0.55 質性訊號 theta 規則)。
紀律(display-only,同 A4 影子 / R18 / 先行指標):
probation/trusted/core)完全由 tools/source_credit.py tiers 機械算出,Claude 不得手動升降bias == "talks-book" 來源(source-config,目前 @BillAckman / Pershing Square,2026-09-16 用戶觀察「他說很可怕時通常持有部位」):陳列其任何主張時,必附一行 13F 對照——讀 briefing-out/cache/agenda-13f.json(tools/agenda_check.py,runner 預載,TTL 7 天):「13F {期別} 前 10:{前 3 名+%};本則{點名持倉 / 看空且有 put / 無關}」。同向 = agenda 揭露,不是預測,不得作 prior;source_credit.py add-claim 時 --note 帶 agenda=same|none,命中率分組看/trade-review 前,來源訊號不得單獨改變任何 Verdict / 加減碼建議,只作背景與記錄python3 tools/source_credit.py add-claim ... 登錄該主張;未登錄的引用不算數(同旗標紀律「講了要記」)這份 cache 用於:
帳本 = research/thesis-ledger.json,工具 = tools/thesis_ledger.py(去重/碰撞/到期/過期/統計全在程式層,Claude 不手改 JSON)。
1. 取得今日到期清單(同時自動 expire sweep):
python3 tools/thesis_ledger.py due
python3 tools/ev_ledger.py resolve-due # EV 分布到期機械驗價(零判斷,自動抓價/淨值標記),輸出直接列在 briefing
python3 tools/source_credit.py resolve-due # 來源信用帳 view claim 到期機械驗價(同上;fact claim 只列不猜,見 2b)回傳 {due:[...], expired:[...]}。expired 是工具自動把「逾期 >30 天未驗收」轉掉的,當作無結果。
2. 對每筆 due thesis 驗收:
trigger.metric → 知道要抓什麼(財報營收/ASP/毛利率、板塊 ETF、價格…)earnings_history.py cache / technical 等)抓實際數字thesis + falsification 判定 passed / failed / partialreschedule 把觸發日往後推、維持 pending,絕不猜 verdict:python3 tools/thesis_ledger.py reschedule --id <id> --to YYYY-MM-DD --reason "財報未出"resolve 帶結構化旗標:pe_ratio × fwd_eps 各情境) → fair_value_after;price_impact_pct = (after−before)/beforefair_value_after 下修impact_decomp = "thesis +X%(基本面)/multiple −Z%(re-rate)=net −W%"python3 tools/thesis_ledger.py resolve --id <id> --verdict passed|failed|partial \
--actual "實際數字" --note "判讀" --next-action "由此推出的操作" \
--fair-value-before <float> --fair-value-after <float> \
--price-impact-pct <float> --impact-decomp "thesis +X%/multiple −Z%=net −W%"fair_value_before/after 取自 Step 0.65 fundamentals cache 的三錨點計算;全部選填,有數就帶。
2b. facts_due 驗收流程(來源信用帳,fact 型主張)
source_credit.py resolve-due 只自動驗 view 型主張(用價格算超額 α);fact 型主張只列不猜,due 回傳 facts_due 供人工核對:
claim 的 metric/value|actual−value|/|value| ≤ 0.5;partial:方向對但超幅;miss:方向錯;找不到對照數字 → 留 pending 不猜resolve:python3 tools/source_credit.py resolve --id <id> --verdict hit|partial|miss --actual "<官方數字+出處>" --confirm-date <YYYY-MM-DD>🐦 來源驗收:{source_id}@{tier} {ticker} {claim 摘要} → {verdict}3.(已除役 2026-07-30) 舊 naked-call-watchlist 3 閘門檢查已移除 —— 該清單為 6/5 反應式閘門時代產物(方法論 6/13 已被預掛 GTC 買梯取代),檔案歸檔至 research/archive/。樂透機會由 Section 11.5 掃描 + 價格警報器承接,不再每日讀舊清單。
4. 輸出「📋 thesis 驗收」區塊(接在 Key Alerts 後 / Quick Take 前):
## 📋 thesis 驗收
| thesis | 命題 | 實際 | verdict | 公允價 before→after | 價格影響 | → actionable |
|--------|------|------|---------|---------------------|---------|-------------|
| MU:memory-cycle | DRAM 漲價毛利率>40% | ASP +8%、毛利率42% | ✅ passed | $320→$370 | +15.6% | HOLD,加碼門檻 $XXX |
(無到期項則略過此區塊;「公允價 before→after」和「價格影響」欄只在 resolve 時填,reschedule 留空)
⏳ 逾期未驗收已歸檔:[expired 清單,若有]驗收結果直接餵 actionable:passed → 強化/HOLD/加碼(含新公允價上修幅度);failed → 汰弱/減碼(含公允價下修多少);partial → 分解 thesis vs multiple 成分後決定操作。resolve --next-action 寫的就是下一步行動,併入 Key Alerts / 行動項。
5. SA 量化榜整合(2026-07-25 用戶指定):
MARKET:sa-quant-scan-* due(或 research/sa-quant-scans/ 最新快照 >35 天)→ Key Alerts 加一行 📋 SA 量化榜掃描到期:請貼最新 screener(條件凍結),與 {最新快照日期} 基準 diff;未到期不輸出。launchd 路徑下 tools/briefing_runner.sh 已預取此兩項;手動執行 briefing 時才需自己跑(重跑安全,有去重):
python3 tools/shadow_signals.py flag # A4 高估旗標,記錄不阻擋
python3 tools/trade_ledger.py snapshot-orders # 在掛單快照(歸因 ground truth)
python3 tools/position_guard.py --sync-alerts --render-plan # 持倉守門(2026-09-02 P3):R14 天數/R23 arm+警報同步/R8 GTC 缺口/>10%/檔數/財報窗/桶別缺口 → 渲染 plan.md 標記區;exit 2 = 有缺口 → 缺口逐條進 Key Alerts(不得省略)
python3 tools/trade_ledger.py orders # 讀回:死單 + 不在 plan 的在掛單
python3 tools/rule_stats.py ledger-audit --check # 規則帳本一致性;launchd 路徑 runner 已預跑(失敗直接推 Telegram),手動 briefing 才需自己跑;exit 2 → 違規逐條進 Key Alerts1. A4 高估旗標(🟣 影子模式)
flag 回傳 A4vsA3 ≤ −35% 且 self_valuation.confidence == ok 的持倉。在 Key Alerts 加一行:
🟣 A4 高估旗標(影子,不阻擋):{ticker} A4vsA3 −X%|{ticker} −Y% — 記錄中,滿 30 天由 /trade-review 計分這一行只做記錄,不得據此改變任何建議。 A4 依 AGENTS.md 0e 仍不進 median、不進 EV。跑滿 2 期檢討才決定是否升為硬閘門(見 feedback/RULES-LEDGER.md R3)。
無旗標則整段省略。
2. 在掛單快照 + 死單偵測
snapshot-orders 每個交易日都必須跑,累積訂單登記表——這是往後把成交歸因到「系統決策 vs 自主決策」的唯一可靠來源。券商 order_status 只回在掛單,成交/取消後即消失,斷一天就有一天的成交永久無法歸因。
掛單 >30 天未成交 → Key Alerts 加一行:
⚠️ 死單:{order_id} {買/賣} {ticker} {N}股 @${price}(掛 D 天)→ 重新定價或撤單python3 tools/trade_ledger.py orders 另會標出不在 plan.md 的在掛單(plan 與券商實況脫節),一併列出。
3. 未結旗標(🔴 本書最貴的漏口,優先於其他所有 alert)
python3 tools/trade_ledger.py flags量測結論(2026-07-25):吃掉最多回撤的機制是「已標記惡化但沒有強制出場」,自警示以來 −$6,333。 成因是旗標只活在 briefing 散文裡:TSLA 與 ON 的 thesis-ledger history 都是 0 筆,沒有任何東西在數延後次數,所以每天把同一個警示當新的重述一次。
輸出規則:
forced_action_required 非空 → Key Alerts 第一行,格式:
🔴 強制決定:{id} 已延後 {n} 次|自警示 {days} 天累積 −$X → 減碼 1/3 或明文撤旗(附理由)overdue 非空 → ⚠️ 旗標逾期:{id}(deadline {date},逾 {n} 天)post_flag_fills.buys > 0 → ⚠️ {ticker} 在警示後仍加碼 {n} 股({dates}),損益 $X開旗紀律(強制,這是修好漏口的關鍵): 凡在 briefing / journal 寫下 ⚠️ / 降桶候選 / 勿再向下加碼 / thesis 蒙塵 / 待覆判 的部位,同一次必須開旗:
python3 tools/trade_ledger.py flag --ticker <T> --slug <kebab> \
--reason "<警示內容>" --deadline <YYYY-MM-DD 決定到期日>延後不是免費的,必須走 defer(會計次):
python3 tools/trade_ledger.py defer --id <id> --to <新日期> --reason "<為何還不決定>"第 3 次延後自動轉 forced → 減碼 1/3 或明文撤旗。撤旗也要走 resolve-flag --action withdrawn --note "<為何警示不成立>"。
反例存證:TSLA 7/01 標降桶候選,7/08 再提、7/09「不砍改收租」(用 PMCC 取代決定)、7/13 ledger 記 on-track,最後 −52.7% / −$6,399。若當時有此機制,7/13 就會被強制處理(標的 $425 vs 現在 $313)。
4. thesis 中途證偽掃描(不等觸發日)
python3 tools/thesis_ledger.py recheck --long-drift-only --limit 5Step 0.7 的 due 只在觸發日驗收;recheck 補的是中間那段。列出「已過天數」最長的 5 筆,各問一句:證偽條件裡有沒有現在就看得到的已經成立?
resolve --verdict failed,不等觸發日,並進 Key Alerts actionablequick / telegram tier 只掃前 3 筆;full / deep 掃全部長飄移筆數。
5. 檢討/review 週期到期(機械,2026-09-14 改為工具)
python3 tools/review_due.py # exit 2 = 有到期;同時寫 briefing-out/cache/review-due.json涵蓋三項:/trade-review(14 天,>21 天 🔴)、/portfolio-review(30 天,>45 天 🔴)、SA 量化榜掃描(35 天,>50 天 🔴;日期取 research/sa-quant-scans/*.md 檔名,非 mtime)。exit 2 → 工具輸出的每一行原樣進 Key Alerts,且進 Telegram「今日待辦」🎯(不得省略、不得只放 full.md)。 launchd 路徑下 briefing_runner.sh 已預跑並在到期時直接推 Telegram(不經模型),手動 briefing 才需自己跑。
2026-09-14 教訓:本條原為純散文規則,telegram tier 在上次檢討後第 16 天直接略過——規則活在散文裡就會被跳過,和旗標紀律同一課。
briefing 不代跑 /trade-review——歸因需要逐筆判斷決策來源,要用戶在場;但到期提醒本身不可依賴模型記得。
若 Step 0b 偵測到倉位變化,輸出差異表:
## ⚡ 倉位變動(vs 上次快照 YYYY-MM-DD)
| 類型 | 操作 | 標的 | 變化 | 計畫對應 |無變動則顯示「倉位無變化」。
日期: YYYY-MM-DD
組合市值: $XXX,XXX (日變動: +/- $X,XXX / +/- X.XX%)
總損益: +/- $X,XXX (+/- X.XX%)
持倉: XX 檔股票 + XX 個選擇權合約全持倉依日漲跌%排序:
| 標的 | 股數 | 現價 | 日漲跌% | 市值 | 總損益% |
+2% 或 -2% 標記。
4a. 無現股標的價格確認:
比對選擇權持倉的 underlying ticker vs 現股持倉。若 underlying 沒有對應現股(如 CRWD、DDOG、GOOGL、LRCX、TSLA、TEAM),
使用 mcp__technical-mcp__get_batch_indicators 或 mcp__yfinance-advanced__get_stock_info 取得該標的目前現股價格。
在 Options Status 表格中加入「標的現價」和「距 Strike %」欄位,方便判斷 ITM/OTM 狀態。
4b. Options 總覽表:
| 合約 | 方向 | 到期日 | 剩餘天數 | 標的現價 | 距Strike% | 損益% | 狀態 |
⚠️ 標記剩餘 <14 天的合約。
為何必要: 持倉 ticker 在 ±48h 內若有財報,technical signal(trend / momentum / RSI)會被 earnings reaction 主導,不是結構性訊號。直接套「弱勢持續 → 減碼」會在 fundamental beat 後賣在低點(PLTR 5/5 案例)。
資料來源:Step 0.6 已預載 briefing-out/cache/earnings-dates.json + earnings-history.json,直接從 cache 取,不再呼叫 MCP(若 cache 缺失或 ticker 不在,才 fallback mcp__fmp-mcp__getEarningsCalendar)。
執行步驟:
從 cache 列出未來 7 天內、或過去 48h 內有財報的持倉 ticker
對 earnings window(±48h)內的 ticker,在 Step 5 Technical Snapshot 表格的「標的」欄位前綴 ⚠️
對 earnings window 內的 ticker:
輸出格式(必須含 base rate):
| 標的 | 日期 | 時機 | 距 earnings | Trailing 8Q beat | Avg surprise % | 狀態 |
|------|------|------|------------|-----------------|---------------|------|
| NVDA | 2026-05-20 | AMC | 2d | 8/8 (100%) | +6.3% | 🔴 window 內 |
| AVGO | 2026-06-03 | AMC | 16d | 7/8 (87.5%) | +3.4% | 觀察中 |Trailing 8Q beat 與 Avg surprise % 從 earnings-history.json 的 beat_count/total 與 avg_surprise_pct 直接讀。
若 cache status ≠ "ok" 或 ticker 不在 cache → 該欄填 (unavailable),並在輸出末尾加註 ⚠️ N tickers 缺 earnings cache(請手動 python3 tools/earnings_history.py --force)
財報叢集曝險(book 級檢查,必做):
📊 財報叢集:未來 7 日窗內持倉合計 X%(N 檔)python3 tools/shadow_signals.py block --ticker XXX --price <當時價> --size <USD> --note "<理由+財報窗>"(見 feedback/earnings-reaction-window.md C 段)③ 窗內合計曝險與各檔 beat rate 一併列出供判斷財報後 7 項體檢(20 秒 checkbox,2026-08-19 起,源 research/隨手筆記59-棋局思維-earnings-cycle.md):
對過去 7 日內已發財報的持倉,各輸出一行機械 scorecard(資料源:8-K/press release + guide;缺項標 ? 不猜):
{ticker} 7-check: Rev✅ EPS✅ RevGuide⬆️ EPSGuide➡️ Margin⬆️ Pricing✅ TAM✅ → 6/7七項 = Revenue beat / EPS beat / Rev guide raised / EPS guide raised / Margin expansion / Pricing power / TAM growing-structural。
詳見
feedback/earnings-reaction-window.md與feedback/weak-signal-root-cause.md
資料:Step 0.55 earnings_crossread.chains(鏈定義 research/leading-config.json,日期由 fetcher 解析,不打 API)。
規則:
active == true 的鏈(leader 過去 10 日已發或未來 7 日將發、或 TSMC 月營收窗 8–12 日);無 active 鏈 → 一行「本期無 active cross-read 鏈」reported_within_10d):從 news cache(Step 0.67)/ pricing_watch 摘 1 句硬數字(capex guide / bit 出貨 / book-to-bill / backlog…),須逐字 quote ≤120 字,無 quote → 標「已發,硬數字未見」(同 §9.5 反幻覺門檻);方向標 ↑/↓/→ 作為 followers 的 priornews_only leader(SK海力士/三星/Infineon):無排程日期,靠 pricing_watch 承接,有相符 item 才列,附 recurrence 提示| 鏈 | Leader(日期/狀態) | 讀什麼 | Followers(財報日) | Leader 訊號(quote) |
|---|---|---|---|---|
| hyperscaler_capex | GOOGL 7/22 ✅ / META 7/29 | capex guide | NVDA 8/26, COHR 8/12… | capex ↑ "…"(來源) |
使用 mcp__technical-mcp__get_batch_indicators 取得全持倉技術指標。
欄位順序(依決策權重排列):
| 標的 | 現價 | 趨勢 | MACD | 量能比 | 動能分 | RSI |
above_sma50/above_ema200/bb_squeeze/ema50_slope5_pct)複合訊號標記規則(必須多指標同時觸發 + 無 earnings window):
| 標記 | 觸發條件 |
|---|---|
| 🔴 弱勢持續 | downtrend + momentum_score < -30(不是機會,是落刀) |
| ⚠️ 動能背離 | uptrend + momentum_score 轉負 OR death_cross(趨勢未破但動能轉弱) |
| 🚀 強勢確認 | golden_cross + strong_uptrend + volume_ratio > 1.2 |
| ⚠️ earnings window | 過去/未來 48h 有財報 → 以上規則一律不套用,標記 wait N+1d |
舊「🔴 拋物線警示(RSI>75)」「🟡 留意(RSI>70)」已於 2026-07-01 移除 — RSI 過高類標籤是飛輪/對稱性規則之前的遺留,一律不再產生。
根因分類規則(看到弱勢/強勢訊號必做):
對任一 weak_down / strong_down / momentum < -20 訊號,先回答根因再行動:
只有 (a) 才執行「汰弱留強」減碼。詳見 feedback/weak-signal-root-cause.md
強訊號對稱分類(看到貼高/大漲訊號必做 — per feedback/momentum-valuation-symmetry.md;RSI 過高不是輸入):
對任一貼 52W 高 / 單日大漲 / 已漲多訊號,先查 revision 方向再行動:
⚠️ revision 引用必附 coverage:**分析師數 N≥15 全權重;8–14 半權重(須與 trend/季成長印證);<8 不單獨觸發加減碼**;上次財報後 >45 天的 revision 標 stale 降權(per
feedback/momentum-valuation-symmetry.md規則 6)
🟠 revision decel(Step 0.55 cache 旗標,影子驗證中):該股在
revision_delta.decel_tickers中(上修仍為正但 7d/30d 動能顯著縮減)→ 在該股行尾標🟠 decel。只標記不改結論:不因此提前 harvest、不否決加碼、不進 EV;連同book_decel記入 Section 6 Key Alerts,由 /trade-review 驗命中率。warming_up→ 本標註完全不出現。
禁:把「超買/太貴/已漲多/RSI 高」單獨當在倉 trim 或新倉否決理由 — 只影響下手結構(分批/spread),永不影響方向。賣出仍須過 (a)/(b)/(c) trim 閘門(feedback/position-concentration.md)。
只在觸發時顯示(無則跳過整個 section):
🔴 Swing Risk 未處理(附建議可掛單)🟡 梯級缺口(附補掛單,per feedback/tiered-profit-taking.md)🔴 叢集曝險 X%(見 Section 4.5 step 6)🔴 飛輪滲漏widening_fast(HY OAS Δ5d ≥ +25bp 或 Δ20d ≥ +50bp)/ VIX 期限 inverted(^VIX/^VIX3M ≥ 1.0)/ 半導體寬度 divergence_flag(SMH 距 52w 高 <5% 且寬度 <50%)→ 各 1 行附數字,不觸發自動動作🚦 pricing 反轉候選(附逐字 excerpt + 對應 thesis slug,如 MU:memory-supply-response-2027)turned_negative == true → 🔴 需求證偽候選:{名} 月營收 YoY 轉負 → 提前檢討 ON/DIOD,不等財報book_decel == true → 🟠 revision 動能減速(寬度 {breadth_pos_pct}%,7d {momentum_7d_pp}pp);book_rollover == true → 升 🔴 revision 寬度跌破 50%briefing-out/cache/account-metrics.json → equity.circuit_breaker_active == true(帳戶自峰回落 >10%)→ 固定顯示 🔴 回檔熔斷生效中(峰 {peak_date} −{current_drawdown_pct}%):信念桶禁淨減碼;清倉/降桶決定強制隔夜(寫理由過根因分類,次日確認);僅機械單(梯級 harvest/旗標 forced/既掛 GTC)照常(規則 feedback/holding-period-discipline.md;cache 缺失 → 跳過不猜)briefing-out/cache/sa-screener-delta.json,asof 在 7 日內且 lists.strong-buy.new 非空 → 列 mandate 內(半導體/AI 硬體/電源/資料中心基建/軟體)的新進名字一行:📈 SA 動能榜新進:VICR、IESC(成長 A 動能 A,站上 50/200 日線)→ 進 L2 研究池候選,不觸發、不追價;mandate 外(金融/醫療/消費)不列。掉榜名字若是我們持倉或 L1 → 另一行 📉 SA 動能榜掉榜:{ticker}。每週一 runner 刷新;非週一無新資料就不出現has_number == true 且貼文 48h 內 → 🐦 {ticker} {source_id}@{tier}:{claim 摘要}("{raw_quote 節錄}");每檔最多 1 行、全 Key Alerts 最多 3 行;Probation 不得出現於此(僅 §9.6);display-only,不改變任何建議🔒 強制:機率分布必須呼叫 probability-honesty-checker agent
寫出機率分布 / EV 之前必須執行:
Agent(
subagent_type: "probability-honesty-checker",
description: "Briefing quick take EV check",
prompt: """
計算當前組合 7 日 horizon 機率分布與 EV。
## Step 1 九項輸入(已備齊):
1a. RSI 分布: [從 Section 5 Technical Snapshot 摘出,每 bucket 檔數 + % of port]
1b. 距 52w 高: [從 get_stock_info 摘出,中位數/最大/最小]
1c. 已實現波動: 過去 5d/2d 累積,最大單日
1d. Binary catalysts (window 7d): [從 Section 4.5 Earnings Calendar Check 摘出,
**必須含 trailing 8Q beat rate + avg surprise %**。
資料來源優先順序:
(1) fundamentals-snapshot.json → tickers.TICKER.base_rate(EODHD,首選)
(2) earnings-history.json → tickers.TICKER(yfinance,備選)
格式:「N/8 beat, +X.X% avg」。⚠️ 低基期股(AMD/CRDO/ONTO 等 avg_surprise_unreliable=true)→ 只用 beat N/8,avg% 標 (unreliable-low-base) 不進 Step 3。cache 缺 → (unavailable)]
1e. 集中度: top 1 / top 5 / 最大板塊(從 Section 1 倉位 + B 板塊配置)
1f. 板塊輪動曝險: leading 持倉 % / lagging 持倉 %(從 sector rotation)
1g. Sentiment: 7d/30d 對比(如 quick tier 無 sentiment 數據則標 N/A)— **display-only,agent 不得據此調機率(2026-09-11 影子測試無擇時訊號,見 tools/sentiment_shadow.py)**
1h. Thesis 健康度: 持倉 fundamental 是否 intact
1i. Macro state: [從 Step 0.5 載入的 macro-snapshot.json 完整貼入:
fed_funds + 30d change / yield_2s10s + regime / hy_oas + regime + pct_1y /
vix + regime / cpi_yoy + trend / regime_tag]
## 額外 context:
[plan.md 摘要 + 最近 N 天事件]
請執行你的 6 步流程並回傳完整輸出 + 精簡結論。
"""
)收到 agent 結果後 verbatim 顯示精簡結論(含 EV 數字)。不可手動改機率或寫質性結論。
第一性檢查(Quick Take 前必填):
### 第一性檢查(市場主題)
- **核心 thesis:** [1 句可驗證命題]
- **證偽條件:** [2-3 個 falsifiable]
- **機率分布:** [由 probability-honesty-checker agent 算出,引用其精簡輸出]
- 樂觀 X% / 基準 X% / 悲觀 X%
- EV (7d) = X.XX%2-3 句總結(明確 conditional 在 thesis 機率):
💰 估值快訊(Quick tier 僅一行,cache 算):
💰 估值:{最被低估標的} vs 公允價 −X%(三錨點中位) | {最被高估標的} vs 公允價 +X% | 今日 thesis 影響:{ticker} {verdict}→ $FV_before→$FV_after(±X%) | 自建分歧最大:{ticker} A4 vs A3 {±X%}規則:
self_valuation.own_target_price vs A3 wall_street_target 計算 A4vsA3 = (own_target − A3_target)/A3_target;取 ≥3% 持倉中絕對分歧最大者;confidence==unavailable 的 ticker 跳過;整段在所有 ≥3% ticker 都是 unavailable 時省略禁止偷懶(直接由 agent self-audit 攔截,主 skill 絕不可寫):
第一性檢查產出後 → 登錄 Thesis Ledger(收尾步驟):
只登錄有明確時間/事件觸發點的 thesis(當日核心市場 thesis + 行動項裡帶「請在財報後/N 日後檢視」的個股 micro thesis);沒有觸發點的泛泛評論不登錄。
每筆登錄前先看既有,避免 slug 飄移:
python3 tools/thesis_ledger.py list --ticker <T>python3 tools/thesis_ledger.py add --ticker <T> --slug <slug> \
--thesis "<可驗證命題>" --falsification "<證偽點1>" "<證偽點2>" \
--trigger-type event|date --trigger-date YYYY-MM-DD \
[--event earnings] [--metric "到期要比的指標"] --source briefing --ev "<EV snapshot>"supersede--ticker MARKET/briefing full 或 /briefing deep 時執行)資料來源: Step 0.65 fundamentals-snapshot.json(cache-first;Deep tier 強制已刷新)
執行範圍:
三錨點 Fair PE 計算規則(每檔必守):
| 錨點 | 來源欄位 | 規則 |
|---|---|---|
| A1(市場隱含) | highlights.pe_ratio | == null / 0.0 → 丟棄,標 (N/A) |
| A2(成長合理) | highlights.peg_ratio × (quarterly_revenue_growth_yoy × 4 或 fwdEPS_growth%);AI 龍頭(NVDA/AVGO/CRWD/AMD)目標 PEG 1.5,其餘 1.0 | == null / 0.0 → 丟棄 |
| A3(分析師隱含) | highlights.wall_street_target ÷ fwdEPS。fwdEPS 來源優先序: ① snapshot.forward_estimates.curr_fy.eps_avg(EODHD 真實賣方共識,當前 FY)→ ② forward_estimates.next_fy.eps_avg(次年 FY)→ ③ 保底 eps_ttm × (1 + growth%) 近似。cache 已在 self_valuation.a3_fwdeps_source 標來源(consensus_curr_fy/consensus_next_fy/approx),直接讀勿重推 | 任一缺 → 丟棄 |
情境指派規則(可重複):
⚠️ 單錨低信心情境 FwdEPS:
forward_estimates.curr_fy.eps_avg;缺則 next_fy;再缺才用 eps_ttm×(1+growth) 近似)forward_estimates.{curr_fy,next_fy} 另帶 eps_revision_30d_pct 與 revisions_up_30d / down_30d——共識 30 日內上修(up≫down 或 pct>0)= guidance 偏正領先訊號,可在備註或 P3 訊號推導引用(非估值輸入)eps_revision_7d_pct / revisions_up_7d / revisions_down_7d / eps_revision_60d_pct / eps_revision_90d_pct — 90d→60d→30d→7d 斜率遞減 = 上修波退潮中(Step 0.55 revision_delta 的 vendor 法直接吃這組)snapshot.quarterly_trends[](最近 6 季 revenue_yoy_pct / gm_pct / inventory_days / inventory_days_qoq)— 缺貨 thesis 證偽指標(ON/DIOD/MCHP/MU 的 GM QoQ 與庫存天數方向),thesis 驗收與 §9.5 可直接引用Full tier 輸出表(每持倉一行):
| 標的 | 現價 | A1 PE | A2 PEG錨 | A3 PT錨 | Fair PE(基/牛/熊) | FwdEPS | 公允價(基/牛/熊) | A4自建目標 | A4vsA3分歧% | 現價/公允基% | 備註 |
|------|------|-------|---------|---------|-----------------|--------|----------------|----------|------------|------------|------|
| MU | $XXX | 40.8 | 35.2 | 44.1 | 40.8/55.1/28.6 | $9.2 | $375/507/263 | $987 ⚠️低信心 | +33% | −8% | beat 8/8 |
| CRWD | $XXX | N/A | 62.1 | 71.3 | 66.7/89.1/46.7 | $3.8 | $253/339/177 | (self-val N/A) | — | +5% | A1 anchor N/A |欄位說明:
⚠️ 大幅偏離;若 abs > 50% → 標 ⚠️⚠️ 異常大偏離,錨點可能失效self_valuation.own_target_price(cache 已算,不重算);confidence=="unavailable" → 標 (self-val N/A);confidence=="low" → 標 ⚠️低信心(A4目標 − A3 wall_street_target) / A3 wall_street_target;A4 不進 median(A1,A2,A3),不進 EV(與 DCF 同為 sanity/divergence flag)DCF 交叉檢核(Deep tier 每檔追加一行):
mcp__fmp-mcp__getDCFValuation(ticker) DCF 交叉: $XXX (vs 基準公允 $XXX, 差 ±X%) [⚠️ 乖離>30% → 錨點存疑]DCF 不可用 (FMP free tier) 靜默略過資料缺口標準處理(不得猜測):
A1: N/A (CRWD 已知缺口)A2: N/A(CRDO 已知缺口)A3: N/A(fwdEPS unavailable),不輸出公允價使用 Agent 子代理(subagent_type: "data-collector")取 top 5 持倉的情緒數據:
get_sentiment_trend(ticker format: "TICKER.US")| 標的 | 7日情緒 | 30日情緒 | 趨勢 | 備註 |
情緒 < -0.3 的標的額外調用 get_news_sentiment 顯示負面新聞。
目的: 從 news body + SEC 8-K + 宏觀 calendar 抽已量化陳述,推導可驗證 thesis 候選,補上財報間隙的高頻 thesis-health 信號。
反幻覺門檻(必守): 每個 signal 必須附 raw_quote(≤120 字逐字引用);無 quote → 無 signal;只有 narrative → 明寫「無可量化信號(only narrative news)」,不捏造數字。
資料管道優先順序(可靠度由高到低):
mcp__sec-edgar-mcp__analyze_8k)→ confidence: high;僅針對 ≥3% 持倉在過去 14 天有新 8-K 者confidence: high。⚠️ FMP getEarningsTranscript 已實測 402(2026-07-28,免費層無逐字稿),改走:SEC 8-K 財報 exhibit(mcp__sec-edgar-mcp__analyze_8k / get_filing_content,Item 2.02 附 earnings PR 全數字)或 EODHD news body 財報報導news-articles.json,需 "content" in fields_available)→ confidence: medium(一般新聞常缺晶圓級細節)
3b. Leading cache pricing_watch(Step 0.55 pricing_watch.memory/power[].excerpt — 關鍵字預過濾 + 逐字 excerpt ≤240 字)→ confidence: medium;excerpt 可直接作 raw_quote 來源(仍須裁剪為 ≤120 字逐字引用),涵蓋非持倉訊號源(TSM/SNDK/STM/TXN 報價與 SK hynix/Samsung/Infineon 發布)
3c. 來源訊號 cache(Step 0.68 twitter-signals.json)→ Trusted/Core tier → confidence: medium;Probation → confidence: low,不入 ledger(同其餘 low confidence 只在文字呈現);post 全文(裁至 ≤120 字逐字)即 raw_quote 來源。引用即代表 add-claim——凡在本節或 Key Alerts 用某則貼文的主張支持判斷,該次必須 python3 tools/source_credit.py add-claim ... 登錄,否則不算已驗證過的引用(同旗標紀律「講了要記」)macro-snapshot.json regime_tag + get_economic_calendar(high_impact_only=True))→ 宏觀主題 thesis 輸入訊號 record shape(Claude 輸出,不寫 JSON 到 cache):
metric: wafer_starts / capex / ASP_QoQ / segment_revenue / utilization / Fed_rate / CPI
value: "+8% QoQ"(逐字含單位)
direction: up | down | flat
ticker/theme, source_url_or_desc, source_type: news|sec_8k|transcript|macro|twitter|substack|rss, date
confidence: high | medium | low
raw_quote: "<逐字引用,≤120 字>" ← 無此欄 = 不成立訊號 → thesis 轉換(Step 0e 紀律): signal 需轉成 1 句可驗證命題 + 2-3 量化證偽點 + 觸發點才算完整 thesis:
SIGNAL: MU 投片量 +8% QoQ (source: EODHD/Reuters, conf medium)
→ THESIS: "MU 投片量 +8% QoQ 預示 FY27 bit 出貨 YoY >25% 且 DRAM ASP 不跌破 −5% QoQ"
→ FALSIFY: ["下季 bit shipment YoY <25%","DRAM ASP QoQ <−5%","guide 下修 >10%"]
→ TRIGGER: event, <next_earnings from earnings-dates.json>, metric="bit shipment YoY + DRAM ASP QoQ"Thesis 登錄規則: 僅 confidence ∈ {high, medium} 且有明確前瞻 trigger → 登錄 ledger(--source signal-inference,--ev 存 signal provenance);confidence=low 只在 briefing 文字呈現,不入 ledger;exit-code-2 碰撞 → 改 slug 或 supersede。
python3 tools/thesis_ledger.py list --ticker <T> # check existing first
python3 tools/thesis_ledger.py add --ticker <T> --slug <slug> \
--thesis "..." --falsification "..." "..." \
--trigger-type event|date --trigger-date YYYY-MM-DD \
--event earnings --metric "..." \
--source signal-inference \
--ev "signal: <metric> <value>, <source>, conf=<confidence>"若訊號來自來源信用帳(X/Substack/RSS claim),--ev 改用可回溯到 source-credit.jsonl claim id 的格式:
--ev "signal: <metric> <value>, src=<source_id>@<tier>, claim=<id>, conf=<confidence>"誠實退化(必守): 若此 tier 的 ≥3% 持倉全部回傳「只有 narrative,無量化數字」→ 整段輸出:
§9.5 訊號擷取:本期無可量化信號(只有 narrative news,無 SEC 8-K / 逐字稿量化句)不輸出任何推測數字,不改寫 qualitative 為 quantitative。
目的: 陳列 Step 0.68 cache 中本期所有可計分主張(含 Probation,此處是唯一可以出現 Probation 的地方),並附來源信用帳現況,供人工判讀與 add-claim 登錄。
輸出表(每則主張一行,無主張則整段省略):
| source | tier | ticker | 主張 | raw_quote(首 80 字) | posted | claim id / 動作 |
|---|---|---|---|---|---|---|
| semi_daily | trusted | ON | SiC 通路缺貨延續 | "channel checks show SiC..." | 8/24 | 已 add-claim(src-2026-…) |
| example_view_source | probation | MU | 記憶體漲價未歇 | "DRAM contract prices..." | 8/23 | 待 add-claim |
末行信用帳統計(python3 tools/source_credit.py stats 輸出摘要):
📊 來源信用帳:N 個來源(Trusted X / Core Y / Probation Z)|本期新增 M 則|累計 hit_rate {overall}%(n={n_scored})mcp__fmp-mcp__getBiggestGainers + getBiggestLosersmcp__polymarket-mcp__search_markets 搜尋與持倉板塊相關事件目的: 從市場掃出至多 3 個適合短 DTE OTM Call 樂透的候選(per memory feedback:樂透用近期 OTM Call 不用 LEAPS,避免 vega 干擾凸性)。
篩選步驟(重用 Section 10 movers + active list 數據,不額外抓取):
getBiggestGainers + getMostActiveStocks
1b. 槓桿 ETF 先映射本尊再判斷(2026-07-30 BE 案):榜上槓桿/反向 ETF(名稱含 2x/3x/Long/Short Daily)不得直接當雜訊丟棄 —— 先映射 underlying(BEG→BE、MUZ→MU…),本尊若 mandate 內且有 binary catalyst → 以本尊進入後續篩選輸出格式(限 1-3 筆,無符合則輸出「⏳ 本次無符合凸性條件的樂透機會」):
| Ticker | 題材 / Binary 催化 | 建議結構 | 預估成本 | 凸性備註 |
|---|
規則:
feedback/holding-period-discipline.md 規則 3)完整進度表:
| # | 計畫操作 | 狀態 | 觸發條件 | 當前數據 | 備註 |
|---|---|---|---|---|---|
| 1 | 加碼 NVDA | ⏳ 待觸發 | RSI<35 | RSI=42 | 接近 |
| 2 | DDOG BCS | ✅ 已完成 | — | — | 3/5 建倉 |
feedback/momentum-valuation-symmetry.md 定期節奏)精簡三問(完整版在 /portfolio-review 4.5;briefing 只掃描 + 給可掛單,不展開全表):
feedback/tiered-profit-taking.md)② revision 轉折/題材降溫/Swing Risk 🔴(可提前下一級;revision 轉折的機械佐證可引 Step 0.55 revision_delta 的 decel_flag/book_decel,仍屬 prior 非強制 harvest)→ 每筆附 GTC 賣限價或 covered call 結構。revision 仍上修的領導者只按級距走,不提前(超買/新高不是 harvest 理由)### 🔄 飛輪檢查
Harvest:[標的 + 觸發依據 + 可掛單](無則「本期無 harvest 觸發」)
現金:X%(✅ 有部署計畫 / 🔴 閒置)
Redeploy 首選:[標的 + revision 依據 + 結構]
配對狀態:每筆 harvest 已配對去處 or 標 dry powder + 觸發/briefing deep 時執行)同時派出 3 組 Agent 子代理(全部 subagent_type: "data-collector",自動使用 Sonnet 5):
get_insider_transactions(90d)+ get_recent_filings(30d)get_stock_info + get_financial_statement — 基本面摘要getStockPeers(top 3)+ getBiggestGainers / getBiggestLosers若 Agent tool 不可用,依序呼叫亦可。
對 Key Alerts 中標記異常的股票(跌>5%、虧>15%),執行 stock-analysis 級別的分析:
目的: 顯示「公司目標/thesis 有無達成」,讓用戶一眼看出哪些論點正在驗證、哪些可能破裂,不 resolve(只讀取、對照、標狀態)。
資料來源:
thesis_ledger.py list --status pending(取得所有待驗收 thesis)Scorecard 邏輯(每筆 pending thesis 做一行):
對每筆 pending thesis,取其 trigger.metric 欄位(或從 thesis 命題推斷),與 fundamentals cache 的實際指標對照,判定當前狀態:
| 狀態 | 標記 | 條件 |
|---|---|---|
| 進行中 / 符合目標 | ✅ on-track | 核心指標與 thesis 方向一致(例:quarterly_revenue_growth_yoy > 0 且加速) |
| 待財報驗收 | ⏳ 待 event | trigger_type=event 且 trigger_date 尚未到(不能從 cache 判斷,等財報) |
| 有風險 / 指標轉弱 | ⚠️ at-risk | quarterly growth decel 連 2Q 或 guide 下修方向;技術面跌破 SMA50 且跌破 EMA200(H12 濾網,取代 death_cross);或 Step 0.55 revision_delta 該股 decel_flag(7d 上修動能縮減,影子驗證中) |
| 已接近證偽條件 | 🔴 warning | falsification 條件中有 1+ 個已出現(精確比對 thesis 列的證偽點) |
| 無法判定 | ❓ unknown | cache 缺相關指標,無法自動比對 |
輸出格式:
### 14.5 📋 Thesis 目標達成度
| ticker | thesis slug | 核心命題(摘要)| 到期/觸發 | cache 指標現況 | 狀態 |
|--------|------------|----------------|---------|--------------|------|
| MU | memory-cycle-asm | DRAM ASP持續上漲 + 毛利>40% | 2026-06-15 財報 | revenue growth +21% YoY;PE 40.8 | ⏳ 待 event |
| NVDA | datacenter-demand | DC revenue連4Q加速 | 2026-05-28 財報 | revenue growth +78% YoY | ✅ on-track |
| CIEN | margin-recovery | 毛利率50%以上連2Q | 2026-06-10 財報 | beat 1/8(⚠️最弱)| 🔴 warning |附加:thesis 到期日程(未來 30 天)
📅 近期 thesis 到期:
6/10 MU:memory-cycle(財報前) → 屆時需抓實際 ASP + 毛利率驗收
6/15 AVGO:ai-revenue-accl(財報後) → AI revenue YoY + guide 驗收規則:
resolve 或 add,那是 Step 0.7 的工作)portfolio-review 式的計畫執行進度表:
/briefing telegram)目的: 每日盤中推送至 Telegram + Email 的精簡決策摘要。不跑 Phase 1-3 的完整分析,只抓推送所需的 7 個資料點,直接產出 emoji 純文字格式。
Sonnet 5(資料抓取為主,無深度合成需要)
同標準規範(0a-0e):讀 plan.md + feedback/*.md → get_account_position → journal 確認。
T1. Earnings Window(next 7 days)
改從 cache 讀: Step 0.6 已預載 briefing-out/cache/earnings-dates.json + earnings-history.json,直接 Read 兩份 JSON。
列出所有持倉 ticker 的:
next_date, timing)earnings-history.json) ↳ read-through: {followers(≤4 檔)}(全訊息至多 1 行)若 cache status ≠ "ok" → fallback mcp__fmp-mcp__getEarningsCalendar,並加註 ⚠️ earnings cache unavailable。
T2. Sentiment Pulse + Fundamentals Cache 預讀(平行 Agent) 派出 data-collector subagent,取所有持倉的 EODHD 7d sentiment_trend(格式:TICKER.US):
Agent(subagent_type="data-collector"):
呼叫 mcp__eodhd-mcp__get_sentiment_trend 對每個 ticker
回傳 dict: {ticker: {score: float, trend: str}}分類:score 7日變動 > +0.1 → 改善;< -0.1 → 轉弱;急降(從 > +0.3 → < +0.1)→ ⚠️ 注意
同時讀取(不額外 MCP round-trip):
briefing-out/cache/fundamentals-snapshot.json(Step 0.65 已預載)→ 供下方 T2.5 💰 計算
T2.5 💰 估值 & Thesis Pulse(cache 算,signal-only)
資料:fundamentals-snapshot.json + Step 0.7 resolve 結果
計算邏輯(同 Section 8.5 三錨點精簡版):
現價/基準公允價 比值(基準公允 = median錨 × fwdEPS)省略整段的條件(全部滿足則 T8a/T8b 不輸出此段):
|現價/公允基 − 1| > 10%,AND→ signal-only:無訊號不推送(比照現有「無 alert 則略過整個 section」慣例)
T3. News & Catalysts(past 24h)
mcp__yfinance-advanced__get_yahoo_finance_news 取 top 5 持倉的新聞,各取 1-2 篇 24h 內最重要的。篩選標準:有具體事件(財報、合約、產品發布、監管)優先,無實質 catalyst 跳過。最多 3 條進入 Telegram 輸出。
T3.5. 🐦 來源訊號(Trusted+,signal-only)
資料:Step 0.68 twitter-signals.json。從 tier ∈ {trusted, core} 且 has_number == true 且貼文 48h 內者挑選,每檔最多 1 則,全訊息最多 3 則。引用即代表 add-claim——選入本節的貼文,同一次執行 python3 tools/source_credit.py add-claim ... 登錄(同 §9.5 3c 紀律)。
無符合門檻的貼文,或 cache status ∈ {"skipped"} / stale → 整段省略(比照 T2.5 慣例)。
T4. Sector Rotation
mcp__technical-mcp__get_sector_rotation() → 取全 sector ETF 相對 SPY 的 leading / improving / weakening / lagging 分類。只顯示各分類各 1-2 個代表 sector。
T5. Alerts(閾值觸發) 根據 T1 + T2 + Step 0b 持倉數據生成 alerts(無則跳過整個 section):
tools/sentiment_shadow.py:55% 讀數飽和 >0.90、個股內無擇時訊號);/trade-review 每期重跑,≥90 天且個股內 |rho| 中位數 ≥0.15 才可升級get_stock_info)→ 標記「逼近 52w 低」widening_fast / VIX 期限 inverted / 寬度 divergence_flag / 台股月營收 turned_negative / book_decel)→ 每項 1 行前綴 🚦(無則不出,display-only)T5.5 跨日一致性檢查(2026-09-08 新增,防自圓其說;2026-09-14 改為工具)
機械層:python3 tools/crossday_check.py briefing-out/YYYY-MM-DD-telegram.txt——寫完 telegram.txt 時 PostToolUse hook 自動跑(有反轉 exit 2 會擋下,要求補說明);launchd 路徑 runner 事後再跑一次並直推 Telegram。它只比對方向詞(加碼/減碼/清倉/勿加碼/旗標…)與 ticker 的共現,判斷「有沒有新依據」仍是下面的規則:
讀前一交易日 briefing-out/YYYY-MM-DD-telegram.txt(找不到 → 跳過本步,不阻擋)。對照今日 Key Alerts / 今日待辦中出現的每個 ticker:
→ 標記 ⚠️ 跨日反轉未見新數據:{ticker} 昨日「{昨日結論摘要}」→ 今日「{今日結論摘要}」,未見新催化,列入 Key Alerts 最前面。
此標記對 T6.5 是硬性攔阻:命中者當日一律不自動執行,即使符合 T6.5 其餘條件,也強制降回 🎯 待辦,附註「跨日反轉待人工複核」。
T6. 今日 / 明日待辦
從 plan.md 的策略佇列 + 觀察清單(⏳ 待評估)+ Step 0e 第一性分析,生成:
• {action}({trigger / catalyst})T6.5 自動執行(今日待辦 → 直接下單,2026-09-08 用戶指定;2026-09-14 起機械單判定移到 code)
觀察型警報(briefing-out/cache/alerts-fired.jsonl 當日條目,mode=briefing_only):每條在此段給結論,不轉述 note——讀 fundamentals-snapshot.json forward_estimates 的 30 日 revisions up/down(缺則先 fetch_fundamentals.py --ticker)與財報窗,寫成「{SYM} 觸 {線}:revision {u}↑:{d}↓、N={n} → 深洗盤候選 ✓ / de-rating ✗;名額 {有/無}」一行;候選 ✓ 且有名額才進 🎯 待辦。
先讀 briefing-out/cache/auto-exec-plan.json(tools/auto_exec.py,runner 預跑;手動 briefing 時 uv run --directory tools python3 tools/auto_exec.py)。機械單(R23 線、用戶裁決收盤線、選擇權管理線、R24 SGOV、R8 缺口)只准執行該檔 plan 列出的項目,觸發判定一律以前一收盤(工具已算),模型不得自行判定「有沒有到線」;skipped 列出被 R14/財報窗/跨日反轉擋下者,原樣進 Key Alerts。執行時點已改為盤中收盤前 15:45 ET 與收盤後 16:20 ET 兩次 pass(tools/evening_pass.sh),結果寫在 plan JSON 的 executed。早上讀到 executed 內 status=placed 的項目只寫 ✅ 已自動執行(單號),不再處理;status=error 與 CLOSE_SPREAD 才由 briefing 補處理,補完 register-order --rule <plan.rule>。新倉/加碼類不在 plan 內,仍走下面五條件。
T6 產生的今日待辦(明日待辦不適用,只是預告)逐條檢查,五條全過才直接下單、不再列為待用戶確認的項目:
auto-exec-plan.json 內 R30-add 項,guard 已驗六條件,回檔 SMA20 GTC ≤$3k)/R25 sleeve 動作(R25-sleeve)/新倉或加碼(thesis 已確認、plan.md 候補表或 roster.json 已寫明目標股數與價位)position_guard.py exit 2 缺口清單中的項目、會讓單一持倉 >10%、財報 ±48h 禁令、R14 30 天鎖、檔數上限(>18)、R8+R23 合計賣穿 30% runner(C2)、R28a 買方鎖(auto-exec-plan.json buy_locked 內的名字:R23 armed 且自峰 ≤ −15%,或 R23 減碼後 30 天內——線在說賣的時候不能同時在買,CRDO 6/26–7/15 案)——命中任一律不自動下單,維持列 🎯 待辦並註明被什麼擋。現金閘(C6,2026-09-14):新倉/加碼買單金額須 ≤ auto-exec-plan.json 的 cash_gate.cash_available;不足且 SGOV 有停泊 → plan 內已有 R24-unpark 賣單,先掛它、買單延一日(T+1);兩者皆無 → 列 🎯 待辦。不靠 margin 撐⚠️ 跨日反轉未見新數據 → 不論前四條是否過關,一律不自動下單五條全過 → 用 mcp__firstrade-server__place_stock_order 直接下單(股票單,含 GTC)。選擇權:平倉可自動、開倉不自動(2026-09-14)——既有選擇權部位觸及開倉時寫死的管理線(50–75% 最大利潤、debit −50% 停損、結構失效收盤線)→ 用 preview_option_spread/place_option_spread(或單腿 *_to_close)day 單直接平,ET 7–16 內執行;選擇權開倉與三腿以上/GTC 複式單仍走 tools/tg_send.py 或互動 session。
下單後:
python3 tools/trade_ledger.py snapshot-orders,並 python3 tools/trade_ledger.py register-order --id <單號> --rule <R8|R23|R24|R25|T6.5|plan-L1|options-mgmt> --note "..."(2026-09-14:規則單不一定寫進 plan.md,不登記會被歸因鏈判成 user——本期人工補了 14 筆)shadow_signals.py record --kind cf-t65-capped --correct-if under、R1 判輪動而不減碼 --kind cf-r1-hold --correct-if over、比選落選者 --kind cf-bench-loser --correct-if under、R17 擋下的盤中衝動 --kind cf-r17-blocked --correct-if over/under。沒做的決定跟做了的一樣要進帳,這是把規則驗證樣本乘 3–5 倍的唯一免費方法research/position-flags.json)→ 同一次 resolve-flag --action <動作> 或視情況更新✅ 已自動執行:{action}(單號 {order_id},{價}×{股數}),取代原本的 🎯;同步進 T8a/T8b 兩層輸出⚠️ 自動下單失敗:{action}(錯誤:{msg})→ 待人工處理,維持在待辦區python3 tools/thesis_ledger.py add --ticker <T> --slug auto-exec-YYYYMMDD-<kebab> \
--thesis "<T6.5 判定的觸發條件與依據,例:CLS 走強確認滿足 plan.md 補倉條件>" \
--falsification "<1-2 個會證明這次自動執行是錯的具體訊號,例:補倉後 10 個交易日內跌破起手成本>" \
--trigger-type date --trigger-date <今日 + 10 個交易日> \
--source briefing --ev "auto-exec T6.5: {action}, 單號 {order_id}"thesis_ledger.py due 機制自動撈出驗收,不需額外工具;exit code 2(slug 碰撞)→ 改用當日日期變體的 slug,不可略過不登錄T7. Quick Take(第一性)
一小段人話(3-5 句,per feedback/briefing-voice-style.md),情緒/敘事走向。不講 RSI/MACD。內容不變:
T8a. 完整 Markdown → briefing-out/YYYY-MM-DD-full.md(詳細層 = Email 與網頁版的本體)
三層分工(2026-09-02 用戶指定):
full.md是最詳細的版本(Email 與網頁直接用它);telegram.txt是它的摘要層(每區 1-2 句 + 動作)。兩者文字不得相同——Telegram 只保留結論與動作,full.md 保留完整推理、表格、全部數據點。Email 不再附 Telegram 文字(send_briefing.py已改)。
使用 Write tool 寫入。敘事段落全部走 feedback/briefing-voice-style.md 口吻(section 骨架與數據點照下方模板一項不漏;開場加 2-4 句 big picture 導言、每區內容寫成完整句子帶解讀)。詳細層必含(Telegram 省略的):① 持倉狀態表(直接貼 research/position-state.json 渲染的表,含桶/權重/持有天/自峰回撤/R23/在掛賣單/旗標/財報日,與 guard 缺口清單)② 每檔估值三錨點表(現價/公允基準/A1/A2/A3/A4 分歧)③ 先行指標完整儀表(各 block 數字,非一行摘要)④ 旗標/thesis 到期/警報的完整清單與 deadline ⑤ 來源訊號逐則(含 raw_quote)⑥ 有 Codex 時的並排比較。markdown 表格在本檔允許且鼓勵。格式:
# Daily Briefing YYYY-MM-DD(詳細版)
## 持倉狀態(position_guard 生成表 + 缺口)
...
## Earnings Window
...
## Sentiment Pulse
...
## 🚦 Leading Indicators
- 儀表: HY {Δ5d:+}bp/5d ({flag}) | VIX期限 {ratio} ({flag}) | 半導體寬度 {pct}%>50DMA ({flag})
- Cross-read: {active 鏈:leader(日期/狀態)→ followers}(無 active 鏈則省略)
- Pricing: {memory/power 最重要 1-2 條 — "{excerpt 節錄}" ({source})}(無 hit 則省略)
- 台股月營收: {名 YoY ±X%…}(僅 is_new_month 或有 flag 時列出)
- Revision Δ: 寬度 {breadth_pos_pct}%(7d {±X}pp){;🟠 decel: T1, T2}(warming_up → ⏳ warming up (archive {N}d))
## News & Catalysts
...
## 🐦 來源訊號(Trusted+,signal-only,無則省略整段)
- {ticker}:{claim 摘要}({source_id}@{tier},{posted 距今}h 前)— "{raw_quote 節錄}"
(最多 3 則;無符合門檻貼文則省略整段)
## 💰 估值 & Thesis(signal-only,無訊號則省略整段)
### 估值偏離
- 最被低估:{ticker} 現價 $X vs 公允基準 $X(−X%,三錨點中位);A1 PE={X}/A2 PEG錨={X}/A3 PT錨={X}
- 最被高估:{ticker} 現價 $X vs 公允基準 $X(+X%)
(|偏離| < 10% 則省略該行)
### 今日 Thesis 驗收影響
- {ticker}:{slug} → {verdict} | 公允價 $FV_before → $FV_after(±X%) | 影響:{impact_decomp}
(無今日 resolve 則省略此小節)
## Sector Rotation
...
## Alerts
...
## 今日待辦
- {✅ 已自動執行:action(單號、價×股數)或 🎯 待辦:action(觸發條件)}
- {⚠️ 自動下單失敗則附錯誤訊息}
## 明日待辦
...
## Quick Take
...T8b. Telegram 純文字 → briefing-out/YYYY-MM-DD-telegram.txt(摘要層)
使用 Write tool 寫入,格式嚴格遵守(純文字 + emoji,無 markdown,無表格,無 bold/italic/link)。這是 full.md 的濃縮,不是複製:每區只留結論 + 動作(1-2 句),推理/表格/逐檔數據留在 full.md;讀者要細節點網頁版連結。目標 ≤3000 字元不變,但能更短就更短——同樣資訊已在 full.md 時,Telegram 的價值是「今天該注意什麼、該做什麼」。
📊 M/D HH:MM(發送時間,本地時區)
📰 News & Catalysts
• {ticker}: {一句話} ({source})
(無 catalyst 則略過整個 section)
🐦 來源訊號
• {ticker}: {claim 摘要}({source_id}@{tier})
(無符合門檻貼文則略過整個 section,最多 3 則)
📅 Earnings This Week
• {ticker} {M/D} {盤前/盤後} ({beat_count}/{total} beat, +{avg_surprise}%) — {focus 重點}
↳ read-through: {followers}(僅當該 ticker 為 active 鏈 leader;全訊息至多 1 行)
(Trailing beat rate 從 earnings-history.json 讀;cache 缺則省略括弧)
🚦 先行指標
HY {+X}bp/5d | VIX期限 {ratio} | 寬度 {pct}% | 記憶體 {n}則 | 台股 {摘要或—}
⚠️ {觸發中的 regime-break / 台股轉負 / book_decel,合併一行}(無觸發則省略此行)
📊 Sentiment Pulse (EODHD 7d)
📈 改善: {ticker} +{delta}, {ticker} +{delta}
📉 轉弱: {ticker} -{delta}
⚠️ 注意: {ticker} {一句說明}
(無變化的 ticker 不列出)
💰 估值 & Thesis
📉 最低估: {ticker} vs 公允價 −X%(三錨點中位)
📈 最高估: {ticker} vs 公允價 +X%
📋 今日 thesis: {ticker} {verdict} 公允價 $FV_before→$FV_after(±X%)
(整段省略條件:無 >10% 偏離 且 今日無 thesis resolve)
🔄 Sector Rotation
💪 leading: {sector}, {sector}
📈 improving: {sector}
📉 weakening: {sector}
💀 lagging: {sector}
🚨 Alerts
• {alert}
(無 alert 則略過整個 section)
🎯 今日待辦
✅ {action}(單號 {order_id},{價}×{股數},已自動執行)
• {action}({trigger})
⚠️ {自動下單失敗的項目,附錯誤原因}
📋 明日待辦
• {action}({catalyst})
⚡ Quick Take
{第一行:今日情緒/敘事方向}
{第二行:本週核心注意事項}格式規則:
**、_、[text](url) 等 markdown 語法feedback/briefing-voice-style.md 內容不變定律 + before/after 範例);先講結論、數字帶解讀briefing-out/YYYY-MM-DD-telegram.txt 比對——跨日重複且無變動的項目(同旗標重述/同觸發帶等待/同 thesis 完好)不再展開,收進一行 ⏸ 無變化:X / Y / Z 或省略;重複但有變動只寫 delta。例外:🔴 警示、今明 deadline 待辦、R15 熔斷狀態仍須一行。讀者昨天讀過的句子今天不該再讀到✅ 已自動執行 是真的已下單(非建議),單號可對照 get_orders;⚠️ 自動下單失敗 才需用戶處理,其餘 🎯 是被 T6.5 判定不符自動執行條件、仍待用戶決定↳ read-through 全訊息至多 1 行briefing-out/ 目錄不存在時先用 Bash mkdir -p briefing-out 建立寫完 briefing-out/YYYY-MM-DD-full.md 後,先寫 tier 標記再生成 HTML:
# 1. 寫 tier 標記(讓 generate_html.py 知道這次是哪個 tier)
echo "<tier>" > briefing-out/YYYY-MM-DD-tier.txt
# <tier> 填入:quick | telegram | full | deep
# 2. 生成 HTML + push(tier gate 自動判斷:只有升級才推)
python3 tools/generate_html.py briefing YYYY-MM-DD --push
# 成功時印出網頁連結;若網站已有更高 tier 則跳過 push(本地 HTML 仍更新)Tier 升級規則: quick(1) < telegram(2) < full(3) < deep(4)
寫完兩個檔案後,若 arguments 含 --send:
python3 tools/send_briefing.py YYYY-MM-DDsend_briefing.py 會自動:
tools/generate_html.py briefing YYYY-MM-DD --push(best-effort,失敗不擋發送)成功時輸出「✅ Telegram 已發送 / Email 已寄出」,失敗時輸出錯誤訊息(sender 自帶 retry + error notification)。
full 或 deep 層)僅當 arguments 含 --codex 或 --2nd 時執行。Quick 層完全跳過本 Phase。
三個子 block 依序執行(可並行派 Agent):
核心原則:Codex 不看 Claude 的 Phase 1–3 結論(不給 Quick Take / Key Alerts / 建議),只給 raw 持倉變動 + 市場數據,讓它獨立評估今日 priorities。Claude 與 Codex 兩個獨立輸出並排比較。
🔴 Prompt 中性化要求(詳見 feedback/codex-prompt-neutrality.md):
raw data 區只能放 fact 數值,不能放 derived label:
| ❌ 不能寫 | ✅ 改寫為 |
|---|---|
MU strong_uptrend / 49 / 量縮 | MU $635.80 (+10.30%) / RSI 81.7 / vol_ratio 0.49 / 6w range $XXX-$XXX |
PLTR weak_downtrend / momentum -24 | PLTR $138.30 (-5.29%) / RSI 46.2 / 6w range $122-$146 / Q1 earnings 5/4(昨日) |
BE 拋物線警示 | BE $291 (+0.9%) / RSI 77.6 / 5d 區間 $275-$303 |
禁止的 label: strong_uptrend / weak_downtrend / consolidation / overbought / oversold / 拋物線 / 打底 / 弱勢持續 / 強勢確認 / momentum_score(這已是 -100~+100 derived score,改寫成「X 個交易日累計漲跌 X%」)。
讓 Codex 自己跑 indicator interpretation,從 raw 數值推導結論。
呼叫 Codex(用 AGENTS.md「Codex 呼叫方式」的 codex exec CLI;勿用 codex:codex-rescue subagent / /codex:rescue,會卡 superpowers preamble),prompt 首行加強制 no-tool 指令,模板:
我是一名美股投資人,使用 Level 2 options + Spread 的 margin 帳戶。
請對今日 briefing,**完全獨立**評估 — 不要看任何先前結論。
**Raw data(只給 fact 數值,無 derived label):**
帳戶:總值 $XXX / 現金 $XXX / 今日帳戶變動 +X.XX%
**今日 movers(價格 + % + 量能比 + 6 週區間):**
- [ticker] $XXX (+/-X.XX%) / RSI XX.X / vol_ratio X.XX / 6w range $XXX-$XXX
- ...
**Earnings Window 標記(過去/未來 48h 有財報的 ticker):**
- [ticker] — 財報日 X/X([已過 X 天 / 還剩 X 天])
**主要持倉技術面(fact only):**
- [ticker]:價 $XXX / RSI XX / MACD line/signal/histogram / vs SMA20 X% / vs SMA50 X%
- ...
**板塊輪動(vs SPY 3mo,純數值):**
- SMH +X.XX% / 1w +X.XX% / RSI XX.X
- ...
**待執行/觀察的計畫項目**(從 plan.md 摘出 ⏳,不寫評語):
- ...
**近期重大事件(fact):** 財報日列表、FOMC、產業催化
**投資風格:** AI/半導體主軸、汰弱留強、信念持倉 [TSLA/MU/AVGO]
**請輸出(獨立判斷):**
1. **今日組合 thesis**(1 句:今日是「進攻」「防守」「觀望」?理由?)
2. **3 個今日最重要的訊號**(具體 — 自己解讀 raw data,不依賴 Claude 標籤)
3. **未來 5 個交易日機率分布(組合表現):**
| 情境 | 機率 | 條件 | 預期 % |
|------|------|------|--------|
| 樂觀 | XX% | [...] | +X% |
| 基準 | XX% | [...] | ±X% |
| 悲觀 | XX% | [...] | -X% |
4. **3 個 actionable 建議**(含口數 / 觸發條件)— 對 earnings window 內的 ticker 預設「等 settle」
5. **Verdict**(1 句):今日整體該做什麼?
**規則:**
- 機率分布必須 sum 到 100%
- 不假設 Claude 已說過什麼
- 保持獨立判斷
- earnings window 內的 ticker 不直接套「汰弱留強」
請以繁體中文回覆,控制在 700 字內。
--effort high --fresh呼叫 Codex(用 AGENTS.md「Codex 呼叫方式」的 codex exec CLI):
我目前的美股持倉(含市值占比):
[插入 Step 0b get_account_position 取得的持倉表]
我的投資風格:
- 主軸:AI/半導體、高成長科技;汰弱留強,集中持倉
- 信念持倉(不換):TSLA, MU, AVGO 多年期 thesis
- 板塊偏好:[從 plan.md 摘出 3-5 行板塊目標]
請以獨立分析師視角:
1. 掃描今日市場有哪些當紅題材/個股,是我目前持倉沒覆蓋到的
2. 對每個候選列出:題材、代表 ticker、為何此刻有機會、建議切入方式(現股/Spread/LEAPS)
3. 要追這些新機會,最該砍掉哪一檔現有持倉?為什麼?
4. 提供 2-3 個具體 actionable 建議(含目標 entry zone)
請以繁體中文回覆。輸出限 600 字。Step 1 — Claude 預先收集數據:
mcp__technical-mcp__get_sector_rotation() → 全板塊 ETF 相對強度 vs SPY(leading / improving / weakening / lagging)mcp__technical-mcp__get_batch_indicators(tickers=[所有持倉]) → 個股動能分數 + 趨勢Step 2 — 呼叫 Codex(用 AGENTS.md「Codex 呼叫方式」的 codex exec CLI):
我的美股持倉(含市值占比 + 板塊歸屬):
[持倉表]
當前板塊輪動數據(vs SPY):
[get_sector_rotation 完整輸出]
當前個股動能:
[get_batch_indicators 摘要]
請以輪動專家視角:
1. 板塊輪動:哪些板塊 leading,哪些 weakening?我的持倉是否站在 leading 板塊?
2. 個股輪動:在我已持有的板塊內,有更強的 leader 我沒拿到?有持倉已被同板塊其他名字超越?
3. 資金流向:從 weakening 輪到 leading 的訊號是否明確?建議調倉路徑
4. 具體建議:3 條 actionable 輪動操作(從哪檔減 → 加到哪檔,附理由)
請以繁體中文回覆。輸出限 700 字。## 🤖 Codex 第二意見
### B1. 獨立第一性分析(Codex 獨立輸出)
**Codex 今日 thesis:** [...]
**Codex 列的 3 個重要訊號:** [...]
**Codex 機率分布:**
| 情境 | 機率 | 條件 | 預期 % |
|------|------|------|--------|
| ... |
**Codex 3 個建議:** [...]
**Codex Verdict:** [...]
#### 並排比較:Claude vs Codex(獨立輸出)
| 維度 | Claude | Codex | 一致性 |
|------|--------|-------|--------|
| 今日 thesis | [Claude] | [Codex] | 同 / 異 |
| 機率分布偏向 | 偏多 / 中性 / 偏空 | 偏多 / 中性 / 偏空 | — |
| 主要建議 | [Claude] | [Codex] | 同 / 異 |
| Verdict | [Claude] | [Codex] | 同 / 異 |
**真實共識:** [1-2 條]
**真實分歧:** [1-3 條]
### 機會掃描(vs 現有持倉)
[B2 Codex 完整回覆]
### 輪動分析(板塊 + 個股)
[B3 Codex 完整回覆]
---
**值得追蹤的新機會:** [從 B2 挑 1-2 個 Claude 也認同的]
**輪動 actionable:** [從 B3 挑 1-2 條 Claude 也認同的調倉操作]--codex-adversarial(opt-in 壓力測試)僅當 arguments 含 --codex-adversarial 時,追加對立面審查段落(攻擊 Claude 結論、找 bug)。預設 --codex 不執行。
若 Codex 失敗 → 輸出
⚠️ Codex 不可用:[error],跳過第二意見,繼續正常輸出。
feedback/briefing-voice-style.md(股癌式直白 + 游庭皓式晨報導讀)。鐵則:內容不變定律 — 每個 section/數字/旗標/待辦一項不漏,只改「怎麼說」;先講結論、數字帶解讀不裸列、術語首次給白話;開場 2-4 句 big picture、結尾一小段「明天看什麼」。機率/EV/旗標的數據結構照舊,禁止用語氣詞替代機率。跨日選材走 voice 檔鐵則 4 增量優先(2026-08-31):與前一交易日輸出比對,無變動項目收一行「⏸ 無變化」或省略、有變動只寫 delta(🔴 警示與今明 deadline 待辦例外仍列)——內容不變定律管單次改寫、鐵則 4 管跨日選材,不衝突curr_fy、decel_flag、pct_above_50dma 這類內部欄位名不得直接出現在報告文字,一律翻完整名稱(本財年、上修減速旗標、站上 50 日線比例…完整對照表見 feedback/briefing-voice-style.md 規則 4b);溯源需要時才括號附欄位名。市場慣用英文(EPS/PE/capex/guide/beat/IV/DTE/delta)不受限briefing-out/ 的兩個檔案briefing-out/ 已加入 .gitignore(個人化數據,不 commit)python3 tools/send_briefing.py YYYY-MM-DD 或 python3 tools/send_briefing.py latest© PatrickSUDO, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/briefing of PatrickSUDO/fadacai-portfolio.
Open the folder on GitHubat commit b34fa31
Briefing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Briefing this skillPatrickSUDO/fadacai-portfolio | 142 | — | ~15k | Automated safety check: Pass | MIT | |
| Process Inboxtelegramdesktop/tdesktop | 33k | 2 repos | ~4.5k | Automated safety check: Pass | GPL-3.0 | |
| Perform Tasktelegramdesktop/tdesktop | 33k | 2 repos | ~3k | Automated safety check: Pass | GPL-3.0 | |
| Continuetelegramdesktop/tdesktop | 33k | 2 repos | ~9.4k | Automated safety check: Pass | GPL-3.0 | |
| Telegrambubbuild/bub | 1.7k | — | ~2.2k | Automated safety check: Pass | Apache-2.0 | |
| Send User MessageTinyAGI/tinyagi | 3.6k | — | ~829 | Automated safety check: Pass | MIT |
telegramdesktop/tdesktop
Process the local ignored ai-tdesktop inbox into durable, independently testable Telegram Desktop task records while task execution worktrees remain active.
telegramdesktop/tdesktop
Resolve, start or resume, implement, review, test, and publish exactly one existing ai-tdesktop task by short slug or full dated id, including rare blocked retries and split-required results.
telegramdesktop/tdesktop
Continue autonomous Telegram Desktop development from the shared ai-tdesktop repository.
bubbuild/bub
Telegram Bot skill for sending and editing Telegram messages via Bot API.
TinyAGI/tinyagi
Send a proactive message to a paired user via their channel (Discord, Telegram, or WhatsApp).
y49/tlive
tlive — remote approvals (Telegram/Feishu/web), live web terminal, and session monitoring for Claude Code / Codex.
PatrickSUDO/fadacai-portfolio
Fetch live brokerage positions and generate a comprehensive portfolio report with sector allocation, P&L analysis, options summary, and risk assessment.
PatrickSUDO/fadacai-portfolio
強制 first-principles 機率分布 + EV 計算。用於檢查當前組合在指定時間窗的預期報酬,禁止用 default bell shape 或質性語言。Usage - /ev-check [30d|7d|14d] [optional scenario theme]
PatrickSUDO/fadacai-portfolio
財報/重大事件(CPI/FOMC)前的末日 buy call 與雙買 straddle 機會掃描。Usage - /event-vol-scan [days] [TICKER ...](預設窗 14 天,掃持倉 + L1 候補 + SPY/QQQ 宏觀事件)
PatrickSUDO/fadacai-portfolio
Test all MCP server connections and report health status. An agent skill from PatrickSUDO/fadacai-portfolio.
PatrickSUDO/fadacai-portfolio
Calculate and compare options strategies (sell put, covered call, LEAPS, naked call) for a given ticker.
PatrickSUDO/fadacai-portfolio
生成下一個交易日的優先行動清單。當用戶問「明天開盤要做什麼」、「今天要操作什麼」、「給我待辦」、「接下來要做什麼」、「有什麼需要處理」等問題時立刻使用此 skill。也適用於盤中(「現在有什麼要做」)和盤後(「今天還有什麼沒做」)場景。不要等用戶說 /todo 才觸發,只要問的是「下一步行動」的問題就應該用。
Works with
Categories
Daily portfolio briefing with 3 tiers: /briefing (quick ~1min), /briefing full (~3min), /briefing deep (~5min). Briefing is an agent skill from PatrickSUDO/fadacai-portfolio. Daily portfolio briefing with 3 tiers: /briefing (quick ~1min), /briefing full (~3min), /briefing deep (~5min).
Briefing fits situations like: productivity & Automation work in your project.
Run `npx skills add PatrickSUDO/fadacai-portfolio --skill briefing -a claude-code`. Or copy the skill folder (.agents/skills/briefing in PatrickSUDO/fadacai-portfolio) into .claude/skills/briefing in your project. Claude Code loads it when a task matches its description.
Run `npx skills add PatrickSUDO/fadacai-portfolio --skill briefing -a codex`. Or copy the skill folder (.agents/skills/briefing in PatrickSUDO/fadacai-portfolio) into .agents/skills/briefing in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add PatrickSUDO/fadacai-portfolio --skill briefing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/briefing, .gemini/skills/briefing, .github/skills/briefing and .opencode/skills/briefing in your project.
Going by SKILL.md and its folder, Briefing needs the command-line tools its instructions call (python3, codex, uv and claude) and credentials named FRED_API_KEY and X_BEARER_TOKEN. Our summary lists: Python 3; A credential in FRED_API_KEY; A credential in X_BEARER_TOKEN.
SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Briefing is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 15k tokens (SKILL.md is roughly 61k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Briefing: Process Inbox (telegramdesktop/tdesktop, 33k stars), Perform Task (telegramdesktop/tdesktop, 33k stars), Continue (telegramdesktop/tdesktop, 33k stars) and Telegram (bubbuild/bub, 1.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
PatrickSUDO (a GitHub user) maintains it in PatrickSUDO/fadacai-portfolio, which has 142 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 7, 2026.
Source: PatrickSUDO/fadacai-portfolio on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.