---
title: "Legal Engineering: o guia 2026 dos fluxos de trabalho jurídicos com IA"
url: https://www.haqq.ai/pt/blog/legal-engineering-ai-powered-legal-workflows-guide
locale: pt
type: blog
description: "O que é engenharia jurídica, o que faz um legal engineer e como o padrão TIRO divide uma cláusula em etapas verificáveis, com o exemplo de uma indenização por PI."
category: "guides"
keywords: "legal engineering, legal engineer, what does a legal engineer do, legal engineer AI, TIRO pattern, Trigger Input Requirements Output, clause decomposition, legal workflow automation, AI legal workflows, multi-agent legal AI, legal pipeline architecture, legal knowledge engineer, legal process design"
published: 2026-05-15
updated: 2026-10-20
english_version: https://www.haqq.ai/blog/legal-engineering-ai-powered-legal-workflows-guide
source: src/data/blogPosts.ts
generator: scripts/generate-page-markdown.ts
---

# Legal Engineering: o guia 2026 dos fluxos de trabalho jurídicos com IA

O que é engenharia jurídica, o que faz um legal engineer e como o padrão TIRO divide uma cláusula em etapas verificáveis, com o exemplo de uma indenização por PI.

> **Note:** In short: legal engineering is the work of turning a legal task into a repeatable, testable workflow that software and AI models can run, with a lawyer approving the result. Its basic tool is TIRO: split each clause or task into a Trigger, Inputs, Requirements and an Output. Below we decompose one indemnity clause in four steps.

## Key facts

- The job title is older than generative AI: Richard Susskind listed the "legal knowledge engineer" among new legal roles in Tomorrow's Lawyers (Oxford University Press, 2013).
- Why verification steps matter: in Mata v. Avianca, Inc., No. 22-cv-1461 (PKC), 678 F. Supp. 3d 443 (S.D.N.Y. 2023), Judge P. Kevin Castel imposed a $5,000 sanction on two lawyers and their firm on 22 June 2023 for filing ChatGPT-generated, non-existent case citations.
- HAQQ's prompt library ships 631 prompts, and Justinian is the legal AI engine that runs HAQQ's workflows (haqq.ai, Oct 2026).

## What is legal engineering?

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.

> **Note:** Our working definition at HAQQ: if you cannot write down the steps, the inputs each step needs, and the test that tells you a step went wrong, the task is still a prompt. Once you can, it is a workflow you can engineer.

## What does a legal engineer do?

- Maps the task with the lawyers who do it today: what triggers it, what documents come in, what a finished deliverable looks like, and which decisions need a partner.
- Decomposes clauses and procedures into TIRO steps and writes down the definitions, thresholds and conflict rules each step depends on.
- Chooses the tool for each step: a model call, a deterministic rule (date arithmetic, a cap calculation), a retrieval query against a statute database, or a human review gate.
- Builds the test set: real or redacted documents with a known right answer, including the awkward ones (missing schedules, conflicting clauses, scans).
- Measures the workflow against that test set before release and after every model or prompt change, and keeps the logs that show which step produced which finding.
- Owns data handling: where documents are processed, who can see which matter, and what is retained, because privilege and confidentiality rules attach to the architecture.

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

- The claim itself: who made it, what it alleges, which part of the Services it targets.
- The date the Customer became aware of the claim, and the date and form of its notice to the Supplier.
- The Losses claimed, with amounts.
- Clause 1 (definitions of Losses, Business Days, Intellectual Property Rights), clause 14.2 (the cap) and any carve-outs in clause 14.3.
- The governing-law clause, because whether late notice defeats the claim or only reduces it depends on the law that applies.

### Step 3: Requirements

