The 2-Edit Rule for AI-Drafted Docs: A Free-Tier Workflow That Keeps Humans Responsible
说明与用途
2‑Edit 规则要求每个 AI 草稿段落至少有两条人工编辑,CI 脚本强制执行,提升文档质量且无额外成本。
问题
Documentation drafted by AI can be merged without human verification, leading to hallucinated or incorrect content.
结果
The workflow enforces a verifiable human edit count, reducing hallucinations and ensuring documentation quality without extra cost.
工作流
- 1. Schedule a job to identify docs needing updates.
- 2. Call an AI model (e.g., MonkeyCode free model) to draft sections, marking them with
<code><!-- Draft: model-<id>--></code>. - 3. Commit the draft to a PR.
- 4. Run CI script
<code>check-human-edits.sh</code>that counts non-model line edits and fails if fewer than two are present. - 5. Human reviewers add at least two meaningful edits outside the AI markers.
- 6. Merge the PR once CI passes.
证据
The 2-Edit Rule changes that. For every document section that the model drafts, a human must introduce at least two non-trivial line changes before CI permits the merge.
CI runs <code>check-human-edits.sh</code>, which fails if any <code>Draft:</code>-marked file has fewer than two human-authored line changes outside the marker lines.
The script runs in any POSIX environment. On GitHub Actions, a minimal workflow triggers on pull requests.
- 记录日期: 2026-09-05T18:00:15.067Z