Docket是一套为AI代理生成的代码创建证据记录的工具系统。1它通过捕捉AI编写代码的完整实现过程(包括尝试的方案、验证步骤和失败记录),并将其与最终的代码差异进行对比,为每个代码块生成证据密度评分,帮助代码审查者快速定位缺乏充分证据支撑的部分。1
该工具的证据密度评分范围从0到1,其中测试覆盖率贡献最多0.5分,通过的检查贡献0.3分(若检查转为绿色则0.35分),类型检查和静态检查各贡献0.1分,人工接触也贡献0.1分。1Docket支持多个AI代理,包括Claude Code、Codex CLI和opencode。1系统会对比记录的编辑输出与实际属性来验证代码归属,当重放过程中出现不一致时会标记为未知代码行。1
在实际应用中,Docket报告的属性识别率在不同场景下差异较大,整体diff层面的识别率分别达到40%、94%和37%,其中未知代码被明确标识出来。1所有证据记录存储在代码库内而无需外部服务或网络连接,采用孤立分支存储并配以签名凭证保护。1该工具的规范以Apache 2.0 JSON Schema形式发布。1
Docket is a tool designed to generate detailed per-commit evidence records for code written by AI agents.1 Rather than examining only the final diff, Docket captures the complete implementation journey undertaken by the agent, including attempted approaches, verification steps, and failed attempts.1 This comprehensive record is then compared against the final code changes to produce an evidence density score for each code block, enabling reviewers to identify and focus on sections lacking supporting evidence.1
The evidence density scoring system ranges from 0 to 1, with specific weightings assigned to different verification methods: test coverage is worth at most 0.5 points, passed checks contribute 0.3 points (or 0.35 if previously failing tests are turned green), type and static checks add 0.1 points each, and human contact also contributes 0.1 points.1 Attribution is verified against recorded edit output, with unknown lines explicitly marked when the replay process detects disagreement.1 Real-world testing has reported attribution rates of 40%, 94%, and 37% across entire diffs, with unknown code clearly identified in each case.1
Docket supports multiple AI agents including Claude Code, Codex CLI, and opencode.1 The system requires no external accounts or network connectivity; all records are stored directly within the repository on an orphan ref with signed credentials.1 The tool's specification is available as an Apache 2.0 JSON Schema.1
评论
还没有评论,欢迎留下第一条。