AI in Practice / Automating Work

Contract Review Starts with a Flow Chart: From Process Description to System

A dark background with the headline: Contract review starts with a flow chart

If you want AI or a system to take on contract review, the first step is not choosing a tool. It is drawing the workflow. We built our contract review process in this order: standardize how requests come in, chart the flow, put the details into a written process description, and then build it into the system. Because the chart and the description came first, we never had to wonder what to build when it was time to implement. Had we started the other way around, we would have ended up bending the work to fit whatever screens the AI produced.

Fixing the entry point: starting with the request template

It started with handing contract request work over to another person. The first problem in any handover is not the contracts themselves but how requests are received. Who is asking, about which contract, for what, and by when? If every request looks different, the person receiving it has to start by asking questions every single time.

So we drafted a revision of the contract request template we used in Slack, adding a common block that every request must fill in. We settled the direction only after putting it to the AI agents we use as advisers on judgment calls. Alongside that, we prepared draft replies to requesters and a table that applied past real requests to the new template. Testing it against real cases makes it obvious where there are too many fields and where different people would read a field differently.

We had Codex review the draft four times and fixed what it found before accepting it. Once the entry point is fixed, the rest of the flow becomes easier to draw, because what is already in hand at the moment of the request is where the flow begins.

Charting the flow: AI adds too many steps

Next, we charted the contract review flow in HTML, from intake through signing to management in a contract ledger. Our inputs were legal reference materials and an existing checklist. We consulted AI on the design of the steps and used Claude Code to build the chart. We then had AI agents review the result with an acceptance mindset, checked how it displayed in a browser, and saved it to a shared drive.

The biggest lesson here was that AI will plausibly invent steps that are not in the source material. Across four rounds of review by Codex, most of the fixes were about steps that appeared nowhere in the materials, and about the chart covering a different scope from the materials. The neater a workflow chart looks, the more correct it seems. That is exactly why every box needs to be traced back to something in the original materials.

The value of a chart is that it exposes gaps and overlaps. In a written procedure, readers tend to skim past who makes the decision and where things get sent back. Once it becomes boxes and arrows, you notice boxes with no one deciding and send-backs with nowhere to return to.

The check itself is simple. Go through the boxes one by one and see whether you can say where that step is written in the legal materials or the checklist. A box you cannot answer for is a step the AI filled in. Some of those steps really are needed, but in that case we update the materials first and then keep the step in the chart. If the chart gets ahead of the materials, no one can tell which one is right.

A process description for the details and exceptions

A chart is good for seeing the whole, but it cannot carry detailed conditions. So we also produced a process description and a more detailed workflow chart in HTML. They were based on a requirements document, a table of decision rules, and a map that sorts out contract risks. The aim of including the risk map was to avoid a flow that examines every contract to the same depth. Which types of contracts, and which conditions, call for a closer look? We wrote those branch points into the chart as forks and into the description as conditions.

To build them, we had Claude Code write a Python script, and the script assembles the documents. Instead of rewriting documents by hand, we made it possible to rebuild them every time from the requirements and the rule table. That way, when requirements change, the chart and the description are far less likely to drift apart. Codex checked the finished documents six times, and we kept fixing until there were zero findings.

At this stage we also formally built two AI steps into the flow: AI reading the contract, and AI reading it ahead of time before a person looks at it. In other words, we decided where AI is used on paper, in the description, before anything else. If you keep adding AI later wherever it looks handy, it becomes unclear who is responsible for what. The documents were stored on our internal drive, and we set up the steps to send them to the people involved through Slack.

Turning the chart and description directly into the system spec

Finally, we built the process into an existing business system, based on the process description. We converted the description from HTML to text and used it as the spec to implement a mechanism that only lets the work move forward in order, from contract request to signing. If the previous step is not finished, the next one cannot start. Sequencing that used to depend on people paying attention is now enforced by the system.

Codex wrote the code and also reviewed the diffs. We confirmed the behavior on a test database. The scope of the implementation, and the conditions for accepting it, were finalized after consulting the AI agents. Release to production waits for human approval. AI can take the work as far as building it, but the decision to put it into production stays with people. We have not moved that line.

Looking back, there was almost no point during implementation where we were unsure what to do. What to build was already written in the chart and the description. The hard part of systematizing a process is not writing code. It is getting the work itself into consistent words.

What leaders should decide first

If you are thinking about bringing AI into contract review, decide the following before you compare tools.

  • Have a single entry point for requests. Decide where and in what form requests are received, and standardize the fields people fill in every time
  • Chart the flow from intake through signing to ledger management. Draw who decides and where things are sent back, as boxes and arrows
  • When AI produces a chart or document, check that every step is grounded in the original materials. Remove steps that are not
  • Decide in the process description, up front, which steps use AI. Do not add them later
  • Keep the decisions to release to production and to sign the contract with people. Widen what you delegate only once you are used to it

Once the flow is on a chart, the system can be built later. A system built without a chart forces you to reshape the work to fit it. Start by deciding who will draw that first chart.