Technical Due Diligence When AI Wrote Your Code
The term sheet is signed. Next week the investor's technical reviewer gets read access to your repo and an hour on a call with you. Technical due diligence on AI-generated code doesn't open with "did a machine write this?" It opens with "can you explain it?", and that's the question most founders of AI-built apps haven't rehearsed.
The questions are predictable, which helps. "Lovable did that bit" doesn't answer any of them, which doesn't.
The NVCA, Lovable and Copyright Office details below were last checked on 15 October 2026.
Does AI-generated code fail technical due diligence?
No. Building with AI tools is ordinary now. In March 2025 TechCrunch reported Y Combinator's Jared Friedman saying that a quarter of its W25 batch had 95% of their codebases generated by AI. Investors have seen plenty of it. A reviewer who marks you down just for using Cursor or Lovable is reviewing your tools, not your company.
What they're really testing is whether the company understands what it sells. A contractor's code with no handover notes fails that test too, and for the same reason. AI just lets you get much further before anyone notices.
The paperwork has caught up. The National Venture Capital Association's model Stock Purchase Agreement, updated October 2025, has an optional Generative AI representation. In it the company states that it uses AI tools within their licence terms, hasn't fed sensitive personal information or confidential material into tools that train on it, and hasn't used AI to build proprietary code "in a manner that it believes would materially affect the Company's ownership or rights therein".
The clause sits in brackets, so it's negotiable. If it ends up in your round, though, you're signing it. And you can't sign it honestly without knowing the answers.
Code nobody can explain is a risk however it got written.
The tech due diligence questions a reviewer actually asks
Every reviewer has a list of their own. The lists overlap on eight things.
Who can see what data? Can one customer read another's records? Show the access rules and how you tested them, ideally with two test accounts. In a Lovable or Supabase app these are the row-level security policies, and they're the usual gap. A passing scan won't settle it, because a scan checks that a rule exists, not that it is right. The Lovable production checklist walks through testing them.
Where are the secrets? Which keys exist, where they're stored, who can read them, and whether any has ever been in the repo. The reviewer will look at the git history, not just today's files. A key that was ever committed is a key to rotate.
What's tested? Not a coverage percentage. Which parts, like sign-in, payments and permissions, have tests that would fail if they broke? "None yet, and here's the plan" beats a big number that tests nothing.
Backups, and the last restore. Having backups is the easy half. When did you last restore one, how long did it take, and how much data would you lose? A backup you've never restored is a hope.
Who owns the code and the accounts? The repo, the database project, the hosting, the domain, the email account, the AI tool's workspace. Each should belong to the company, not to a founder's personal address or a freelancer who's moved on. The NVCA form also has the company state that every employee and consultant who built its IP has assigned it to the company in writing.
Which licences come with your dependencies? Your app pulls in hundreds of open-source packages, picked by an AI while you weren't watching. The NVCA form's open-source representation targets licences that would force your own code to be "disclosed or distributed in source code form". The AGPL is the one to know. The GNU Project explains that if you run a modified AGPL program on a server and let people use it, "your server must also allow them to download the source code". A licence report from your package manager takes minutes.
How does a change reach production? Who can deploy, what runs before a change goes live, and how you roll back. "I prompt it and click Publish" is a process, technically. The reviewer wants to know what stops a bad change.
Where are the single points of failure? Usually it's the one person who knows how it works, holding the one login that has all the access. Sometimes it's an outside service that would take the product with it if it failed or changed its terms. Name them before the reviewer does.
Answers that worry a reviewer, and answers that settle one
Worrying
- We think customers are separated
- The AI handled security
- Backups are switched on
- A freelancer has the hosting login
Settled
- Tested with two accounts, dated, here is the result
- These are the keys, here is where each one lives
- Restored last month, it took forty minutes
- Every account is on a company address, listed
Who owns code an AI wrote?
As far as the tool is concerned, mostly you. Lovable's terms say "you also own any AI Output generated for you through the Services, subject to any third-party rights in the underlying models, training data, or outputs." Other AI app tools have similar clauses. Read the one you used.
Owning output under a contract isn't the same as holding copyright in it. The US Copyright Office's January 2025 report on copyrightability concluded that "prompts alone do not provide sufficient human control to make users of an AI system the authors of the output." Work a person shaped, edited and arranged can still be protected, as far as that human contribution goes. The rules differ between countries, and this one is for your lawyer. A reviewer will still ask whether someone understood and changed what the AI produced.
Then there's training. Lovable's terms let it use customer data to train models, and say "you may tell us at any time that you do not want your Customer Data used for model training". The opt-out works going forward. If client data went into prompts, that bears on the NVCA representation, so check the setting and write down when you changed it.
Before the reviewer gets repo access, run through what to check before sharing an exported Lovable repo. Old keys in the history and a database nobody documented are cheaper to find yourself.
Write the answer pack before the data room opens
The data room is where the documents go once diligence starts. Don't wait for it. A short written answer pack, a page or so per question, does more for you than a week of cleanup before the call.
Every answer has four parts: what's true today, where the evidence is, who owns it, and what you're doing about any gap. Evidence means something a stranger can check. A link to the access rules. The date of the last restore. A licence report. A list of accounts with the address each one belongs to.
Building the answer pack
Inventory
Every account, service, key and person with access
Move ownership
Company accounts, written IP assignments
Test
Two-account data check, a real restore, a licence report
Write
One page per question, with evidence and dates
Rehearse
Explain it to someone who has not seen the code
Inventory
Every account, service, key and person with access
Move ownership
Company accounts, written IP assignments
Test
Two-account data check, a real restore, a licence report
Write
One page per question, with evidence and dates
Rehearse
Explain it to someone who has not seen the code
Gaps are fine. "No automated tests on payments yet, plan attached, two weeks" reads as a team in control. A gap the reviewer finds on their own reads as a team that didn't look. Investors price risk. They price surprise higher.
Due diligence on a vibe-coded app runs like any other. The reviewer reads the pack, spot-checks a few claims and spends the hour on whatever doesn't match. A good pack leaves them very little to spend it on.
Should someone check it before the investor does?
If you can't answer three of the eight questions today, yes. A leaking table found by you is a fix. Found in diligence, it's a renegotiation.
Our audits cover the same ground from your side of the table, before the investor's reviewer does. For apps made in Lovable, Bolt, Cursor and similar tools, the AI-built apps page has a free Exposure Check that looks from outside only, and a Production-Readiness Review that reads the repo and tests the live app. If nobody on the team will own these answers after the round either, that's the job of a fractional CTO.
The reviewer isn't asking who wrote your code. They're asking who answers for it, and the right answer is a name.
How we help with this
Backend Architecture
Scalable backend systems, API integrations, and resilient architectures built around the messy reality of third-party services.
Learn more
Technology Strategy
Translate business goals into technical plans. Stack selection, scaling strategy, and build-vs-buy decisions grounded in real experience.
Learn more
Architecture Audit
A deep review of your system architecture - API integrations, scalability bottlenecks, resilience gaps, and the failure modes that only show up in production.
Learn more
Technology Strategy Audit
Get an honest assessment of where your technology stands - stack health, technical debt, team structure, and roadmap alignment. Know exactly what to fix before your next growth phase.
Learn more
Want to discuss this topic?
If this resonates with where your company is right now, we'd like to hear from you.