DEV Community

ujja
ujja Subscriber

Posted on

When Your AI Agent Reads Outdated Docs, Who Checks the Docs?

This is a submission for the MLH x DEV Writing Challenge

What I Built

I built Docgrity, a documentation integrity tool that finds where your documentation disagrees with itself before it confuses you — or the next AI agent working on your codebase.

The idea came from a surprisingly simple problem.

I opened one of my own documentation files and realised I didn't believe a word of it.

With AI-assisted coding, every agent session can leave more documentation behind: PLAN.md, TODO.md, implementation notes, architecture decisions, and sometimes another architecture document because the agent didn't notice the first one existed.

Eventually, you can end up with a repository full of documentation and no reliable way to know what's still true.

And now there's a bigger problem:

AI agents read those docs too.

A stale or contradictory document isn't just confusing for a developer anymore. It becomes context for the next agent, which can then make decisions based on information that was never correct, or is no longer true.

So I built Docgrity to make documentation itself something we can check.

What does Docgrity find?

Docgrity scans documentation and surfaces:

  • Duplicates — different documents saying essentially the same thing
  • Contradictions — conflicting claims, shown side by side
  • Open questions — unanswered questions and stale TODOs

The important part is that every finding comes with evidence.

No finding without a receipt.

The source text is quoted verbatim and verified against the actual file before a finding is reported. If the system can't prove a finding, it gets dropped.

Docgrity currently works across repositories and Confluence.

For repositories, there is a VS Code extension, CLI, and GitHub Action.

For Confluence, I'm building an early-stage Forge app that scans spaces for the same documentation integrity problems.

Why I built it

I didn't want another documentation tool that asks developers to maintain more metadata or another service that needs to own their documentation.

The goal was something much simpler:

Make the documentation you already have more trustworthy.

Docgrity is local-first, has zero infrastructure, doesn't require a hosted service, and is MIT licensed.

Try it out:

Demo

The easiest way to see Docgrity is to run it against a repository containing documentation that has evolved over time.

For example:

npm i -g docgrity
docgrity scan --open
Enter fullscreen mode Exit fullscreen mode

The CLI scans the documentation and produces findings with the supporting evidence behind each one.

There is also a VS Code experience with an interactive dashboard, clickable evidence, and draft GitHub issues that you can review before posting.

code --install-extension ujjavala.docgrity
Enter fullscreen mode Exit fullscreen mode

And Docgrity can run in CI through GitHub Actions, so documentation checks can become part of the development workflow.

- uses: ujjavala/docgrity-vscode/action@main
Enter fullscreen mode Exit fullscreen mode

For Confluence, Docgrity scans a space and surfaces the same kinds of problems across pages rather than limiting the analysis to a Git repository.

Try Docgrity for VS Code

Try Docgrity for Confluence

Docgrity can use Ollama for local AI inference in the CLI.

This was important to the design because documentation can contain information that teams don't necessarily want to send to an external AI service.

With Ollama, the analysis can run locally, keeping the documentation and model interaction on the developer's machine.

The AI isn't treated as the final authority, either. Docgrity uses it to identify potential duplicates, contradictions, and unanswered questions, but then verifies the resulting findings against the actual source documents.

That led to one of the core design principles of the project:

No finding without a receipt.

The model can suggest something is wrong. The evidence has to prove it.

I also built the Confluence integration as an Atlassian Forge app, allowing the same documentation-integrity approach to be applied to documentation that lives outside the repository.

Hackathon Experience

The hackathon gave me a good excuse to take an idea that had been sitting in my head and turn it into something people can actually run.

What started as a question — "What if we could automatically tell when our documentation stopped agreeing with itself?" — became a working tool across a CLI, VS Code extension, GitHub Action, and Confluence integration.

The part I'll remember most is how quickly an idea can grow once you start building it.

The original problem sounds small: documentation goes stale.

But once AI agents are involved, documentation becomes part of the context those agents use to make decisions. That makes documentation quality much more interesting — and much more important — than I initially thought.

I ended up building Docgrity around that idea:

Documentation integrity for you, your team, and your agent friends. 🤖

If you have a repository or Confluence space you think you know well, run a scan.

If it finds something that makes you go "wait… that's still in there?" — I'd love to hear about it.

Top comments (0)