AI Agents for Lawyers

Playbooks

Build a Legal Decision-Tree App for Clients Without Code

Build a legal decision-tree app for clients without code in a day: write the logic as a node table, generate it with Claude or Lovable, and test the edge cases.

By Dr. Niklas SchmidtUpdated 13 November 202611 min read
On this page
  1. Pick a question the tree can answer honestly
  2. Write the logic as a node table before opening any tool
  3. Build it with Claude Artifacts, Lovable or a form builder
  4. Guardrails: unauthorised practice, liability and the AI Act
  5. Test it against the twelve cases that break trees
  6. Publish, measure and keep it current
  7. What to do this week

A legal decision-tree app is a client-facing questionnaire that walks a user through a sequence of questions to a provisional answer and, at the right moment, to a lawyer. You can build one without code in a day: write the logic as a node table, hand it to Claude Artifacts or Lovable, add escalation rules and disclaimers, test it against edge cases, then publish it behind your firm's terms.

Pick a question the tree can answer honestly

A tree earns its place when it answers a closed question from facts the client already has, and when the answer you would give by email is the same nine times out of ten. Jamie Tso, a senior associate at Clifford Chance who built a track-changes analyser and a signature-page extractor for roughly nothing, starts every build with one daily pain point and writes the specification as a user experience before asking for a line of code (Tso, 6 Jan 2026). For a client-facing tree the pain point is the question you have answered twenty times this year in near-identical words.

Four filters sort the candidates:

Candidate questionTurns on facts the client has?Law stable enough for a quarterly review?Cost of a wrong provisional answerVerdict
Is the person we engage as a contractor showing employment indicators?Yes, six to eight factsYes; the tests move slowlyModerate, and every path ends in a review anywayBuild it
Does our token need a MiCA authorisation?Mostly, though "what is this token" is often the hard partYoung regime, supervisory guidance still arrivingHigh; authorisation timelines run in monthsBuild a short tree with an early hand-off
Must we appoint a data protection officer?YesYesLowBuild it
Can we dismiss this employee next week?No; it depends on documents, history and personalitiesVariesVery highDo not build; route to intake

The worked example below uses the contractor question because the facts are simple and the hand-off is natural. A MiCA tree suits a crypto practice for the same reason: most users need to hear "speak to someone before you file anything" by the third screen.

A decision tree is a cousin of the calculator, and calculators show how low the technical bar has fallen. A Texas family lawyer rebuilt a child-support calculator he had once sold on the App Store in under ten minutes with Gemini, after an attempt with Claude failed (LMI, 24 Jun 2025). The difference is that a calculator has one formula and a tree has exits. The tree's job is to sort, not to advise, which is why it belongs next to your client intake rather than on your knowledge page.

Write the logic as a node table before opening any tool

The tool is the easy part. The logic is the part that carries your name, so write it first, in a table a colleague can check without running anything. Five rules:

  1. The first node is always a jurisdiction gate. A user whose facts sit outside the law you have encoded gets a hand-off on screen one, not a wrong answer on screen six.
  2. Eight questions at most. Beyond that, completion rates fall and the tree starts pretending to a precision it does not have.
  3. Every question has an "I don't know" path, and that path ends with a person.
  4. No free-text fields. A text box invites the user to paste the whole dispute, and with it personal data you now hold without an engagement.
  5. Outcomes are indicators plus a next step. "Indicators point to employment; book a review before the next payment run" is an outcome. "This person is an employee" is advice you have not been instructed to give.

The table below is an illustrative tree for the contractor question. Every jurisdiction weighs the indicators differently and some start from a presumption of employment, so the weighting, the thresholds and the outcome texts are yours to set with the employment team.

