Essay
25

Essay · Published Mar 15, 2025

Public Code Gives AI More Context to Work With

Public libraries give coding agents examples, documentation, and discussions they can retrieve. Private APIs must supply that context themselves.

A field-guide drawing of a trail backpack, map, and notebook
In this article1 section

Coding agents are better around popular public libraries because those libraries leave evidence everywhere: source, documentation, issues, examples, and discussions. Training may contribute, but retrieval and the context available during a session matter too.

Private code is not automatically opaque. An agent can read the repository and follow good local documentation. The disadvantage is that a private SDK must provide its own context; a public library arrives with years of examples and solved mistakes.

The loop is unfair on purpose

Open code creates a useful loop. More examples make the library easier for people and agents to use. More use produces issues, fixes, and explanations. Closed code can build the same loop internally, but somebody has to fund and maintain it.

I am not saying every company should open its core IP. If secrecy protects the business, keep it private and invest in documentation, tests, and repository instructions. If the client library is merely a doorway into a hosted service, opening it can improve adoption without giving away the service itself.

I notice the difference when moving between public ecosystems and private monorepos. Public patterns need less explanation. Private ones depend more heavily on repository guidance such as CLAUDE.md. Private code is not the problem. Missing context is.

One quick signal

Did this earn your time?

What was missing?

Thanks. That gives me something concrete to check.