Skip to main content
← Blog

Your codebase could document itself — here's who's building that, and how

· Mick Brzeziński

  • AI agents
  • documentation
  • developer tools

Documentation rots because code has a compiler and a test suite, and prose has neither. Nothing fails when a doc goes stale — until an agent reads it as ground truth and ships the bug.

That shift is why a wave of tools is now racing to make documentation maintain itself — the repo as its own living wiki. This is a map of that space: who’s building it, and the four approaches they take. Not a ranking — the category moves monthly, and half the “always up to date” claims mean “up to date as of the last time it ran.”

Why the pressure is suddenly real

Teams have tolerated stale docs for decades. What changed is the reader. Tony Karrer notes that agent rules files “go stale quickly” and “can make things worse, with agents following outdated or rigid instructions.” Harness puts it flatly: instruction drift is as dangerous as code drift. The same industry that split the docs surface in two — README for humans, an AGENTS.md for agents, now in tens of thousands of repos — also needs that second surface to stay true.

The four approaches

A map of four approaches to keeping a codebase documented, shown as categories, not a ranking. Hosted wiki generators (DeepWiki, Google Code Wiki, deepwiki-open) point at a repo to produce a browsable wiki that lives on the vendor and refreshes on a schedule. In-repo doc maintainers (Driver.ai, DeepDocs, Mintlify) generate Markdown and open a pull request when code changes, so the docs are version-controlled. Code-coupled or executable docs (Swimm, doctest/Sphinx) bind the doc to specific code so drift is flagged or fails a test. Roll-your-own agent in CI (the Intility pattern, Claude Code or Copilot in Actions) reads the PR diff on merge and proposes a docs PR you review. A footer notes the adjacent agent-context layer: AGENTS.md, MCP, Context7.

1. Hosted wiki generators. Point a tool at a repo and get a browsable wiki — diagrams, chat, file-linked summaries. DeepWiki (from Cognition, the Devin company) is the best known: swap github.com for deepwiki.com on any public repo. Google Code Wiki is the big-vendor entrant (public preview; private repos via a waitlisted Gemini CLI extension). There’s an open-source clone, deepwiki-open, if you want to self-host. The shared trade-off: the wiki lives on the vendor, and it’s a snapshot — it regenerates on a schedule, not on your merges. DeepWiki’s own docs cite up to a five-day re-index lag for standard repos, or a weekly refresh if you add their badge.

2. In-repo doc maintainers. Instead of a hosted site, these write Markdown back into the repo and open a pull request when the code changes — so the docs are version-controlled and yours. Driver.ai (into a driver_docs/ folder) and DeepDocs both work this way, per their own docs. Mintlify sits on the hosted/hybrid line — a polished docs site whose content its GitHub App can push back to a repo. Trade-off: you own the artifact and review every change, but you’re trusting an AI to write the diff.

3. Code-coupled / executable docs. The most rigorous approach doesn’t ask a model to be truthful — it binds the doc to the code so drift can’t hide. Swimm pioneered coupling docs to specific snippets and flagging them when that code changes (a human still writes the fix). Older and bulletproof: doctest / Sphinx, where examples in the docs are executed and a stale one fails the build. Trade-off: a real guarantee, but narrow — it covers the example/reference slice, not the “why.”

4. Roll-your-own agent in CI. No product at all: an agent runs in your pipeline, reads the pull-request diff on merge, and opens a docs PR you review. The cleanest worked example is Intility’s — Claude Code in a GitHub Action, grounded in the diff, opening a PR by default. Trade-off: cheapest and fully under your control; you maintain the workflow.

And underneath all of it, the agent-context layerAGENTS.md, MCP, docs servers like Context7 — isn’t a wiki, but it’s where this is heading: documentation as a surface agents read directly, not just humans.

What none of them fully solve

Three gaps cut across every approach.

Accuracy. AI-written docs can be confidently wrong. DeepWiki was caught through 2025 calling LibreOffice’s build system Buck when it’s Make, and recommending a VS Code extension that doesn’t exist — with a citation. Specific cases get patched; the failure mode doesn’t. Mintlify, to its credit, names it: the most common documentation-AI error isn’t fabrication, it’s staleness — a generator grounded in last week’s code writes a perfectly confident, perfectly wrong page.

Whether it should exist at all. The sharpest skeptic, Fabrizio Ferri Benedetti, calls auto-generated wikis “documentation theater as a service” and argues the docs worth having — intent, rationale, trade-offs — are exactly the parts a generator can’t derive. Auto-generating “the id is the id” just industrializes noise.

Audience. Every tool here picks one reader. None generates a plain-language layer for a product owner and a code-accurate layer for a developer from the same source — still an open gap.

How to choose

Skip the word “living” and ask three things instead.

Documentation accuracy over time as code keeps changing. A schedule-based wiki starts accurate, then drifts steadily downward as the code moves beneath it, snapping back only when it's regenerated. An on-merge approach stays near the top — it dips at each code change and recovers immediately when an agent opens a docs PR.

  • When does it update? On a schedule (a snapshot) or on every merge (continuous)?
  • Where do the docs live? On the vendor, or as version-controlled files in your repo you can diff and own?
  • How does it stay honest? Grounded in the actual diff, citing source, and proposing a PR a human reviews — or auto-committing prose nobody checks?

There’s no universal winner; there’s a fit for how your team already works. A solo public project might just want DeepWiki’s free snapshot.

So what

For most teams the honest shape isn’t a hosted wiki from a $25-billion startup. It’s the cheapest version of the right pattern: an agent, on merge, reading the diff and opening a docs PR you review like any other. You can wire that up this quarter, and you own every line.

So before you pick anything: when your code changes on Friday, what — or who — updates the doc your agent will trust on Monday?

Honesty note, since this whole piece is about not trusting the “living” label: DeepWiki’s misfires above are third-party documented, but Driver’s and DeepDocs’s mechanics are their own stated behaviour — I haven’t stress-tested either. All tool facts here were checked in June 2026; this category changes monthly, so re-verify any single line before you bet on it.