How to Talk to Your Robot: Keeping Coding Agents on Track

freediver1 pts0 comments

How to Talk to Your Robot: Keeping Coding Agents on Track – John Jeffers

How to Talk to Your Robot: Keeping Coding Agents on Track

23 Jul, 2026

As the maintainer of Luxury Yacht, I spend a lot of time talking to LLMs. A lot.

I wouldn't say this is fun. Honestly, a lot of it is drudgery. It's keeping the robots in line. It's waiting a long time between prompts, making sure they don't do stupid things, and that the code they spit out isn't total garbage.

No matter how much time and effort I put into documentation, agents files, skills, or whatever the hot thing is this month, LLMs only have so much context, they can't truly learn anything, and those **DO NOT IGNORE ME UNDER ANY CIRCUMSTANCES** critical instructions you carefully designed are eventually going to get dropped out of the context window to make room for who-knows-what. And that gets more likely the longer a session goes on.

Having said that, Luxury Yacht is largely written by LLMs, and I think it's a pretty good app. I don't like the term "vibe coded" because that implies that I don't care about code quality, and that is absolutely not true. I don't blindly accept whatever the robots churn out. I spend more time in optimization passes than I do in feature work, trying to make the code the best it can be, to the best of my ability as a person with far more experience in platforms and infrastructure than in software development.

With all that in mind, I'd like to share some of the things I've done that seem to help, at least a little bit. I'm not pretending to be an expert here. It's a lot of trial and error, and I have no doubt that there are things I could be doing better. We're all learning, and the AI landscape changes rapidly.

There Are No Silver Bullets<br>Let's just get this out of the way: for large, complex projects, you'll be wrangling the LLMs a lot. Keeping them on track can be difficult and requires vigilance. LLMs love to be "clever", so you'll be busy making sure that they stick to established patterns, reuse existing code, and don't reinvent yet another wheel. You'll be frequently reminding them to validate that a change they made in one subsystem doesn't have unforeseen consequences elsewhere.

Agents Files<br>Agents files are the first place an LLM looks for the lay of the land, so this is where you want to put your important rules about how you want the LLM to behave, and tell it where it can find more information.

It won't always follow these instructions, and sometimes it'll forget the very important things you put in here, but it's where to start. If you do nothing else, create an AGENTS.md file in the root of your project or repo.

Curious about what to put in AGENTS.md? Start here.

Claude has to be different<br>Unfortunately, Claude doesn't want an AGENTS.md file, it wants CLAUDE.md. If you only use Claude, put the instructions in CLAUDE.md instead of AGENTS.md. But, if you use a mix of LLMs including Claude, cover your bases by putting your instructions in the AGENTS.md file, then create a separate CLAUDE.md file with only this line:

@AGENTS.md

Using multiple agents files<br>For a large project, you might want multiple AGENTS.md files spread around the project. This can help if you're tasking an agent with working on a specific part of the app, and reduce the amount of instructions it has to read vs. dumping everything into a single agents file in the root.

For example, Luxury Yacht has an agents file in the root that talks about overarching rules for the entire project, but then has additional agents files in the backend and frontend directories with more specific rules and info about those areas of the app.

By the way, Luxury Yacht is open-source, so you can go look at the github repo to see the agents files I use. You're not going to want to use my exact files for your project, but they might give you some ideas of how to structure yours.

Documentation<br>I make sure my agents files contain info about where to find documentation for the app. Let the LLMs write their own documentation. Tell them that they are writing it for themselves, so it doesn't need to be human-friendly, but rather optimized for consumption by agents.

Every time the agent modifies the app, it shouldn't consider the task complete until it updates any relevant docs with information about the changes. Instructions for this are of course in the agents files, but I sometimes have to remind the agent to do this before closing out a task.

I put all of my documentation in a docs directory in the root. Unlike the agents files, I don't split it into frontend and backend docs because the split is not always that clean. Many systems have cross-cutting concerns. I usually let the LLMs decide how to organize the docs, since that's who they are for.

I drop a README.md into the docs directory that functions as an index to tell the agents what docs to reference. Rather than try to explain exactly what I mean, I encourage you to look at the file. As with the other...

agents files llms file claude instructions

Related Articles