NodeQuestionYesNoI don't know
Q0Is the work performed mainly in [jurisdiction]?Q1Outcome DOutcome D
Q1Can the individual send a substitute of their own choosing to do the work, and has that actually happened?Q4Q2Outcome D
Q2Does your organisation set when, where and how the work is done?Q3Q4Outcome D
Q3Does the individual have a company email address, a line manager and equipment you provide?Outcome AQ5Outcome D
Q4Has the individual worked mainly or only for your organisation for more than twelve months?Q5Outcome COutcome D
Q5Does the individual carry financial risk, such as a fixed price for a defined result and their own tools?Outcome BOutcome AOutcome D
OutcomeHeadingNext step
AIndicators point towards employmentBook a status review before the next payment run; bring the contract and three months of invoices
BMixed indicatorsUpload nothing; book a fixed-fee review and bring the contract
CContractor indicators predominateKeep this summary on file and repeat the check in twelve months or when the arrangement changes
DThis check cannot answer your questionContact [name] directly; the tool has not asked about the facts that matter in your case

Print the tables, walk every path with a pen and count them. Six questions with three exits each produce far fewer real paths than the arithmetic suggests, and each one needs a partner to have read the outcome text.

Build it with Claude Artifacts, Lovable or a form builder

Three routes cover most firms, and none of them needs a developer.

RouteWhat you getBest forWatch out for
Claude ArtifactsA single-file app generated from your prompt, previewed and edited in the chat, shareable by linkPrototypes and internal tools; a first version in an hourNo database, and the file lives with Anthropic; check your plan's data terms before pasting anything sensitive
Lovable or ReplitA hosted app with its own address and, if you want it, a databaseThe permanent public version; Tso's recommendation for apps that need to persistA database means personal data, which means a processor agreement; keep the tree stateless if you can
Form builder with branching logicA questionnaire with conditional jumps, embedded in your siteFirms whose marketing team already runs oneOutcome pages are often thin, and every answer is stored by default until you switch that off

Google AI Studio is free for prototyping, and Tso's method is the same on all three routes: write the spec as a user experience, iterate with screenshots of whatever came out wrong, and never use client data during the build, only synthetic examples (Tso, 6 Jan 2026). The vibe coding glossary entry covers the vocabulary and the intake-app playbook uses the same tools for an internal build. The prompt below is the client-facing version; paste your node table and disclaimer where indicated.

You are building a single-page, mobile-friendly web app for a law firm's website.
It is a branching questionnaire, not a chatbot. Follow this specification exactly.

PURPOSE
Help a business user work out whether a person they engage as a contractor shows
the indicators of employment under [jurisdiction] law, and route them to the right
next step. The app sorts; it does not advise.

USER EXPERIENCE
1. A start screen with the title "Contractor or employee? A five-minute check",
   one paragraph saying what the tool does and does not do, the disclaimer text,
   and a "Start" button.
2. One question per screen. Each question has exactly the answer buttons listed
   in the node table. Every question also has an "I don't know" button that leads
   to outcome D.
3. A progress indicator ("Question 3 of 6") and a "Back" button that restores the
   previous answer.
4. An outcome screen showing the outcome heading, the outcome text, the list of
   answers given, a "Print or save this summary" button and a "Book a review"
   button that opens mailto:[address] with the answers in the email body.
5. A footer line: "Logic version 1.0, [date]. Reflects [jurisdiction] law as at
   that date."

NODE TABLE
[paste the node table and the outcome table here, with the exact outcome texts]

CONSTRAINTS
- Plain HTML, CSS and JavaScript in one file. No frameworks, no external scripts,
  no fonts loaded from third parties.
- No free-text fields anywhere. Buttons only.
- Store nothing: no cookies, no local storage, no analytics, no network calls
  except the mailto link.
- No language-model calls. The logic is the node table and nothing else.
- Do not invent additional questions, outcomes or legal statements. If the node
  table is ambiguous, stop and ask me.
- Use the disclaimer text verbatim on the start screen and the outcome screen.
- Meet WCAG 2.1 AA: keyboard operation, visible focus, 4.5:1 contrast, buttons at
  least 44 pixels high.

DISCLAIMER TEXT
[paste the clause]

When you have built it, list every path from the start screen to each outcome so
that the routing can be checked against the node table.

The last line matters more than it looks. A model will happily add a seventh question it thinks is helpful, and it will phrase your outcomes more confidently than you wrote them. Asking it to list every path forces the routing back into the open where it can be compared with the table. Module 5 of the AI Lab for Lawyers course covers vibe coding of this kind with browser-based tools and no installs.

