Catch Docs Drift at the PR: A Free‑Tier Bot That Drafts Impact Notes
Description and use
A bot analyzes merged PRs, drafts a doc‑impact note, and posts it as a comment, prompting a human to update documentation.
Problem
Documentation drift occurs when code changes are merged without updating docs, leading to runtime errors and user confusion.
Outcome
The bot reduces documentation drift by automatically flagging potential doc updates for every merged PR, keeping token usage predictable and requiring only a human to approve changes.
Workflow
- Fetch merged PRs since last run
- Build prompt with PR title, changed files, and truncated diff
- Send prompt to free LLM and receive JSON with impact label, candidate doc files, and note
- Post the note as a comment on the PR or open a draft PR against docs
- Human reviews the note and decides whether to edit docs
Evidence
The bot runs on a schedule, not on every push. That keeps token spend predictable and the server stateless.
The model returns a JSON classification: impact label, candidate doc files, and a short note.
A typical small PR lands in the low thousands of input tokens. A large diff can exceed the context window and force truncation.
- Record date: 2026-09-08T18:16:28.128Z