From Courtrooms to Code: A Lawyer's 30-Year Quest to Structure Legal Thinking
Reimagining the Law: How AI and Logic-Based Legal Algorithms Can End Court Congestion and Automate Legal Reasoning Without Sacrificing Accuracy
I am a modern lawyer living in Chicago, bootstrapping a software company that aims to do something audacious: accurately and instantly draft estate planning documents for attorneys and everyday people alike. Building this platform means I also continue to practice law—to survive financially, yes, but also to maintain perspective. Balancing court appearances with developing software is challenging, yet profoundly insightful.
Recently, I represented a client in Spokane County Superior Court, appearing remotely from Chicago. Scrolling through the docket for my mandatory hearing, I froze: 65 pages of scheduled cases, each page listing 24 cases—that’s over 1,500 cases in a single day. Spokane’s own studies confirmed the obvious: the court system doesn’t have the capacity for this volume. The problem isn’t unique to Spokane—it’s nationwide.
Legal Systems are Breaking: In and Out of Court
Court congestion is just one outward symptom of the deeper dysfunction plaguing our legal systems. It reflects a structure built not for efficiency but for antiquated processes that fail to meet modern needs. The same issues confronting overwhelmed court systems—cost, inefficiency, and mistrust—are the barriers I’m tackling in estate planning.
Yet the problem runs even deeper than inefficiency. Our legal system, built on rules, still treats legal knowledge as words on a page instead of structured, interconnected objects. This is a fundamental mismatch between how law functions and how modern tools like AI process it. Legal research is stuck in the stone age, relying on keyword searches rather than embracing a structured, rule-centric framework.
The "Brown" Revelation: A Case Isn't Just Text, It's an Object
The epiphany hit me while pondering a peculiar AI failure: Why does artificial intelligence keep making up fake court cases? "Brown v. Board of Education," 347 U.S. 483 (1954), isn’t just text to lawyers—it’s as real as a chair or table. It’s a foundational object in our legal universe, the case that overturned "separate but equal" and redefined civil rights in America. Yet, to AI, "Brown v. Board" is just another language pattern, akin to "once upon a time" or "happily ever after."
Looking at AI's hallucinations transported me back to my early programming days, before Object-Oriented Programming (OOP) revolutionized software development. Back then, we wrote endless “if-then” statements, like trying to describe a car by meticulously listing every possible thing it could do. OOP changed everything by letting us think in objects. A car became a thing with properties (color, speed) and behaviors (accelerate, brake). Suddenly, complex systems became manageable.
That led to my "aha" moment: What if we treated law like OOP? What if we reimagined legal constructs—not as words, but as objects with properties and relationships? Court cases like Brown could become objects in a structured legal framework, eliminating the ambiguity AI struggles with today.
From Text to Objects: Reimagining Legal Rules
My experience as both a lawyer and developer has taught me that legal reasoning maps beautifully to object-oriented programming. Consider this example from estate tax law:
class WashingtonEstateTax:
def __init__(self):
self.exemption = 2.193 # 2024 exemption amount in millions
self.rates = {
10: 0.10, # First $1M
20: 0.14, # Next $1M
# ...progressive rates
}
def calculate(self, taxable_estate):
tax_base = max(0, taxable_estate - self.exemption)
return self._apply_marginal_rates(tax_base)
This isn’t just programming—it’s the product of decades of legal experience, distilled into logic gates. When I tested the model with my software platform, DeepSeek, it successfully applied the algorithm to a complex Washington state estate tax scenario. Washington is one of 12 states with its own estate tax, separate from federal regulations, making it a perfect proving ground for AI precision.
DeepSeek correctly identified thresholds, applied progressive tax rates, and handled deductions, exemptions, and federal-state interactions. It didn’t just retrieve information—it understood and executed legal principles with accuracy. This success demonstrated that a structured, rule-centric AI model can make law function practically and efficiently.
Scaling This Logic Beyond Estate Planning
This rule-centric approach can extend seamlessly to court cases. Take a negligence claim, for example. Using OOP principles, you could encapsulate the elements of negligence into an object:
class Claim:
def __init__(self, elements):
self.elements = elements
def evaluate_elements(self, facts):
return all(facts.get(el, False) for el in self.elements)
class NegligenceClaim(Claim):
def __init__(self):
super().__init__(elements=["duty", "breach", "causation", "damages"])
# Example Analysis
facts = {
"duty": True,
"breach": True,
"causation": True,
"damages": False # Missing damages
}
claim = NegligenceClaim()
result = "Motion Granted" if not claim.evaluate_elements(facts) else "Motion Denied"
With this structure, legal determinations become mechanically precise, enabling instant analysis of cases like motions to dismiss under Rule 12(b)(6).
Why This Matters: Eliminating AI Hallucinations
Current AI struggles with citations and case law because it treats them as unstructured text rather than structured data. By reframing legal concepts as objects:
Hallucinations are eliminated, as AI can validate citations via defined properties.
Rules become instantly adaptable when laws change.
Legal automation becomes scalable, verifiable, and precise.
Imagine legal research no longer relying on keyword searches but delivering structured, rule-based results. Imagine courts with dynamic dockets prioritizing cases by complexity and urgency, empowered by instant analysis of the facts and claims presented.
This approach could fundamentally transform the legal system’s ability to deliver justice efficiently and equitably.
Beyond Automation: Building a Legal Operating System
The possibilities are vast:
Courtrooms optimized by real-time docket management.
Statutes and case law as modular frameworks, updating dynamically.
Access to justice scaled like cloud computing.
The key isn’t replacing lawyers but augmenting them. By transforming legal knowledge into executable logic, we can empower both practitioners and everyday people to navigate the law effectively.
A Call to Innovate
What started as estate planning software has transformed into a broader vision: rebuilding legal reasoning from the ground up. Practicing in subzero Chicago winters has taught me pragmatic optimism. This shift isn’t just possible—it’s necessary.
If we can teach AI to follow estate tax rules, we can teach it to follow the law. But the real question is: How fast can we adapt?
Developers, lawyers, and technologists alike: What legal process should we structure next? Let’s build the framework for tomorrow’s legal system—together.