Keeping technical documentation current with AI

A deployment script changes, but the runbook still lists the old command. The next person following it loses time figuring out what went wrong. A small code change has become a documentation problem.
An AI agent can help by comparing a change with the documents it affects and preparing an update. The useful result is a draft that an engineer can check quickly, with links to the code and decisions behind it. Someone still needs to be responsible for the change.
From a code change to a documentation update
Start with a narrow trigger, such as a merged pull request that changes an API or a configuration option. Give the agent access to the relevant repository and documents, then ask it to:
- Identify instructions or examples affected by the change. A removed configuration flag, for example, may still appear in the setup guide.
- Propose an update and cite the commit, specification, or ticket that supports it. Flag anything it cannot establish from those sources.
- Run the documentation build, link checks, and tests for the examples in an isolated test environment.
- Open a pull request with the proposed text, the checks performed, and any questions for the reviewer.
The person maintaining that part of the system reviews the update before it is merged. Review can catch mistakes, but it does not guarantee accurate documentation. Examples still need testing, and operational instructions need checking against the environment where they will be used.
Release notes can follow a similar process: draft a summary from merged changes, link to the relevant tickets, and have the team check what users need to know.
Keep the reasons behind a decision
An agent can summarize a recorded architecture discussion. If the sources do not explain why a team chose one design over another, it should ask for that context. A plausible explanation is not evidence of the team's reasoning.
An architecture decision record also has a different purpose from a setup guide. It preserves a decision made at a particular time. When the design changes, add a new decision and mark the previous one as superseded, keeping its history available.
Other maintenance work worth trying
The same approach can help with a dependency upgrade: prepare the change, link to the release notes, identify affected code, and attach the test results. For a bug report, an agent can attempt a reproduction and propose a failing test for the team to inspect.
A system inventory needs more than repository access. It may need deployment records and a maintained list of owners. Make those sources explicit so the agent can report missing information instead of filling the gaps.
Start with one document you can verify
Choose a repository and a document type whose examples can be tested safely, such as a local setup guide. A runbook can be useful too, but its commands may change infrastructure or data. Test those commands in an isolated environment with suitable permissions; access to the documentation should not imply permission to run them in production.
Review the first few proposed updates together. Check whether they found real omissions, whether the sources support the text, and how much correction the reviewer needed to do. Expand the scope when those drafts save the team work. If they create more review work, adjust the trigger, context, or checks before adding more documents.