Guardrails: unauthorised practice, liability and the AI Act

The technical risk of a decision tree is close to zero. The professional risk sits in four places.

What you call it. The FTC's final order against DoNotPay, the self-described "world's first robot lawyer", imposed $193,000 and banned claims that a service "operates like a human lawyer" without competent evidence (FTC, Feb 2025). In Germany, the Steuerberaterkammer Berlin sued the start-up Accountable at LG Berlin II (Az. 61 O 90/26) over its "KI-Steuerberater" label, the first German test of whether AI tax software amounts to unauthorised tax assistance (May 2026). Both cases turn on the words on the marketing page, not on the code. Call the tool a check or a questionnaire, never a virtual lawyer.

Whose advice it is. A tree published by a law firm expresses the firm's reading of the law, and a user who follows it will say so if it goes wrong. The Austrian bar's four practice rules from its first KI-Tag in March 2026 fit neatly: client data stays on EU servers, disclose AI use to clients, the lawyer keeps final responsibility, and no client data for training (Anwaltsblatt, 2026). "Final responsibility" here means a named partner signs off every outcome text and every later change. The clause below does the rest of the work; adapt it to your jurisdiction's rules on engagement and advertising.

Sample disclaimer

This check sorts common situations into next steps. It is not legal advice, it
does not take account of facts it has not asked about, and using it does not
create a lawyer-client relationship with [Firm]. Its logic reflects [Firm]'s
reading of [jurisdiction] law as at [version date] and may be out of date. If the
check tells you to speak to a lawyer, or your situation is urgent, contact [name]
at [email]. Nothing you enter is stored.

Where the AI Act bites. A hand-written branching questionnaire with no model behind it is, on most readings, not an AI system at all; it infers nothing and follows your table. Two things change that. If you add a chat layer so users can ask questions in their own words, Article 50 applies: since 2 August 2026 a chatbot must tell users they are dealing with AI, and the Digital Omnibus left that duty untouched while deferring the stand-alone high-risk obligations of Annex III, including employment and administration of justice, from 2 August 2026 to 2 December 2027 (Gibson Dunn, 2026). So if the tool moves from sorting to deciding, for example an employer using an AI-driven version to classify its workforce, it edges towards Annex III's employment category on that later date. Whether lawyer-side tools fall under the administration-of-justice heading is unsettled and parked until then. The AI Act guide for lawyers sets out what a deployer owes today; for a stateless questionnaire the honest answer is very little, provided it stays a questionnaire.

Where the data goes. A stateless tree that stores nothing sidesteps most of the GDPR analysis. The moment you add an email capture, a database or analytics, you are a controller with a processor to contract, so read the GDPR page before switching those on. A tool built by one associate on a personal account is also exactly the shadow AI that firm policies exist to catch; the fix recommended in the North Carolina Bar's policy guidance is a sandbox with logging and lightweight approval, not a ban (NC Bar, 13 Jan 2026). Put the tree through whatever your AI policy says about client-facing tools before it goes live.

Test it against the twelve cases that break trees

Testing a decision tree is quick because it has no free text and a finite number of paths. Run the twelve below yourself, then hand the link to a trainee with no instructions and watch.

#TestExpected behaviour
1Work performed outside the jurisdictionOutcome D on screen one
2"I don't know" on every questionOutcome D, never a substantive outcome
3Contradictory answers: substitute allowed, but you set the hours and provide a line managerThe table's routing, not a merged average; then decide whether Q1 should ask about actual substitution
4Back button after three answersPrevious answer restored, progress counter correct
5Every path to every outcomeMatches the printed table; no outcome is unreachable
6Phone in portrait modeButtons readable and tappable; no horizontal scroll
7Keyboard only, no mouseEvery button reachable; focus visible
8Print the outcomeSummary includes answers, outcome, version date and disclaimer
9Existing client with a live matterThe outcome text tells them to contact their usual lawyer; no duplicate intake
10A user adverse to a current clientNothing is stored, so no conflict is created; confirm the mailto route lands with someone who runs a conflict check
11Browser developer tools openNo network calls, no cookies, no storage
12Partner reads every outcome text aloudNo sentence that reads as individual advice

