feat(engine+skill): cash 呈現層 — 現金上卡 + 入金判讀 + 無錨點誠實揭露 (refs #171)#175
Merged
Conversation
#174 地基層讓 engine 吃得到現金(load_cash_flows/cash_position/state.cash), 但只進對帳記憶、還沒對用戶「可見可用」。這個 PR 接呈現層(#174 body 的「還沒做」清單): - build_card_data 加 `cash` 欄(TR_JSON 上卡):Claude 讀 balance/weight/reliable/recent_net_deposit 寫進敘事 - build_honesty_ledger 加 `cash_reliability` key:只在「有可誤導的 weight 但不可信」(reliable=False + weight 非 None)觸發; weight=None(算不出、不上卡)不空吠。判定進 engine、文案留 Claude(照 #82 機制,Step 3 gate 無需新增 prose) - render() Rich 文字卡總覽段:reliable 才報「帳戶現金 $X(佔帳戶 Y%)」+ 本期淨入金;無錨點盲算不上卡 - SKILL Step 0 收現金餘額錨點 UX(TR_CASH JSON,讓 cash_weight 通電)+ Step 1 card.cash 欄位說明 - card-spec 現金與入金判讀段:reliable 講帳戶權重 + 「這筆入金加深還是解集中度」;無錨點誠實邀請補餘額 - EVALS B17 + 契約測試(TR_JSON cash key / HL cash_reliability)+ 單元測試(三情境觸發矩陣) 驗證:run_all 十套全綠;全 13 mock persona 產卡核對 cash 欄位 + cash_reliability 觸發一致(零 INCONSISTENT); 錨點路徑 render 顯示「帳戶現金 $19,284(佔帳戶 37%)」;入金判讀端到端(TR_PREV_END 過濾本期存款)。 呈現層需視覺核對,交棒乾淨 session 完成(#174 交棒理由)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ed52d14 to
7af4d37
Compare
This was referenced Jul 12, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
這個 PR 做什麼
接續 #174 的現金 ingestion 地基層(engine 吃得到現金、算對、存進對帳記憶)——這個 PR 是呈現層,把現金功能對用戶做到「可見、可用」。完成 #174 body「還沒做」清單的全部項目。
Scope(呈現,非地基)
build_card_data加cash欄(TR_JSON 上卡):Claude 讀balance/weight/source/reliable/recent_net_deposit寫進敘事build_honesty_ledger加cash_reliabilitykey:只在「有可誤導的 weight 但不可信」(reliable=False+weight非None)觸發;weight=None(算不出、不上卡)不空吠。判定進 engine、文案留 Claude(照 [design] 卡片呈現一致性完全依賴執行當下的 self-check 自律,沒有機械式強制 #82 機制,Step 3 gate 的既有第 4 項自動涵蓋,SKILL 主檔零新增 guardrail prose)render()Rich 文字卡總覽段:reliable才報「帳戶現金 $X(佔帳戶 Y%)」+ 本期淨入金;無錨點盲算不上卡TR_CASHJSON,讓cash_weight通電,這是功能真正通電的關鍵)+ Step 1card.cash欄位說明reliable講帳戶權重 +「這筆入金加深還是解集中度」;無錨點誠實邀請補餘額cashkey / HLcash_reliability)+ 單元測試(三情境觸發矩陣)honesty 三路徑(
cash_reliability精確觸發)null測試 / 核對
run_all十套全綠cash欄位 +cash_reliability觸發一致,零 INCONSISTENT(day_trader/insufficient/swing 的 csv_sum「看似 100% 現金」正確觸發揭露,不裸報假值)render:帳戶現金 \$19,284(佔帳戶 37%)TR_PREV_END過濾本期存款 →recent_net_deposit=10000→ 卡面「本期淨入金 $10,000」事實鏈路(CLAUDE.md 連動)
build_honesty_ledger↔ SKILL Step 1card.cash+ honesty 列舉 ↔ card-spec 現金與入金判讀段 ↔ EVALS B17 ↔test_tr_json_contract的HL_KEYS/TR_JSON_KEYS。refs #171 · 承接 #174(地基層)
🤖 Generated with Claude Code