---
title: "Confirm the company owns the code · Agent Wranglers"
url: https://agentwranglers.se/playbook/due-diligence/code-and-ownership/code-ownership-rights
id: TDD-5
level: Required
risk: law
updated: 2026-10-27
build: a2a6bdfed830
tokens: 847
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Confirm the company owns the code

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Code and ownership](https://agentwranglers.se/playbook/due-diligence/code-and-ownership.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-27.

- ID: TDD-5
- Level: Required
- Chapter: [Code and ownership](https://agentwranglers.se/playbook/due-diligence/code-and-ownership.md)
- Rule: Match every person and firm that wrote code to a signed agreement that gives the company the rights to it. Report each author without one as a finding.
- Check: A script lists every commit author email in the history. Each one maps to a row in the rights table that names its agreement, or appears as a finding in the report.
- Risk: A law broken
- How: Who owns code from a contractor, an agency or a founder before the company existed depends on the contract and on national law. Code a freelancer wrote without a written transfer may still belong to them. List the authors from the git history, and match each to an employment contract, a contractor agreement or a transfer of rights. Open source code follows [List the licences of the code and every dependency](https://agentwranglers.se/playbook/due-diligence/code-and-ownership/licence-inventory.md), and outside contributions follow [Record each contributor's right to submit](https://agentwranglers.se/playbook/open-source/contributions/contributor-sign-off.md). A lawyer judges the gaps, and the review lists them.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### Shell example

```sh
# Every author in the history, with commit count, for the rights table
git log --all --format='%aE' | sort | uniq -c | sort -rn
```

## Sources

- [US Copyright Office Circular 30 on works made for hire](https://www.copyright.gov/circs/circ30.pdf)

## Related rules

- TDD-6 [List the licences of the code and every dependency](https://agentwranglers.se/playbook/due-diligence/code-and-ownership/licence-inventory.md) in Technical due diligence
- OSS-9 [Record each contributor's right to submit](https://agentwranglers.se/playbook/open-source/contributions/contributor-sign-off.md) in Open source maintenance
- TDD-24 [Keep a technical data room ready](https://agentwranglers.se/playbook/due-diligence/preparing-to-sell/technical-data-room.md) in Technical due diligence

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/due-diligence/code-and-ownership/code-ownership-rights">Agent Wranglers technical due diligence playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Build the product from the company's own repository](https://agentwranglers.se/playbook/due-diligence/code-and-ownership/build-from-own-repository.md)
- Next: [List the licences of the code and every dependency](https://agentwranglers.se/playbook/due-diligence/code-and-ownership/licence-inventory.md)
- [Code and ownership](https://agentwranglers.se/playbook/due-diligence/code-and-ownership.md)
