AI Joe
← Blog· AI Axiom

The First Function You Write Becomes the Blueprint for All the Rest

September 15, 2026

An AI coding model does not invent a new shape for every function. It copies the nearest one it can find. That means the first version of any pattern, an error handler, a domain object, a small utility, becomes a template the model reaches for on the twelfth request and the fortieth, long after anyone remembers making a choice.

The Details:

  • Domain objects set the terms early. The first time a model defines what a "user" or an "order" looks like, that shape spreads into every function that touches it. An ambiguous field or a conflated concept does not stay contained; it gets inherited system-wide before anyone notices it was a decision at all.
  • Error handling conventions form from the first three or four functions written, not from a deliberate policy. Exceptions, typed returns, and silent logging can all coexist in one codebase simply because nobody named the convention out loud, and the model followed whatever pattern it saw first.
  • A small utility function turns into infrastructure the moment it gets imported a second time. Nobody designs it that way; it just accumulates weight through repetition until touching it means touching everything downstream.
  • Prompting habits are patterns too. A run of quick, narrow requests trains the model to keep optimizing for quick and narrow, so the shape of the first prompt in a session quietly sets the shape of the tenth.

The fix is not a linter or a new framework. It is a short, living document in the repo that shows the actual chosen shapes in code, paired with a five-minute weekly check: what did we repeat this week that nobody consciously picked? Catching a pattern at instance one costs nothing. Catching it at instance forty means rewriting eleven files to fix a decision nobody remembers making.

Bottom Line: In AI-assisted codebases, the first instance of a pattern is never just code; it is a template. Name it on purpose or the model will name it for you.

Enjoy this article?

Listen to the Claude Code Conversations radio show or join the community.