ClaudeMods
☰
ZH-TW
● 0 人在線上 · 瀏覽 0 次
贊助提交作品
GitHub 儲存庫 · 發布者 DannyMac180

assumption-ledger

提供 Claude 一個 register_assumption 工具,並在提示列上方顯示這個回合的假設、決定與考慮過但未完成的事項。

DannyMac180@DannyMac180

DannyMac180/skills/tree/main/modsmith/templates/assumption-ledger

已翻譯

關於這個 mod

assumption-ledger

Claude 會取得一個 register_assumption 工具。它工作時會使用這個工具記下三種類型的事項:

  • assumption:它想當然接受、沒有檢查的事情。
  • decision:道路上的分岔,以及它選擇的方向。
  • considered-not-done:它想過更好或更完整的修正,卻選擇不做。這一項最值得注意。模型常常看見正確解法後就略過,而你永遠不會發現。

回合結束時,清單會依類型分組顯示在提示列上方:

Ledger for this turn [ Dismiss ]
Considered, not done (1)
 · Add retry on 429 (out of scope)       [ Do it ]
Assumed (1)
 · Node 20 is the runtime

Do it 會傳送後續訊息,要求 Claude 完成該項目,或用一行說明為什麼應保持未完成。Dismiss 會清除橫條。新的回合也會清除它。

命令

| 命令 | 作用 | | --- | --- | | /assumptions | 列印這個工作階段的每筆記錄,依類型分組,並顯示它來自哪個回合。 | | /assumptions write [path] | 將工作階段記錄追加到工作目錄中的 DECISIONS-log.md(或指定的 path)。除非執行這個命令,否則不會寫入磁碟。 | | /assumptions off | 停止記錄,並將工具移到 ToolSearch 後方,讓模型不再看見它。跨工作階段記住這個設定。 | | /assumptions on | 重新開啟。 |

成本

這個 mod 不會自行呼叫模型。它的成本來自模型使用工具所消耗的內容:

| 時機 | Token | 說明 | | --- | --- | --- | | 每次要求 | 約 200 個輸入 token | 工具名稱、說明與 schema 位於工具清單中。說明不會變動,因此第一次要求之後屬於提示快取讀取(約為價格的十分之一)。 | | Claude 記錄每筆事項時 | 約 40 到 80 個輸出 token,另加 2-token 結果 | 一次工具呼叫。Claude 常在同一步與其他工具呼叫批次執行;否則下一步會從快取重新讀取上下文。 | | 沒有值得記錄的回合 | 額外 0 | 工具說明告訴模型略過顯而易見的內容。 | | /assumptions off 與 on | 每次重建一次快取 | 工具是否列出會改變,工具清單也是快取前綴的一部分。 | | Do it | 一個新回合 | 你要求 Claude 做更多工作,所以成本取決於該工作的成本。 |

橫條與工作階段記錄不消耗 token。/assumptions 會將清單作為 transcript 中的命令輸出列印;模型是否會像讀取其他命令輸出一樣在下一回合讀取這一列,尚未檢查。

組合方式

  • 任何繪製在提示列上方的內容。 橫條會把其他 mod 繪製的內容放在自己的清單下方({await next(e)}),而 survey 佔用橫條或回合正在執行時會讓開。
  • 後續步驟監督器或問答分支。 詢問「這解決原始目標了嗎,是否偷懶了?」的分支可以讀取這個 mod 的狀態($.state.get({ plugin: 'assumption-ledger', key: 'pending' }),其中保存目前回合的項目直到下一回合開始;只有這個 mod 自己的 turn.complete hook 執行後,shown 才會填入,因此另一個 mod 的 turn.complete 可能看到它是空的),並把 considered-not-done 項目放進問題。這比讓分支猜測漏了什麼更省成本,也更誠實。
  • 模式選擇器或模型路由器。 模式會透過 $.command.run 執行 /assumptions off 來關閉帳本:停止記錄、將工具移到 ToolSearch 後方,並記住選擇。只透過 state.set 寫入 { plugin: 'assumption-ledger', key: 'isOff' } 只能停止記錄:工具仍在清單中(它的 tool.describe 回答會在失效前快取),而且不會記住選擇。
  • 共用專案看板。 /assumptions write 會提供其他 Claude 或儀表板可以讀取的檔案。

