Skip to main content
S

dsh-evidence-audit

sas-159/dsh-evidence-audit

Checks the agent’s own claims against the tool output saved in the same session: each sentence carrying a path, a number with a unit, inline code or a URL is graded supported, partial or no evidence, with the anchors it could not find listed. Coverage shows on the composer pill. Heuristic and local — no LLM call, no receipt log, nothing uploaded.

Install

dsh plugin --profile web add github:sas-159/dsh-evidence-audit

README

dsh-evidence-audit

「取证」——把 Agent 的最后一条回答,逐句对回它自己调用过的工具输出。

在 conversation.composer.dock 里加一枚胶囊,点开给出:

  • 证据覆盖率:可核对句子里,有多少能被工具输出支撑
  • 三档判定:有据 / 部分有据 / 没找到证据
  • 缺失清单:每个未被支撑的句子,列出它声称的锚点(路径、数字、行内代码、URL)里哪些在工具输出中找不到

它解决什么问题

Agent 会"总结得很像真的":说测试通过、说覆盖了多少、说改了哪个文件。这些话对不对,没人逐句核对。这个插件把"结论"与"证据"并排放在一起——不是判断对错,而是指出哪些话没有依据。

判定规则(启发式)

  1. 从最后一条助手回答里切出可核对的句子(含路径、带单位的数字、行内代码或 URL)。
  2. 从每个工具调用的 argsRaw 与结果文本里建立证据语料。
  3. 逐锚点做忽略空白的大小写无关匹配:
    • 全部命中 → 有据
    • 部分命中 → 部分有据
    • 全部未命中 → 没找到证据
    • 数字出现但单位不同(如声称"42 个"、工具输出是"42 passing")→ 归为 部分有据,不算无据。

边界(写清楚)

  • 这是启发式锚点匹配,不是语义证明。它指出"工具输出里没提到",不等于该句错误。
  • 只审计会话里可见的工具输出;被裁剪或未加载进窗口的历史不在语料里。
  • 不联网、不读文件、不落盘:数据全部来自页面已持有的 Chat 快照。

安装

pnpm install
pnpm run build

然后用 plugin_manager install_bundle 指向本目录。

开发

pnpm run check   # tsc -p tsconfig.json
pnpm run build   # src/*.tsx -> dist/client.js + dist/index.js

Related plugins