Documenting Code Nobody Remembers: A Git-History Draft Pipeline A developer created a Python script that builds a documentation context pack from git history, enabling AI models to draft documentation with cited evidence instead of invented rationale. The tool extracts recent commits, blame lines, and markers like TODO and FIXME, and forces claims to reference commit hashes, addressing the gap between AI drafts and human sign-off in code documentation. A recurring theme in this week's DEV discussions: AI turned every developer into a reviewer, but nobody wrote the contract between the model's draft and the human's sign-off. That gap hurts most in documentation, where the code itself rarely explains the "why." The ticket said: "document the billing module." Six files, zero inline comments, three quiet years in git. Inside proration.py there is a constant, 0.095 , that no test explains. Blame says six years old; the commit message says "fix billing." You are now a documentation archaeologist. One command pinpoints when that constant appeared: git log -S '0.095' --oneline -- src/billing/proration.py The pickaxe search gives you the commit, but not the reasoning. That split — evidence versus rationale — is the whole job. A drafting model with no context will politely invent a rationale for 0.095 . The fix is not a "better" prompt; it is a narrower job description. Feed the model an evidence pack drawn from git history, and force every claim to cite a commit hash. The script below builds that pack for any path in a repository: recent commits, blame lines, and markers that usually hide a decision. It uses plain subprocess and runs on Python 3.9+. bash /usr/bin/env python3 """Build a citations-ready context pack from git history. Usage: python build docs context.py