Test 3 is where most trees get rewritten. Real arrangements are mixed, and the value of the exercise is discovering that your Q1 was two questions wearing one label. Test 12 is the one never to skip.

Publish, measure and keep it current

Large firms have already turned this pattern into a product line. A&O Shearman has sold four Harvey-built agents to clients on subscription since April 2025, and Macfarlanes launched its client-facing Amplify on the Harvey API in March 2026. A decision tree is the zero-licence-fee version of the same idea, and the build time is modest: a legal hackathon reported in January 2026 produced twenty working apps in a week (Non-Billable, 30 Jan 2026).

Before it goes live:

  • Name an owner and a review date. Quarterly suits stable law; monthly suits any regime still issuing guidance.
  • Put a logic version and an "as at" date on every screen. When the Digital Omnibus moved the Annex III deadline by sixteen months, any tool that had hard-coded 2 August 2026 as the start date became wrong overnight.
  • Count uses and hand-offs, not answers. You want to know that forty people ran the check and eleven booked a review; you do not want a table of their circumstances.
  • Say on the page that the firm used AI to build the tool, if that is true. In Clio's 2025 Legal Trends Report 78% of clients wanted disclosure of AI use and 36% said they would trust an AI-using lawyer less, so the wording matters; the disclosure page has phrasing that works.
  • Keep the source file in the firm's repository, not in one person's chat history.

What to do this week

  1. Pick one question you have answered by email at least ten times this year and write the node table on paper.
  2. Walk every path with a colleague from the relevant team; rewrite any outcome that reads as a verdict.
  3. Paste the table into the build prompt above in Claude or Lovable, with synthetic test facts only.
  4. Run the twelve tests; fix Q1 when test 3 breaks it.
  5. Have a partner sign off the outcome texts and the disclaimer, then put the link through your AI policy's approval step.
  6. Publish with a version date and a named owner, and diary the first review.

Frequently asked questions

Is a legal decision-tree app on a law firm website the unauthorised practice of law?

Usually not, provided it sorts situations into next steps rather than giving individual advice, carries a clear disclaimer and is published by the firm itself. The risk sits in how you describe it: the FTC's 2025 order against DoNotPay banned claims that a service operates like a human lawyer, and a Berlin court is testing whether a start-up may call its software a KI-Steuerberater. Call it a check or a questionnaire and keep a named lawyer responsible for the logic.

Do I need coding skills to build a legal decision-tree app?

No. You write the logic as a table of questions, answers and outcomes, then paste it into a build prompt for Claude Artifacts, Lovable, Replit or Google AI Studio, which generate the app and let you correct it with screenshots. Clifford Chance and Linklaters associates have built working internal tools this way for roughly nothing. A form builder with branching logic is the third route if your marketing team already runs one.

Does the EU AI Act apply to a decision-tree questionnaire on a law firm website?

A hand-written branching questionnaire with no model behind it is, on most readings, not an AI system, because it infers nothing and simply follows your table. If you add a chat layer, Article 50 applies and the tool must tell users they are dealing with AI, a duty in force since 2 August 2026 and not deferred by the Digital Omnibus. Tools that move from sorting to deciding about workers edge towards Annex III, whose obligations now start on 2 December 2027.

What is the difference between a legal decision-tree app and a legal chatbot?

A decision tree follows a fixed route you wrote: the same answers always lead to the same outcome, nothing is stored, and there is no model to hallucinate. A chatbot interprets free text with a language model, which makes it more flexible and much harder to control, brings the AI Act's transparency duty into play and creates a record of whatever the user typed. For a client-facing tool on a firm's website the tree is the safer default.

Put this into practice

AI Lab for Lawyers: a live, hands-on course for practising lawyers

4 live sessions (8 hours), recordings included, taught by Dr. Niklas Schmidt of Wolf Theiss. Rated 4.7/5 from 381 ratings; alumni from Norton Rose Fulbright, Paul Hastings, Pillsbury and Taylor Wessing.

Reserve a seat · €200 Maven money-back guarantee · certificate of completion