Our product documentation had the problem every fast-moving SaaS company's documentation has. It was written by whoever had time, when they had time, and it described the product as it was on the day they wrote it. Six months later, half of it was wrong in small ways that only a customer would notice.
The code, on the other hand, was always right. By definition. It's the product.
So I stopped trying to fix the documentation and started generating it from the source instead.
Step one: read the codebase, write the guides
I pointed Claude at our repositories and worked through the product feature by feature. For each one: what does this actually do, what are the configuration options, what happens at the edges, how does it interact with the other features. Not what the old docs claimed. What the code does.
Out of that came a full set of guides. Feature guides for every capability in the platform. Integration guides for each of the systems we connect to. Product guides for how the pieces fit together. Written from the code, then reviewed by me and by the people who own each area, because the code tells you what happens but not always why, and a guide with no why is a reference manual, not documentation.
This took evenings over a few weeks. Five years ago it would have been a technical writer's entire quarter, and they'd have needed an engineer next to them the whole time.
Step two: put it where people are
A pile of accurate documentation is only useful if it's where people look. So the guides went into Confluence, which is where our internal knowledge already lived. That's the source of truth. Everything else derives from it.
From Confluence, a pipeline built in n8n pushes the customer-facing guides to our Intercom help centre automatically. Update the Confluence page, the help centre updates. No manual republishing, no drift.
The same pipeline also feeds every page into a Pinecone vector database. That's what powers AskEva, our internal knowledge assistant. Ask it anything about the product in plain English and it answers from the current documentation, with references, so you can check it.
Step three: make it available to Claude
This is the bit that changed how the company works. I wrapped the vector database in an MCP server so that Claude, wherever anyone's using it, can query the knowledge base directly.
So a salesperson drafting a proposal can ask what the platform does for a specific compliance requirement and get the right answer from the docs. A support agent can check how a feature is meant to behave before telling a customer it's a bug. A new engineer can ask how a subsystem works and get an accurate answer without interrupting anyone. And the customer support bot, Fin, draws from the same well, so customers get the same answers the staff do.
One source. Written from the code. Flowing automatically to Confluence, the help centre, the internal assistant, the customer bot, and Claude itself.
Step four: keep it true
Generating the docs once solves the problem once. The product changes every week. Left alone, the guides would drift out of date exactly the way the old ones did, just from a better starting point.
So the last piece is a set of Claude agents that run every day against the source code changes. They look at what merged, work out whether any of it changes what the documentation says, and where it does, they draft the update and open a pull request. Not to the code. To the docs. I get a PR that says, in effect, "this feature's behaviour changed yesterday, here's the guide rewritten to match, approve or reject".
Most days there's nothing, or something small. Occasionally there's a real change I'd have missed, because it was buried in a PR whose title didn't mention the user-facing effect. I read every one before merging. That's deliberate. The agents are good at spotting that something changed and describing what. They're less reliable on whether a customer needs to know, and a guide that documents every internal tweak is as useless as one that documents nothing.
The effect is that the documentation tracks the product without anyone remembering to update it. The human effort has gone from writing the docs to approving a diff, which is a job I can do in the gaps between meetings, and do.
Then the team did the same with customer calls
Once the pattern existed it was obvious where else to apply it. We had hundreds of recorded customer conversations in Gong that most of the company couldn't access. One of the engineers took the same approach, and did it better than my version: pull them out, index them, extract the structured insights, wrap it in an MCP server. Now anyone can ask what customers have been saying without a Gong licence. I've written about that separately.
What went wrong
Reliability, for a while. The internal assistant had a stretch where it was flaky enough that people stopped trusting it, and a knowledge tool people don't trust is worse than no tool because they stop checking. We fixed it, but the dip in usage took longer to recover from than the bug did. Trust is asymmetric like that.
The code doesn't tell you everything. It tells you what the system does. It doesn't tell you what the customer is trying to achieve, or why the feature exists, or the three things people commonly get wrong. That has to come from humans, and the first draft of the guides was noticeably thin on it until the product team went through them.
And the daily agents took a while to get right. The first version proposed a docs change for nearly every merge, including refactors that changed nothing a customer would see. Reviewing that was more work than writing the docs by hand would have been. Tightening what counts as a user-facing change fixed most of it, but the judgement call about what's worth documenting is still mine, and I don't think that bit should be automated. A PR I rubber-stamp isn't a review.
Why I did it myself
Because it wouldn't have got done otherwise. Documentation infrastructure loses to product work on every backlog, correctly. But it's exactly the kind of thing a technical leader can build in the gaps if they're willing to stay on the tools. It's not glamorous. It's plumbing. And it's made almost every team in the company a bit faster and a bit more accurate, which is more than most of my meetings achieve.