← Back to HAQQ Blog

Legal Engineering: The 2026 Guide to AI-Powered Legal Workflows

By Nicolas Dawalibi · · Updated · 9 min read · Guides

What legal engineering is, what a legal engineer does, and how the TIRO pattern breaks a clause into testable steps, with a worked decomposition of an IP indemnity.

Key facts

Legal engineering is designing, building and maintaining systems that do a defined piece of legal work the same way every time: reviewing a lease against a playbook, extracting renewal dates from 500 vendor contracts, screening a marketing email against advertising rules. The system breaks the task into steps, gives each step one job, checks each step's output, and hands the lawyer a result with its reasoning and sources attached.

Three skills meet in it. Legal knowledge says what correct work looks like. Software practice (types, tests, version control, logs) keeps the system reliable. AI design decides which steps a model should do, which a rule or a database lookup should do, and where a human signs off. A prompt is one component of that system, in the same way that a single query is one component of a database application.

In a firm the role often sits between the knowledge-management team and IT. Some legal engineers are lawyers who learned to code; others are engineers who spent years beside a practice group. What they share is the habit of asking "how would we know this step failed?" before asking "which model should we use?"

What is the TIRO pattern?

TIRO reads a clause or a task as four parts. The Trigger is the event that brings the clause into play. The Inputs are the facts and documents the clause needs. The Requirements are what must be checked or worked out, and they split into four kinds: Definitions (what the terms mean), Validations (conditions that must hold), Arbitration (which rule wins when two conflict) and Transformations (calculations that turn inputs into a result). The Output is what the clause produces: an obligation, a right, an amount, or nothing.

The value of the pattern is practical. Each Requirement becomes one step a system can run and one thing a reviewer can check. When an AI review gets a clause wrong, TIRO tells you where: a missed definition, a validation skipped, a conflict resolved the wrong way.

How do you decompose a clause with TIRO? A worked example

Here is a typical IP indemnity from a SaaS agreement. We wrote it for this example; it is close to what we see in supplier paper.

12.1 The Supplier shall indemnify the Customer against all Losses arising from any claim that the Services infringe the Intellectual Property Rights of a third party, provided that the Customer notifies the Supplier in writing within ten (10) Business Days of becoming aware of the claim, and subject to clause 14.2.

Step 1: Trigger

A third party makes a claim that the Services infringe its IP rights. A claim about something the Customer built on top of the Services is a different event, and the clause should not fire for it. That distinction becomes the first check.

Step 2: Inputs

Step 3: Requirements

KindWhat the step does in clause 12.1How we run it
DefinitionsResolve "Losses", "Business Days" and "Intellectual Property Rights" from clause 1Retrieval from the same contract, quoted back with clause numbers
ValidationsNotice was in writing; notice was within 10 Business Days of awareness; the claim concerns the Services, not Customer modificationsDate arithmetic in code, using the contract's Business Day definition; a model reads the claim to classify its target
ArbitrationClause 12.1 says "subject to clause 14.2"; check whether clause 14.3 carves IP indemnities out of the cap, and which prevails if they conflictA model compares the clauses and must quote both; a lawyer confirms any conflict it flags
TransformationsLosses claimed, minus anything excluded by the Losses definition, limited by the cap if it appliesCalculation in code, with every input shown

Step 4: Output

One of three results, each with the clauses quoted: the Supplier must pay a stated amount (capped or uncapped); the obligation is in doubt because notice was late, with a note that the effect depends on the governing law; or the clause does not apply because the claim targets Customer modifications. A lawyer reviews the second and third outcomes every time.

Put this way, a review that only says "IP indemnity present, standard" is plainly incomplete. It skipped the notice validation and the cap arbitration, which are where most disputes over this clause start. The decomposition also shows that two of the four requirement steps need no language model at all: counting business days and applying a cap are arithmetic.

How does a TIRO decomposition become a workflow?

Each requirement step becomes a stage with a typed input and output, so the next stage receives structured data instead of free text. Independent stages run in parallel (the IP indemnity, the limitation of liability and the termination clauses can be reviewed at the same time), and a final synthesis stage reconciles them, because two parallel findings can contradict each other. In our own data-room experiment on synthetic documents, a 3-agent pipeline found the cross-document issues that a single long prompt missed: see single prompt vs a 3-agent swarm.

Two design rules matter more than the number of agents. First, every citation a model produces is checked against a source before it reaches the lawyer; Mata v. Avianca is the standing reminder of what happens otherwise. Second, cost follows routing: a cheap model can classify a document, while the arbitration step deserves the strongest model you have. We measured that trade-off in what an AI-drafted motion costs.

Good candidates repeat often, have a checkable right answer, and follow a playbook that already exists in someone's head or a precedent bank. In our experience the order to try them is roughly this:

In HAQQ these workflows ship as legal skills: packaged, tested procedures that run on Justinian, with the steps, sources and approval points visible to the lawyer. Firms can also build their own from the same parts.

Keep the data question in view from the first day. Where documents are processed, under whose keys, and who can see each matter affect privilege and client confidentiality, and they are much harder to change after a workflow is in use. Our security guide covers the questions to ask.

Further reading

The TIRO vocabulary used here comes from Robert Taylor's book Legal Engineering: Building AI-Powered Legal Workflows with Multi-Agent Architectures. Its first part covers the foundations (the technology stack, TIRO, multi-pass pipelines, parallel execution, integration with Word track changes, and privilege and security). Its second part applies them to ten workflows, which make a useful reading list:

FAQ

What is legal engineering?

Legal engineering is designing, building and maintaining systems that perform a defined piece of legal work the same way every time, such as playbook review, deadline extraction or regulatory screening. The task is split into steps, each step is checked, and a lawyer approves the result with its reasoning and sources attached.

What does a legal engineer do?

A legal engineer maps a legal task with the lawyers who do it, decomposes clauses and procedures into steps, chooses whether each step is a model call, a deterministic rule, a database lookup or a human review, builds a test set with known right answers, measures the workflow before and after every change, and owns where client data is processed.

What is the TIRO pattern?

TIRO stands for Trigger, Input, Requirements, Output. The Trigger is the event that brings a clause into play, the Inputs are the facts and documents it needs, the Requirements are the Definitions, Validations, Arbitration (conflict rules) and Transformations (calculations) it performs, and the Output is the obligation, right or amount it produces.

How is legal engineering different from prompt engineering?

Prompt engineering improves a single instruction to a model. Legal engineering designs the whole workflow around it: which steps use a model at all, how each step's output is checked, how citations are verified against sources, where a lawyer signs off, and how the system is retested when a model changes.

Do you need to code to become a legal engineer?

It helps. Many legal engineers are lawyers who learned enough programming to build and test workflows, or engineers who worked alongside a practice group for years. The core skill is decomposing legal work into steps with checkable outputs; tools such as HAQQ's legal skills let firms run engineered workflows without building the software themselves.