Our Docs Write Themselves Now:
Exploring GitHub Agentic Workflows

Our Docs Write Themselves Now: Exploring GitHub Agentic Workflows

Technical documentation is a challenge for most product teams. The primary issue is keeping it up to date with your changing code. In the AI era especially, it's become harder than ever. The velocity of pull requests has gone up, and it's easier and easier for documentation to fall behind.

You can and should get AI to write documentation as you go, but that's difficult to police at scale. It's hard to check in a review whether documentation has been added. And even if you can police that, how do you tell whether existing documentation is now out of date because of what you've changed in the pull request?

This week I decided to try and tackle this problem at OfferZen and figure out if there was a way to automatically generate and update technical documentation as we work. That's not to say that, as engineers, we shouldn't be thinking about our documentation and updating it anyway. Just that having an extra safety net to continuously keep things up to date as part of the process is valuable.

What I found was that GitHub Agentic Workflows have been released as a technical preview, and they had some really interesting examples of doing exactly this. One example, which I pretty much copied and adjusted for our setup, was the daily docs updater. The way it works is it runs on a set schedule, looks at all the pull requests merged in the last 24 hours, and then reviews your documentation. It checks whether the changes have been captured in the docs, and whether existing documentation needs to be adjusted based on the context of those pull requests. It then puts together an overall pull request for you to review with all the documentation changes, so you as the human still have control. You can make edits if you need to, close the pull request, or update your prompt - things aren't just going to go off the rails. It becomes part of your daily workflow, and in the long run that's going to make a very big difference.

Example of pull request created by the daily doc updater workflow
Example of a Pull Request created by the daily documentation updater

In addition to this, I took a step I've been meaning to work on for a while - adding an MCP server to our documentation site with appropriate authentication. The MCP server itself is simple. It exposes just three tools: search the docs, get a specific doc, and list all available docs. That's it. From there, it's up to the LLM or agent to take that documentation content and do something useful with it. You can use it in Claude Code, Claude Desktop, n8n, Cursor - wherever our team members might be when they want access to the technical documentation. Now that we're going to have constantly updated docs, this felt like a really solid next step to make sure people can fully utilise them wherever they are.

Article content
Article content

If you're interested, go take a look at the GitHub Agentic Workflows documentation. Beyond just daily docs updating, they've got a bunch of examples of similar patterns. There's one for continuous triage that automatically summarises, labels, and cleans up issues. There's one for continuous code simplification that creates pull requests to simplify patterns and align things. They've got examples for continuous test improvement, CI failure hygiene, repository health reporting, and all sorts of other things.

GitHub agentic workflow ideas

You can leverage these workflows to build an army of agents helping your team ship faster and ship higher quality code.

Definitely worth checking out!

To view or add a comment, sign in

Others also viewed

Explore content categories