If software can generate music, art, code, circuits, and so much more, why can't computers replace lawyers for drafting agreements?

My background is in software development, and my undergrad education was in science - I want it to be possible to generate contracts with code. If I could turn my legal practice into a software program, the drafting side of my work could be scaled up immensely. Even a rough draft generated by a computer would be quite useful. But technology is very far from making this possible. Why?

The first problem is that the business side of drafting is poorly defined. People think they know what they want, but they either can't express it, or don't actually know what they want. Often the latter. But even if it was well-defined, it wouldn't be well-defined within the universe of possible legal terms (which are derived from the business terms). It's very difficult for even skilled lawyers to undertake that sort of review, and suggest the most useful of the many possibilities.

The problem with transforming requirements into contracts is very similar to the problem of generating computer programs automatically, because the programmer does much more than simply mechanically create instructions to accord to a standard. The programmer is engaging in a creative process of evaluating the many possibilities to translate a business requirement into code. If the person acting for the business (e.g. a manager) could transform the ideas into a defined set of terms for the programming team then they probably wouldn't need the programmers. Despite massive advances in computers, the demand for programmers has only increased. And computer programs are more obviously amenable to being generated by computer programs than legal contracts are, because they're natively code.

The second difficulty with automatically generating contracts is that businesses are usually rapidly moving forward, and don't have time to define every legal risk and every solution. Even if they did, how would they do this without the special knowledge of lawyers, who do that for a living? The computer that does this would have to somehow analyse the shifting trajectory of the business and identify current and future needs like a lawyer does. But the lawyer bases this analysis on many factors outside of what a program would have available, such as understanding the company's enforcement options if things go wrong, the power balance between the parties, the need for reasonable terms to avoid negotiation, expected formats that other parties will accept, etc. The broad principles could perhaps be captured in a program but even very skilled people find this process hard to do. Software just isn't close to good enough.

Of course, it's possible to generate a filled-in template (using Docusign or a more sophisticated program like Docassemble). And it's possible to generate templates that have been widely used, by extracting documents from EDGAR, or scraping them off websites. But these templates are of questionable quality, and usually not suited to the business use. To pick between templates is itself a difficult task, and it's often easier to start a new agreement template than to reuse an existing one. The reason for this is that contracts are more art than science. They're also marketing documents, intended to convince someone to sign the agreement by clearly spelling out the deal. Agreements are best when they fit the exact circumstances of a particular business, and this is a very open-ended task that relies on human creativity, experience, and skill. In new areas, like cryptocurrency, existing templates may be especially poorly suited for the business's needs. Trying to transform this task into a program that generates suitable contracts isn't possible. Standard form agreements like NDAs have already been standardized by many platforms, and that does work, but even in the world of a very specific type of contract like an NDA, there's a wide variety of possibilities.

The day that computers can replace lawyers for drafting agreements is the day that we wake up in a radically transformed economy because the task is so challenging that it would mean that many other easier tasks would have been solved as well. It's hard to picture what that would be, as it would radically change the world, but I suspect it would be a world where lawyers simply move on to other parts of the work that they do, or perhaps migrate more strongly into the business roles that they often serve.