Your README lies. I built a tool that proves it with Kane CLI
READMEs lie. Not maliciously — they just drift. Someone changes the checkout flow, forgets to update the docs, and now the README promises a confirmation page that no longer exists. Nobody notices, because nobody re-reads the README after every deploy. The docs say the app does X. The app disagrees. Silently.
README 文件会撒谎。并非出于恶意,它们只是与实际情况脱节了。有人更改了结账流程,却忘记更新文档,于是 README 中承诺的确认页面便不复存在了。没人会注意到这一点,因为没人会在每次部署后都重新阅读 README。文档声称应用能实现 X 功能,但应用实际表现却并非如此,而且是悄无声息地不一致。
I built DocTruth to catch that. It takes the claims in your README, turns each one into a Kane CLI flow, runs it in a real browser, and reports TRUE or LIE per claim — with a sealed evidence pack (screenshots + logs) for every run. When a claim fails, the verdict goes back to the coding agent, which fixes the app and re-runs Kane until it passes. This is my entry for the Kane CLI Online Hackathon. Repo: https://github.com/Lacrade6/doctruth — demo video: https://www.youtube.com/watch?v=eQz1csnWiN8
我构建了 DocTruth 来捕捉这种现象。它会提取 README 中的声明,将每一项转化为 Kane CLI 流程,在真实浏览器中运行,并针对每项声明报告“真”或“假”——同时为每次运行提供密封的证据包(截图和日志)。当某项声明失败时,判定结果会反馈给编码代理,由其修复应用并重新运行 Kane,直到通过测试。这是我为 Kane CLI 在线黑客松提交的作品。仓库地址:https://github.com/Lacrade6/doctruth — 演示视频:https://www.youtube.com/watch?v=eQz1csnWiN8
The demo store that lied. To prove the idea I needed an app with a real bug, so I built PawShop: a tiny store with a home page, a product page, a cart, and a checkout. Three claims, written in plain English in claims.json: C1 — The product detail page shows the product name and price. C2 — Adding a product to the cart updates the cart count. C3 — Checking out shows a confirmation with an order number.
撒谎的演示商店。为了验证这个想法,我需要一个带有真实漏洞的应用,所以我构建了 PawShop:一个包含主页、产品页、购物车和结账功能的小型商店。claims.json 中用简单的英语写了三项声明:C1 — 产品详情页显示产品名称和价格。C2 — 将产品添加到购物车会更新购物车数量。C3 — 结账时会显示带有订单号的确认信息。
C1 and C2 were honest. C3 was a lie, and I planted it on purpose: the “Place order” button called submitOrder(), a function that does not exist. Click it and nothing happens. No error on screen, no confirmation, no order number. A human reading the README would never catch it. The README says checkout works. The button says otherwise.
C1 和 C2 是真实的。C3 是一个谎言,是我故意植入的:“下单”按钮调用了 submitOrder(),这是一个不存在的函数。点击它什么也不会发生。屏幕上没有错误提示,没有确认信息,也没有订单号。阅读 README 的人永远无法发现这一点。README 说结账功能正常,但按钮的表现却并非如此。
Run 004: Kane caught it. tool/run.mjs turns each claim into a kane-cli run flow and writes the verdict to report.md. The first real run came back 2 TRUE, 1 LIE: C1 TRUE — product detail shows “Cat Toy, $5”. C2 TRUE — cart goes to “Cart: 1 items”. C3 LIE — Kane clicked Place order and reported submitOrder is not defined. That is the whole point of the tool. Not a flaky test, not a timeout — a concrete, named failure, with the evidence pack in evidence/run-004/ to prove it. Anyone can open the NDJSON logs and see exactly what Kane did and what the page returned.
运行 004:Kane 捕捉到了它。tool/run.mjs 将每项声明转化为 kane-cli 运行流程,并将判定结果写入 report.md。第一次实际运行的结果是 2 个“真”,1 个“假”:C1 为真 — 产品详情显示“猫玩具,$5”。C2 为真 — 购物车变为“购物车:1 件商品”。C3 为假 — Kane 点击了“下单”,并报告 submitOrder 未定义。这正是该工具的核心意义所在。这不是不稳定的测试,也不是超时,而是一个具体的、明确的故障,并有 evidence/run-004/ 中的证据包作为证明。任何人都可以打开 NDJSON 日志,查看 Kane 到底做了什么以及页面返回了什么。
The fix, and run 005. The fix was one line in app/checkout.html: onclick=“submitOrder()” became onclick=“placeOrder()”. Nothing else changed. Then the loop closed itself — the agent re-ran the same claims through Kane: 3 TRUE, 0 LIE. Kane filled in the name (Alex Taylor) and address (123 Main Street), clicked Place order, and the confirmation appeared with order number PS-731959. Evidence in evidence/run-005/. Agent builds. Kane verifies. Kane’s verdict fixes the build. Kane confirms.
修复与运行 005。修复方法是在 app/checkout.html 中修改了一行代码:onclick=“submitOrder()” 变成了 onclick=“placeOrder()“。除此之外没有其他改动。随后循环自动闭合 — 代理通过 Kane 重新运行了相同的声明:3 个“真”,0 个“假”。Kane 填写了姓名(Alex Taylor)和地址(123 Main Street),点击了“下单”,确认信息随之出现,订单号为 PS-731959。证据位于 evidence/run-005/ 中。代理构建,Kane 验证。Kane 的判定结果修复了构建,Kane 进行了确认。
Why a tool, not a demo. A one-off demo proves the loop once. DocTruth is meant to be reused: Any README, any app. Claims are plain-English sentences in claims.json; point it at any app URL. The loop is automated. tool/run.mjs runs every claim through Kane, parses the results, and writes report.md. No hand-driving the browser. Evidence is sealed. Every run leaves a pack of screenshots and logs under evidence/, so a verdict can be checked without re-running anything — and without spending credits. The packs for run-004 and run-005 are in the repo; you can verify both runs without a TestMu account.
为什么要做成工具而不是演示?一次性的演示只能证明循环一次。DocTruth 的设计初衷是可复用的:适用于任何 README,任何应用。声明是 claims.json 中的简单英语句子;只需将其指向任何应用 URL 即可。循环是自动化的。tool/run.mjs 通过 Kane 运行每一项声明,解析结果并写入 report.md。无需手动操作浏览器。证据是密封的。每次运行都会在 evidence/ 下留下截图和日志包,因此无需重新运行即可检查判定结果,也无需消耗积分。run-004 和 run-005 的证据包都在仓库中;你无需 TestMu 账户即可验证这两次运行。
Try it. 1. Serve the demo app (any static server) python3 -m http.server 8137 —directory app. 2. Run the claims through Kane (needs kane-cli login first) node tool/run.mjs —base-url http://localhost:8137. 3. Read the verdict cat report.md. Requirements: Node 20+, Kane CLI (npm install -g @testmuai/kane-cli), and a TestMu AI account — 10,000 free credits cover the demo many times over.
试用一下。1. 启动演示应用(使用任何静态服务器):python3 -m http.server 8137 —directory app。2. 通过 Kane 运行声明(需先执行 kane-cli login):node tool/run.mjs —base-url http://localhost:8137。3. 读取判定结果:cat report.md。要求:Node 20+,Kane CLI (npm install -g @testmuai/kane-cli),以及一个 TestMu AI 账户 — 10,000 点免费积分足以覆盖多次演示。
What I took away from this. The interesting part was never the bug itself. It was how ordinary the lie was. A button wired to a function that doesn’t exist is the kind of thing that ships all the time, and the README keeps promising the feature for months afterward. The fix took one line; finding it took a browser that actually clicks the button. If your docs make promises, make something check them. DocTruth is my attempt at that — and the evidence packs are in the repo if you want to argue with the verdict. Built with Muse, tested with Kane CLI, for the Kane CLI Online Hackathon.
我的心得。有趣的部分从来不是漏洞本身,而是这种谎言是多么常见。一个连接到不存在函数的按钮是那种经常被发布到生产环境的问题,而 README 却在之后几个月里一直承诺该功能。修复它只需一行代码;而发现它则需要一个真正能点击按钮的浏览器。如果你的文档做出了承诺,就找个东西去验证它们。DocTruth 是我在这方面的尝试 — 如果你想对判定结果提出异议,仓库里有证据包。使用 Muse 构建,通过 Kane CLI 测试,专为 Kane CLI 在线黑客松打造。