Provenance Is the New Technical Debt: Who Owns the Code Your AI Wrote?
Photo: Official GDC, CC BY 2.0, via Wikimedia Commons
Here's a scenario playing out in conference rooms across the country right now. A company is three weeks into Series B diligence. The engineering team is confident. The metrics are clean. Then the acquirer's outside counsel sends over a 40-line request, and line 31 asks the company to identify any code in the repository that was generated in whole or in part by a machine learning model, along with the model, version, and license terms applicable to the output.
The company's CTO says, honestly, "we'll have to get back to you."
That's not a legal problem yet. It's a provenance problem, and it's the most predictable technical debt most startups are accruing right now without noticing.
Nothing here is legal advice — it's engineering hygiene. Talk to your own counsel about the rest.
What Provenance Actually Means Day to Day
Strip away the jargon and provenance answers four questions about any given block of code:
- Where did it come from? Human-written, machine-generated, copied from an internal repo, or lifted from a Stack Overflow answer in 2019.
- What produced it? Model name, version, and provider.
- Under what terms? The provider's output ownership language, plus whatever license governs any training-adjacent material the output resembles.
- Who approved it? The human who reviewed it and merged it, and the date.
Most teams can answer question one for maybe 60% of their repository and questions two through four for approximately none of it. That's the gap.
Three Failure Modes Worth Losing Sleep Over
Contamination. A model emits a block of code that closely tracks a copyleft-licensed implementation. Your license scanner runs at dependency level, not snippet level, so it waves the file through. Two years later someone's open source compliance review flags it, and now you're doing a code archaeology project under a deadline you didn't set.
Attribution. Developers paste generated snippets into files and lose the thread of which parts were assisted. When the code misbehaves, nobody knows whether the bug was authored or hallucinated — and the review that would have caught it never happened because the snippet looked plausible.
Accountability. Your employee IP assignment agreements and your AI tool's terms of service may say different things about who owns the output. Contractors complicate it further. In diligence, an acquirer wants a single coherent story, and "we think it's fine" is not that story.
Why This Is Landing Now
Two things converged. First, AI-assisted development went from an experiment to the default workflow in about eighteen months, and most teams rolled it out through individual tool subscriptions rather than an engineering policy. Second, the buyers and investors doing diligence have caught up — they've now seen enough messy deals that the questionnaire language is standardizing.
A signed commit history is no longer sufficient. The merge commit says a human clicked a button. It says nothing about what the human read before clicking.
A Provenance Practice a Ten-Person Team Can Actually Keep
You don't need a governance department. You need four cheap habits.
1. Use commit trailers
The same mechanism that gives you Signed-off-by can carry Assisted-by: <tool> <version> and Prompt-Ref: <id>. It's two lines in a commit template, and it's machine-readable down the road. Any tooling that parses git metadata will pick it up without you writing a parser.
2. Log prompts that produce anything structural
Not every autocomplete. But anything that generates a function, a migration, a schema, a config block, or a non-trivial test should have a referenceable prompt — a shared snippet library or a markdown file in the repo. Ten seconds of copy-paste now saves a week of reconstruction later.
3. Make review a documented gate, not a vibe
Reviewers should be able to say: I read this, I understood it, I can maintain it. Write that expectation down. Generated code that nobody on the team can explain is a liability regardless of who technically owns it.
4. Scan snippets, not just dependencies
Snippet-level detection has gotten genuinely usable in the last year. Point one at your repo quarterly. You're looking for verbatim matches against public code, especially anything under a copyleft license.
What Should Already Be in Your Data Room
When the question comes — during a raise, an acquisition, a SOC 2 audit, or an enterprise security review — you want these ready, not assembled under pressure:
- A one-page AI usage policy stating which tools are approved, for what, and who signs off.
- A model inventory: tool, provider, version, and the current output-ownership terms — with the date you checked them, because those terms change.
- Trailer coverage on commits from the date you adopted the policy forward. Nobody expects retroactive perfection; they expect a start date and a slope.
- A third-party notice file that includes generated code attributions where applicable.
- Your contractor and vendor IP language, including anything that touches generated output.
The pattern that kills deals isn't having AI-generated code. It's having no idea which code it is. Buyers can price a known risk. They walk away from an unquantifiable one.
Start With the Diff You Merged Yesterday
Provenance feels like a big program. In practice it starts with a commit template, a shared prompt log, and one honest conversation with your team about what review means now that half the code arrives pre-typed.
The teams that build the paper trail early will treat this as a checkbox. The teams that don't will treat it as a fire drill, in the worst possible week, with someone else holding the calendar.