About Justin Lerma: AI educator and thought leader focused on the intersection of technology and human performance. Views are my own.

Disclaimer: The views expressed in this publication are personal opinions and do not represent the positions of any employer or affiliate.

© 2025 Justin Lerma. All rights reserved. Unauthorized reproduction or distribution of this content without express written permission is prohibited.

Think Like an Engineer, Build With AI. Part One: Context Comes Before Code

Share
Think Like an Engineer, Build With AI. Part One: Context Comes Before Code
Before AI can build the right thing, you have to lay the foundation: who it’s for, what they need, and what success looks like.

AI has made it possible for people who are not engineers to build real software, automate real workflows, and hand real decisions to a machine. Most of them are getting mediocre results, and it is not because the tools are weak. It is because nobody taught them how engineers organize work. Engineers learned a long time ago that a system is only as good as the clarity you give it. With AI, that lesson now applies to everyone.

This series takes a handful of software engineering principles and translates them for the average person who wants to use AI seriously. The running example is ANIMA, a coaching app I built for strongman, the sport where athletes lift, carry, and pull very heavy objects in competition. I built it with Claude Code and Claude Cowork, two AI tools from Anthropic that write code and edit files on your computer when you tell them what to do. I am not an engineer. I came to this from training, from launching products at Amazon, and from philosophy, and everything in these posts is what I had to learn end to end to make it work.

Part one is about context: what you need to know before you open the AI, and how to get it out of your head and onto the page. The later parts build on it, covering the files that give the AI a memory, the work orders that keep you in control of changes, and the rules that shape how the AI makes decisions.

The AI built the wrong thing

When I started ANIMA, the AI did exactly what you would expect. It started building a training plan generator. Tell it your lifts, your bodyweight, your goal, and it would hand you a program. That is the obvious feature. It is what every fitness app does.

It was wrong. Not broken, wrong. I was deep in training for a national strongman competition when I saw it, and I did not need anything telling me what to do. I needed help tracking my specific weaknesses and understanding how to build them out. That is what competitive athletes are actually after. Being competitive already puts them outside the average, and the average is exactly where AI is trained to pull people. My understanding of the problem shifted right there: the app was not a coach that hands you a plan. It was a tool that lets a coach or athlete see more and stay in charge.

The AI got hundreds of small things wrong along the way. The one that mattered most, and it was not the AI’s fault: it had no way of knowing who the customer was. I did. The fix was not a better tool. The fix was getting what was in my head out of my head.

Context is the raw material

Here is the first principle, and it is not technical at all. AI is only as good as the context you bring to it. Engineers have a blunt phrase for this: garbage in, garbage out. If you hand an AI a vague problem, it fills the gaps with the most average answer available, because that is what it was trained on. Average is the enemy when you are building something specific.

I had an unfair advantage on ANIMA. I have trained strongman for years. I knew the sport, I knew the goal, and I knew the customer down to how they think about a bad training day. The rest came from a habit I picked up at Amazon called working backwards, where I launched six programs at a global level and watched each one grow and evolve over years while staying in love with the problem it solved. Amazon has written about it publicly and two former executives wrote a book by that name, so none of this is secret. The idea is simple: start from the customer and the finished result, then work back to what you need to build.

Before I wrote a single instruction for the AI, I could answer five questions.

  1. Who exactly is this for?
  2. What problem or opportunity do they have?
  3. What is the single most important benefit to them?
  4. How do I know that is what they need?
  5. What does it look like when it works?

Those five answers collapse into one sentence. For ANIMA it reads like this:

ANIMA is for near elite athletes and coaches in specialized sports like strongman who want to stay in control of their training while getting full visibility into the athlete, daily trends and insights, and a way to stress test a decision before committing to it, none of which a generic program can give them.

If you have played the video game Halo or read the books, you already know the shape of this. Master Chief, the soldier you play, carries an AI named Cortana who can see everything about him and everything around him. She does not fight for him. She gives him the full picture and a second opinion before he commits, and the decision stays his. That is ANIMA. Read the sentence again and notice what it rules out. It rules out a plan generator. The pivot that took me weeks to make was sitting in the customer sentence the whole time. I just had not written it down yet.

The problem: the AI forgets everything

Here is the part nobody tells you when you start. Every conversation with an AI starts with everything it knows about the world and nothing about you or the specific problem in front of it. The general knowledge is always there. The context is not. Close the window and it forgets your customer, your decisions, and the mistake it made yesterday. You can repeat yourself every session, and most people do, which is why most people stall.

Software engineers solved this problem a long time ago, long before AI. They write things down in a few specific files that live next to the project, and those files become the memory. You do not need to be an engineer to borrow the habit. You need two files.

The fix: two files

The rulebook. Engineers using Claude Code call this file CLAUDE.md. Think of it as an employee handbook for the AI. It holds the standing rules for how you want the work done: what to always do, what never to touch, how to hand things back to you. You write a rule once and it applies to every session after that. Mine started with three lines. It grows every time something goes wrong, which is the point.

The blueprint. Engineers call this the spec, short for specification. Think of it as the plan of the building. It says what you are building, who it is for, and what has already been decided. The first line of your blueprint is the customer sentence you just wrote. Once something is in the blueprint, it is settled. The AI builds against it instead of guessing.

Neither file is finished when you write it. Both evolve as you spend more time with the problem and your understanding of it sharpens. Every new insight becomes a line in one of them, and every mistake becomes a rule, so the files end up holding everything you have learned and the AI never has to relearn it. My ANIMA blueprint does not say what it said on day one. It says what I know now.

That is it for now. Two files. The rest of the structure comes later in this series, and you will add it when the project is big enough to need it, not before.

Why this is really about judgment

I studied philosophy before I ever shipped a product, and this is where the two worlds meet. Writing a rulebook for an AI is shaping a small world that has to follow your rules. Philosophers have trained for that for centuries. It is called a thought experiment. The philosopher Immanuel Kant tested a rule by asking what would happen if everyone followed it all the time. You will ask the same thing of every line in your rulebook: if the AI followed this every single time, what would break?

Engineers have their own name for the same skill. They call it systems thinking: run the design forward in your head, watch how the parts interact, and find where it breaks before reality finds it for you. The philosopher and the engineer arrive at the same move from different directions. It is the thing I have been best at in every product I have launched, and I learned it from thought experiments long before I ever shipped anything.

That question is not technical. It is judgment. The tools are new, but the faculty they demand is old, and everyone is about to need it more intentionally than they ever have.

Do this before you open the AI

Take twenty minutes and answer the five questions above for one problem you want AI to help with. Then write the one sentence. Do not open any AI tool until the sentence is done. When you do open it, paste that sentence in first and tell the AI it is the first line of the blueprint.

That sentence is the first piece of what I call a command center: a small set of files you will build over this series that holds your thinking and tells the AI how to work. By the end, you will have a structure that handles the problem you have today and keeps working as the problem changes shape.

The AI will always reach for the obvious feature first. Your sentence is how you stop it.

Next in the series

Part two covers what happens when the project outgrows one conversation: how to keep the AI from inventing its own filing system, and how to hand work from one session to the next without losing anything.


About Justin Lerma: AI educator and thought leader focused on the intersection of technology and human performance. Views are my own.

Disclaimer: The views expressed in this publication are personal opinions and do not represent the positions of any employer or affiliate.

© 2025 Justin Lerma. All rights reserved. Unauthorized reproduction or distribution of this content without express written permission is prohibited.