Passer en français Book a Consultation

Documentation Should Be Treated as Code

AI agents now act on what we write. Business documentation deserves the same discipline as code: version control, reviews, owners and approvals.

For decades, we have been writing code to tell machines what to do. We created programming languages because machines couldn’t understand our language.

If we wanted a machine to do something, we had to explain it in a language it understood. And we had to be very precise.

One wrong instruction, and the whole thing could fail.

That’s why software engineers developed all these practices around code. Version control, code reviews, testing, approvals, deployments, etc.

But something fundamental has changed with AI.

Machines can now understand our language.

We no longer need to write Python or JavaScript to explain every task to a machine. We can simply write instructions in English, and an AI agent can understand them and execute them.

So here’s my question:

If our documentation is now being used by machines to execute tasks, why aren’t we treating documentation the same way we treat code?

Think about how we manage code

In software engineering, we don’t normally allow anyone to modify production code without some kind of control.

We have repositories where the code is centralized.

We have Git to track changes.

We have pull requests so that someone else can review what was changed.

We have automated tests to make sure that changes don’t break existing functionality.

And we have approval processes before deploying to production.

All of this exists for a simple reason: code controls how our systems behave.

Now think about documentation.

In many organizations, documentation is everywhere.

Some processes are documented in Word files. Others are in SharePoint, Confluence, Excel, or even emails.

Sometimes two people working in the same department have different versions of the same procedure.

And in many cases, nobody really knows which version is the correct one.

Until recently, this was mostly a knowledge management problem.

But with AI agents, I think it becomes something much more serious.

Documentation is becoming executable

Let’s take a simple example.

Imagine a company that has documented its process for onboarding a new employee.

The documentation explains which accounts need to be created, which approvals are required, and which departments need to be notified.

Traditionally, an employee would read this documentation and execute the steps.

If something didn’t make sense, they could ask someone.

Now imagine that the company gives the same documentation to an AI agent and asks it to automate the onboarding process.

The agent will use that documentation to determine what actions to take.

What happens if the documentation is outdated?

What happens if two departments have different versions of the process?

What happens if someone changes the approval requirements without informing the other teams?

We are no longer talking about someone reading incorrect information.

We are talking about a machine potentially executing incorrect instructions.

And unlike humans, AI agents can execute these instructions hundreds or thousands of times.

Of course, agents can ask questions and detect inconsistencies when designed to do so. But we cannot rely on that alone to compensate for poor documentation.

This is not just a software engineering problem

I’ve worked in several industries throughout my career. Mining, logistics, restaurants, insurance, and financial institutions.

One thing I’ve noticed is that every industry relies heavily on documentation.

Take mining, for example.

Mining engineering involves planning, surveying, ventilation, and many other activities. Behind these activities, there are procedures, calculations, Excel files, and documented processes.

In logistics, you have processes for inventory management, purchasing, supplier selection, and order processing.

In restaurants, you have recipes, menus, food preparation procedures, and processes for introducing new products.

These industries are very different, but they all have something in common.

They depend on people following processes correctly.

And those processes are documented somewhere.

Now imagine introducing AI agents into these environments.

An agent helping with inventory management needs to understand the company’s inventory procedures.

An agent supporting mining engineers needs access to the correct engineering processes.

An agent helping a restaurant manage its operations needs to understand how that restaurant operates.

So the quality of the documentation becomes directly connected to the quality of the work performed by the agents.

That’s why I believe documentation management is going to become increasingly important as companies adopt AI.

We already have a solution

The interesting thing is that we don’t necessarily need to invent something completely new.

Software engineering has already solved many of these problems.

We call the approach Docs as Code, and the broader operational practices are sometimes called DocOps.

The idea is relatively simple.

Instead of keeping documentation scattered across different applications, we could manage it using the same principles we use for code.

For example, imagine a company where each department has its own documentation repository.

The finance department has its repository.

Human resources has another.

Operations has another.

The documentation is written in Markdown files.

For those who aren’t familiar with Markdown, it’s simply a text format that is easy for both humans and machines to read.

When someone wants to modify a procedure, they don’t just open a document and change it.

They propose a modification.

Someone responsible for that process reviews the changes.

The changes are approved and merged into the main documentation.

Git keeps track of who changed what, when, and why.

We can even introduce automated checks to identify broken references, missing information, or inconsistencies.

And because the documentation is centralized and versioned, AI agents can be configured to use the approved version.

Of course, we would still need an application that makes the documentation easy for employees to navigate and understand.

The goal isn’t to force everyone in the company to become a software developer.

The goal is to bring the discipline of software engineering to documentation management.

Documentation should have owners

There’s another important point.

In software engineering, systems generally have owners.

If something breaks, someone is responsible for investigating and fixing it.

I think documentation should work the same way.

Every important process should have an owner.

Someone responsible for making sure the documentation reflects how the company actually operates.

And when a process changes, updating its documentation should be part of that change.

Not something we plan to do three months later.

Because if an AI agent is using that documentation, the outdated procedure could continue being executed until someone notices the problem.

AI is an accelerator

I’ve said this before, and I still believe it.

AI is an accelerator. It can accelerate your productivity, but it can also accelerate your mistakes.

If your processes are well documented, consistent, and properly maintained, AI agents can become extremely useful.

But if your documentation is outdated, contradictory, or scattered across different systems, giving it to an AI agent doesn’t magically solve the problem.

You might simply end up automating the confusion.

For years, companies have invested heavily in making their code reliable.

Version control, testing, reviews, approvals, and continuous integration have become standard practices in software engineering.

I think we need to start applying the same thinking to business documentation.

Not because documentation suddenly became more important.

But because machines are now capable of acting on what we write.

And that changes everything.

This article was first published on Substack.

← All articles