DocDrift: Your Code Drifted. Your Docs Didn't Have To.
说明与用途
DocDrift 自动检测并修复代码与文档之间的漂移,生成可审阅的 PR 以更新 README 等文件。
问题
When code changes (renamed env vars, default ports, moved endpoints) the README and other docs become outdated, leading to broken references that simple string‑matching tools miss.
结果
DocDrift automatically detects and patches documentation drift, producing a human‑reviewable PR that updates README tables, env examples, and route references while preventing hallucinated links and preserving markdown structure.
工作流
- Intake repository and branch
- Extract code symbols via tree‑sitter AST
- Parse docs (.md, .env.example) into typed targets
- Gemma synthesizes drift findings
- Gate 1 validates findings against extracted symbols
- Patch docs in a shadow copy
- Gate 2 re‑parses patched docs to ensure tables stay well‑formed
- Tone the diff for readability
- Emit unified diff and PR metadata
证据
DocDrift compares values and shapes, not just string existence.
Gate 1 then drops every claim the AST can't prove — no phantom links survive — and Gate 2 applies the proposed patch to a shadow copy of your docs, re‑parses it, and refuses edits that would break a markdown table.
The output is a unified diff, a humanized PR title and body, and a full step trace with timings.
- 记录日期: 2026-10-26T06:11:15.916Z