Lawyers can code, and should

Par Jonathan Pyle, Contract Performance Officer at Philadelphia Legal Assistance and the developer of Docassemble, a free and open-source expert system for guided interviews and document assembly.

Most lawyers are not computer programmers and do not want to be. They think of computer programming as a skill that « tech people » have and lawyers do not. As a result, most lawyers think that document automation, or automating legal work in general, is not in their job description. However, lawyers may actually be well-suited to automate their own work.

I was a computer programmer before I was a lawyer, and based on my experience, I think lawyer skills have a lot in common with computer programming skills. Being a lawyer involves thinking deliberately, methodically, carefully, precisely, unambiguously, and literally. It means anticipating possibilities that have a low probability of occurrence and planning what needs to be done if such possibilities occur. Lawyers listen to their clients explain what they want to accomplish, and then they translate those goals into legal language and legal processes.

Computer programmers do all of these things as well, except that they write computer code instead of legal documents, and the quality of their work is tested by whether the computer program crashes, rather than by whether their client loses a case or ends up on the disadvantageous side of a transaction. I believe many lawyers would be very good at « computer programming the law » if they put their minds to it.

The nice thing about computer programs is that they are repeatable; you can invest time thinking carefully about a process on behalf of one client, and if you transfer that thought into a computer program, you can run it again for a second client, and you do not have to spend as much energy applying the same thinking. Each client will present somewhat different circumstances, and you can add logic to your computer program to account for those different circumstances. Just as a lawyer becomes more competent with experience, so can a computer program become smarter over time.

Many lawyers will agree that simple legal documents like leases and mortgages can be automated, but they will argue that more complex legal documents need to be created manually by lawyers. However, complexity has never been a barrier to automation. You can order a product from Amazon and it will arrive at your door in less than a day; there is nothing « simple » about that, but the process is almost entirely automated. Why should law firms not automate processes that are similarly complex?

Lawyers may also argue that their thinking cannot be automated because it considers « soft » factors, or making judgment calls in an environment of uncertainty. However, these are not barriers to automation. For example, the input into the computer program could be « how aggressive does your client want to be on a scale from 1 to 10, » and the computer program could do different things depending on that subjective value. « Judgment calls » are also automatable. Amazon.com makes a « judgment call » when it infers that because you looked at one product, you might also be interested in another product. It does this by programming computers to apply statistics to data. Lawyers could do this as well by entering a series of « judgment calls » into a computer in the form of inputs (relevant facts) and outputs (legal judgments), and asking the computer to guess the correct judgment based on a new set of facts. The computer will not make the right judgment every time (neither will a lawyer) but it might have surprisingly good insights.

I do not think lawyers can be replaced with robots, and I do not think « replacing » human legal professionals is the point of legal document automation. At a minimum, document automation can help speed up internal processes, for example by automating the drafting of retainer agreements. Next, it can help create rough drafts of more complex legal documents, which can not only save a lawyer time, but may help remind the lawyer about considerations they may have overlooked. Next, it may allow a law firm to transform some of its services into products; for example, a client who needs  an employment severance agreement could log onto the law firm’s web site, answer a series of questions, and then download a robust agreement that incorporates the expertise and judgments of the law firm’s lawyers. Such product-ized legal services may be fully or partially automated; for example, clients may feel better about relying on the automatically-generated document if one of the law firm’s attorneys spends a few minutes looking it over.

Attorneys interested in automating their work have a variety of technology options. Commercial options include Microsoft Power Automate, ContractExpress, HotDocs, Leaflet, Forte, Doxsera, Documate, and Neota Logic. As a lawyer who knows how to code, I saw a need for a document automation tool built on the principles of the free and open-source software movement, so I developed my own platform, Docassemble, which is free and open-source. (For more information, visit https://docassemble.org.) Docassemble has a steeper learning curve than other platforms, but it is powerful because it lets you incorporate open-source software into your automation solutions.

I would encourage any attorney to build skills in document automation. Once they have those skills, they may find ways to automate things that nobody else ever thought about automating, and they may find that they enjoy « computer programming the law. »