| Kind | What the step does in clause 12.1 | How we run it |
| --- | --- | --- |
| Definitions | Resolve "Losses", "Business Days" and "Intellectual Property Rights" from clause 1 | Retrieval from the same contract, quoted back with clause numbers |
| Validations | Notice was in writing; notice was within 10 Business Days of awareness; the claim concerns the Services, not Customer modifications | Date arithmetic in code, using the contract's Business Day definition; a model reads the claim to classify its target |
| Arbitration | Clause 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 conflict | A model compares the clauses and must quote both; a lawyer confirms any conflict it flags |
| Transformations | Losses claimed, minus anything excluded by the Losses definition, limited by the cap if it applies | Calculation 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](https://www.haqq.ai/blog/single-prompt-vs-swarm-ma-diligence).

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](https://www.haqq.ai/blog/motion-to-dismiss-167-or-455-routing).

## Which legal workflows suit legal engineering?

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:

- Obligation and deadline extraction (renewal notices, insurance certificates, cure periods). Clear inputs, clear outputs, high cost when missed.
- Playbook review and redlining of inbound supplier or customer paper.
- Document triage for in-house teams: classify, extract the deadline, route to the right lawyer.
- Portfolio analytics: treat liability caps, governing law and auto-renewal flags across a contract set as fields you can filter.
- Due diligence over a data room, where cross-document checks (change of control against a licence) pay off most.
- Research memos, once citation verification against a statute and case database is in place.

In HAQQ these workflows ship as [legal skills](https://www.haqq.ai/product/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.

## How do you start legal engineering in a firm?

- Pick one workflow from the list above that a practice group runs weekly.
- Collect 20 to 30 past examples with the answer a senior lawyer would sign off on. This is your test set.
- Decompose the core clauses with TIRO, on paper, with the lawyers in the room.
- Build the smallest version that passes the test set, with human approval at the Output step.
- Re-run the test set every time you change a model, a prompt or a playbook rule, and keep the results.

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](https://www.haqq.ai/blog/legal-ai-security-soc2-gdpr) 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:

- Contract drafting from a client playbook
- Contract redlining
- Contract analytics across a portfolio
- Regulated communications review
- Third-party (vendor) risk
- Document triage
- Obligation tracking
- M&A due diligence
- Litigation support and e-discovery
- Legal research with citation verification

- [Legal Engineering by Robert Taylor (book site)](https://www.taylorlegalengineering.com/book)
- [Mata v. Avianca, Inc., No. 22-cv-1461 (S.D.N.Y.), docket on CourtListener](https://www.courtlistener.com/docket/63107798/mata-v-avianca-inc/)
- [Richard Susskind, Tomorrow's Lawyers (Oxford University Press)](https://global.oup.com/academic/product/tomorrows-lawyers-9780198864929)

## Related reading

- [our 30-document data room experiment with a public answer key](https://www.haqq.ai/blog/single-prompt-vs-swarm-ma-diligence)
- [the complete guide to AI contract review](https://www.haqq.ai/blog/ai-contract-review-lawyers-guide)
- [the prompt-injection scanner we built for legal AI](https://www.haqq.ai/blog/prompt-injection-scanner-legal-ai)
- [per-stage model routing economics](https://www.haqq.ai/blog/motion-to-dismiss-167-or-455-routing)
- [how a legal ontology cut our cost per query](https://www.haqq.ai/blog/legal-ontology-ai-cost-reduction)

## Perguntas frequentes

### O que é legal engineering?

Legal engineering é conceber, construir e manter sistemas que executam uma parte definida do trabalho jurídico sempre da mesma forma, como a revisão com base num playbook, a extração de prazos ou a triagem regulatória. A tarefa é dividida em passos, cada passo é verificado e um advogado aprova o resultado com o respetivo raciocínio e fontes anexados.

### O que faz um legal engineer?

Um legal engineer mapeia uma tarefa jurídica com os advogados que a executam, decompõe cláusulas e procedimentos em passos, escolhe se cada passo é uma chamada a um modelo, uma regra determinística, uma consulta a uma base de dados ou uma revisão humana, constrói um conjunto de testes com respostas certas conhecidas, mede o fluxo de trabalho antes e depois de cada alteração e é responsável pelo local onde os dados dos clientes são tratados.

### O que é o padrão TIRO?

TIRO significa Trigger, Input, Requirements, Output. O Trigger é o evento que faz uma cláusula entrar em jogo, os Inputs são os factos e documentos de que necessita, os Requirements são as Definitions, Validations, Arbitration (regras de conflito) e Transformations (cálculos) que executa, e o Output é a obrigação, o direito ou o montante que produz.

### Em que é que o legal engineering difere do prompt engineering?

O prompt engineering melhora uma única instrução a um modelo. O legal engineering concebe todo o fluxo de trabalho à sua volta: que passos usam de todo um modelo, como é verificado o resultado de cada passo, como as citações são confirmadas face às fontes, onde um advogado dá a aprovação e como o sistema é novamente testado quando um modelo muda.

### É preciso saber programar para ser legal engineer?

Ajuda. Muitos legal engineers são advogados que aprenderam programação suficiente para construir e testar fluxos de trabalho, ou engenheiros que trabalharam durante anos junto de uma área de prática. A competência central é decompor o trabalho jurídico em passos com resultados verificáveis; ferramentas como as legal skills da HAQQ permitem às sociedades executar fluxos de trabalho concebidos desta forma sem terem de construir o software.

---

Canonical page: https://www.haqq.ai/pt/blog/legal-engineering-ai-powered-legal-workflows-guide
Whole-site context for agents: https://www.haqq.ai/llms.txt · https://www.haqq.ai/agents.md

Generated at build time from the site's own content data. Do not edit by hand.
