Inspiration
I worked for 6 years and 7 months at the leading global law firm Ashurst (now Ashurst-Perkins Coie). I found in my area of practice, planning and land use law, that due diligence on land for M&A transactions was done manually, was time consuming and often bogged down junior associate time. That is why I created LawTerra, to solve this problem I experienced as a junior lawyer.
What it does
LawTerra automates the process of legal due diligence on land. Most companies that are being bought or sold have land, and usually this due diligence is conducted manually by dozens of junior associates, who spend hundreds of hours to manually search a range of public and private databases for relevant checks (contamination, heritage listing, zoning etc.).
It works via the lawyer describing their matter in plain language, for example acquiring a warehouse site in Oakland for residential redevelopment. A GPT 5.6 agent reads the matter and works out which searches are relevant and why, then runs them (FEMA flood, EPA Superfund, zoning) and drafts a risk rated due diligence memo. This points out the red flags present that may affect the value of the land and therefore the company bought or sold.
Every finding is footnoted to the source record, each section ties back to what the client actually wants to do with the site, and there is a partner review step at the end because AI should do the diligence and a lawyer should own the judgment. You can also download the memo as a Word document in the firm template so the reviewing partner can put their name to it.
How I built it
The whole application was built in a single Codex session. I wrote a detailed spec first, drawing on how these memos are actually structured in practice, and let Codex build against it: Next.js app, a scoping agent route, search modules behind a common interface, memo generation, and the document view. GPT 5.6 does the runtime reasoning, both scoping the matter and drafting the memo. FEMA runs against the live public API with a timeout fallback, and Superfund and zoning use realistic cached records for the demo properties, labelled as such in the app. Deployed on Vercel.
Challenges I ran into
Model capacity errors on deadline day, a git repo I accidentally initialised in my home directory, a Vercel project name rejected for capital letters, and an environment variable that took three attempts to actually attach to the deployment. The bigger design challenge was avoiding hallucinations. This is done as the due diligence retrieves positive or negative results for different tests (rather than having to produce a written result). In addition all results are referable to the sources.
Accomplishments that I'm proud of
The memo actually reads like something a partner would sign. The scoping step reasons about the transaction, for example flagging that residential redevelopment may be affected by contamination of land, which practically affects M&A land deal value or may kill the deal. And I went from spec to deployed product in one day.
What I learned
As someone with a background as a lawyer I had to learn how to use Codex from scratch. I was able to use Codex as a non technical founder to build something that automates the most painful parts of my old job. The biggest lesson was that the quality of what Codex produces depends almost entirely on the quality of the brief you give it. That is a skill lawyers already have. I wrote a detailed spec the way I would instruct a junior associate, what the output should look like, what structure the memo follows, what the risk logic is, and Codex built against it far better than when I prompted loosely. I also learned to work with it iteratively rather than expecting perfection in one pass, paste the exact error back in rather than describing it, and keep the scope tight when the deadline is real. Domain expertise plus a clear brief turned out to matter more than knowing how to code.
What's next for LawTerra
More search types, more US jurisdictions and reaching out to test law firm interest in this product.
Built With
- chat-gpt
- codex
- law
- legal-experience
Log in or sign up for Devpost to join the conversation.