Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

The 2-Edit Rule for AI-Drafted Docs: A Free-Tier Workflow That Keeps Humans Responsible

Description and use

The 2‑Edit Rule requires at least two human line edits per AI‑drafted section, enforced by a CI script, ensuring documentation quality without extra cost.

Problem

Documentation drafted by AI can be merged without human verification, leading to hallucinated or incorrect content.

Outcome

The workflow enforces a verifiable human edit count, reducing hallucinations and ensuring documentation quality without extra cost.

Workflow

  • 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.

Evidence

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.

Source

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.

Source

The script runs in any POSIX environment. On GitHub Actions, a minimal workflow triggers on pull requests.

Source

  • Record date: 2026-09-05T18:00:15.067Z