DannyMac180/skills/tree/main/modsmith/templates/assumption-ledger
assumption-ledger
为 Claude 提供 register_assumption 工具,并在提示列上方显示本回合的假设、决定和考虑过但未完成的事项。
关于这个 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实际为$.state.get({ plugin: 'assumption-ledger', key: 'pending' }),其中包含当前回合的事项,直到下个回合开始;只有这个 mod 自己的turn.completehook 运行后,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;shownis only filled once this mod's ownturn.completehook has run, so another mod'sturn.completemay see it empty) and put theconsidered-not-doneitems 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 offthrough$.command.run: that stops recording, moves the tool behind ToolSearch and remembers the choice. Writing{ plugin: 'assumption-ledger', key: 'isOff' }throughstate.setalone only stops recording: the tool stays in the list (itstool.describeanswer is cached until invalidated) and the choice is not remembered. - A shared project board.
/assumptions writegives 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.