安裝與載入

claude --plugin-dir /path/to/assumption-ledger

或者將資料夾複製到 mods 資料夾。載入前檢查:

claude plugin validate /path/to/assumption-ledger
claude plugin test /path/to/assumption-ledger

以 Claude Code 2.1.286 建置並檢查。

安裝

請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。

claude plugin marketplace add DannyMac180/skills
claude plugin install assumption-ledger
原文 / README

assumption-ledger

Claude gets a tool, register_assumption. While it works it uses the tool to write down three kinds of thing:

  • assumption: something it took for granted and did not check.
  • decision: a fork in the road and the way it went.
  • considered-not-done: a better or fuller fix it thought of and chose not to do. This is the one to watch. Models often see the right solution and then skip it, and you never find out.

When the turn ends, the list shows above the prompt, grouped by kind:

Ledger for this turn [ Dismiss ]
Considered, not done (1)
 · Add retry on 429 (out of scope)       [ Do it ]
Assumed (1)
 · Node 20 is the runtime

Do it sends Claude a follow-up asking it to do that item, or to say in one line why it should stay undone. Dismiss clears the band. A new turn clears it too.

Commands

| Command | What it does | | --- | --- | | /assumptions | Prints every entry from this session, grouped by kind, with the turn each came from. | | /assumptions write [path] | Appends the session's entries to DECISIONS-log.md (or path) in the working directory. Nothing is written to disk unless you run this. | | /assumptions off | Stops recording and moves the tool behind ToolSearch, so the model stops seeing it. Remembered across sessions. | | /assumptions on | Turns it back on. |

What it costs

The mod makes no model calls of its own. Its cost is what the model spends using the tool:

| When | Tokens | Notes | | --- | --- | --- | | Every request | about 200 input tokens | The tool's name, description and schema in the tool list. The description never changes, so after the first request this is a prompt-cache read (about a tenth of the price). | | Each entry Claude records | about 40 to 80 output tokens, plus a 2-token result | One tool call. Claude often batches it with other tool calls in the same step; when it doesn't, the step after it re-reads the context from cache. | | A turn where nothing was worth noting | 0 extra | The tool's description tells the model to skip the obvious. | | /assumptions off and on | one cache rebuild each | Changing whether the tool is listed changes the tool list, which is part of the cached prefix. | | Do it | one new turn | You are asking Claude to do more work, so that turn costs what the work costs. |

The band and the session log cost nothing in tokens. /assumptions prints its list as a command-output row in the transcript; whether the model reads that row on the next turn, as it does other command output, was not checked.

Composes with

  • Anything drawing above the prompt. The band draws whatever other mods draw there beneath its own list ({await next(e)}), and it steps aside while a survey holds the band or a turn is running.
  • A next-steps supervisor or quiz fork. A fork that asks "did this solve the original goal, was it lazy?" can read this mod's state ($.state.get({ plugin: 'assumption-ledger', key: 'pending' }), which holds the current turn's entries until the next turn starts; shown is only filled once this mod's own turn.complete hook has run, so another mod's turn.complete may see it empty) and put the considered-not-done items in its question. That is cheaper and more honest than asking the fork to guess what was skipped.
  • A mode selector or model router. A mode switches the ledger off by running /assumptions off through $.command.run: that stops recording, moves the tool behind ToolSearch and remembers the choice. Writing { plugin: 'assumption-ledger', key: 'isOff' } through state.set alone only stops recording: the tool stays in the list (its tool.describe answer is cached until invalidated) and the choice is not remembered.
  • A shared project board. /assumptions write gives a file another Claude or a dashboard can read.

Install and load

claude --plugin-dir /path/to/assumption-ledger

Or copy the folder into your mods folder. Check it before loading:

claude plugin validate /path/to/assumption-ledger
claude plugin test /path/to/assumption-ledger

Built and checked against Claude Code 2.1.286.

更多類似作品