How a Lawyer Wrote Her First Code with AI and Automated Compliance
An IT industry lawyer got tired of waiting in the backlog queue and opened an IDE for the first time. With an AI assistant instead of tutorials — in a few…
AI-processed from Habr AI; edited by Hamidun News
A lawyer from the IT industry decided to write his own tool for automating compliance processes — and opened an IDE for the first time in his life. Without a technical education, without programming courses. Spoiler: the code worked.
When a Lawyer Opens an IDE
Most lawyers live in a world of Word, Excel, and twenty-page contracts in small print. Their tools are templates, precedents, internal knowledge bases. Programming, as a rule, does not figure into this list.
The author of the Habr article faced hours of routine: check each clause of a contract for compliance with internal policies, document deviations, generate a report. Every time, manually. He could have submitted the task to the IT department — but understood that it would end up in the backlog for several quarters.
So he decided to do it himself. First step: download VS Code. Second step: accept that he couldn't do it without help.
At this stage, an AI assistant entered the process: something between a mentor and a pair programmer.
AI as a Pair Programmer
The approach turned out to be straightforward: describe the task in plain language, get working code, figure out why it works (or why it doesn't), move forward. Without the feeling that you're "asking the wrong thing" — AI doesn't judge for basic questions. What helped at each stage:
- Describing the logic of the task in words → AI translates it into code
- An unclear error → explanation without technical jargon
- Need a regex for parsing legal text → a ready-made template with an explanation of what and why
- Unclear project structure → step-by-step advice on organizing files
- Wrote the first version yourself → AI does a review and explains what can be improved and why
Key takeaway: AI doesn't write code instead of you. It helps you understand what exactly needs to be written — and why exactly like that. The difference is fundamental.
What Came Out in the End
After a few weeks of work, a working tool appeared. A Python script reads a contract in text format, searches for clauses by keywords and patterns, checks them against the company's internal policies, marks deviations, and generates a report in Excel. This is not a production solution. There's no beautiful interface, not all possible file formats are handled, there are no autotests (the author learned what those are during the process). But the tool works — and saves several hours a week.
"I didn't become a developer.
But I became a person who can explain to a developer what exactly needs to be done — and in his language."
What This Means
The story of a lawyer-coder illustrates one of the major shifts that AI brings to the profession: lowering the entry barrier for creating tools. Previously, writing a working program without a technical education was practically impossible. Now it's long, not easy, requires patience — but realistic.
For companies, an important shift: automation can come not just from the IT department. Specialists from law, finance, operations begin to solve their own tasks independently — faster than waiting in the backlog queue.
For lawyers — a separate signal. The ability to describe a task so that AI can solve it, and to understand the result obtained, is already becoming a competitive advantage. Not because lawyers should replace developers. But because the line between "who makes the rules" and "who codes them" is becoming thinner.
Want to stop reading about AI and start using it?
AI News is a curated feed of AI/tech news. Hamidun Academy teaches you to use AI systematically in your work.