LegAI
GDPR compliance, caught in the editor instead of the audit. An AI checker that reads your code as you write it and flags the parts that break EU data law. We built it, tested it on real codebases, and then decided not to take it further.
My role
No formal roles — four of us worked across everything. My weight went into three places: framing the product strategy, bringing VC and founder conversations from my own network, and building the local ML detection script with AI assistance. The Figma work and the report were shared.
The frame
This is a business case study. The course was about building a product argument, not running a design process, so what follows is a market bet, the evidence we gathered for and against it, the interaction decisions that came out of testing, and the reason we stopped.
The bet
A startup with 15 people ships a feature to EU users on a Tuesday. Nobody in the building is a lawyer. Somewhere in that release is a logging call that writes an email address to plaintext, or a third-party SDK quietly shipping personal data outside the EEA.
They will find out in one of two ways. An expensive external consultant tells them six months later, or a regulator does. Either way, three things follow: the release slips, the team burns weeks unpicking work it already shipped, and somewhere on the horizon sits a fine.
GDPR fines run to €20 million or 4% of global turnover, whichever hurts more. For a company at that size, that is not a fine. That is the end.
There are over 25,000 active tech startups in the EU ecosystem. Most of them handle personal data. Very few of them have compliance headcount.
The gap in the market
OneTrust, LogicGate, BRYTER, TrustArc, MetricStream. Every serious compliance tool is built for enterprises, priced for enterprises, and needs a legal team to operate. They also all work the same way: they audit what you already shipped.
Nobody was catching it at the keystroke.
Talking to the market
We did not run a survey. We used my network and went to the people who would have to pay for this, or fund the people who would.
VCs and startup founders confirmed the problem, clearly and without much prompting. Compliance genuinely competes with velocity. Developers do not want a separate compliance process bolted onto their week, they want the check where the work already happens. Every founder we spoke to had a story about a legal question that stalled a release.
What they did not confirm was that anyone would buy it. Founders agreed the pain was real, then priced it below the cost of building the thing that would fix it. That gap sat in the back of the project the whole way through, and it is the reason the last section of this page exists.
Cutting the scope, three times
Compliance is not a product category. It is a continent. Intellectual property, cyber security, financial regulation, employment law, accessibility, and each one branches again.
- Cut one: GDPR only.Not because it is the biggest problem, but because the EU publishes the rule set. There is an authoritative, public, articulated document to build against. Every other domain would have meant inventing our own interpretation of the law, which is exactly the thing we were not qualified to do.
- Cut two: code-level GDPR only.GDPR compliance also lives in contracts, in vendor agreements, in how you answer a data subject access request. None of that is machine-checkable. What is machine-checkable: how data gets collected, where it gets logged, whether it gets hashed, how long it is retained, what leaves the building. So that became the product.
- Cut three: startups of 5 to 50 people.EU-facing, healthcare and fintech first. Small enough to have no legal function, regulated enough to care, technical enough to install a VS Code extension.
The scoping was the design work. Everything downstream was a consequence of these three cuts.
Two surfaces, one system
The product split into two, because the people using it wanted two completely different things.
- The extension.For the developer, in flow, inside VS Code. Detection surfaces inline, next to the offending line, with a plain-language explanation of the risk. Three actions: ignore, resolve later, assign. The design constraint here was interruption cost. Every flag is a tap on the shoulder, and a developer who is being tapped on the shoulder too often will uninstall the extension.
- The dashboard.For the manager, who is not in the code and does not want to be. Compliance status across projects, violations by severity, overrides waiting for review. Role-scoped, so a team lead sees recurring issues across sprints and a senior manager sees escalation and risk.
These could not be one screen. The developer needs a whisper. The manager needs a ledger.
How detection worked
A regex layer for the obvious patterns. Data collection calls, logging, hashing, hard-coded secrets. Cheap, fast, and it catches the majority of real violations because most real violations are not clever.
An ML layer on top of it, RandomForest and GradientBoosting classifiers over code transformed into feature vectors, for the patterns that do not sit still. The same violation looks different across codebases, and regex is brittle in the face of a coding style it has not seen.
A reconciliation step between the two, because when a rule and a model disagree, something has to decide. This existed for exactly one reason: to hold down false positives.
The code never left the machine
Detection ran on device. Rules and violation records synced to the cloud. That split was not an implementation convenience, it was the only defensible architecture. A compliance tool that uploads proprietary source code to a server has created a compliance problem in order to solve one. Nobody would install it, and they would be right not to. But compliance rules change, and every team needs the same ones, so those had to live somewhere central.
Local analysis, shared rules. That is the whole architecture in three words.
Testing: Wizard of Oz
Four practitioners: an ML engineer, a startup CEO, a developer, and a product manager who also writes code.
The interface was Figma. The detection was real.
Each participant ran our script locally, on their own machine, against a codebase they had written themselves. The script found real GDPR violations in their real code. Then we walked them through the designed screens and asked what they would do with what they had just been shown.
That combination is the whole reason the session produced anything useful. If the findings had been fake, we would have gotten polite feedback on a mockup. Because the findings were about their own work, we got reactions.
The password field
The script found four violations correctly. It also flagged a secure password field that was not a violation at all.
The developer who wrote that code did not think "interesting edge case." He thought the tool was wrong about him.
The failure mode that kills a tool like this is not the violation it misses. It is the confident, wrong flag raised against code the developer understands far better than the model does.
Do that twice and the tool gets muted. And a muted compliance tool is worse than no compliance tool, because the dashboard still shows green.
We had been trying to build a system that was right. The test told us to build a system that could afford to be wrong.
What changed
- Override with justification.The developer can dismiss any flag. The tool does not argue. But the dismissal requires a written reason and supporting evidence, and both go into the record.
- Maker-checker.The override lands in the manager's queue with the justification attached. The manager approves or rejects, and can leave feedback. The human overrules the machine, and accountability survives the disagreement.
- Three views, not one.The dashboard stopped being a single screen for everyone. Senior managers see risk and compliance status across all projects. Team managers monitor unresolved issues and work the override queue. Developers see their own violations, with the option to justify or escalate.
The second prototype is not a better classifier. It is the same classifier, wrapped in a process that assumes it will be wrong sometimes and stays trustworthy anyway.
Why we stopped
The final slide of our presentation listed what LegAI needed next. Funding. ML engineers. A full-stack developer. A legal professional. A partnership with an LLM provider. Demos with real startups to validate a proof of concept we had not yet validated.
That slide is the argument for stopping, written by us, without noticing.
Detection across arbitrary production codebases needs labelled training data at a scale we did not have and could not get. GDPR judgment you would stake a company on needs a lawyer in the room, and our roadmap said so in as many words. And the founders who agreed the problem was painful would not price it high enough to fund the thing that would fix it.
We could design the interaction honestly. We could not honestly claim the detection would hold up in production. So we made the argument, wrote it up, and left it there.
That is not the ending a portfolio piece is supposed to have. But calling a project when the evidence says to is a design decision too, and I would rather show one of those than fake an outcome.
Credits
The 'Para'legals: Antrit Saxena, Malki Kothalawala, Ho Bao Vy Phan, Pranit Popli.
DH2655 Cooperative IT-Design, KTH Royal Institute of Technology.
